Commit ee4956db by chengzhuoshen

前端glemod解耦,与后端联调代码(剥离liaall,setmod,glemod)

parent 4b9d347a
......@@ -6,6 +6,7 @@ import liaallProcess from "./liaallProcess"
import commonGlobalSearch from "./commonGlobalSearch";
import Utils from "~/utils"
import _ from "~/utils/Lodash.js";
import Glentry from "../model/Public/Glentry";
const tabNameToRulePathMapping = {
"setpan": "setmod.setpan",
......@@ -173,14 +174,51 @@ export default {
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;
//请求分录信息
let glentry = new Glentry().data;
glentry.transName = this.settle.transName;
glentry.userId = this.settle.userId;
glentry.rec = this.settle.rec;
glentry.cbsMap = this.settle.cbsMap;
glentry.ptsList = this.settle.ptsList;
glentry.setfog = rtnmsg.data.setfog;
glentry.setfeg = rtnmsg.data.setfeg;
glentry.setglg = rtnmsg.data.setglg;
glentry.liaallg = this.settle.liaall.liaallg;
rulePath = "/service/gle/assertGle";
rtnmsg = await Api.post(rulePath, glentry);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
}
}
loading.close();
return;
} else if (name === "setpan,glepan" && this.trnName === "cptopn") {
this.processSetpan();
//组数据,发post请求 ①结算②分录
const loading = this.loading("正在请求数据")
this.buildSettle();
let rulePath = "/service/setmod/assertSetmod";
let rtnmsg = await Api.post(rulePath, this.settle);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.setmod, rtnmsg.data);
//请求分录信息
let glentry = new Glentry().data;
glentry.transName = this.settle.transName;
glentry.userId = this.settle.userId;
glentry.rec = this.settle.rec;
glentry.cbsMap = this.settle.cbsMap;
glentry.ptsList = this.settle.ptsList;
glentry.setfog = rtnmsg.data.setfog;
glentry.setfeg = rtnmsg.data.setfeg;
glentry.setglg = rtnmsg.data.setglg;
rulePath = "/service/gle/assertGle";
rtnmsg = await Api.post(rulePath, glentry);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
}
loading.close();
return;
}
const nms = name.split(",")
......
export default class Glentry {
constructor() {
this.data = {
transName: "",
userId: "",
rec: {
inr: "",
objtyp: "",
ownref: "",
opndat: "",
trninr: "",
branchInr: "",
trnObjType: "",
trnObjInr: "",
trnCmtflg: "",
trnGlenmb: "",
swftyp: "",
fintyp: ""
},
cbsMap: {
OPN2: {
cur: "",
amt: ""
},
NOM1: {
cur: "",
amt: ""
},
OPN1: {
cur: "",
amt: ""
},
MAX: {
cur: "",
amt: ""
},
MAX2: {
cur: "",
amt: ""
}
},
ptsList: [],
setfog: {},
setfeg: {},
setglg: {},
liaallg: []
}
}
}
\ 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