Commit 854557dc by denyu

Merge remote-tracking branch 'origin/master'

parents c625e653 c1584dd1
...@@ -35,10 +35,14 @@ export default { ...@@ -35,10 +35,14 @@ export default {
let data = Utils.flatObject(this.model) let data = Utils.flatObject(this.model)
return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath,{...data,params}) return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath,{...data,params})
}, },
checkAll(params){ async checkAll(params){
params = params||{} params = params||{}
let data = Utils.flatObject(this.model) let data = Utils.flatObject(this.model)
return Api.post(this.declareParams.trnName+"/checkAll",{...data,params}) const res = await Api.post(this.declareParams.trnName+"/checkAll",{...data,params})
if (res.respCode === SUCCESS) {
this.changeFormValidateDisabled(false);
}
return res
}, },
pedding(params){ pedding(params){
params = params||{} params = params||{}
......
...@@ -5,22 +5,31 @@ export default { ...@@ -5,22 +5,31 @@ export default {
mixins: [commonApi,commonDeclare], mixins: [commonApi,commonDeclare],
data: function () { data: function () {
return { return {
defFlag:true
} }
}, },
created: function () {}, // created: function () {},
mounted() { created() {
if(!this.isInDisplay){ if(!this.isInDisplay){
this.ruleWatcher() this.ruleWatcher()
this.ruleCheck() this.ruleCheck()
} }
}, },
methods: { methods: {
openWatch(flag){
this.defFlag = !!flag
},
ruleWatcher() { ruleWatcher() {
if(!this.defaultRules) if(!this.defaultRules)
return return
const that = this; const that = this;
Object.keys(that.defaultRules).forEach(key => { Object.keys(that.defaultRules).forEach(key => {
that.$watch("model." + key, _.debounce(that.defaultRules[key], 1000)) let func = function(){
if(!that.defFlag){
that.defaultRules[key].apply(that)
}
}
that.$watch("model." + key, _.debounce(func, 1000))
}) })
}, },
ruleCheck() { ruleCheck() {
...@@ -46,6 +55,13 @@ export default { ...@@ -46,6 +55,13 @@ export default {
} }
} }
this.rules = res; this.rules = res;
},
changeFormValidateDisabled(flag) {
const fields = this.$refs.modelForm.fields
for (let i = 0; i < fields.length; i++) {
const field = fields[i];
field.validateDisabled = flag
}
} }
}, },
computed:{ computed:{
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
"didgrp.rmb.pts.extkey": defaultDidgrpRmbPtsExtkey, "didgrp.rmb.pts.extkey": defaultDidgrpRmbPtsExtkey,
"setmod.dspflg": defaultSetmodDspflg, "setmod.dspflg": defaultSetmodDspflg,
"liaall.limmod.othp.det": defaultLiaallLimmodOthpDet, "liaall.limmod.othp.det": defaultLiaallLimmodOthpDet,
"mtabut.coninf.oitinf.labinftxt": defaultMtabutConinfOitinfLabinftxt, "mtabut.coninf.oitinf.labinftxt": defaultMtabutConinfOitinfLabinftxt,
"mtabut.coninf.oitset.labinftxt": defaultMtabutConinfOitsetLabinftxt, "mtabut.coninf.oitset.labinftxt": defaultMtabutConinfOitsetLabinftxt,
"ditp.benp.det": defaultDitpBenpDet, "ditp.benp.det": defaultDitpBenpDet,
"liaall.limmod.limpts.lsh": defaultLiaallLimmodLimptsLsh, "liaall.limmod.limpts.lsh": defaultLiaallLimmodLimptsLsh,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-table-column label="传送方式"> <el-table-column label="传送方式">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <c-select v-model="model.trnmod_trndoc_doceot[scope.$index]" style="width:100%" placeholder="请选择"> --> <!-- <c-select v-model="model.trnmod_trndoc_doceot[scope.$index]" style="width:100%" placeholder="请选择"> -->
<c-select v-model="model.trnmod.trndoc.doceot[scope.row.index].apflab1" style="width:100%" placeholder="请选择"> <c-select v-model="model.trnmod.trndoc.doceot[scope.row.index].apf" style="width:100%" placeholder="请选择">
<el-option v-for="item in codes.apftxt" :key="item.value" :label="item.label" <el-option v-for="item in codes.apftxt" :key="item.value" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
......
...@@ -173,13 +173,14 @@ export default { ...@@ -173,13 +173,14 @@ export default {
}, },
methods:{ methods:{
tabClick(vm){ tabClick(vm){
this.$refs.modelForm.validate(valid => { this.changeFormValidateDisabled(true)
if (valid){ // this.$refs.modelForm.validate(valid => {
console.log(1) // if (valid){
}else{ // console.log(1)
console.log(0) // }else{
} // console.log(0)
}) // }
// })
const label = vm.label const label = vm.label
if (label === "账务") { if (label === "账务") {
this.executeRule("setmod.setpan").then(res => { this.executeRule("setmod.setpan").then(res => {
...@@ -196,7 +197,8 @@ export default { ...@@ -196,7 +197,8 @@ export default {
} }
} }
}, },
created:async function(){ mounted:async function(){
this.changeFormValidateDisabled(true);
console.log("进入ditopn交易"); console.log("进入ditopn交易");
let rtnmsg = await this.init() let rtnmsg = await this.init()
if(rtnmsg.respCode == SUCCESS) if(rtnmsg.respCode == SUCCESS)
...@@ -205,9 +207,13 @@ export default { ...@@ -205,9 +207,13 @@ export default {
console.log(rtnmsg) console.log(rtnmsg)
Utils.copyValueFromVO(this.model,rtnmsg.data) Utils.copyValueFromVO(this.model,rtnmsg.data)
console.log(this.model); console.log(this.model);
if(this.isInDisplay) if(this.isInDisplay){
this.restoreDisplay() this.restoreDisplay()
}
const that = this;
this.$nextTick(() => {
that.openWatch(false);
})
} }
else else
{ {
......
...@@ -183,6 +183,24 @@ export default { ...@@ -183,6 +183,24 @@ export default {
return { return {
stmData: { stmData: {
columns: [ columns: [
"4 1 \"TRN\" 50 ",
"5 2 \"Reference\" 150",
"6 3 \"Name\" 110",
"18 5 \"MT\" 100",
"7 6 \"Creation\" 101 20 DateTime 1",
"20 7 \"Cur\" 30",
"21 8 \"Amt\" 69 2 8 1 16",
"1 9 \"Status\" 60 1 tdViewTypeEdit:0 1 SPT:STA",
"20 7 \"Cur\" 30",
"21 8 \"Amt\" 69 2 8 1 16",
"1 9 \"Status\" 60 1 tdViewTypeEdit:0 1 SPT:STA",
"8 10 \"By User\" 66",
"15 11 \"Work User\" 76",
"17 12 \"Work Branch\" 126",
"16 13 \"Last User\" 76",
"3 14 \"Info\" 50 1 20:0 1 FormatINFDSP",
"19 15 \"Key\" 90",
"10 16 \"Infotext\" 500"
], ],
data: [ data: [
] ]
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
that.init(that.model).then(res => { that.init(that.model).then(res => {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
that.model = Utils.copyValueFromVO(that.model, res.data) that.model = Utils.copyValueFromVO(that.model, res.data)
that.$refs.Menu.stmData.columns = res.data.sptstm.rows; // that.$refs.Menu.stmData.columns = res.data.sptstm.rows;
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment