Commit f52dfbe3 by xionglin

fctopn

parent ddedf319
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.gidgrp.apl.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.gidgrp.apl));
}
if (model.gidgrp.adv.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.gidgrp.adv));
}
if (model.gidgrp.ben.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.gidgrp.ben));
}
let dataObj = {
rec: {
objtyp: 'GID',
ownref: model.gidgrp.rec.ownref,
opndat: model.gidgrp.rec.opndat,
expdat: model.gidgrp.rec.expdat,
branchInr: model.gidgrp.rec.branchInr,
hndtyp: model.gidgrp.rec.hndtyp,
gartyp: model.gidgrp.rec.gartyp,
fingua: model.gidgrp.rec.fingua,
segtyp: model.gidgrp.ghd.segtyp,
fromflg: model.gidgrp.rec.fromflg,
othersno: model.gidgrp.rec.othersno,
sndto: model.gidgrp.rec.sndto,
swiftflg: model.gitp.swiftflg,
giduil: model.gidgrp.rec.giduil,
purpos: model.gidgrp.rec.purpos,
revflg: model.gidgrp.rec.revflg,
cnfsta: model.gidgrp.rec.cnfsta,
},
cbsMap: {
MAX: model.gidgrp.cbs.max,
OPN1: model.gidgrp.cbs.opn1,
MAC: model.gidgrp.cbs.mac,
MAC2: model.gidgrp.cbs.mac2,
OPC2: model.gidgrp.cbs.opc2,
CNF: model.gidgrp.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: 'GID',
objinr: model.gidgrp.rec.objinr,
ownref: model.gidgrp.rec.ownref,
},
};
return params
},
buildDoctre (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
rec: {
objtyp: 'GID',
objinr: model.gidgrp.rec.objinr,
ownref: model.gidgrp.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 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";
import buildFn from './buildCommons.js';
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/fctopn/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 'setpan':
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/gctadd/getOwnRef', params);
if (res.respCode == SUCCESS) {
loading.close();
this.model.gidgrp.rec.ownref = res.data;
}
},
// 获取gctadd弹框表格数据
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;
}
},
// 选中gctadd弹框表格的行数据
async selectGridEtyPromptData(row) {
let params = {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.model.pta.nam = 'Brilliance';
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/gctadd/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
}
},
async handleSave() {
let result = await this.save();
if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
this.$notify({
title: "成功",
message: "保存成功",
type: "success",
});
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.go(-1)
} else if(result.fieldErrors && Object.keys(result.fieldErrors).length > 0 ){
const tab = this.showBackendErrors(result.fieldErrors)
if (tab) {
// tab切换之后,需出发tab-click的事件
this.tabClick(tab);
}
this.$notify({
title: "错误",
message: "检核失败!",
type: "error",
});
} else{
this.$notify({
title: "失败",
message: "保存失败",
type: "error",
});
}
}
},
};
export default {
"aplp.ptsget.sdamod.dadsnd":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"fcdgrp.apl.pts.extkey":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"aplp.ptsget.sdamod.seainf":[
{type: "string", required: false, message: "必输项"},
{max: 3,message:"长度不能超过3"}
],
"fcdgrp.apl.pts.nam":[
{type: "string", required: false, message: "必输项"},
{max: 40,message:"长度不能超过40"}
],
"fcdgrp.apl.pta.nam1":[
{type: "string", required: false, message: "必输项"},
{max: 40,message:"长度不能超过40"}
],
"reason":[
{type: "string", required: false, message: "必输项"},
{max: 40,message:"长度不能超过40"}
],
"cashamt":[
{required: false, message: "必输项"},
{max: 18,message:"整数位不能超过14位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
"cshstm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"fcdgrp.apl.pts.extkey" :null,
"fcdgrp.apl.pts.nam" :null,
"cashamt" :null,
"cashcur" :null,
"cashacc" :null,
}
\ No newline at end of file
import Pts from '~/components/business/commonModel/Pts';
export default class Fctopn{
constructor () {
this.data = {
gidgrp:{
apl:{
pts:new Pts().data
},
},
cashcur:"", // currency .cashcur
cashamt:"", // 金额 .cashamt
gleflg:"", // 是否过帐 .gleflg
cashacc:"", // account .cashacc
trmtyp:"", // 科目 .trmtyp
reason:"", // collect reason .reason
cshstm:"", // STREAM OF CSH .cshstm
pageId: "", // ctx的key
pta:{
nam:""
}
}
}
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="24">
<c-col :span="12" style="padding-right: 20px;">
<c-col :span="24">
<c-fullbox>
<el-form-item label="申请人" prop="gidgrp.apl.pts.extkey">
<c-input
v-model="model.gidgrp.apl.pts.extkey"
maxlength="16"
placeholder="请输入申请人Extkey"
@keyup.enter.native="
queryGridEtyPromptDialogData('APL', 'C')
"
></c-input>
</el-form-item>
<template slot="footer">
<c-button size="small" type="primary" @click="onAplpDet">
详情
</c-button>
</template>
</c-fullbox>
</c-col>
<c-col :span="24">
<el-form-item label="" prop="gidgrp.apl.pts.adrblk">
<c-input
v-model="model.gidgrp.apl.pts.adrblk"
maxlength="40"
placeholder="请输入"
disabled
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="" prop="pta.nam">
<c-input
v-model="model.pta.nam"
maxlength="40"
placeholder="请输入Externally Visible Name of Address"
disabled
></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" style="padding-left: 20px;">
<c-col :span="24">
<c-col :span="13">
<el-form-item label="保证金账号" prop="cashacc">
<!-- <c-select
v-model="model.cashacc"
style="width: 100%"
placeholder="请选择account"
>
</c-select> -->
<c-select
v-model="model.cashacc"
placeholder="请选择account"
></c-select>
</el-form-item>
</c-col>
<c-col :span="11">
<el-form-item label="科目" label-width="60px" prop="trmtyp">
<c-select
v-model="model.trmtyp"
style="width: 100%"
placeholder="请选择科目"
>
<el-option v-for="k in codes.trmtyp" :label="k" :value="k.split('\t')[0]" :key="k"></el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-fullbox>
<c-col :span="12">
<el-form-item label="金额" prop="cashcur">
<c-select
v-model="model.cashcur"
style="width: 100%"
placeholder="请选择currency"
:code="codes.infled_Cur"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="" label-width="5px" prop="cashamt">
<c-input-currency
v-model="model.cashamt"
placeholder="请输入金额"
></c-input-currency>
</el-form-item>
</c-col>
<template slot="footer">
<c-button size="small" type="primary" @click="onGet" disabled>
Get
</c-button>
</template>
</c-fullbox>
</c-col>
<c-col :span="24">
<c-col :span="20">
<el-form-item label="说明" prop="reason">
<c-input
v-model="model.reason"
maxlength="40"
placeholder="请输入collect reason"
></c-input>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item label="" prop="gleflg" label-width="0px">
<c-checkbox v-model="model.gleflg">是否过帐</c-checkbox>
</el-form-item>
</c-col>
</c-col>
</c-col>
</c-col>
<c-col :span="24">
<c-istream-table
:list="model.cshstm.rows || []"
:columns="columns"
></c-istream-table>
</c-col>
</div>
</template>
<script>
import event from "../event";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
data() {
return {
columns: [
"0 1 \"INR\" 100",
"1 2 \"Own Reference\" 150",
"2 3 \"收取日期\" 150 4 7",
"3 4 \"Cur\" 100",
"4 5 \"Relevant Amount\" 150 2 8:1 2 5",
"5 6 \"机构号\" 120",
"6 7 \"保证金帐号\" 120",
"7 8 \"是否过帐\" 120 1 0 1 FCD:GLEFLG",
"8 9 \"是否到帐\" 120 1 0 1 FCD:RELFLG",
"9 10 \"是否被用\" 120 1 0 1 FCD:USEFLG",
"10 11 \"说明 \" 200",
"P COLORED TRUE",
"P VERTLINES TRUE",
"P HORZLINES TRUE",
"P MULTISELECT FALSE"
],
};
},
created: function () {},
};
</script>
<style>
</style>
<template>
<div class="eContainer">
<c-page title="保证金收取">
<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="myTabClick">
<!--PD000002 -->
<el-tab-pane label="概要" name="opnp1">
<c-content>
<m-opnp1 :model="model" :codes="codes"/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<!-- 底部按钮 -->
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleStash="handleStash"
>
</c-function-btn>
<!-- 选择数据的表格弹框 -->
<c-grid-ety-prompt-dialog
ref="etyDialog"
:promptData="promptData"
@select-ety="selectGridEtyPromptData"
>
</c-grid-ety-prompt-dialog>
</c-page>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable"
import Fctopn from "../model"
import commonFuncs from "~/mixin/commonFuncs"
import Check from "../model/check"
import event from '../event'
import Opnp1 from "./Opnp1"
export default {
name: "Fctopn",
components:{
"m-opnp1" : Opnp1,
},
provide() {
return {
root: this
}
},
mixins: [event, commonFuncs],
data(){
return {
tabVal: "opnp1",
trnName: "fctopn",
model: new Fctopn().data,
checkRules: Check,
rules: null,
codes: {
cashcur: [],
trmtyp: [],
...CodeTable,
},
promptData: {
title: 'Select a Party',
columns: [
{
prop: 'ptyInr',
label: 'Party Number'
},
{
prop: 'inr',
label: 'Address Number'
},
{
prop: 'branch',
label: 'Branch Code'
},
{
prop: 'bchName',
label: 'Branch Name'
},
{
prop: 'adrName',
label: 'Address Name'
},
{
prop: 'adr1',
label: 'Address1'
},
{
prop: 'locCty',
label: 'City'
},
{
prop: 'locZip',
label: 'Zip'
},
{
prop: 'bicCode',
label: 'BIC'
}
],
data: []
}
}
},
mounted () {
this.init()
},
}
</script>
<style>
</style>
......@@ -703,6 +703,10 @@ export default {
{
label:'绑定电子凭证',
route:'/business-new/gitatt'
},
{
label:'保证金收取',
route:'/business-new/fctopn'
}
],
currentHandleRow: {}
......
......@@ -26,5 +26,6 @@ const Business = [
{ path: 'gitpca', component: () => import('~/business/gitpca/views'), name: 'gitpca', meta: { title: '关税保函预注销' } },
{ path: 'gitfre', component: () => import('~/business/gitfre/views'), name: 'gitfre', meta: { title: '保函自由格式报文' } },
{ path: 'fctopn', component: () => import('~/business/fctopn/views'), name: 'fctopn', meta: { title: '保证金收取' } },
]
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