Commit 5c1300c9 by 李少勇

修改setmod内的联动方法交互方式

parent 69a10603
......@@ -110,5 +110,13 @@ export default {
concur: model.liaccv.concur,
};
return params
},
// 公共组件setmod中dsp字段改变,触发联动时候的入参
buildSetgllAccts (model, trnName, setglg) {
let params = {
...this.buildCommonData(model, trnName),
setglg
};
return params
}
}
\ No newline at end of file
......@@ -6,7 +6,6 @@ import glentry from '~/components/business/glentry/event';
import engp from '~/components/business/engp/event';
import docpan from '~/components/business/docpan/event';
import ccvpan from '~/components/business/ccvpan/event';
import GitopnRequest from '../model/GitopnRequest';
export default {
mixins: [commonFunctions],
......@@ -186,5 +185,22 @@ export default {
handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName);
},
// 公共组件setmod处理方式改变触发联动
changeSetmodModel (emitParams) {
let reqParams = {}
switch (emitParams.code) {
case 'processMethods':
reqParams = buildFn.buildSetglg(this.model, this.trnName);
this.calcPayDetail(reqParams)
break
case 'changeDsp':
this.model.setmod.setglg.setgll = emitParams.list;
reqParams = buildFn.buildSetgllAccts(this.model, this.trnName, emitParams.list);
this.setgllAccts(reqParams, emitParams.index)
break
default:
return
}
}
},
};
......@@ -43,7 +43,11 @@
<!--PD000027 -->
<el-tab-pane label="费用/账务" name="setpan">
<c-content>
<m-setmod :model="model" :codes="codes" />
<m-setmod
:model="model"
:codes="codes"
@changeSetmodModel="changeSetmodModel"
/>
</c-content>
</el-tab-pane>
......
import Api from '~/service/Api';
import buildFn from '~/business/gitopn/event/buildCommons.js'
export default {
async processSetpan(setfegRequest, fn) {
let loading = this.loading('正在请求试算费用');
let objtyp = setfegRequest.rec.objtyp;
......@@ -25,29 +21,21 @@ export default {
}
loading.close()
},
async calcPayDetail() {
async calcPayDetail(setglgRequest) {
let loading = this.loading('正在请求试算账务');
let rulePath = '/service/gid/setmod/calcPayDetail';
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
let rtnmsg = await Api.post(rulePath, setglgRequest);
let rtnmsg = await Api.post('/service/gid/setmod/calcPayDetail', setglgRequest);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.setglg = rtnmsg.data.setglg;
}
loading.close()
},
async setgllAccts(index, setgll) {
this.model.setmod.setglg.setgll = setgll;
async setgllAccts(reqParams, index) {
let loading = this.loading();
let rulePath = '/service/gid/setmod/setgll/' + index + '/accts';
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
setglgRequest.setglg = {setgll: setgll};
let rtnmsg = await Api.post(rulePath, setglgRequest);
let rtnmsg = await Api.post(rulePath, reqParams);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.setglg = rtnmsg.data.setglg;
}
loading.close()
}
}
......@@ -357,7 +357,7 @@
<template #default="scope">
<c-select
v-model="scope.row.dsp"
@change="dispDefault(scope.$index + 1)"
@change="changeProcessMethods('processMethods')"
>
<el-option
v-for="item in codes.setfeldsp"
......@@ -524,7 +524,7 @@
</c-select>
<c-select
v-model="scope.row.dsp"
@change="dspChange(scope.$index)"
@change="changeDsp(scope.$index, 'changeDsp')"
v-if="scope.row.debcdtflg == 'C'"
>
<el-option
......@@ -1454,9 +1454,13 @@ export default {
this.dialog = row;
});*/
},
dispDefault(index) {
let vm = this;
vm.root.calcPayDetail();
// 处理方式改变
changeProcessMethods(code) {
this.$emit('changeSetmodModel', {
code
})
// let vm = this;
// vm.root.calcPayDetail();
},
// 第二个表格
detail2(index, row) {
......@@ -1572,9 +1576,13 @@ export default {
});
}
},
async dspChange(index) {
const vm = this;
vm.root.setgllAccts((index + 1), vm.stmData3);
async changeDsp(index, code) {
this.$emit('changeSetmodModel', {
code,
index: (index + 1),
list: this.stmData3
})
// this.root.setgllAccts((index + 1), this.stmData3);
// let rtnmsg = await this.executeDefault(
// "setmod.setglg.setgll(" + (index + 1) + ").dsp"
......
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