Commit f5109e03 by 吴佳
parents dad9fbd2 90a0570f
......@@ -34,6 +34,10 @@
},
handleResize: (contentRef, height) => {
let content = document.getElementById(contentRef)
if(!content){
//切换顶部tab,会隐藏元素,所以有可能找不到
return
}
let clientHeight = `${document.documentElement.clientHeight}`
content.style.height = clientHeight - height + 'px'
}
......
......@@ -20,6 +20,7 @@
v-if="showSelection"
:reserve-selection="true"
></el-table-column>
<el-table-column
v-for="(item, key) in tableColumns"
:key="key"
......@@ -27,6 +28,9 @@
:label="item.label"
:width="item.width"
>
<template slot-scope="scope">
<span>{{!item.render?scope.row[item.prop]:item.render(item,scope)}}</span>
</template>
</el-table-column>
<slot></slot>
<el-table-column fixed="right" width="48px" v-if="showButtonFlg" class-name="buttonColumn">
......@@ -185,6 +189,24 @@ export default {
const obj = {};
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if(typeof line === "object" ){
//如果是对象,支持自定义处理
//{width,position,index,label,pattern,render}
let {width,position,index,label,pattern,render,...rest} = line
position += ''
if (!obj[position]) {
obj[position] = [];
}
obj[position].push({
idx:index,
prop:label,
width:width+'px',
pattern,
render,
...rest
})
continue
}
if (etyReg.test(line)) {
const gs = line.match(etyReg);
const columnName = gs[1];
......@@ -205,14 +227,24 @@ export default {
if (Object.hasOwnProperty.call(obj, k)) {
const o = obj[k];
const tableColumn = o.map((item) => item.prop).join("\n");
columnArr.push({
let colInfo = {
prop: tableColumn,
label: tableColumn,
width: o[0].width,
// width: "auto",
index: k,
children: o,
});
}
//支持自定义处理
if(o.length == 1){
if(o[0].pattern && this[o[0].pattern]){
colInfo.render = this[o[0].pattern]
colInfo.code = o[0].code
}else if(o[0].render){
colInfo.render = o[0].render
}
}
columnArr.push(colInfo);
}
}
const arr = columnArr.sort((a, b) => {
......@@ -271,6 +303,30 @@ export default {
handleColumnChange() {
this.selectAll = this.tableColumnsOrigin.length === this.columnGroup.length;
},
//补充自定义列处理函数
date(item,scope){
let value = scope.row[item.prop]
if(!value){
return ""
}
let idx = value.indexOf(" ")
if(idx > 0)
return value.substring(0,idx)
return value
},
code(item,scope){
let value = scope.row[item.prop]
let code = item.code
if(!value || !code){
return ""
}
let em = code.find(item=>item.value.trim() == value.trim())
if(!em){
return value
}
return em.label
}
}
};
</script>
......
......@@ -5884,5 +5884,24 @@ const CodeTable = {
atptxt: [
{ label: "开立信用证", value: "DITOPN" },
],
sptrelstatus:[
{label:'Incoming',value:'INC'},
{label:'Automatic',value:'AUT'},
{label:'To Correct',value:'COR'},
{label:'Manual',value:'MAN'},
{label:'Registered',value:'RIM'},
{label:'Pending',value:'PEN'},
{label:'Rejected',value:'REJ'},
{label:'Straight Through',value:'STP'},
{label:'Processing Pending',value:'PUP'},
{label:'Release Pending',value:'PUR'},
{label:'Branch Confirm',value:'CMC'},
{label:'Branch Register',value:'CMP'},
{label:'To Correct',value:'CMR'},
{label:'Branch Pending',value:'CMB'},
{label:'To Correct',value:'CTR'},
{label:'Done',value:'CAN'},
{label:'E Trade',value:'EJS'},
]
}
export default CodeTable;
\ No newline at end of file
......@@ -57,26 +57,42 @@ export default {
const tab = Utils.positioningErrorMsg(fieldErrors, fields);
return tab;
},
loading(text){
const loading = this.$loading({
lock: true,
text,
spinner: 'el-icon-loading',
background: 'rgba(200, 200, 200, 0.3)'
});
return loading
},
getRoot(){
return (this.root || this)
},
async init(params) {
const loading = this.loading("交易加载中")
let rtnmsg = await Api.post(this.declareParams.trnName + "/init", { params })
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
loading.close()
return rtnmsg
},
save(params) {
return Api.post(this.declareParams.trnName + "/saveData", this.wrapper(params))
async save(params) {
const loading = this.loading("正在保存交易")
let rtnmsg = await Api.post(this.declareParams.trnName + "/saveData", this.wrapper(params))
loading.close()
return rtnmsg
},
async executeCheck(rulePath,params){
const loading = this.loading("校验进行中")
let rtnmsg = await Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors)
}
loading.close()
return rtnmsg
},
async executeDefault(rulePath, params) {
......@@ -88,29 +104,41 @@ export default {
return rtnmsg
},
async executeRule(rulePath, params,delayCb) {
const loading = this.loading("正在请求数据")
let rtnmsg = await Api.post(this.declareParams.trnName + "/executeRule/" + rulePath, this.wrapper(params,delayCb))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors)
}
loading.close()
return rtnmsg
},
async checkAll(params) {
const loading = this.loading("正在校验数据")
const rtnmsg = await Api.post(this.declareParams.trnName + "/checkAll", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
loading.close()
return rtnmsg
},
pedding(params) {
return Api.post(this.declareParams.trnName + "/pending", this.wrapper(params))
async pedding(params) {
const loading = this.loading("正在暂存数据")
const rtnmsg = await Api.post(this.declareParams.trnName + "/pending", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
loading.close()
return rtnmsg
},
async restoreDisplay() {
let inr = this.$route.query.trn
if (!inr)
return
const loading = this.loading("快照数据加载中")
let data = await Api.post("display/" + inr)
Utils.copyValueFromVO(this.model, JSON.parse(data.data))
loading.close()
},
async executeNotify(params) {
const rtnmsg = await Api.post(this.declareParams.trnName + "/executeNotify", this.wrapper(params))
......
......@@ -108,8 +108,8 @@ export default {
{max: 20,message:"长度不能超过20"}
],
"didgrp.rec.utlnbr":[
{type: "string", required: false, message: "必输项"},
{max: 3,message:"长度不能超过3"}
{type: "number", required: false, message: "必输项"},
// {max: 3,message:"长度不能超过3"}
],
"bddgrp.prb.pts.extkey":[
{type: "string", required: false, message: "必输项"},
......@@ -194,8 +194,8 @@ export default {
{type: "date", required: false, message: "输入正确的日期"}
],
"bddgrp.rec.tenmaxday":[
{type: "string", required: false, message: "必输项"},
{max: 3,message:"长度不能超过3"}
{type: "number", required: false, message: "必输项"},
// {max: 3,message:"长度不能超过3"}
],
......
......@@ -407,7 +407,6 @@ export default {
const res = await this.executeRule("searow")
that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
this.model.trncorco.trnstm = res.data.trncorco_trnstm;
this.$store.commit("setTaskList", {key: "trnfnd", val: this.stmData.data.length});
this.$refs.paramsForm.clearValidate();
Utils.positioningErrorMsg(res.fieldErrors, this.$refs.paramsForm.fields)
......
......@@ -26,7 +26,6 @@ const Status = {
taskList: {
sptsel: 0,
trnrel: 0,
trnfnd: 0,
bopsel: 0,
sptbrk: 0,
diasel: 0,
......
......@@ -103,8 +103,6 @@ import Sptpopup from "./Sptsel/Sptpopup"
* 带有name的才会被添加进顶部的标签页里
*/
const BusRouter = [
{ path: 'sptpopup', component: Sptpopup, name: 'Sptpopup', meta: { title: '详情' } },
// { path: 'inftrnpsDetail', component: InftrnpsDetail, name: 'InftrnpsDetail', meta: { title: '详情' } },
{ path: 'sptpopup', component: Sptpopup, name: 'Sptpopup', meta: { title: '待经办详情' } },
{ path: 'trnfndsDetail', component: TrnfndsDetail, name: 'TrnfndsDetail', meta: { title: '已完成详情' } },
{ path: 'inftrnpsDetail', component: InftrnpsDetail, name: 'InftrnpsDetail', meta: { title: '待复核详情' } },
......
......@@ -151,7 +151,6 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
console.log(rtnmsg);
debugger;
Utils.copyValueFromVO(this.model, rtnmsg.data);
console.log(this.model);
if (this.isInDisplay) {
......
......@@ -251,7 +251,11 @@
title="历史信息"
width="800"
trigger="click"
:ref="'popover_' + scope.row.IDX"
>
<div style="text-align: right; margin-top: -30px; margin-right: 5px; font-size: 16px;">
<span class="el-icon-close" @click="closeTrn('popover_' + scope.row.IDX)"/>
</div>
<c-istream-table
:list="trnData.data"
:columns="trnData.columns"
......@@ -346,8 +350,10 @@ export default {
'8 6 "Beneficiary" 150',
'9 7 "Party Number" 140',
'10 8 "Presenting Bank" 220',
'3 9 "Opened" 150',
'4 10 "Closed" 80',
// '3 9 "Opened" 150',
// '4 10 "Closed" 80',
{index:3,position:9,width:100,pattern:'date',label:'Opened'},
{index:4,position:10,width:100,pattern:'date',label:'Closed'},
'11 11 "Doc Amount Cur" 120',
'12 12 "Doc Amount" 120',
'13 13 "Open Amount Cur" 130',
......@@ -377,8 +383,11 @@ export default {
this.$router.history.push("/business/" + code)
this.initdialog = false
},
closeTrn(refId){
this.$refs[refId].doClose();
},
async getTrnInfo(idx, row) {
debugger;
this.model.infcon.objinr = row["INR"];
this.model.didgrp.rec.inr = row["INR"];
......
......@@ -317,7 +317,11 @@
title="历史信息"
width="800"
trigger="click"
:ref="'popover_' + scope.row.IDX"
>
<div style="text-align: right; margin-top: -30px; margin-right: 5px; font-size: 16px;">
<span class="el-icon-close" @click="closeTrn('popover_' + scope.row.IDX)"/>
</div>
<c-istream-table
:list="trnData.data"
:columns="trnData.columns"
......@@ -342,6 +346,13 @@
>
详情
</c-button>
<!-- <c-button
style="margin-left: 0"
size="small"
>
关闭
</c-button> -->
</el-popover>
<!-- <c-button
......@@ -609,8 +620,10 @@ export default {
'9 6 "Beneficiary Party Number" 170',
'10 7 "Beneficiary" 150',
'11 8 "BIC" 150',
'4 9 "Opened" 150',
'5 10 "Expired" 150',
// '4 9 "Opened" 150',
{index:4,position:9,width:100,pattern:'date',label:'Opened'},
// '5 10 "Expired" 150',
{index:5,position:10,width:100,pattern:'date',label:'Expired'},
'6 11 "Closed" 100',
'12 12 "L/C Amt Cur" 100',
'13 13 "L/C Amount" 120',
......@@ -668,6 +681,9 @@ export default {
this.trnData.data = rtnmsg.data.infcon_trnstm.rows;
}
},
closeTrn(refId){
this.$refs[refId].doClose();
},
toDitopn(){
this.$router.history.push("/business/ditopn")
}
......
......@@ -433,7 +433,8 @@ export default {
'4 1 "交易代码" 70 ',
'5 2 "业务编号" 300',
'6 3 "交易名称" 140',
'1 4 "状态" 60 1 tdViewTypeEdit:0 1 SPT:STA',
//'1 4 "状态" 60 1 tdViewTypeEdit:0 1 SPT:STA',
{index:1,position:4,width:100,pattern:'code',label:'状态',code:this.codes.sptrelstatus},
'17 5 "报文类型" 100',
'18 6 "对方银行BIC" 110',
'7 7 "创建时间" 160 20 DateTime 1',
......
......@@ -48,7 +48,8 @@ export default {
rules:null,
codes:{
flt:CodeTable.flt,
dflg:CodeTable.dflg
dflg:CodeTable.dflg,
sptrelstatus:CodeTable.sptrelstatus,
},
}
},
......
......@@ -90,7 +90,7 @@ export default {
that.model = Utils.copyValueFromVO(that.model, res.data);
// that.$refs.inftrnps.stmData.columns=res.data.trncorco_trnstm.rows
this.$refs.inftrnps.handleSearch();
this.$refs.inftrnps.trnfndhandleSearch();
});
},
};
......
......@@ -23,10 +23,6 @@
</el-tab-pane>
<el-tab-pane label="已完成列表" name="trnfnd">
<span slot="label">
已完成列表
<el-badge v-if="$store.state.Status.taskList.trnfnd>0" :value="$store.state.Status.taskList.trnfnd" :max="99"/>
</span>
<c-content :height="160">
<t-trnfnd />
</c-content>
......
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