Commit fbfa30d9 by liushikai

汇款查询

parent fe91e259
......@@ -29,6 +29,15 @@ export default {
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
display(index, row) {
Api.post("getTrnNameByInr", { inr:row['INR'] }).then((res) => {
if (res.respCode == SUCCESS) {
const trnName = res.data.toLowerCase();
let viewurl = "/#/display/" + trnName + "?trn=" + row['INR']
window.open(viewurl, 'newwindow', 'height=1500,width=1200,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
});
},
async onInfbutUserow(){
let rtnmsg = await this.executeRule("infbut.userow")
if(rtnmsg.respCode == SUCCESS)
......
<template>
<div class="busnavbar">
<div class="busnavbar-items">
<c-button style="margin-left:7px;" size="medium" type="primary" class="medium_bcs" v-for="(item,index) in codeList" v-bind:key="index" @click.native="onNarBtnClick(item.code,index)" :title="item.title" :disabled="item.isDis==='N'">{{item.label}}</c-button>
</div>
</div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Cptsel from "~/model/Cptsel"
import CommonProcess from "~/mixin/CommonProcess"
export default {
props:["ownref"],
components:{
},
mixins: [CommonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
trnName:'cptsel',
model:new Cptsel().data,
navcode:[
// {code:"",label:"",isDis:"",title:""},
],
}
},
methods:{
//各入口按钮请求
async onNarBtnClick(code,i){
this.model.cfgfil.subtrn1= code
let rtnmsg = await this.executeRule("cfgfil.hotsub1")
console.log("cfgfil.code:" + this.model.cfgfil.subtrn1);
if(rtnmsg.respCode == SUCCESS){
this.navcode = []
this.$emit("onChoose",code.toLowerCase());
}else{
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
},
computed:{
codeList(){
//将model中的数据映射成数组
return this.navcode.map(item=>{
let entireItem = {...item}
this.navcode = [];
//TODO 根据数据判断当前的code,是否可以继续
// entireItem.enable = item.isDis
return entireItem
})
}
},
watch:{
"ownref":async function(n, o){
if(!this.ownref){
console.log("11111")
// onTigger()
return;
}
}
},
mounted(){
this.$nextTick(function(){
this.$on('childmethods',async function(){
this.navcode = []
//请求按钮数据
this.model.cpdgrp.rec.ownref = this.ownref
console.log("ownref:" + this.ownref );
let rtnmsg = await this.executeRule("cpdgrp.rec.ownref");//didgrp_rec_ownref
if(rtnmsg.respCode == SUCCESS){
//重置数组
this.navcode = []
this.updateModel(rtnmsg.data)
//this.model.cfgfil.btnstm = rtnmsg.data.cfgfil_btnstm.rows
//给inr赋值,后面弹窗里面的按钮请求会用到
//this.model.didgrp.rec.inr = rtnmsg.data.didgrp_rec_inr
const length = this.model.cfgfil.btnstm.rows.length
let btnStr = this.model.cfgfil.btnstm.rows
let j = 0;
let m = 0;
// const buttonIndex = ['信用证修改','减额修改接受','到单','修改通知行']
for(let i=0; i < length; i++){
//获取数组中每行的数据
// if(!( btnStr[i].indexOf("保证金") >= 0) && !(btnStr[i].indexOf("开立信用证") >= 0)){
// let arr = btnStr[i].split("\t");
// let newList = {
// code:arr[0],
// label:arr[1],
// isDis:arr[2],
// title:arr[3]
// }
// m++;
// j = buttonIndex.indexOf(arr[1].replace(/(^\s*)|(\s*$)/g, ""));
// if(j<0){
// j = m;
// }
// //添加到navcode数组中
// this.navcode.splice(j,0,newList)
// }
let arr = btnStr[i].split("\t");
let newList = {
code:arr[0],
label:arr[1],
isDis:arr[2],
title:arr[3]
}
this.navcode.splice(i,0,newList)
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
})
})
}
}
</script>
<style>
</style>
......@@ -306,24 +306,98 @@
<c-button size="small" type="primary" style="margin-left: 0"
>导Excel</c-button
>
<c-button size="small" type="primary" style="margin-left: 0"
<!-- <c-button size="small" type="primary" style="margin-left: 0"
>Display</c-button
>
<c-button size="small" type="primary" style="margin-left: 0"
>Use</c-button
>
> -->
</c-col>
<c-col>
<c-istream-table :list="stmData.data" :columns="stmData.columns">
<el-table-column prop="op" label="操作" width="140" fixed="right">
<c-col :span="24">
<c-istream-table :list="stmData.data" :columns="stmData.columns" :showButtonFlg="true">
<el-table-column fixed="right" prop="op" label="操作" width="140px">
<!-- <template slot="header">
<c-col :span="11" style="text-align: left">
<span>操作</span>
</c-col>
<c-col :span="12" style="text-align: right">
<c-button icon="el-icon-s-tools"></c-button>
</c-col>
</template> -->
<template slot-scope="scope">
<c-button size="small" type="primary" style="margin-left: 0" @click="onInfbutDsp(scope.$index,scope.row)">Display</c-button
>
<el-popover
placement="top-start"
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">
<el-table-column prop="op" label="操作" width="0">
<template slot-scope="scope">
<c-button
style="margin-left: 0"
size="small"
@click="display(scope.$index, scope.row)"
>
详情
</c-button>
</template>
</el-table-column>
</c-istream-table>
<c-button
style="margin-left: 0"
size="small"
@click="getTrnInfo(scope.$index, scope.row)"
slot="reference"
>
详情
</c-button>
</el-popover>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="getButtons(scope.row['Reference'])"
>
处理
</c-button>
<!-- <c-button
style="margin-left: 0"
size="small"
type="primary"
@click="onInfbutDsp(scope.$index, scope.row)"
>
info
</c-button> -->
</template>
</el-table-column>
</c-istream-table>
</c-col>
<el-dialog :visible.sync="initdialog" :title="'交易列表'" append-to-body>
<div class="m-list-btns">
<m-busbtn ref="childs" :ownref="ownref" @onChoose="onChoose"
>11</m-busbtn
>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -331,14 +405,38 @@ import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infcpd/Event";
import BusNavbar from "~/views/Business/Infcpd/BusNavbar";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [CommonProcess],
components: { "m-busbtn": BusNavbar },
data() {
return {
searchToggle: true,
ownref: "",
initdialog: false,
dialogTableVisible: false,
trnData: {
columns: [
'1 1 "编号" 200',
'2 2 "交易名称" 130',
// '3 3 "日期" 200',
{ index: 3, position: 3, width: 110, pattern: "date", label: "日期" },
// '4 4 "状态" 50',
{
index: 4,
position: 4,
width: 100,
pattern: "code",
label: "状态",
code: this.codes.relstaEN,
},
'5 5 "币种" 80',
'6 6 "金额" 100',
],
data: [],
},
stmData: {
columns: [
'1 1 "Reference" 150 ',
......@@ -356,11 +454,29 @@ export default {
'18 13 "2.Party Number" 150',
'19 14 "Paying Bank" 150',
//'3 15 "Opened" 140',
{index:3,position:15,width:140,pattern:'time',label:'Opened'},
{
index: 3,
position: 15,
width: 140,
pattern: "time",
label: "Opened",
},
//'4 16 "Value" 140',
{index:4,position:16,width:140,pattern:'time',label:'Value'},
{
index: 4,
position: 16,
width: 140,
pattern: "time",
label: "Value",
},
//'5 17 "Closed" 140',
{index:5,position:17,width:140,pattern:'time',label:'Closed'},
{
index: 5,
position: 17,
width: 140,
pattern: "time",
label: "Closed",
},
'20 18 "1.Cur" 80',
'22 19 "2.Cur" 80',
'21 20 "Paym.Amount" 120',
......@@ -374,7 +490,7 @@ export default {
},
methods: {
...Event,
/* handleSearch(callback) {
/* handleSearch(callback) {
setTimeout(() => {
this.$notify.info({
title: "提示",
......@@ -384,6 +500,36 @@ export default {
callback();
}, 1000);
}, */
async getButtons(ownref){
this.initdialog = true
this.ownref = ownref
console.log("ownref:" +ownref);
setTimeout(()=>{
this.$refs.childs.$emit("childmethods")
},10)
},
async onChoose(code){
//跳转交易
this.$router.history.push("/business/" + code)
this.initdialog = false
} ,
async getTrnInfo(idx, row) {
console.log(row)
this.model.infcon.objinr = row["INR"];
this.model.cpdgrp.rec.inr = row["INR"];
this.model.infcon.chksubcon = "X";
this.dialogTableVisible = true;
let rtnmsg = await this.executeDefault("infcon.chksubcon");
if ((rtnmsg.respCode = SUCCESS)) {
this.trnData.data = rtnmsg.data.infcon_trnstm.rows;
}
},
closeTrn(refId){
this.$refs[refId].doClose();
},
handleReset() {},
},
created: function () {},
......
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