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;
return ptspta;
},
buildTrndocRequest() {
let trndocRequest = new TrndocRequest().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.branchInr = this.model.lidgrp.rec.branchinr;
trndocRequest.rec = rec;
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;
return ptspta;
},
// 处理Litopn数据
buildTrndocLitopn () {
let trndocRequest = new TrndocRequest().data;
let rec = {};
let cbsMap = {};
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,
};
cbsMap.NOM1 = {
'cur':this.model.lidgrp.cbs.nom1.cur,
'amt':this.model.lidgrp.cbs.nom1.amt,
};
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));
}
trndocRequest.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;
trndocRequest.rec = rec;
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));
}
trndocRequest.ptsList = ptsptaList;
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;
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;
trndocRequest.rec = rec;
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));
}
trndocRequest.ptsList = ptsptaList;
}
trndocRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
trndocRequest.userId = window.sessionStorage.userId;
} else {
trndocRequest.userId = "ZL";
}
return trndocRequest;
},
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));
}
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;
let userId = window.sessionStorage.userId
trndocRequest.userId = !!userId ? userId : 'ZL'
return trndocRequest;
},
async processTrndoc() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
let rulePath = "/service/docpan/assertTrndoc";
let trndocRequest = this.buildTrndocRequest();
let rtnmsg = await Api.post(rulePath, trndocRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.docpan, rtnmsg.data);
}
loading.close();
async processTrndoc() {
//组数据,发post请求
const loading = this.loading('正在请求数据')
let rulePath = '/service/docpan/assertTrndoc';
let trndocRequest = this.buildTrndocRequest();
let rtnmsg = await Api.post(rulePath, trndocRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.docpan, rtnmsg.data);
}
loading.close();
}
}
\ No newline at end of file
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;
return ptspta;
},
buildLiaallRequest() {
let liaallRequest = new LiaallRequest().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.branchInr = this.model.lidgrp.rec.branchinr;
liaallRequest.rec = rec;
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;
return ptspta;
},
// 处理Litopn数据
buildLiaccvLitopn () {
let liaallRequest = new LiaallRequest().data;
let rec = {};
let cbsMap = {};
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,
};
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.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.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,
};
cbsMap.MAX2 = {
'cur':this.model.lidgrp.cbs.max2.cur,
'amt':this.model.lidgrp.cbs.max2.amt,
};
liaallRequest.cbsMap = cbsMap;
liaallRequest.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));
}
liaallRequest.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;
liaallRequest.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;
liaallRequest.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));
}
liaallRequest.ptsList = ptsptaList;
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;
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;
liaallRequest.rec = rec;
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));
}
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;
},
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;
liaallRequest.cbsMap = cbsMap;
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();
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));
}
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 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;
return ptspta;
},
buildGlentryRequest() {
let glentryRequest = new GlentryRequest().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.branchInr = this.model.lidgrp.rec.branchinr;
glentryRequest.rec = rec;
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;
return ptspta;
},
// 处理Litopn数据
buildGlentryLitopn () {
let glentryRequest = new GlentryRequest().data;
let rec = {};
let cbsMap = {};
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,
};
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.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.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,
};
cbsMap.MAX2 = {
"cur":this.model.lidgrp.cbs.max2.cur,
"amt":this.model.lidgrp.cbs.max2.amt,
};
glentryRequest.cbsMap = cbsMap;
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 = [];
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;
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;
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;
glentryRequest.cbsMap = cbsMap;
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;
glentryRequest.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));
}
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 = [];
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));
}
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;
},
let userId = window.sessionStorage.userId
glentryRequest.userId = !!userId ? userId : 'ZL'
return glentryRequest;
},
async processGlentry() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
let rulePath = "/service/gle/assertGle";
let glentryRequest = this.buildGlentryRequest();
let rtnmsg = await Api.post(rulePath, glentryRequest);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
loading.close();
async processGlentry() {
//组数据,发post请求
const loading = this.loading('正在请求数据')
let rulePath = '/service/gle/assertGle';
let glentryRequest = this.buildGlentryRequest();
let rtnmsg = await Api.post(rulePath, glentryRequest);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
loading.close();
}
}
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) {
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;
return ptspta;
},
buildSetfegRequest() {
let setfegRequest = new SetfegRequest().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;
setfegRequest.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,
};
setfegRequest.cbsMap = cbsMap;
let ptsptaList = [];
let ptydetList = [];
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 !== "") {
ptsptaList.push(this.buildPtspta(this.model.lidgrp.adv));
//ptydetList.push(this.buildPtydet(this.model.lidgrp.adv));
}
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";
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;
setfegRequest.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;
setfegRequest.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));
}
setfegRequest.ptsList = ptsptaList;
setfegRequest.liaall = this.model.liaall;
setfegRequest.liaccv = this.model.liaccv;
}
//setfegRequest.ptydet = ptydetList;
setfegRequest.doceot=this.model.trnmod.trndoc.doceot;
setfegRequest.transName = this.trnName;
if (!!window.sessionStorage.userId) {
setfegRequest.userId = window.sessionStorage.userId;
} else {
setfegRequest.userId = "ZL";
}
return setfegRequest;
},
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";
}
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);
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;
return ptspta;
},
// Setfeg关于Listopn的处理
buildSetfegLitopn () {
let setfegRequest = new SetfegRequest().data;
let rec = {};
let cbsMap = {};
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;
setfegRequest.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,
};
setfegRequest.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));
}
setfegRequest.ptsList = ptsptaList;
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;
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;
setfegRequest.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;
setfegRequest.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));
}
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.doceot = this.model.trnmod.trndoc.doceot;
setfegRequest.transName = this.trnName;
let userId = window.sessionStorage.userId
setfegRequest.userId = !!userId ? userId : 'ZL'
return setfegRequest;
},
// 处理setglg数据
buildSetglgRequest() {
let setglgRequest = new SetglgRequest().data;
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 setfegRequest = this.buildSetfegRequest();
let rtnmsg = await Api.post(rulePath, setfegRequest);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.setfeg = rtnmsg.data.setfeg;
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.setfeg = rtnmsg.data.setfeg;
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;
}
}
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