Commit 93e4fc43 by chenwenbin

// 表外记账,费用账务,会计分录前后端联调优化

parent 27cf2a46
......@@ -198,8 +198,6 @@ export default {
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
setglgRequest.setglg = {setgll: emitParams.list};
this.setgllAccts(setglgRequest, index);
emitParams.list = this.model.setmod.setglg.setgll || [{value: '', lable:''}];
emitParams.list[index-1].act = emitParams.list[index-1].acts[0].value;
break
default:
return
......
......@@ -9,8 +9,10 @@ export default {
this.model.setmod.ref = rtnmsg.data.ref;
this.model.setmod.doccur = rtnmsg.data.doccur;
this.model.setmod.docamt = rtnmsg.data.docamt;
this.srcSetgllIndex = this.model.setmod.setfeg.setfel.length;
// 试算账务
if (this.model.setmod.setfeg.setfel.length > 0) {
if (this.srcSetgllIndex > 0) {
loading = this.loading('正在请求试算账务');
let setglgRequestParams = fn()
let res = await Api.post(`/service/${ objtyp.toLowerCase() }/setmod/calcPayDetail`, setglgRequestParams);
......
......@@ -372,9 +372,15 @@ export default {
},
computed: {
formData() {
let formDataTmp = this.model.setmod.setfeg.setfel[this.idx];
formDataTmp.fecp1.taxrat = formDataTmp.fecp1.taxrat || '';
return formDataTmp
let formDataTmp = this.model.setmod.setfeg.setfel[this.idx];
formDataTmp.fecp1 = formDataTmp.fecp1 ? formDataTmp.fecp1 : {};
formDataTmp.fecp1.taxrat = formDataTmp.fecp1.taxrat ? formDataTmp.fecp1.taxrat : '';
formDataTmp.wrkfec = formDataTmp.wrkfec ? formDataTmp.wrkfec : {};
formDataTmp.wrkfec.ratcur = formDataTmp.wrkfec.ratcur ? formDataTmp.wrkfec.ratcur : 0;
return formDataTmp;
}
},
methods: {
......
......@@ -421,7 +421,7 @@
style="padding: 4px"
class="el-icon-plus"
size="mini"
@click="addRowSetfel(scope)"
@click="addRowSetfel()"
>
</c-button>
<c-button
......@@ -429,7 +429,7 @@
circle
class="el-icon-minus"
size="mini"
@click="removeRowSetfel(scope)"
@click="removeRowSetfel()"
>
</c-button>
</template>
......@@ -1417,7 +1417,14 @@ export default {
}
this.stmData3 = stm;
},
deep: true
},
'model.setmod.setfeg.setfel': {
handler(val, oldVal) {
this.$emit('changeSetmodModel', {code: 'processMethods'});
},
deep: true
}
},
methods: {
//第一个表格
......@@ -1428,7 +1435,8 @@ export default {
},
removeRowSetfol() {
this.model.setmod.setfog.setfol.shift();
this.defaultFunction();
// this.defaultFunction();
this.$emit('changeSetmodModel', {setmod: this.model.setmod});
},
saveDialog() {
this.dialogVisible = false;
......@@ -1436,40 +1444,41 @@ export default {
},
// 第二个表格
addRowSetfel() {
let newRow = { ...this.dialog2 };
// 复制最新一条数据
let oldsetfel = this.root.model.setmod.setfeg.setfel;
if (!oldsetfel || oldsetfel.length == 0) {
return;
}
let newRow = JSON.parse(JSON.stringify(oldsetfel[oldsetfel.length-1]));
this.model.setmod.setfeg.setfel.splice(0, 0, newRow);
this.defaultFunction();
},
removeRowSetfel() {
this.model.setmod.setfeg.setfel.shift();
this.defaultFunction();
let curLen = this.model.setmod.setfeg.setfel.length ;
if (curLen <= this.root.srcSetgllIndex) {
// 原始计算数据不能删除
this.$notify.error({ title: '错误', message: '原始计算数据,该记录无法删除!' });
return;
}
this.model.setmod.setfeg.setfel.pop();
},
detail1(index, row) {
this.index = index;
this.dialogVisible = true;
this.dialog = row;
/*this.executeDefault('setfel.det').then((res) => {
this.index = index;
this.dialogVisible = true;
this.dialog = row;
});*/
},
// 处理方式改变
changeProcessMethods(code) {
this.$emit('changeSetmodModel', {
code
})
// let vm = this;
// vm.root.calcPayDetail();
},
// 第二个表格
detail2(index, row) {
const that = this;
that.index = index;
that.$refs.setpanDialog.visiable = true;
that.dialog2 = row;
/* const rule = 'setmod.setfeg.setfel(' + (index + 1) + ').det';
that.root.model.setmod.setfeg.setfel[index] = row;
setTimeout(() => { that.$refs.setpanDialog.visiable = true }, 100);
/* const rule = 'setmod.setfeg.setfel(' + (index + 1) + ').det';
that.executeRule(rule).then((res) => {
that.index = index;
that.$refs.setpanDialog.visiable = true;
......@@ -1486,10 +1495,7 @@ export default {
async handleDetail(index, row) {
const that = this;
that.index = index;
that.$refs.detpDialog.visiable = true;
this.detpDialogVisible = true;
that.dialog3 = that.model.setmod.setglg.setgll[index];
debugger
that.rattyp = that.strCalCode(that.dialog3.rattyp, that.codes.ratetype);
that.dcbrattyp = that.strCalCode(
that.dialog3.dcbrattyp,
......@@ -1499,6 +1505,14 @@ export default {
that.dialog3.scbrattyp,
that.codes.ratetype
);
that.dialog3.setgrp = that.dialog3.setgrp ? that.dialog3.setgrp : {act: {}};
that.dialog3.setgrp.act = that.dialog3.setgrp.act ? that.dialog3.setgrp.act : {pts: {extkey: ''}};
that.dialog3.setgrp.act.pts = that.dialog3.setgrp.act.pts ? that.dialog3.setgrp.act.pts : {extkey: ''};
that.dialog3.actp = that.dialog3.actp ? that.dialog3.actp : {};
that.dialog3.actp.ptsget = that.dialog3.actp.ptsget ? that.dialog3.actp.ptsget : {sdamod: {seainf: ''}};
that.$refs.detpDialog.visiable = true;
that.detpDialogVisible = true;
// const rule = "setmod.setglg.setgll(" + (index + 1) + ").det";
// let rtnmsg = await this.executeRule(rule);
......@@ -1547,7 +1561,13 @@ export default {
}
},
async accucrChange(index) {
let rtnmsg = await this.executeRule(
let code = 'changeDsp';
this.$emit('changeSetmodModel', {
code,
index: (index + 1),
list: this.stmData3
})
/*let rtnmsg = await this.executeRule(
'setmod.setglg.setgll(' + (index + 1) + ').acccur'
);
if (rtnmsg.respCode == SUCCESS) {
......@@ -1559,10 +1579,16 @@ export default {
if (res.respCode == SUCCESS) this.updateModel(res.data);
});
});
}
}*/
},
async fmtaccamtChange(index) {
let rtnmsg = await this.executeRule(
let code = 'changeDsp';
this.$emit('changeSetmodModel', {
code,
index: (index + 1),
list: this.stmData3
})
/* let rtnmsg = await this.executeRule(
'setmod.setglg.setgll(' + (index + 1) + ').fmtaccamt'
);
if (rtnmsg.respCode == SUCCESS) {
......@@ -1574,7 +1600,7 @@ export default {
if (res.respCode == SUCCESS) this.updateModel(res.data);
});
});
}
}*/
},
async changeDsp(index, code) {
this.$emit('changeSetmodModel', {
......
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