Commit 0e033694 by liaoxing

cctdav添加

parent 774c4437
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.ccdgrp.col.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.ccdgrp.col));
}
if (model.ccdgrp.drr.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.ccdgrp.drr));
}
if (model.ccdgrp.dre.pts.extkey) {
ptsptaList.push(this.buildPtspta(model.ccdgrp.dre));
}
let dataObj = {
rec: {
objtyp: 'CCD',
ownref: model.ccdgrp.rec.ownref,
opndat: model.ccdgrp.rec.opndat,
expdat: model.ccdgrp.rec.expdat,
branchInr: model.ccdgrp.rec.branchInr,
hndtyp: model.ccdgrp.rec.hndtyp,
},
cbsMap: {
MAX: model.ccdgrp.cbs.max,
OPN1: model.ccdgrp.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: 'CCD',
objinr: model.ccdgrp.rec.inr,
ownref: model.ccdgrp.rec.ownref,
},
};
return params
},
buildDoctre (model, trnName) {
let params = {
...this.buildCommonData(model, trnName),
rec: {
objtyp: 'CCD',
objinr: model.ccdgrp.rec.inr,
ownref: model.ccdgrp.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/cctdav/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;
}
},
// 业务信息=》基本信息=》托收业务编号-----获取托收业务编号
async getCcdgrpOwnRef() {
let params = {
ptainr: this.model.ccdgrp.drr.pts.ptainr,
businessType: 'CC',
tbl: 'CC',
};
const loading = this.loading();
let res = await Api.post('/service/cctdav/getOwnRef', params);
if (res.respCode == SUCCESS) {
loading.close();
this.model.ccdgrp.rec.ownref = res.data;
}
},
// 点击获取按钮拉取当前key字段下的表单数据
queryFormData(key) {
console.log(key);
},
// 获取cctdav弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.ccdgrp[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;
}
},
// 选中cctdav弹框表格的行数据
async selectGridEtyPromptData(row) {
let params = {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.ccdgrp, row.role.toLowerCase(), res.data);
}
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
this.handleChangeForm(key, value);
},
// 初始化保函开立类型码表下拉列表
async queryHndtypCodeTableList(trnName) {
let params = {
cctp: {
swiftflg: this.model.cctp.swiftflg,
},
ccdgrp: {
rec: {
purpos: this.model.ccdgrp.rec.purpos,
},
},
transName: trnName.toUpperCase(),
};
let res = await Api.post('/service/cctdav/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 Cctdav {
constructor() {
this.data = {
cctdavl1blk: "",
ccdgrp: {
rec: {
ownref: "", // Our Reference .ccdgrp.rec.ownref
nam: "", // Name of CC contract .ccdgrp.rec.nam
regref: "", // Register Ref. .ccdgrp.rec.regref
ccform: "", // Form of Clean Coll. .ccdgrp.rec.ccform
modset: "", // Mode of Collection .ccdgrp.rec.modset
purflg: "", // Payment Disposition .ccdgrp.rec.purflg
tocsel: "", // Type of Check .ccdgrp.rec.tocsel
pretyp: "", // TYPE OF PRESENTER .ccdgrp.rec.pretyp
chcknum: "", // Check Number .ccdgrp.rec.chcknum
chkdat: "", // Date of Draft .ccdgrp.rec.chkdat
},
cbs: {
opn1: {
cur: "", // Open Amount .ccdgrp.cbs.opn1.cur
amt: "0", // Open Amount .ccdgrp.cbs.opn1.amt
},
max: {
cur: "", // Draft Amount .ccdgrp.cbs.max.cur
amt: "0", // Draft Amount .ccdgrp.cbs.max.amt
},
},
cor: {
pts: new Pts().data,
namelc: "", // 名称 .ccdgrp.cor.namelc
adrelc: "", // 地址 .ccdgrp.cor.adrelc
dbfadrblkcn: "", // Chinese address .ccdgrp.cor.dbfadrblkcn
},
pre: {
pts: new Pts().data,
namelc: "", // 名称 .ccdgrp.pre.namelc
adrelc: "", // 地址 .ccdgrp.pre.adrelc
dbfadrblkcn: "", // Chinese address .ccdgrp.pre.dbfadrblkcn
},
dro: {
pts: new Pts().data,
namelc: "", // 名称 .ccdgrp.dro.namelc
adrelc: "", // 地址 .ccdgrp.dro.adrelc
dbfadrblkcn: "", // Chinese address .ccdgrp.dro.dbfadrblkcn
},
col: {
pts: new Pts().data,
namelc: "", // 名称 .ccdgrp.col.namelc
adrelc: "", // 地址 .ccdgrp.col.adrelc
dbfadrblkcn: "", // Chinese address .ccdgrp.col.dbfadrblkcn
},
orddat: "", // Date of Order .ccdgrp.orddat
blk: {
setins: "", // Settlement Instructions .ccdgrp.blk.setins
},
},
cctp: {
recget: {
sdamod: {
seainf: "", // .cctp.recget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .cctp.recget.sdamod.dadsnd
},
},
corp: {
ptsget: {
sdamod: {
seainf: "", // .cctp.corp.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .cctp.corp.ptsget.sdamod.dadsnd
},
},
},
prep: {
ptsget: {
sdamod: {
seainf: "", // .cctp.prep.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .cctp.prep.ptsget.sdamod.dadsnd
},
},
},
drop: {
ptsget: {
sdamod: {
seainf: "", // .cctp.drop.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .cctp.drop.ptsget.sdamod.dadsnd
},
},
},
colp: {
ptsget: {
sdamod: {
seainf: "", // .cctp.colp.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .cctp.colp.ptsget.sdamod.dadsnd
},
},
},
usr: {
extkey: "", // User ID .cctp.usr.extkey
},
usrget: {
sdamod: {
seainf: "", // .cctp.usrget.sdamod.seainf
},
},
},
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,
}
}
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12">
<c-form-item label="付款指示" prop="ccdgrp.blk.setins">
<c-input
type="textarea"
:rows="6"
v-model="model.ccdgrp.blk.setins"
maxlength="600"
show-word-limit
placeholder="请输入付款指示"
:disabled="model.ccdgrp.rec.modset == '2'"
></c-input>
</c-form-item>
</c-col>
<c-col :span="12">
<c-button
size="small"
type="primary"
@click="
showGridPromptDialog(
'cctp.setins.buttxmsel',
null,
null,
{ TXT: 'ccdgrp.blk.setins' },
{ TXT: false },
'doxpDialog'
)
"
>
...
</c-button>
</c-col>
</div>
</template>
<script>
import event from "../event";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
data() {
return {};
},
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="right"
size="small"
:validate-on-rule-change="false"
>
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<!--cctdav PD000001 -->
<el-tab-pane label="建立光票托收" name="cctdav1">
<c-content>
<m-cctdav1 :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--engp PD000000 表外记账 -->
<el-tab-pane label="表外记账" name="engp">
<m-engp :model="model" :codes="codes" />
</el-tab-pane>
<!--setmod PD000000 结算 -->
<el-tab-pane label="费用账务" name="setmod">
<m-setmod :model="model" :codes="codes" />
</el-tab-pane>
<!--glemod PD000001 -->
<el-tab-pane label="会计分录" name="glentry">
<m-glentry :model="model" :codes="codes" />
</el-tab-pane>
<!--coninf PD000000 提示信息 -->
<el-tab-pane label="备查附言" name="coninfp">
<m-coninfp :model="model" :codes="codes" />
</el-tab-pane>
<!--trndoc PD000529 &Messages -->
<el-tab-pane label="报文和面函" name="docpan">
<m-docpan :model="model" :codes="codes" />
</el-tab-pane>
<!--trndoc PD000546 附件 -->
<el-tab-pane label="附件" name="doctre">
<m-doctre :model="model" :codes="codes" />
</el-tab-pane>
<!--cctp PD000065 Settlement Instructions -->
<el-tab-pane label="结算说明" name="setinsp">
<m-setinsp :model="model" :codes="codes" />
</el-tab-pane>
</c-tabs>
</el-form>
<c-grid-ety-prompt-dialog
ref="etyDialog"
:promptData="promptData"
@select-ety="selectGridEtyPromptData"
>
<!-- v-on:select-ety="selectEty" -->
</c-grid-ety-prompt-dialog>
<!-- <c-grid-ety-prompt-dialog
ref="doxpDialog"
:isPty="false"
:promptData="promptData"
@select-ety="selectMsg"
>
</c-grid-ety-prompt-dialog> -->
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleStash="handleStash"
>
</c-function-btn>
</c-page>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import Cctdav from "../model"
import formRules from '../model/check'
import Cctdav1 from "./Cctdav1";
import Setinsp from "./Setinsp";
import Setmod from "~/components/business/setmod/views"
import Coninfp from "~/components/business/coninfp/views";
import Docpan from "~/components/business/docpan/views";
import Engp from "~/components/business/engp/views";
import Glentry from "~/components/business/glentry/views";
import Doctre from "~/views/Public/Doctre"
import operationFunc from "@/mixin/operationFunc";
import event from "../event";
export default {
name: "Cctdav",
components: {
"m-cctdav1": Cctdav1,
"m-docpan": Docpan,
"m-doctre": Doctre,
"m-coninfp": Coninfp,
"m-setmod": Setmod,
"m-glentry": Glentry,
"m-setinsp": Setinsp,
"m-engp": Engp,
},
provide() {
return {
root: this,
};
},
mixins: [operationFunc, event], // 里面包含了Default、Check等的公共处理
data() {
return {
tabVal: "cctdav1",
trnName: "cctdav",
trnType: "",
model: new Cctdav().data,
rules: formRules,
codes: { ...CodeTable },
};
},
activeNames: ["engp"],
methods: {
// myTabClick(tab) {
// this.tabClick(tab);
/**
* do it yourself
**/
// },
},
created: async function () {
// console.log("进入cctdav交易");
// let rtnmsg = await this.init({});
// if (rtnmsg.respCode == SUCCESS) {
// this.updateModel(rtnmsg.data);
// //TODO 处理数据逻辑
// if (this.isInDisplay) {
// this.restoreDisplay();
// }
// } else {
// this.$notify.error({ title: "错误", message: "服务请求失败!" });
// }
},
mounted () {
this.init()
// this.queryHndtypCodeTableList(this.trnName)
},
};
</script>
<style>
</style>
......@@ -553,10 +553,10 @@ export default {
label: '光票托收催收',
route: '/business-new/ccttra'
},
{
label: '光票托收开立',
route: '/business-new/cctdav'
},
// {
// label: '光票托收开立',
// route: '/business-new/cctdav'
// },
{
label: '光票托收结汇',
route: '/business-new/cctset'
......@@ -613,7 +613,7 @@ export default {
// }
// },
toCctdav() {
this.$router.history.push("/business/cctdav");
this.$router.history.push("/business-new/cctdav");
},
},
created: function () {},
......
......@@ -16,7 +16,6 @@
<c-grid-ety-prompt-dialog
ref="etyDialog"
:promptData="promptData"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
</c-tabs>
......
......@@ -86,6 +86,7 @@ const Business = [
// { path: 'bctcan', component: () => import('~/business/bctcan/views'), name: 'bctcan', meta: { title: '进口代收注销' }},
{ path: 'bctrad', component: () => import('~/business/bctrad/views'), name: 'bctrad', meta: { title: '进口代收二次收单' }},
{ path: 'infccd', component: () => import('~/business/infccd/views'), name: 'infccd', meta: { title: '光票托收入口交易' }},
{ path: 'cctdav', component: () => import('~/business/cctdav/views'), name: 'cctdav', 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