Commit 12d4dae4 by WH

feat:sptdoc新建

parent 431607e4
......@@ -33,13 +33,15 @@ export default {
if (typeof(this.$route.query.brdinr) == 'undefined') {
params.brdgrp.rec.inr = null
}
const frmSpt = this.$route.query.frm||false;
debugger
const res = await Api.post('/service/litdck/init', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
lidgrp:{
rec:{
inr: this.$route.query.inr
inr: frmSpt?this.$route.query.inr:null
}
},
......
......@@ -24,6 +24,7 @@ export default {
spt: JSON.parse(localStorage.getItem('row_' + this.trnName)),
trninr: this.$route.query.trninr,
}
debugger
const res = await Api.post('/service/litopn/init', {
...params,
transName: this.trnName,
......
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.lidgrp.apl.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.lidgrp.apl));
// }
// if (model.lidgrp.adv.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.lidgrp.adv));
// }
// if (model.lidgrp.ben.pts.extkey) {
// ptsptaList.push(this.buildPtspta(model.lidgrp.ben));
// }
let dataObj = {
// rec: {
// objtyp: 'LID',
// objinr: model.lidgrp.rec.inr,
// ownref: model.lidgrp.rec.ownref,
// opndat: model.lidgrp.rec.opndat,
// expdat: model.lidgrp.rec.expdat,
// branchInr: model.lidgrp.rec.branchinr,
// hndtyp: model.lidgrp.rec.hndtyp,
// gartyp: model.lidgrp.rec.gartyp,
// fingua: model.lidgrp.rec.fingua,
// // segtyp: model.lidgrp.ghd.segtyp,
// fromflg: model.lidgrp.rec.fromflg,
// othersno: model.lidgrp.rec.othersno,
// sndto: model.lidgrp.rec.sndto,
// // swiftflg: model.gitp.swiftflg,
// giduil: model.lidgrp.rec.giduil,
// purpos: model.lidgrp.rec.purpos,
// revflg: model.lidgrp.rec.revflg,
// cnfsta: model.lidgrp.rec.cnfsta,
// },
// cbsMap: {
// MAX: model.brdgrp.cbs.max,
// OLDMAX: model.brdgrp.cbs.oldmax,
// MAX2: model.brdgrp.cbs.max2,
// NOM1: model.brdgrp.cbs.nom1,
// OPN1: model.brdgrp.cbs.opn1,
// MAC: model.brdgrp.cbs.mac,
// MAC2: model.brdgrp.cbs.mac2,
// OPC2: model.brdgrp.cbs.opc2,
// CNF: model.brdgrp.cbs.cnf,
// },
// ptsList: ptsptaList,
transName: trnName,
userId: window.sessionStorage.userId ? window.sessionStorage.userId : 'ZL'
};
return dataObj
},
}
\ No newline at end of file
import Api from "@/service/Api";
export default {
methods: {
async init() {
console.log(this.$route.query.inr)
const res = await Api.post('/service/sptdoc/init', {
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
sptInr:this.$route.query.inr
});
},
// 提交
handleSubmit() {
this.handleCheck(true).then(async () => {
let params = {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
objinr: this.model.spt.objinr
}
// 精简cfagit
if (params.cfagit && params.cfagit.cfaflg !== '1') {
delete params.cfagit
}
// 精简cnybop
if (params.cnybop && params.cnybop.vouflg !== '1') {
delete params.cnybop.cnyvou
}
const res = await Api.post(`/service/${this.trnName}/save`, params);
if (res.respCode === SUCCESS) {
this.$notify({
title: '成功',
message: '提交成功',
type: 'success',
});
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.push('/taskList')
this.$store.commit("setTaskListTabVal", 'trnrel');
}
})
},
// 检核
handleCheck(isSubmit) {
return new Promise((resolve) => {
// 前端检验
this.$refs['modelForm'].validate(async (validStatic) => {
if (validStatic) {
const rtnmsg = await Api.post(`/service/${this.trnName}/checkAll`, {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
if (rtnmsg.respCode === SUCCESS) {
let errorRules = rtnmsg.data;
let keysList = Object.keys(errorRules)
// 如果后端返回的对象为空,则后端校验成功
if (errorRules && !keysList.length) {
// 清除之前的校验状态
this.$refs['modelForm'].clearValidate();
if (!isSubmit) {
this.$notify({
title: "成功",
message: "校验成功",
type: "success",
});
}
resolve()
return
}
const tab = this.showBackendErrors(errorRules)
if (tab) {
// tab切换之后,需出发tab-click的事件
if (tab.name !== this.tabVal) {
this.isChecking = true
this.tabClick(tab);
}
this.$notify({
title: "错误",
message: "校核失败",
type: "error",
});
return
}
}
} else {
// 前端校验失败
this.$notify({
title: '失败',
message: '校验失败',
type: 'error',
});
this.showFrontendErrors()
}
})
})
},
// 获取gitopn弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.recpan.ptygetSdamodDadrcv.pts.extkey,
};
let res = await Api.post('/service/ptspta/list', params);
if (res.respCode == SUCCESS) {
console.log(this.root)
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.model.recpan.ptygetSdamodDadrcv.pts = res.data.pts
}
},
//根据交易获取相关
}
}
export default {
}
\ No newline at end of file
import Pts from '~/components/business/commonModel/Pts';
export default class Sptrou {
constructor() {
this.data = {
selflg: '',
spt: {
objinr:'',
objnam: '',
txt: '',
crtcur: '',
crtamt: '',
ownusg: '',
pricod: '',
inftxt: '',
infdsp: '',
usr: '',
dat: new Date(),
cretrn: 'SPTDOC',
branchinr:'00000047',
bchkeyinr:'00000047'
},
recpan: {
tim: new Date().getTime(),
atptxt: '',
// atpget: {
// sdamod: {
// cod: '',
// }
// },
atpgetSdamodCod:'',
// conget: {
// sector: '',
// },
congetSector: '',
congetSelref: '',
// ptyget: {
// sdamod: {
// dadrcv: ''
// }
// },
ptygetSdamodDadrcv: {
pts: new Pts().data,
},
// usrget: {
// sdamod: {
// dadrcv: ''
// }
// }
usrgetSdamodDadrcv: window.sessionStorage.userId || 'ZL',
}
}
}
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- 左 -->
<el-col>
<c-col :span="12">
<c-col :span="12">
<el-form-item label="Contract Amount" prop="spt.crtcur">
<c-select
v-model="model.spt.crtcur"
style="width: 100%"
placeholder="币种"
:code="codes.curtxt1"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item
style="text-align: left; margin-left: 5px"
label-width="0px"
prop="spt.crtamt"
>
<c-input-number v-if="model.spt.crtcur =='JPY'"
v-model="model.spt.crtamt"
style="text-align: left;
width: 90%"
placeholder="请输入金额"
></c-input-number>
<c-input-currency v-else
v-model="model.spt.crtamt"
style="text-align: left;
width: 90%"
placeholder="请输入金额"
></c-input-currency>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<c-col :span="24">
<el-form-item label="Customer(APL/BEN...)" prop="recpan.ptygetSdamodDadrcv.pts.extkey">
<c-fullbox>
<c-input
v-model="model.recpan.ptygetSdamodDadrcv.pts.extkey"
style="width: 100%"
maxlength="16"
placeholder=""
@keyup.enter.native="
queryGridEtyPromptDialogData('PTYGETSDAMODDADRCV', 'C')
"
></c-input>
<template slot="footer">
<c-button
style="margin: 0 10px 0 10px; padding: 0 12px"
size="small"
type="primary"
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="recpan.ptygetSdamodDadrcv.pts.adrblk">
<c-input
v-model="model.recpan.ptygetSdamodDadrcv.pts.adrblk"
type="textarea"
:rows="4"
maxlength="80"
show-word-limit
placeholder=""
></c-input>
</el-form-item>
</c-col>
</c-col>
<!-- <c-col :span="12">-->
<!-- <el-form-item>-->
<!-- <c-col :span="4">-->
<!-- <template>-->
<!-- <c-checkbox-->
<!-- v-model="checked"-->
<!-- @change="open"-->
<!-- style="float: right; text-align: center"-->
<!-- >Documents Attached-->
<!-- </c-checkbox-->
<!-- >-->
<!-- </template>-->
<!-- </c-col>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <c-col :span="4">-->
<!-- <template>-->
<!-- <c-checkbox-->
<!-- @change="open"-->
<!-- style="float: right; text-align: center"-->
<!-- >File Upload-->
<!-- </c-checkbox-->
<!-- >-->
<!-- </template>-->
<!-- </c-col>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
</c-col>
<c-col :span="24">
<c-col :span="8">
<el-form-item
label="Responsible User"
style="width: 100%"
prop="recpan.usrgetSdamodDadrcv"
>
<c-fullbox>
<c-input
maxlength="8"
disabled
v-model="model.recpan.usrgetSdamodDadrcv"
></c-input>
<template slot="footer">
<c-button
size="small"
style="margin-left: 10px; padding: 0 12px"
type="primary"
icon="el-icon-search"
>
</c-button>
</template>
</c-fullbox>
</el-form-item>
</c-col>
<!-- <c-col :span="8">-->
<!-- <el-form-item-->
<!-- label="Responsible Group"-->
<!-- style="width: 100%"-->
<!-- prop="spt.ownusg"-->
<!-- >-->
<!-- <c-select-->
<!-- placeholder=""-->
<!-- style="width: 100%"-->
<!-- v-model="model.spt.ownusg"-->
<!-- >-->
<!-- </c-select>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<!-- <c-col :span="8">-->
<!-- <el-form-item-->
<!-- label="Priority"-->
<!-- style="width: 100%"-->
<!-- prop="spt.pricod"-->
<!-- >-->
<!-- <c-select-->
<!-- placeholder=""-->
<!-- style="width: 100%"-->
<!-- v-model="model.spt.pricod"-->
<!-- >-->
<!-- </c-select>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
</c-col>
<c-col :span="24">
<c-col :span="20">
<el-form-item label="Info Text" prop="spt.inftxt">
<c-input
type="textarea"
maxlength="390"
:rows="6"
show-word-limit
placeholder=""
v-model="model.spt.inftxt"
></c-input>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item
label=""
style="width: 100%"
prop="spt.infdsp"
>
<c-select
placeholder=""
style="width: 100%"
v-model="model.spt.infdsp"
>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="5">
<el-form-item label="Entered by" prop="spt.usr">
<c-input
v-model="modelsptusr"
disabled
></c-input>
</el-form-item>
</c-col>
<c-col :span="5">
<el-form-item label="on" prop="spt.dat">
<el-date-picker
type="date"
disabled
v-model="model.spt.dat"
>
</el-date-picker>
</el-form-item>
</c-col>
<c-col :span="5">
<el-form-item label="at" prop="recpan.tim">
<el-time-picker
disabled
v-model="model.recpan.tim">
</el-time-picker>
</el-form-item>
</c-col>
<c-col :span="5">
<el-form-item label="in TRN" prop="spt.cretrn">
<c-input
v-model="model.spt.cretrn"
disabled
></c-input>
</el-form-item>
</c-col>
</c-col>
</el-col>
</div>
</template>
<script>
import event from "@/business/sptdoc/event";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
data() {
return {
checked: true
// activeNames: ['rog'],
};
},
methods: {},
created: function () {
},
computed:{
modelsptusr(){
this.model.spt.usr = window.sessionStorage.userId || 'ZL'
return this.model.spt.usr
}
}
// name: "ReferenceComponent"
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- 左 -->
<el-col :span="11">
<!-- <c-col :span="24">-->
<!-- <el-form-item label="受益人名称" prop="lidgrp.ben.pts.nam">-->
<!-- <c-input-->
<!-- disabled-->
<!-- v-model="model.lidgrp.ben.pts.nam"-->
<!-- maxlength="40"-->
<!-- :placeholder="$t('other.please_enter') + 'Name of Party'"-->
<!-- ></c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<c-col :span="24">
<el-form-item label="Register Referance No." prop="spt.objnam">
<c-input
v-model="model.spt.objnam"
disabled
maxlength="40"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Transaction" prop="recpan.atpgetSdamodCod">
<c-fullbox>
<c-input
v-model="model.recpan.atpgetSdamodCod"
maxlength="40"
></c-input>
<template slot="footer">
<c-button
style="margin: 0 10px 0 10px; padding: 0 12px"
size="small"
type="primary"
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="Business Sector" prop="recpan.congetSector">
<c-select
v-model="modelrecpancongetSector"
disabled
maxlength="40"
></c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Reference No." prop="recpan.congetSelref">
<c-fullbox>
<c-input
v-model="model.recpan.congetSelref"
:disabled = this.model.selflg
maxlength="40"
></c-input>
<template slot="footer">
<c-button
style="margin: 0 10px 0 10px; padding: 0 12px"
size="small"
type="primary"
icon="el-icon-search"
@click="searchInfo()"
>
</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>
</el-col>
<!--RIGHT-->
<c-col :span="12" style="padding-left: 20px">
<c-col :span="24">
<el-form-item label="Name" prop="spt.txt">
<c-input
v-model="spttxt"
disabled
maxlength="40"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item prop="recpan.atptxt">
<c-input
v-model="model.recpan.atptxt"
disabled
maxlength="40"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item>
<el-button plain>Show Inc.</el-button>
<el-button plain>Rtn SWT/CHT</el-button>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item>
<c-input
disabled
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<el-dialog :visible.sync="dialogTableVisible">
<el-table :data="gridData" @row-dblclick="target">
<el-table-column property="inr" label="inr" width="150"></el-table-column>
<el-table-column property="ownref" label="ownref" width="200"></el-table-column>
<el-table-column property="nam" label="nam"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import event from '../event'
import Api from "@/service/Api";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
data() {
return {
// activeNames: ['rog'],
gridData: [],
dialogTableVisible: false
};
},
methods: {
async searchInfo() {
let res = await Api.post('/service/sptdoc/search', {
searchNam: this.model.recpan.atpgetSdamodCod.toUpperCase(),
searchOwnref: this.model.recpan.congetSelref,
});
this.gridData = res.data
this.dialogTableVisible = true
},
async target(row) {
let index = row.nam.lastIndexOf(" ")
let amt = row.nam.substr(index+1,row.nam.length)
this.model.spt.crtamt=amt
let cur = row.nam.substr(index-3,3)
this.model.spt.crtcur=cur
//根据交易名和inr在后端进行判断
let res = await Api.post('/service/sptdoc/target', {
searchNam: this.model.recpan.atpgetSdamodCod.toUpperCase(),
searchInr: row.inr,
});
this.dialogTableVisible = false
this.model.recpan.ptygetSdamodDadrcv.pts.adrblk = res.data.nam
this.model.recpan.ptygetSdamodDadrcv.pts.extkey = res.data.extkey
debugger
let index1 = res.data.ownref.lastIndexOf("\\")
let text = res.data.ownref.substring(0,index1)
this.model.recpan.congetSelref = text
this.model.spt.objinr = row.inr
}
},
created: function () {
},
computed: {
modelrecpancongetSector(){
if (this.model.recpan.atpgetSdamodCod.toUpperCase() === 'LITOPN' ){
this.model.recpan.congetSector = 'Import L/C'
this.model.recpan.atptxt = 'Opening an Import L/C'
// this.model.spt.ownusg = '256CSV'
// this.model.spt.pricod = 'Normal'
this.model.selflg = true
}
if( this.model.recpan.atpgetSdamodCod.toUpperCase() === 'LITDCK' ){
this.model.recpan.congetSector = 'Import L/C'
this.model.recpan.atptxt = 'Receiving Documents'
this.model.selflg = false
}
if( this.model.recpan.atpgetSdamodCod.toUpperCase() === 'BRTSET' ){
this.model.recpan.congetSector = 'Import L/C'
this.model.recpan.atptxt = 'Settling Documents'
this.model.selflg = false
}
if( this.model.recpan.atpgetSdamodCod.toUpperCase() === 'BRTUCL' ){
this.model.recpan.congetSector = 'Import L/C'
this.model.recpan.atptxt = 'Settling Documents'
this.model.selflg = false
}
return this.model.recpan.congetSector
},
spttxt(){
let namTxt = this.model.recpan.ptygetSdamodDadrcv.pts.nam.substring(0,15)+ " " +this.model.spt.crtcur+" "+this.model.spt.crtamt
this.model.spt.txt = namTxt
return this.model.spt.txt
}
}
// name: "ReferenceComponent"
}
</script>
<style scoped>
</style>
\ 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">
<el-tab-pane label="Sptdoc" name="ReferenceComponent">
<c-content>
<m-ReferenceComponent :model="model" :codes="codes"/>
<m-DetailPanel :model="model" :codes="codes"/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<!-- 选择数据的表格弹框 -->
<c-grid-ety-prompt-dialog
ref="etyDialog"
:promptData="promptData"
@select-ety="selectGridEtyPromptData"
>
</c-grid-ety-prompt-dialog>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleStash="handleStash"
>
</c-function-btn>
</div>
</template>
<script>
import CodeTable from '~/config/CodeTable';
import ReferenceComponent from './ReferenceComponent';
import DetailPanel from './DetailPanel';
import Sptdoc from '../model'
import operationFunc from "@/mixin/operationFunc";
import event from "../event";
import formRules from '../model/check';
export default {
name: 'Sptdoc',
components: {
'm-ReferenceComponent': ReferenceComponent,
'm-DetailPanel': DetailPanel,
},
provide() {
return {
root: this
}
},
mixins: [operationFunc, event], // 里面包含了Default、Check等的公共处理
data() {
return {
tabVal: 'ReferenceComponent',
trnName: 'sptdoc',
rules: formRules,
codes: {...CodeTable},
model : new Sptdoc().data,
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: []
},
}
},
methods: {},
mounted() {
this.init()
}
}
</script>
<style>
</style>
......@@ -50,10 +50,12 @@ export default {
this.$router.push({ path: 'business-new/sptpopup', query: { inr: inr } });
},
async continueEdit(row, scope) {
let inr = row.inr;
let trnName = row.frm.toLowerCase();
localStorage.setItem(`row_${row.frm.toLowerCase()}`, JSON.stringify(row))
this.$router.push({
path: 'business-new/' + trnName,
query: { inr: inr }
});
},
// pageSize改变
......
......@@ -98,6 +98,7 @@ const Business = [
{ path: 'inftrd', component: () => import('~/business/inftrd/views'), name: 'Inftrd', meta: { title: '进口融资查询' }},
{ path: 'trtset', component: () => import('~/business/trtset/views'), name: 'Trtset', meta: { title: '进口融资还款' }},
{ path: 'sptdoc', component: () => import('~/business/sptdoc/views'), name: 'Sptdoc', meta: { title: 'sptdoc' }},
]
......
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