Commit ef3be540 by 李少勇

公共组件内的方法整理

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