Commit ef3be540 by 李少勇

公共组件内的方法整理

parent c403c11c
import TrndocRequest from "../model/TrndocRequest.js";
import Api from "~/service/Api";
import Utils from "~/utils";
import TrndocRequest from '../model/TrndocRequest.js';
import Api from '~/service/Api';
import Utils from '~/utils';
export default {
buildPtspta(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.glggrpflg=pts.glggrpflg;
ptspta.adrblk=pts.adrblk;
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.glggrpflg = pts.glggrpflg;
ptspta.adrblk = pts.adrblk;
return ptspta;
},
buildTrndocRequest() {
// 处理Litopn数据
buildTrndocLitopn () {
let trndocRequest = new TrndocRequest().data;
let rec = {};
let cbsMap = {};
if (this.trnName === "litopn") {
rec.objtyp = "LID";
rec.objtyp = 'LID';
rec.ownref = this.model.lidgrp.rec.ownref;
rec.opndat = this.model.lidgrp.rec.opndat;
rec.branchInr = this.model.lidgrp.rec.branchinr;
trndocRequest.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.lidgrp.cbs.nom1.cur,
"amt":this.model.lidgrp.cbs.nom1.amt,
'cur':this.model.lidgrp.cbs.nom1.cur,
'amt':this.model.lidgrp.cbs.nom1.amt,
};
let ptsptaList = [];
if (this.model.lidgrp.apl.pts.extkey !== "") {
if (this.model.lidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(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));
}
if (this.model.lidgrp.ben.pts.extkey !== "") {
if (this.model.lidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben));
}
trndocRequest.ptsList = ptsptaList;
} else if (this.trnName === "gitopn") {
rec.objtyp = "GID";
return trndocRequest
},
// 处理Gitopn数据
buildTrndocGitopn () {
let trndocRequest = new TrndocRequest().data;
let rec = {};
rec.objtyp = 'GID';
rec.ownref = this.model.gidgrp.rec.ownref;
rec.opndat = this.model.gidgrp.rec.opndat;
rec.expdat = this.model.gidgrp.rec.expdat;
......@@ -70,30 +74,42 @@ export default {
trndocRequest.rec = rec;
let ptsptaList = [];
if (this.model.gidgrp.apl.pts.extkey !== "") {
if (this.model.gidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.apl));
}
if (this.model.gidgrp.adv.pts.extkey !== "") {
if (this.model.gidgrp.adv.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.adv));
}
if (this.model.gidgrp.ben.pts.extkey !== "") {
if (this.model.gidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.ben));
}
trndocRequest.ptsList = ptsptaList;
return trndocRequest
},
// 整合各交易的数据
buildTrndocRequest() {
let trndocRequest = new TrndocRequest().data;
switch (this.trnName) {
case 'litopn':
trndocRequest = this.buildTrndocLitopn()
break
case 'gitopn':
trndocRequest = this.buildTrndocGitopn()
break
default:
return
}
trndocRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
trndocRequest.userId = window.sessionStorage.userId;
} else {
trndocRequest.userId = "ZL";
}
let userId = window.sessionStorage.userId
trndocRequest.userId = !!userId ? userId : 'ZL'
return trndocRequest;
},
async processTrndoc() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
let rulePath = "/service/docpan/assertTrndoc";
const loading = this.loading('正在请求数据')
let rulePath = '/service/docpan/assertTrndoc';
let trndocRequest = this.buildTrndocRequest();
let rtnmsg = await Api.post(rulePath, trndocRequest);
if (rtnmsg.respCode == SUCCESS) {
......
import LiaallRequest from "../model/LiaallRequest.js";
import Api from "~/service/Api";
import Utils from "~/utils";
import LiaallRequest from '../model/LiaallRequest.js';
import Api from '~/service/Api';
import Utils from '~/utils';
export default {
buildPtspta(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.glggrpflg=pts.glggrpflg;
ptspta.adrblk=pts.adrblk;
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.glggrpflg = pts.glggrpflg;
ptspta.adrblk = pts.adrblk;
return ptspta;
},
buildLiaallRequest() {
// 处理Litopn数据
buildLiaccvLitopn () {
let liaallRequest = new LiaallRequest().data;
let rec = {};
let cbsMap = {};
if (this.trnName === "litopn") {
rec.objtyp = "LID";
rec.objtyp = 'LID';
rec.ownref = this.model.lidgrp.rec.ownref;
rec.opndat = this.model.lidgrp.rec.opndat;
rec.branchInr = this.model.lidgrp.rec.branchinr;
liaallRequest.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.lidgrp.cbs.nom1.cur,
"amt":this.model.lidgrp.cbs.nom1.amt,
'cur':this.model.lidgrp.cbs.nom1.cur,
'amt':this.model.lidgrp.cbs.nom1.amt,
};
cbsMap.OPN1 = {};
cbsMap.OPN2 = {
"cur":this.model.lidgrp.cbs.opn2.cur,
"amt":this.model.lidgrp.cbs.opn2.amt,
'cur':this.model.lidgrp.cbs.opn2.cur,
'amt':this.model.lidgrp.cbs.opn2.amt,
};
cbsMap.MAX = {
"cur":this.model.lidgrp.cbs.max.cur,
"amt":this.model.lidgrp.cbs.max.amt,
'cur':this.model.lidgrp.cbs.max.cur,
'amt':this.model.lidgrp.cbs.max.amt,
};
cbsMap.MAX2 = {
"cur":this.model.lidgrp.cbs.max2.cur,
"amt":this.model.lidgrp.cbs.max2.amt,
'cur':this.model.lidgrp.cbs.max2.cur,
'amt':this.model.lidgrp.cbs.max2.amt,
};
liaallRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.lidgrp.apl.pts.extkey !== "") {
if (this.model.lidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(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));
}
if (this.model.lidgrp.ben.pts.extkey !== "") {
if (this.model.lidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben));
}
liaallRequest.ptsList = ptsptaList;
} else if (this.trnName === "gitopn") {
rec.objtyp = "GID";
return liaallRequest;
},
// 处理Gitopn数据
buildLiaccvGitopn () {
let liaallRequest = new LiaallRequest().data;
let rec = {};
let cbsMap = {};
rec.objtyp = 'GID';
rec.ownref = this.model.gidgrp.rec.ownref;
rec.opndat = this.model.gidgrp.rec.opndat;
rec.expdat = this.model.gidgrp.rec.expdat;
......@@ -97,31 +102,43 @@ export default {
liaallRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.gidgrp.apl.pts.extkey !== "") {
if (this.model.gidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.apl));
}
if (this.model.gidgrp.adv.pts.extkey !== "") {
if (this.model.gidgrp.adv.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.adv));
}
if (this.model.gidgrp.ben.pts.extkey !== "") {
if (this.model.gidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.ben));
}
liaallRequest.ptsList = ptsptaList;
}
liaallRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
liaallRequest.userId = window.sessionStorage.userId;
} else {
liaallRequest.userId = "ZL";
return liaallRequest
},
// 整合各交易的数据
buildLiaallRequest() {
let liaallRequest = new LiaallRequest().data;
switch (this.trnName) {
case 'litopn':
liaallRequest = this.buildLiaccvLitopn()
break
case 'gitopn':
liaallRequest = this.buildLiaccvGitopn()
break
default:
return
}
liaallRequest.liaallg = this.model.liaall.liaallg;
liaallRequest.transName = this.trnName;
let userId = window.sessionStorage.userId
liaallRequest.userId = !!userId ? userId : 'ZL'
return liaallRequest;
},
async processLiaall() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
let rulePath = "/service/liaall/assertLiaall";
const loading = this.loading('正在请求数据')
let rulePath = '/service/liaall/assertLiaall';
let liaallRequest = this.buildLiaallRequest();
let rtnmsg = await Api.post(rulePath, liaallRequest);
if (rtnmsg.respCode == SUCCESS) {
......
import GlentryRequest from "../model/GlentryRequest.js";
import Api from "~/service/Api";
import Utils from "~/utils";
import GlentryRequest from '../model/GlentryRequest.js';
import Api from '~/service/Api';
export default {
buildPtspta(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.glggrpflg=pts.glggrpflg;
ptspta.adrblk=pts.adrblk;
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.glggrpflg = pts.glggrpflg;
ptspta.adrblk = pts.adrblk;
return ptspta;
},
buildGlentryRequest() {
// 处理Litopn数据
buildGlentryLitopn () {
let glentryRequest = new GlentryRequest().data;
let rec = {};
let cbsMap = {};
if (this.trnName === "litopn") {
rec.objtyp = "LID";
rec.objtyp = 'LID';
rec.ownref = this.model.lidgrp.rec.ownref;
rec.opndat = this.model.lidgrp.rec.opndat;
rec.branchInr = this.model.lidgrp.rec.branchinr;
glentryRequest.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.lidgrp.cbs.nom1.cur,
"amt":this.model.lidgrp.cbs.nom1.amt,
'cur':this.model.lidgrp.cbs.nom1.cur,
'amt':this.model.lidgrp.cbs.nom1.amt,
};
cbsMap.OPN1 = {};
cbsMap.OPN2 = {
"cur":this.model.lidgrp.cbs.opn2.cur,
"amt":this.model.lidgrp.cbs.opn2.amt,
'cur':this.model.lidgrp.cbs.opn2.cur,
'amt':this.model.lidgrp.cbs.opn2.amt,
};
cbsMap.MAX = {
"cur":this.model.lidgrp.cbs.max.cur,
"amt":this.model.lidgrp.cbs.max.amt,
'cur':this.model.lidgrp.cbs.max.cur,
'amt':this.model.lidgrp.cbs.max.amt,
};
cbsMap.MAX2 = {
"cur":this.model.lidgrp.cbs.max2.cur,
"amt":this.model.lidgrp.cbs.max2.amt,
'cur':this.model.lidgrp.cbs.max2.cur,
'amt':this.model.lidgrp.cbs.max2.amt,
};
glentryRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.lidgrp.apl.pts.extkey !== "") {
if (this.model.lidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(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));
}
if (this.model.lidgrp.ben.pts.extkey !== "") {
if (this.model.lidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben));
}
glentryRequest.ptsList = ptsptaList;
glentryRequest.liaallg = this.model.liaall.liaallg;
} else if (this.trnName === "gitopn") {
rec.objtyp = "GID";
return glentryRequest;
},
// 处理Gitopn数据
buildGlentryGitopn () {
let glentryRequest = new GlentryRequest().data;
let rec = {};
let cbsMap = {};
rec.objtyp = 'GID';
rec.ownref = this.model.gidgrp.rec.ownref;
rec.opndat = this.model.gidgrp.rec.opndat;
rec.expdat = this.model.gidgrp.rec.expdat;
......@@ -98,34 +100,46 @@ export default {
glentryRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.gidgrp.apl.pts.extkey !== "") {
if (this.model.gidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.apl));
}
if (this.model.gidgrp.adv.pts.extkey !== "") {
if (this.model.gidgrp.adv.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.adv));
}
if (this.model.gidgrp.ben.pts.extkey !== "") {
if (this.model.gidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.ben));
}
glentryRequest.ptsList = ptsptaList;
glentryRequest.liaallg = this.model.liaall.liaallg;
return glentryRequest
},
// 整合各交易的数据
buildGlentryRequest() {
let glentryRequest = new GlentryRequest().data;
switch (this.trnName) {
case 'litopn':
glentryRequest = this.buildGlentryLitopn()
break
case 'gitopn':
glentryRequest = this.buildGlentryGitopn()
break
default:
return
}
glentryRequest.liaallg = this.model.liaall.liaallg;
glentryRequest.setfog = this.model.setmod.setfog;
glentryRequest.setfeg = this.model.setmod.setfeg;
glentryRequest.setglg = this.model.setmod.setglg;
glentryRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
glentryRequest.userId = window.sessionStorage.userId;
} else {
glentryRequest.userId = "ZL";
}
let userId = window.sessionStorage.userId
glentryRequest.userId = !!userId ? userId : 'ZL'
return glentryRequest;
},
async processGlentry() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
let rulePath = "/service/gle/assertGle";
const loading = this.loading('正在请求数据')
let rulePath = '/service/gle/assertGle';
let glentryRequest = this.buildGlentryRequest();
let rtnmsg = await Api.post(rulePath, glentryRequest);
if (rtnmsg.respCode == SUCCESS) {
......
import Api from "~/service/Api";
import SetfegRequest from "../model/SetfegRequest.js";
import SetglgRequest from "../model/SetglgRequest.js";
import Api from '~/service/Api';
import SetfegRequest from '../model/SetfegRequest.js';
import SetglgRequest from '../model/SetglgRequest.js';
export default {
buildPtydet(ptsptaObj) {
let ptydet = {};
ptydet.rol=ptsptaObj.pts.rol;
ptydet.dftfeecur=ptsptaObj.pts.dftfeecur;
return ptydet;
},
buildPtspta(ptsptaObj) {
buildPtspta (ptsptaObj) {
let ptspta = {};
let pts = ptsptaObj.pts;
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.glggrpflg=pts.glggrpflg;
ptspta.adrblk=pts.adrblk;
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.glggrpflg = pts.glggrpflg;
ptspta.adrblk = pts.adrblk;
return ptspta;
},
buildSetfegRequest() {
// Setfeg关于Listopn的处理
buildSetfegLitopn () {
let setfegRequest = new SetfegRequest().data;
let rec = {};
let cbsMap = {};
if (this.trnName === "litopn") {
rec.objtyp = "LID";
rec.objtyp = 'LID';
rec.ownref = this.model.lidgrp.rec.ownref;
rec.opndat = this.model.lidgrp.rec.opndat;
rec.expdat = this.model.lidgrp.rec.expdat;
......@@ -41,48 +33,48 @@ export default {
setfegRequest.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.lidgrp.cbs.nom1.cur,
"amt":this.model.lidgrp.cbs.nom1.amt,
'cur': this.model.lidgrp.cbs.nom1.cur,
'amt': this.model.lidgrp.cbs.nom1.amt,
};
cbsMap.OPN1 = {};
cbsMap.OPN2 = {
"cur":this.model.lidgrp.cbs.opn2.cur,
"amt":this.model.lidgrp.cbs.opn2.amt,
'cur': this.model.lidgrp.cbs.opn2.cur,
'amt': this.model.lidgrp.cbs.opn2.amt,
};
cbsMap.MAX = {
"cur":this.model.lidgrp.cbs.max.cur,
"amt":this.model.lidgrp.cbs.max.amt,
'cur': this.model.lidgrp.cbs.max.cur,
'amt': this.model.lidgrp.cbs.max.amt,
};
cbsMap.MAX2 = {
"cur":this.model.lidgrp.cbs.max2.cur,
"amt":this.model.lidgrp.cbs.max2.amt,
'cur': this.model.lidgrp.cbs.max2.cur,
'amt': this.model.lidgrp.cbs.max2.amt,
};
setfegRequest.cbsMap = cbsMap;
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));
//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));
//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));
//ptydetList.push(this.buildPtydet(this.model.lidgrp.ben));
}
setfegRequest.ptsList = ptsptaList;
setfegRequest.liaall = this.model.liaall;
setfegRequest.liaccv = this.model.liaccv;
} else if (this.trnName === 'gitopn') {
rec.objtyp = "GID";
return setfegRequest
},
// Setfeg关于Gitopn的处理
buildSetfegGitopn () {
let setfegRequest = new SetfegRequest().data;
let rec = {};
let cbsMap = {};
rec.objtyp = 'GID';
rec.ownref = this.model.gidgrp.rec.ownref;
rec.opndat = this.model.gidgrp.rec.opndat;
rec.expdat = this.model.gidgrp.rec.expdat;
......@@ -110,131 +102,65 @@ export default {
setfegRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.gidgrp.apl.pts.extkey !== "") {
if (this.model.gidgrp.apl.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.apl));
}
if (this.model.gidgrp.adv.pts.extkey !== "") {
if (this.model.gidgrp.adv.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.adv));
}
if (this.model.gidgrp.ben.pts.extkey !== "") {
if (this.model.gidgrp.ben.pts.extkey !== '') {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.ben));
}
setfegRequest.ptsList = ptsptaList;
return setfegRequest
},
// 处理Setfeg数据
buildSetfegRequest() {
let setfegRequest = new SetfegRequest().data;
switch (this.trnName) {
case 'litopn':
setfegRequest = this.buildSetfegLitopn()
setfegRequest.liaall = this.model.liaall;
setfegRequest.liaccv = this.model.liaccv;
break
case 'gitopn':
setfegRequest = this.buildSetfegGitopn()
setfegRequest.liaall = this.model.liaall;
setfegRequest.liaccv = this.model.liaccv;
break
default:
return
}
//setfegRequest.ptydet = ptydetList;
setfegRequest.doceot=this.model.trnmod.trndoc.doceot;
setfegRequest.doceot = this.model.trnmod.trndoc.doceot;
setfegRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
setfegRequest.userId = window.sessionStorage.userId;
} else {
setfegRequest.userId = "ZL";
}
let userId = window.sessionStorage.userId
setfegRequest.userId = !!userId ? userId : 'ZL'
return setfegRequest;
},
// 处理setglg数据
buildSetglgRequest() {
let setglgRequest = new SetglgRequest().data;
let rec = {};
let cbsMap = {};
if (this.trnName === "litopn") {
rec.objtyp = "LID";
rec.ownref = this.model.lidgrp.rec.ownref;
rec.opndat = this.model.lidgrp.rec.opndat;
rec.expdat = this.model.lidgrp.rec.expdat;
rec.branchInr = this.model.lidgrp.rec.branchinr;
setglgRequest.rec = rec;
cbsMap.NOM1 = {
"cur":this.model.lidgrp.cbs.nom1.cur,
"amt":this.model.lidgrp.cbs.nom1.amt,
};
cbsMap.OPN1 = {};
cbsMap.OPN2 = {
"cur":this.model.lidgrp.cbs.opn2.cur,
"amt":this.model.lidgrp.cbs.opn2.amt,
};
cbsMap.MAX = {
"cur":this.model.lidgrp.cbs.max.cur,
"amt":this.model.lidgrp.cbs.max.amt,
};
cbsMap.MAX2 = {
"cur":this.model.lidgrp.cbs.max2.cur,
"amt":this.model.lidgrp.cbs.max2.amt,
};
setglgRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.lidgrp.apl.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.apl));
}
if (this.model.lidgrp.adv.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.adv));
}
if (this.model.lidgrp.ben.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.ben));
}
setglgRequest.ptsList = ptsptaList;
} else if (this.trnName === 'gitopn') {
rec.objtyp = "GID";
rec.ownref = this.model.gidgrp.rec.ownref;
rec.opndat = this.model.gidgrp.rec.opndat;
rec.expdat = this.model.gidgrp.rec.expdat;
rec.branchInr = this.model.gidgrp.rec.branchinr;
rec.hndtyp = this.model.gidgrp.rec.hndtyp;
rec.gartyp = this.model.gidgrp.rec.gartyp;
rec.fingua = this.model.gidgrp.rec.fingua;
rec.segtyp = this.model.gidgrp.ghd.segtyp;
rec.fromflg = this.model.gidgrp.rec.fromflg;
rec.othersno= this.model.gidgrp.rec.othersno;
rec.sndto = this.model.gidgrp.rec.sndto;
rec.swiftflg = this.model.gitp.swiftflg;
rec.giduil = this.model.gidgrp.rec.giduil;
rec.purpos = this.model.gidgrp.rec.purpos;
rec.revflg = this.model.gidgrp.rec.revflg;
rec.cnfsta = this.model.gidgrp.rec.cnfsta;
setglgRequest.rec = rec;
cbsMap.MAX = this.model.gidgrp.cbs.max;
cbsMap.OPN1 = this.model.gidgrp.cbs.opn1;
cbsMap.MAC = this.model.gidgrp.cbs.mac;
cbsMap.MAC2 = this.model.gidgrp.cbs.mac2;
cbsMap.OPC2 = this.model.gidgrp.cbs.opc2;
cbsMap.CNF = this.model.gidgrp.cbs.cnf;
setglgRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (this.model.gidgrp.apl.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.apl));
}
if (this.model.gidgrp.adv.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.adv));
}
if (this.model.gidgrp.ben.pts.extkey !== "") {
ptsptaList.push(this.buildPtspta(this.model.gidgrp.ben));
}
setglgRequest.ptsList = ptsptaList;
}
setglgRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
setglgRequest.userId = window.sessionStorage.userId;
} else {
setglgRequest.userId = "ZL";
switch (this.trnName) {
case 'litopn':
setglgRequest = this.buildSetfegLitopn()
break
case 'gitopn':
setglgRequest = this.buildSetfegGitopn()
break
default:
return
}
setglgRequest.setfeg = this.model.setmod.setfeg;
setglgRequest.transName = this.trnName;
let userId = window.sessionStorage.userId
setglgRequest.userId = !!userId ? userId : 'ZL'
return setglgRequest;
},
async processSetpan() {
//组数据,发post请求
let loading = this.loading("正在请求试算费用");
let rulePath = "/service/setmod/calcSettleDetail";
let loading = this.loading('正在请求试算费用');
let rulePath = '/service/setmod/calcSettleDetail';
let setfegRequest = this.buildSetfegRequest();
let rtnmsg = await Api.post(rulePath, setfegRequest);
if (rtnmsg.respCode == SUCCESS) {
......@@ -243,8 +169,8 @@ export default {
this.model.setmod.doccur = rtnmsg.data.doccur;
this.model.setmod.docamt = rtnmsg.data.docamt;
if (this.model.setmod.setfeg.setfel.length > 0) {
loading = this.loading("正在请求试算账务");
rulePath = "/service/setmod/calcPayDetail";
loading = this.loading('正在请求试算账务');
rulePath = '/service/setmod/calcPayDetail';
let setglgRequest = this.buildSetglgRequest();
rtnmsg = await Api.post(rulePath, setglgRequest);
if (rtnmsg.respCode == SUCCESS) {
......
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