Commit ae834c5d by WH

letdrv

parent 7d6f7ae2
export default {
buildPtspta (ptsptaObj) {
let pts = ptsptaObj.pts;
let ptspta = {
rol: pts.rol,
name: pts.nam,
ptyinr: pts.ptyinr,
ptainr: pts.ptainr,
extkey: pts.extkey,
dftdsp: pts.dftdsp,
dftcur: pts.dftcur,
dftact: pts.dftact,
dftfeecur: pts.dftfeecur,
dftactptainr: pts.dftactptainr,
glggrpflg: pts.glggrpflg,
adrblk: pts.adrblk
};
return ptspta;
},
buildCommonData (model, trnName) {
let ptsptaList = [];
if (model.bodgrp.apl.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.bodgrp.apl));
}
if (model.bodgrp.adv.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.bodgrp.adv));
}
if (model.bodgrp.ben.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.bodgrp.ben));
}
let dataObj = {
rec: {
objtyp: 'GID',
ownref: model.bodgrp.rec.ownref,
opndat: model.bodgrp.rec.opndat,
expdat: model.bodgrp.rec.expdat,
branchInr: model.bodgrp.rec.branchInr,
hndtyp: model.bodgrp.rec.hndtyp,
gartyp: model.bodgrp.rec.gartyp,
fingua: model.bodgrp.rec.fingua,
segtyp: model.bodgrp.ghd.segtyp,
fromflg: model.bodgrp.rec.fromflg,
othersno: model.bodgrp.rec.othersno,
sndto: model.bodgrp.rec.sndto,
swiftflg: model.gitp.swiftflg,
giduil: model.bodgrp.rec.giduil,
purpos: model.bodgrp.rec.purpos,
revflg: model.bodgrp.rec.revflg,
cnfsta: model.bodgrp.rec.cnfsta,
},
cbsMap: {
MAX: model.bodgrp.cbs.max,
OPN1: model.bodgrp.cbs.opn1,
MAC: model.bodgrp.cbs.mac,
MAC2: model.bodgrp.cbs.mac2,
OPC2: model.bodgrp.cbs.opc2,
CNF: model.bodgrp.cbs.cnf,
},
ptsList: ptsptaList,
transName: trnName,
userId: window.sessionStorage.userId ? window.sessionStorage.userId : 'ZL'
};
return dataObj
},
buildSetfeg (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
liaall: model.liaall,
liaccv: model.liaccv,
doceot: model.trnmod.trndoc.doceot,
};
return params
},
buildSetglg (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
setfeg: model.setmod.setfeg,
liaall: model.liaall,
liaccv: model.liaccv,
};
return params
},
buildGlentry (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
liaallg: model.liaall.liaallg,
setfog: model.setmod.setfog,
setfeg: model.setmod.setfeg,
setglg: model.setmod.setglg,
};
return params
},
buildEngp (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
liaallg: model.liaall.liaallg,
};
return params
},
buildDocpan (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
};
return params
},
buildCcvpan (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
liaccvg: model.liaccv.liaccvg,
oldamt: model.liaccv.oldamt,
chgamt: model.liaccv.chgamt,
concur: model.liaccv.concur,
};
return params
},
buildLimitbody (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
rec: {
// objtyp: 'BOD',
objinr: model.bodgrp.rec.inr,
ownref: model.bodgrp.rec.ownref,
},
};
return params
},
buildDoctre (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
rec: {
// objtyp: 'BOD',
objinr: model.bodgrp.rec.inr,
ownref: model.bodgrp.rec.ownref,
swiftflg: model.gitp.swiftflg,
},
};
return params
},
// 公共组件setmod中dsp字段改变,触发联动时候的入参
buildSetgllAccts (model, trnName, setglg) {
let params = {
...this.buildCommonData(model, trnName),
setglg
};
return params
}
}
\ No newline at end of file
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import buildFn from './buildCommons.js';
import setmod from '~/components/business/setmod/event';
import glentry from '~/components/business/glentry/event';
import engp from '~/components/business/engp/event';
import docpan from '~/components/business/docpan/event';
import ccvpan from '~/components/business/ccvpan/event';
import limitbody from '~/components/business/limitbody/event';
import doctre from '~/components/business/doctre/event';
import Utils from "~/utils"
export default {
mixins: [commonFunctions],
methods: {
...setmod,
...glentry,
...engp,
...docpan,
...ccvpan,
...limitbody,
...doctre,
async init () {
const params = {
spt: JSON.parse(localStorage.getItem('row_' + this.trnName))
}
const res = await Api.post('/service/gitopn/init', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
if (!res.data) {
return
}
this.copyValueFromVoData(this.model, res.data)
this.copyValueFromVoData(this.model.setmod.setfeg, res.data.setfeg)
this.copyValueFromVoData(this.model.setmod.setfog, res.data.setfog)
this.copyValueFromVoData(this.model.setmod.setglg, res.data.setglg)
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
if (Utils.typeOf(model[key]) === 'Object') {
this.copyValueFromVoData(model[key], data[key])
} else {
this.$set(model, key, data[key])
}
}
})
},
async tabClick(tab) {
if (this.isInDisplay) {
return;
}
let name = tab.name;
switch (name) {
case 'ccvpan':
let ccvpanRequest = buildFn.buildCcvpan(this.model, this.trnName);
this.processLiaccv(ccvpanRequest);
break;
case 'engp':
let engpRequest = buildFn.buildEngp(this.model, this.trnName);
this.processLiaall(engpRequest);
break;
case 'setmod':
let setfegRequest = buildFn.buildSetfeg(this.model, this.trnName);
// 此处利用回调是为了等setfeg的接口调用完成后才去获取setglg参数,由于setglg参数依赖于setfeg函数的返回值
this.processSetpan(setfegRequest, () => {
return buildFn.buildSetglg(this.model, this.trnName);
});
break;
case 'docpan':
let docpanRequest = buildFn.buildDocpan(this.model, this.trnName);
this.processTrndoc(docpanRequest);
break;
case 'glepan':
let glentryRequest = buildFn.buildGlentry(this.model, this.trnName);
this.processGlentry(glentryRequest);
break;
case 'limitbody':
let limitbodyRequest = buildFn.buildLimitbody(this.model, this.trnName);
this.processLimitbody(limitbodyRequest);
break;
case 'doctre':
let doctreRequest = buildFn.buildDoctre(this.model, this.trnName);
this.processDoctre(doctreRequest);
break;
default:
return;
}
},
// 点击获取按钮拉取当前key字段下的表单数据
queryFormData(key) {
console.log(key);
},
// 业务信息=》基本信息=》保函编号-----获取保函编号
async queryOwnref() {
let params = {
ptainr: this.model.gidgrp.apl.pts.ptainr,
businessType: 'LG',
tbl: 'LG',
};
const loading = this.loading();
let res = await Api.post('/service/gitopn/getOwnRef', params);
if (res.respCode == SUCCESS) {
loading.close();
this.model.gidgrp.rec.ownref = res.data;
}
},
// 获取gitopn弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.gidgrp[type.toLowerCase()].pts.extkey,
};
let res = await Api.post('/service/ptspta/list', params);
if (res.respCode == SUCCESS) {
this.root.$refs['etyDialog'].show = true;
this.root.promptData.data = res.data.ptaInfos;
this.root.promptData.type = type;
}
},
// 选中gitopn弹框表格的行数据
async selectGridEtyPromptData(row) {
let params = {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
}
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
this.handleChangeForm(key, value);
},
// 初始化保函开立类型码表下拉列表
async queryHndtypCodeTableList(trnName) {
let params = {
gitp: {
swiftflg: this.model.gitp.swiftflg,
},
gidgrp: {
rec: {
purpos: this.model.gidgrp.rec.purpos,
},
},
transName: trnName.toUpperCase(),
};
let res = await Api.post('/service/gitopn/initHndtyp', params);
if (res.respCode == SUCCESS) {
this.$set(this.codes, 'voHndtyp', res.data);
}
},
// 是否SWIFT格式修改--联动保函开立类型
handleChangeSwiftflg() {
this.queryHndtypCodeTableList(this.root.trnName);
},
// 支出目的修改--联动保函开立类型
handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName);
},
buildLiaccv () {
let params = {
...buildFn.buildCommonData(this.model, this.trnName),
liaccvg: this.model.liaccv.liaccvg,
oldamt: this.model.liaccv.oldamt,
chgamt: this.model.liaccv.chgamt,
concur: this.model.liaccv.concur,
};
return params
},
// 公共组件setmod处理方式改变触发联动
changeSetmodModel (emitParams) {
let reqParams = {}
switch (emitParams.code) {
case 'processMethods':
reqParams = buildFn.buildSetglg(this.model, this.trnName);
this.calcPayDetail(reqParams)
break
case 'changeDsp':
let index = emitParams.index;
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
setglgRequest.setglg = {setgll: emitParams.list};
this.setgllAccts(setglgRequest, index);
break
default:
return
}
}
},
};
import Pts from '~/components/business/commonModel/Pts';
import Pub from '~/components/business/commonModel/index.js';
export default class Botsel {
constructor() {
this.data = {
recget: {
sdamod: {
seainf: '',
dadsnd: ''
}
},
clsflg: '',
matp: {
mattxtlab: ''
},
bpdget: {
clsflg: '',
sdamod: {
dadsnd: '',
seainf: ''
}
},
selbut: {
dsppndram: '',
trnpenlab: '',
sptpenlab_descr: '',
trnpenlab_descr: '',
sptpenlab: '',
dspclsdat: ''
},
bodgrp: {
rec: {
inr:'',
rcvdat: '',
predat: '',
doctypcod: '',
matpertyp: '',
matpercnt: '',
ownref: '',
docsta: '',
matdat: '',
nam: '',
matperbeg: ''
},
col: {
pts: new Pts().data
}
,
cbs: {
opn1: {
cur: '',
amt: ''
},
max: {
cur: '',
amt: ''
}
},
drr: {
pts: new Pts().data
},
dre: {
pts: new Pts().data
}
},
cfgfil: {
regtxt10: '',
regtxt12: '',
regtxt11: '',
regtxt1: '',
regtxt3: '',
regtxt2: '',
bitmap: '',
regtxt5: '',
regtxt4: '',
regtxt7: '',
regtxt6: '',
regtxt9: '',
regtxt8: '',
subtrn11: '',
subtxt9: '',
subtxt8: '',
subtxt7: '',
subtxt6: '',
subtxt5: '',
subtxt4: '',
subtxt3: '',
subtxt2: '',
subtxt1: '',
hotreg11: '',
hotreg10: '',
hotsub1: '',
hotsub2: '',
subtrn10: '',
hotreg12: '',
regside1: '',
regside2: '',
regside7: '',
hotsub5: '',
regside8: '',
hotsub6: '',
regside9: '',
hotsub3: '',
hotsub4: '',
regside3: '',
hotsub9: '',
regside4: '',
regside5: '',
hotsub7: '',
regside6: '',
hotsub8: '',
hotreg2: '',
hotreg1: '',
hotreg4: '',
hotreg3: '',
subtxt11: '',
subtrn9: '',
hotreg6: '',
subtrn8: '',
hotreg5: '',
subtrn7: '',
regside12: '',
subtrn6: '',
subtrn5: '',
subtrn4: '',
subtrn3: '',
subtrn2: '',
regside11: '',
subtrn1: '',
regside10: '',
hotsub11: '',
hotreg8: '',
subtxt10: '',
hotsub10: '',
hotreg7: '',
hotreg9: ''
},
dspbpd: '',
fpdget: {
clsflg: '',
sdamod: {
dadsnd: '',
seainf: ''
}
},
bpdgrp: {
rec: {
ownref: '',
fintyp: '',
nam: '',
finact: ''
},
cbs: {
max: {
cur: '',
amt: ''
}
}
},
fpdgrp: {
inv: {
pts: new Pts().data
},
rec: {
funflg: '',
opndatlc: '',
expdatlc: '',
perint: '',
expdat: '',
valdat: '',
ownref: '',
nam: '',
silflg: '',
opndat: '',
rdsflg: ''
},
cbs: {
opn1: {
cur: '',
amt: ''
},
max: {
cur: '',
amt: ''
},
sld: {
cur: '',
amt: ''
}
},
sel: {
pts: new Pts().data
}
},
dspbpdclsdat: ''
}
};
}
\ No newline at end of file
<template>
<div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right" size="small" :validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
</c-tabs>
</el-form>
</div>
</template>
<script>
import Botsel from "../model"
import formRules from '../model/check'
import event from "../event"
export default {
name: "Botsel",
components:{
},
provide() {
return {
root: this
}
},
mixins: [event], // 里面包含了Default、Check等的公共处理
data(){
return {
tabVal: "",
trnName: "botsel",
model: new Botsel().data,
rules: formRules,
codes: {
},
}
},
methods:{},
created:async function(){}
}
</script>
<style>
</style>
......@@ -132,7 +132,7 @@ export default {
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.brdgrp[type.toLowerCase()].pts.extkey,
extkey: this.model.bedgrp[type.toLowerCase()].pts.extkey,
};
let res = await Api.post('/service/ptspta/list', params);
if (res.respCode == SUCCESS) {
......@@ -148,7 +148,7 @@ export default {
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
this.$set(this.model.bedgrp, row.role.toLowerCase(), res.data);
}
},
// 业务信息=》基本信息=》支出目的
......
......@@ -71,6 +71,7 @@ export default class Letdrv {
intdis: '',
},
rec: {
inr:'',
branchinr:'',
rcvdat: '',
doctypcod: '',
......
......@@ -479,70 +479,89 @@
</el-form-item>
</c-col>
<!-- <c-ptap-->
<!-- :model="model"-->
<!-- :argadr="{-->
<!-- title: '',-->
<!-- grp: 'bedgrp',-->
<!-- rol: 'prb',-->
<!-- }"-->
<!-- :noRef="false"-->
<!-- :disabled="!(model.bedgrp.rec.docprbrol=='PRB')"-->
<!-- :isAdrblk="true"-->
<!-- :disabledExtkey="model.bedgrp.rec.docprbrol=='BEN'"-->
<!-- >-->
<!-- </c-ptap>-->
<c-col :span="24">
<el-form-item label="参考号" prop="bedgrp.prb.pts.ref">
<c-input v-model="model.bedgrp.prb.pts.ref" maxlength="16" placeholder="请输入参考号"></c-input>
</el-form-item>
</c-col>
<c-col :span="24" :offset="0">
<el-form-item label="地址编号" prop="bedgrp.prb.pts.extkey">
<c-fullbox>
<c-input
v-model="model.bedgrp.prb.pts.extkey"
maxlength="16"
placeholder="请输入地址编码"
:disabled="model.bedgrp.rec.docprbrol != 'PRB'"
@keyup.enter.native="
<c-ptap1
:model="model"
:argadr="{
title: '交单行',
grp: 'bedgrp',
rol: 'prb',
}"
:noRef="false"
:disabled="!(model.bedgrp.rec.docprbrol=='PRB')"
:isAdrblk="true"
:disabledExtkey="model.bedgrp.rec.docprbrol=='BEN'"
@keyup.enter.native="
queryGridEtyPromptDialogData('PRB', 'C')
"
></c-input>
<template slot="footer">
<c-button
style="margin: 0 10px 0 10px; padding: 0 12px"
size="small"
type="primary"
@click="model.betp.prbp.ptsget.sdamod.seainf"
icon="el-icon-search"
>
</c-button>
<c-button
style="margin: 0 0"
size="small"
type="primary"
icon="el-icon-info"
>
</c-button>
</template>
</c-fullbox>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="地址信息" prop="bedgrp.prb.pts.adrblk">
<c-input
:rows="4"
:disabled="model.bedgrp.rec.docprbrol != 'PRB'"
type="textarea"
v-model="model.bedgrp.prb.pts.adrblk"
maxlength="80"
show-word-limit
placeholder="请输入地址信息"></c-input>
</el-form-item>
</c-col>
>
</c-ptap1>
<!-- <c-ptap-->
<!-- :model="model"-->
<!-- :argadr="{-->
<!-- title: '',-->
<!-- grp: 'bedgrp',-->
<!-- rol: 'prb',-->
<!-- }"-->
<!-- :noRef="false"-->
<!-- :disabled="!(model.bedgrp.rec.docprbrol=='PRB')"-->
<!-- :isAdrblk="true"-->
<!-- :disabledExtkey="model.bedgrp.rec.docprbrol=='BEN'"-->
<!-- @keyup.enter.native="-->
<!-- queryGridEtyPromptDialogData('PRB', 'C')"-->
<!-- >-->
<!-- </c-ptap>-->
<!-- <c-col :span="24">-->
<!-- <el-form-item label="参考号" prop="bedgrp.prb.pts.ref">-->
<!-- <c-input v-model="model.bedgrp.prb.pts.ref" maxlength="16" placeholder="请输入参考号"></c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<!-- <c-col :span="24" :offset="0">-->
<!-- <el-form-item label="地址编号" prop="bedgrp.prb.pts.extkey">-->
<!-- <c-fullbox>-->
<!-- <c-input-->
<!-- v-model="model.bedgrp.prb.pts.extkey"-->
<!-- maxlength="16"-->
<!-- placeholder="请输入地址编码"-->
<!-- :disabled="model.bedgrp.rec.docprbrol != 'PRB'"-->
<!-- @keyup.enter.native="-->
<!-- queryGridEtyPromptDialogData('PRB', 'C')-->
<!-- "-->
<!-- ></c-input>-->
<!-- <template slot="footer">-->
<!-- <c-button-->
<!-- style="margin: 0 10px 0 10px; padding: 0 12px"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="model.betp.prbp.ptsget.sdamod.seainf"-->
<!-- icon="el-icon-search"-->
<!-- >-->
<!-- </c-button>-->
<!-- <c-button-->
<!-- style="margin: 0 0"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- icon="el-icon-info"-->
<!-- >-->
<!-- </c-button>-->
<!-- </template>-->
<!-- </c-fullbox>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<!-- <c-col :span="24">-->
<!-- <el-form-item label="地址信息" prop="bedgrp.prb.pts.adrblk">-->
<!-- <c-input-->
<!-- :rows="4"-->
<!-- :disabled="model.bedgrp.rec.docprbrol != 'PRB'"-->
<!-- type="textarea"-->
<!-- v-model="model.bedgrp.prb.pts.adrblk"-->
<!-- maxlength="80"-->
<!-- show-word-limit-->
<!-- placeholder="请输入地址信息"></c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<c-col :span="24">
......@@ -574,9 +593,10 @@
import Ptsmsg from "~/views/Public/Ptsmsg";
import event from '../event';
import Ptap from "~/views/Public/Ptap";
import Ptap1 from "~/views/Public/Ptap1";
export default {
components: {"c-ptsmsg": Ptsmsg, "c-ptap": Ptap},
components: {"c-ptsmsg": Ptsmsg, "c-ptap": Ptap, "c-ptap1": Ptap1},
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
......@@ -619,9 +639,15 @@ export default {
this.model.bedgrp.cbs.max.cur = this.model.ledgrp.cbs.nom1.cur
return this.model.bedgrp.cbs.max.cur
},
maxamt(){
this.model.bedgrp.cbs.max.amt = this.model.ledgrp.cbs.nom1.amt
return this.model.bedgrp.cbs.max.amt
maxamt:{
get:function (){
this.model.bedgrp.cbs.max.amt = this.model.ledgrp.cbs.opn1.amt
return this.model.bedgrp.cbs.max.amt
},
set:function (newVal){
this.model.bedgrp.cbs.max.amt = newVal
}
},
opn2cur(){
this.model.bedgrp.cbs.opn2.cur = this.model.ledgrp.cbs.nom1.cur
......
......@@ -68,5 +68,6 @@ const Business = [
{ path: 'letrsv', component: () => import('~/business/letrsv/views'), name: 'letrsv', meta: { title: '出口信用证补通知' } },
{ path: 'betamc', component: () => import('~/business/betamc/views'), name: 'betamc', meta: { title: '出口信用证保兑额度释放' } },
{ path: 'infbod', component: () => import('~/business/infbod/views'), name: 'infbod', meta: { title: '出口托收查询' } },
{ path: 'botsel', component: () => import('~/business/botsel/views'), name: 'botsel', meta: { title: '出口托收入口交易BOTSEL' } },
]
export default Business
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment