Commit 854557dc by denyu

Merge remote-tracking branch 'origin/master'

parents c625e653 c1584dd1
......@@ -35,10 +35,14 @@ export default {
let data = Utils.flatObject(this.model)
return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath,{...data,params})
},
checkAll(params){
async checkAll(params){
params = params||{}
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){
params = params||{}
......
......@@ -5,22 +5,31 @@ export default {
mixins: [commonApi,commonDeclare],
data: function () {
return {
defFlag:true
}
},
created: function () {},
mounted() {
// created: function () {},
created() {
if(!this.isInDisplay){
this.ruleWatcher()
this.ruleCheck()
}
},
methods: {
openWatch(flag){
this.defFlag = !!flag
},
ruleWatcher() {
if(!this.defaultRules)
return
const that = this;
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() {
......@@ -46,6 +55,13 @@ export default {
}
}
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:{
......
......@@ -15,7 +15,7 @@ export default {
"didgrp.rmb.pts.extkey": defaultDidgrpRmbPtsExtkey,
"setmod.dspflg": defaultSetmodDspflg,
"liaall.limmod.othp.det": defaultLiaallLimmodOthpDet,
"mtabut.coninf.oitinf.labinftxt": defaultMtabutConinfOitinfLabinftxt,
"mtabut.coninf.oitinf.labinftxt": defaultMtabutConinfOitinfLabinftxt,
"mtabut.coninf.oitset.labinftxt": defaultMtabutConinfOitsetLabinftxt,
"ditp.benp.det": defaultDitpBenpDet,
"liaall.limmod.limpts.lsh": defaultLiaallLimmodLimptsLsh,
......
......@@ -10,7 +10,7 @@
<el-table-column label="传送方式">
<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.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"
:value="item.value">
</el-option>
......
......@@ -173,13 +173,14 @@ export default {
},
methods:{
tabClick(vm){
this.$refs.modelForm.validate(valid => {
if (valid){
console.log(1)
}else{
console.log(0)
}
})
this.changeFormValidateDisabled(true)
// this.$refs.modelForm.validate(valid => {
// if (valid){
// console.log(1)
// }else{
// console.log(0)
// }
// })
const label = vm.label
if (label === "账务") {
this.executeRule("setmod.setpan").then(res => {
......@@ -196,7 +197,8 @@ export default {
}
}
},
created:async function(){
mounted:async function(){
this.changeFormValidateDisabled(true);
console.log("进入ditopn交易");
let rtnmsg = await this.init()
if(rtnmsg.respCode == SUCCESS)
......@@ -205,9 +207,13 @@ export default {
console.log(rtnmsg)
Utils.copyValueFromVO(this.model,rtnmsg.data)
console.log(this.model);
if(this.isInDisplay)
if(this.isInDisplay){
this.restoreDisplay()
}
const that = this;
this.$nextTick(() => {
that.openWatch(false);
})
}
else
{
......
......@@ -183,6 +183,24 @@ export default {
return {
stmData: {
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: [
]
......
......@@ -50,7 +50,7 @@ export default {
that.init(that.model).then(res => {
//TODO 处理数据逻辑
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