Commit 6c70f6bd by panziyi

clttra修改

parent 0ae6216e
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.cldgrp.col.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.cldgrp.col));
// }
// if (model.cldgrp.pre.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.cldgrp.pre));
// }
// if (model.cldgrp.dro.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.cldgrp.dro));
// }
let dataObj = {
rec: {
objtyp: 'CLD',
objinr: model.cldgrp.rec.inr,
ownref: model.cldgrp.rec.ownref,
opndat: model.cldgrp.rec.opndat,
expdat: model.cldgrp.rec.expdat,
branchInr: model.cldgrp.rec.branchinr,
nam: model.cldgrp.rec.nam,
oridre: model.cldgrp.rec.oridre,
},
cbsMap: {
MAX: model.cldgrp.cbs.max,
OPN1: model.cldgrp.cbs.opn1,
// MAC: model.bcdgrp.cbs.mac,
// MAC2: model.bcdgrp.cbs.mac2,
// OPC2: model.bcdgrp.cbs.opc2,
// CNF: model.bcdgrp.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: 'BCD',
// objinr: model.bcdgrp.rec.inr,
// ownref: model.bcdgrp.rec.ownref,
// },
};
return params
},
buildDoctre (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
// rec: {
// objtyp: 'BCD',
// objinr: model.bcdgrp.rec.inr,
// ownref: model.bcdgrp.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)),
// trnmod:{
// trn:JSON.parse(localStorage.getItem('review_'+this.trnName))
// }
}
const res = await Api.post('/service/clttra/init', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
cldgrp:{
rec:{
inr: this.$route.query.inr
}
},
});
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.bcdgrp.dre.pts.ptainr,
businessType: 'IC',
tbl: 'IC',
};
const loading = this.loading();
let res = await Api.post('/service/cltdav/getOwnRef', params);
if (res.respCode == SUCCESS) {
loading.close();
this.model.bcdgrp.rec.ownref = res.data;
}
},
// 获取弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.cldgrp[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;
}
},
// 选中弹框表格的行数据
async selectGridEtyPromptData(row) {
let params = {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.cldgrp, row.role.toLowerCase(), res.data);
}
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
this.handleChangeForm(key, value);
},
// 初始化保函开立类型码表下拉列表
async queryHndtypCodeTableList(trnName) {
let params = {
botp: {
swiftflg: this.model.botp.swiftflg,
},
bcdgrp: {
rec: {
purpos: this.model.bcdgrp.rec.purpos,
},
},
transName: trnName.toUpperCase(),
};
let res = await Api.post('/service/cltdav/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
},
// 业务信息=》基本信息=》编号-----获取编号
async queryOwnref() {
let params = {
ptainr: this.model.cldgrp.col.pts.ptainr,
businessType: 'CL',
tbl: 'CL',
};
const loading = this.loading();
let res = await Api.post('/service/cltdav/getOwnRef', params);
if (res.respCode == SUCCESS) {
loading.close();
this.model.cldgrp.rec.ownref = res.data;
}
},
// 公共组件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 Utils from "~/utils"
/**
* Ccttra Check规则
*/
let checkObj = {
"cldgrp.rec.ownref":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"cltp0.recget.sdamod.seainf":[
{type: "string", required: false, message: "必输项"},
{max: 3,message:"长度不能超过3"}
],
"cldgrp.rec.chktyp":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"cldgrp.rec.colflg":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"cldgrp.cbs.max.amt":[
{type: "string", required: false, message: "必输项"},
{max: 18,message:"整数位不能超过14位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
"cldgrp.cbs.opn1.amt":[
{type: "string", required: false, message: "必输项"},
{max: 18,message:"整数位不能超过14位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
"cldgrp.rec.colref":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"cldgrp.rec.colptynam":[
{type: "string", required: false, message: "必输项"},
{max: 40,message:"长度不能超过40"}
],
"cldgrp.rec.credat":[
// {type: "date", required: false, message: "输入正确的日期"}
],
"cldgrp.rec.count":[
{type: "number", required: false, message: "必输项"},
// {max: 3,message:"长度不能超过3"}
],
}
for (const key in checkObj) {
if (Object.hasOwnProperty.call(checkObj, key)) {
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key)
}
}
export default checkObj
import Pts from '~/components/business/commonModel/Pts';
import Pub from '~/components/business/commonModel/index.js';
export default class Clttra {
constructor() {
this.data = {
bptbck:{
bptbckg:[],
},
cldgrp: {
rec: {
ownref: "", // Batch No. .cldgrp.rec.ownref
colref: "", // Coll.bank ref. .cldgrp.rec.colref
colptynam: "", // Coll.bank name .cldgrp.rec.colptynam
credat: "", // Date of creation .cldgrp.rec.credat
count: "", // Item Count .cldgrp.rec.count
chktyp: "", // Type of Draft .cldgrp.rec.chktyp
colflg: "", // Payemnt Disposition .cldgrp.rec.colflg
},
cbs: {
max: {
cur: "", // Draft Amount .cldgrp.cbs.max.cur
amt: "", // Draft Amount .cldgrp.cbs.max.amt
},
opn1: {
cur: "", // Open Amount .cldgrp.cbs.opn1.cur
amt: "", // Open Amount .cldgrp.cbs.opn1.amt
},
},
},
cltp0: {
recget: {
sdamod: {
seainf: "", // .cltp0.recget.sdamod.seainf
},
},
},
pageId: "", // ctx的key
setmod: new Pub().data.Setmod,
setmod: new Pub().data.Setmod,
mtabut: new Pub().data.Mtabut,
trnmod: new Pub().data.Trnmod,
liaall: new Pub().data.Liaall,
liaccv: new Pub().data.Liaccv,
docpan: new Pub().data.Docpan,
};
}
}
<template>
<div class="eibs-tab">
<c-col :span="24">
<c-col :span="11">
<el-form-item label="包号" prop="cldgrp.rec.ownref">
<c-input v-model="model.cldgrp.rec.ownref" maxlength="16" placeholder="请输入" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="11" :offset="1">
<el-form-item label="汇票类型" prop="cldgrp.rec.chktyp">
<c-select v-model="model.cldgrp.rec.chktyp" style="width: 100%" placeholder="请输入汇票类型" disabled>
<el-option v-for="item in codes.chktyp" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<c-col :span="12">
<el-form-item label="托收币种金额" prop="cldgrp.cbs.max.cur">
<c-input v-model="model.cldgrp.cbs.max.cur" style="width:100%" placeholder="请选择托收币种金额"
disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="11" :offset="1">
<el-form-item label="" label-width="0" prop="cldgrp.cbs.max.amt" style="width:100%">
<c-input v-model="model.cldgrp.cbs.max.amt" style="width:100%" placeholder="请输入托收余额"
disabled></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="11" :offset="1">
<el-form-item label="票据类型" prop="cldgrp.rec.colflg">
<c-select v-model="model.cldgrp.rec.colflg" style="width: 100%"
placeholder="请输入票据类型" disabled>
<el-option v-for="item in codes.colflg" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<c-col :span="12">
<el-form-item label="托收余额" prop="cldgrp.cbs.opn1.cur">
<c-input v-model="model.cldgrp.cbs.opn1.cur" style="width:100%" placeholder="请选择托收余额"
disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="11" :offset="1">
<el-form-item label-width="0" prop="cldgrp.cbs.opn1.amt">
<c-input v-model="model.cldgrp.cbs.opn1.amt" placeholder="请输入托收余额" disabled></c-input>
</el-form-item>
</c-col>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<el-form-item label="代收行参考号" prop="cldgrp.rec.colref">
<c-input v-model="model.cldgrp.rec.colref" maxlength="16" placeholder="请输入代收行参考号">
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<el-form-item label="代收行名称" prop="cldgrp.rec.colptynam">
<c-input v-model="model.cldgrp.rec.colptynam" maxlength="40" placeholder="请输入代收行名称"
disabled>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<el-form-item label="创建日期" prop="cldgrp.rec.credat">
<c-date-picker type="date" v-model="model.cldgrp.rec.credat" style="width:100%"
placeholder="请选择创建日期" disabled></c-date-picker>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="11">
<el-form-item label="选中票据份数" prop="cldgrp.rec.count">
<c-input v-model="model.cldgrp.rec.count" placeholder="请输入选中票据份数" disabled></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-edit-table :model="model" v-bind="docgrd">
</c-edit-table>
</c-col>
</div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Clttra/Event"
export default {
inject: ['root'],
props: ["model", "codes"],
mixins: [commonProcess],
data() {
return {
docgrd: {
columns: [
{
title: "核对号",
width: "120px",
dataIndex: "chcknum",
show: "text",
},
{
title: "托收编号",
width: "120px",
dataIndex: "ownref",
show: "text",
},
{
title: "Name of CC contact",
width: "220px",
dataIndex: "nam",
show: "text",
},
{
title: "委托人",
width: "200px",
dataIndex: "prenam",
show: "text",
},
{
title: "币种",
width: "100px",
dataIndex: "cur",
show: "text",
},
{
title: "balance",
width: "100px",
dataIndex: "amt",
show: "text",
},
{
title: "PAY TO",
width: "100px",
dataIndex: "paytoamt",
show: "input",
},
],
urls: "bptbck.bptbckg",
},
}
},
methods: { ...Event },
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="left"
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="Sel">
<c-content>
<m-Sel :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--PD000529 -->
<el-tab-pane label="报文和面函" name="docpan">
<c-content>
<m-docpan :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--PD000546 -->
<el-tab-pane label="附件" name="doctre">
<c-content>
<m-doctre :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--PD000000 -->
<el-tab-pane label="提示信息" name="coninfp">
<c-content>
<m-coninfp :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--PD000000 -->
<el-tab-pane label="账务" name="setmod">
<c-content>
<m-setmod :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
<!-- <el-button size="small">备忘录</el-button> -->
<!-- <el-button size="small">影像信息</el-button> -->
<!-- <el-button size="small">保存模板</el-button> -->
<!-- <el-button size="small">使用模板</el-button> -->
<!-- <el-button size="small">制裁信息</el-button> -->
<!-- <el-button size="small">拆分报文</el-button> -->
<!-- <el-button size="small">提示</el-button> -->
</c-function-btn>
</c-page>
</div>
</template>
<script>
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Clttra from "../model";
import operationFunc from "~/mixin/operationFunc";
import Check from "../model/check";
import event from "../event";
import Sel from "./Sel";
import Engp from "~/components/business/engp/views";
import Setmod from "~/components/business/setmod/views";
import Glentry from "~/components/business/glentry/views";
import Coninfp from "~/componenpm i less-loadernts/business/coninfp/views";
import Docpan from "~/components/business/docpan/views";
import Doctre from "~/components/business/doctre/views";
import Limitbody from "~/components/business/limitbody/views";
export default {
name: "Clttra",
components: {
"m-Sel": Sel,
"m-setmod": Setmod,
"m-engp": Engp,
"m-glentry": Glentry,
"m-docpan": Docpan,
"m-doctre": Doctre,
"m-coninfp": Coninfp,
},
provide() {
return {
root: this
}
},
mixins: [event, operationFunc], // 里面包含了Default、Check等的公共处理
data() {
return {
tabVal: "Sel",
trnName: "clttra",
model: new Clttra().data,
rules: Check,
codes: {
...CodeTable
},
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
}
},
created: async function () {
// console.log("进入clttra交易");
// let rtnmsg = await this.init(this.$route.query)
// if (rtnmsg.respCode == SUCCESS) {
// //TODO 处理数据逻辑
// if (this.isInDisplay) {
// this.restoreDisplay();
// }
// this.updateModel(rtnmsg.data);
// this.model.bptbck.bptbckg = rtnmsg.data.ccdbatg;
// console.log(this.model.bptbck.bptbckg);
// }
// else {
// this.$notify.error({ title: '错误', message: '服务请求失败!' });
// }
},
mounted() {
this.init();
},
}
</script>
<style>
</style>
......@@ -88,7 +88,7 @@ const Business = [
{ path: 'infccd', component: () => import('~/business/infccd/views'), name: 'infccd', meta: { title: '光票托收入口交易' }},
{ path: 'cctdav', component: () => import('~/business/cctdav/views'), name: 'cctdav', meta: { title: '光票托收开立' }},
{ path: 'cltdav', component: () => import('~/business/cltdav/views'), name: 'cltdav', meta: { title: '打包托收开立' }},
// { path: 'clttra', component: () => import('~/business/clttra/views'), name: 'clttra', meta: { title: '打包托收催收' }},
{ path: 'clttra', component: () => import('~/business/clttra/views'), name: 'clttra', 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