Commit 4b9d347a by chengzhuoshen

前端liaall,setmod解耦,与后端联调代码

parent 80e5eded
import commonDeclare from "./commonDeclare" import commonDeclare from "./commonDeclare"
import commonApi from "./commonApi" import commonApi from "./commonApi"
import Api from "~/service/Api";
import settleProcess from "./settleProcess" import settleProcess from "./settleProcess"
import Api from "~/service/Api" import liaallProcess from "./liaallProcess"
import commonGlobalSearch from "./commonGlobalSearch"; import commonGlobalSearch from "./commonGlobalSearch";
import Utils from "~/utils" import Utils from "~/utils"
import _ from "~/utils/Lodash.js"; import _ from "~/utils/Lodash.js";
...@@ -34,7 +35,7 @@ const tabNameToRulePathMapping = { ...@@ -34,7 +35,7 @@ const tabNameToRulePathMapping = {
} }
export default { export default {
mixins: [commonApi, commonDeclare, commonGlobalSearch, settleProcess], mixins: [commonApi, commonDeclare, commonGlobalSearch, settleProcess, liaallProcess],
data: function () { data: function () {
return { return {
// 弹框回填 // 弹框回填
...@@ -156,11 +157,28 @@ export default { ...@@ -156,11 +157,28 @@ export default {
if (this.isInDisplay) { if (this.isInDisplay) {
return return
} }
let name = tab.name let name = tab.name;
let setpanFlag = 'N';
if (name === "engp,setpan,glepan" && this.trnName === "litopn") { if (name === "engp,setpan,glepan" && this.trnName === "litopn") {
name = "engp"; //组数据,发post请求 ①先表外②结算③分录
setpanFlag = 'Y'; const loading = this.loading("正在请求数据")
let rulePath = "/service/liaall/assertLiaall";
this.buildLiaall();
let rtnmsg = await Api.post(rulePath, this.liaall);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.liaall, rtnmsg.data);
//assertSetmod
this.buildSettle();
this.settle.liaall = rtnmsg.data; //补充表外数据
rulePath = "/service/setmod/assertSetmod";
rtnmsg = await Api.post(rulePath, this.settle);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.setmod, rtnmsg.data);
//请求分录信息 待开发
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
}
loading.close();
return;
} else if (name === "setpan,glepan" && this.trnName === "cptopn") { } else if (name === "setpan,glepan" && this.trnName === "cptopn") {
this.processSetpan(); this.processSetpan();
return; return;
...@@ -243,9 +261,6 @@ export default { ...@@ -243,9 +261,6 @@ export default {
this.executeRule(rulePath).then(res => { this.executeRule(rulePath).then(res => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.updateModel(res.data); this.updateModel(res.data);
if (setpanFlag === "Y") {
this.processSetpan();
}
} }
}) })
// } // }
......
import Settle from "Liaall.js"; import Liaall from "../model/Public/Liaall.js";
import Api from "~/service/Api"; import Api from "~/service/Api";
import Utils from "~/utils"; import Utils from "~/utils";
...@@ -41,33 +41,6 @@ export default { ...@@ -41,33 +41,6 @@ export default {
} }
return ptspta; return ptspta;
}, },
buildLiaallg(ptsptaObj) {
let ptspta = {};
let pts = ptsptaObj.pts;
let adr = ptsptaObj.adr;
ptspta.rol=pts.rol;
ptspta.name=pts.nam;
ptspta.ptyinr=pts.ptyinr;
ptspta.ptainr=pts.ptainr;
ptspta.extkey=pts.extkey;
ptspta.dftdsp=pts.dftdsp;
ptspta.dftcur=pts.dftcur;
ptspta.dftact=pts.dftact;
ptspta.dftfeecur=pts.dftfeecur;
ptspta.dftactptainr=pts.dftactptainr;
//ptspta.dftselrol=
ptspta.glggrpflg=pts.glggrpflg;
//ptspta.pansta=
//ptspta.ptytyp=
//ptspta.ptyextkey=
ptspta.adrblk=pts.adrblk;
//ptspta.rolsetflg=
if (adr !== null && adr !== undefined) {
ptspta.adrbic=adr.bic;
ptspta.adrLoccty=adr.loccty;
}
return ptspta;
},
buildLiaall() { buildLiaall() {
let rec = {}; let rec = {};
let cbsMap = {}; let cbsMap = {};
...@@ -100,71 +73,20 @@ export default { ...@@ -100,71 +73,20 @@ export default {
"amt":this.model.lidgrp.cbs.max2.amt, "amt":this.model.lidgrp.cbs.max2.amt,
}; };
this.settle.cbsMap = cbsMap; this.liaall.cbsMap = cbsMap;
let ptsptaList = []; let ptsptaList = [];
let ptydetList = [];
if (this.model.lidgrp.apl.pts.extkey !== "") { if (this.model.lidgrp.apl.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.apl)); ptsptaList.push(this.buildPtspta(this.model.lidgrp.apl));
ptydetList.push(this.buildPtydet(this.model.lidgrp.apl));
} }
if (this.model.lidgrp.adv.pts.extkey !== "") { if (this.model.lidgrp.adv.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.adv)); ptsptaList.push(this.buildPtspta(this.model.lidgrp.adv));
ptydetList.push(this.buildPtydet(this.model.lidgrp.adv));
} }
if (this.model.lidgrp.ben.pts.extkey !== "") { if (this.model.lidgrp.ben.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben)); ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben));
ptydetList.push(this.buildPtydet(this.model.lidgrp.ben));
} }
this.liaall.ptsList = ptsptaList; this.liaall.ptsList = ptsptaList;
this.liaall.ptydet = ptydetList;
} else if (this.trnName === "cptopn") {
rec.objtyp = "CPD";
rec.ownref = this.model.cpdgrp.rec.ownref;
rec.opndat = this.model.cpdgrp.rec.opndat;
rec.branchInr = this.model.cpdgrp.rec.branchinr;
rec.detchgcod = this.model.cpdgrp.rec.detchgcod;
rec.trdinr = this.model.cpdgrp.rec.trdinr;
rec.chato = this.model.cpdgrp.rec.chato;
//rec.paytyp = this.model.cpdgrp.rec.paytyp;
rec.paytyp = "O";//固定值 O 表示汇出
rec.swftyp = this.model.cpdgrp.rec.swftyp;
rec.valdat = this.model.cpdgrp.rec.valdat;
rec.opndat = this.model.cpdgrp.rec.opndat;
this.liaall.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.cpdgrp.cbs.nom1.cur,
"amt":this.model.cpdgrp.cbs.nom1.amt,
};
cbsMap.MAX = {
"cur":this.model.cpdgrp.cbs.max.cur,
"amt":this.model.cpdgrp.cbs.max.amt,
};
this.liaall.cbsMap = cbsMap;
let ptsptaList = [];
//let ptydetList = [];
if (this.model.cpdgrp.orc.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.cpdgrp.orc));
//ptydetList.push(this.buildPtydet(this.model.cpdgrp.orc));
}
if (this.model.cpdgrp.ori.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.cpdgrp.ori));
//ptydetList.push(this.buildPtydet(this.model.cpdgrp.ori));
}
if (this.model.cpdgrp.pye.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.cpdgrp.pye));
//ptydetList.push(this.buildPtydet(this.model.cpdgrp.pye));
}
this.liaall.ptsList = ptsptaList;
this.Liaall.liaallg = this.model.Liaall.liaallg;
//this.settle.ptydet = ptydetList;
} }
// this.liaall.doceotList=this.buildDoceot();
this.liaall.transName = this.trnName; this.liaall.transName = this.trnName;
if (!!window.sessionStorage.userId) { if (!!window.sessionStorage.userId) {
this.liaall.userId = window.sessionStorage.userId; this.liaall.userId = window.sessionStorage.userId;
...@@ -176,14 +98,13 @@ export default { ...@@ -176,14 +98,13 @@ export default {
async processLiaall() { async processLiaall() {
//组数据,发post请求 //组数据,发post请求
const loading = this.loading("正在请求数据") const loading = this.loading("正在请求数据")
const rulePath = "/liaall/assertLiaall"; let rulePath = "/service/liaall/assertLiaall";
this.buildLiaall(); this.buildLiaall();
let rtnmsg = await Api.post(rulePath, this.settle); let rtnmsg = await Api.post(rulePath, this.liaall);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.liaall, rtnmsg.data); Utils.copyValueFromVO(this.model.liaall, rtnmsg.data);
this.model.liaall.liaallg = rtnmsg.data.liaallg;
} }
loading.close() loading.close();
} }
} }
......
...@@ -40,7 +40,7 @@ export default class Liaall { ...@@ -40,7 +40,7 @@ export default class Liaall {
} }
}, },
ptsList: [], ptsList: [],
liaallg: [] liaallg: [],
} }
} }
} }
\ No newline at end of file
...@@ -54,12 +54,10 @@ export default class Settle { ...@@ -54,12 +54,10 @@ export default class Settle {
setfeg: { setfeg: {
setfel: [] setfel: []
}, },
glemod: {
gleshwstm: {}
},
setamt:"", // 扣费后付款金额 .setmod.setamt setamt:"", // 扣费后付款金额 .setmod.setamt
redamt:"", // 扣减金额 .setmod.redamt redamt:"", // 扣减金额 .setmod.redamt
refdat:"", refdat:"",
liaall:{}
} }
} }
} }
\ No newline at end of file
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