Commit 1dd4db2a by 唐贵贤

infltd交易 界面规范化调整

parent 9aaff1d9
......@@ -2,7 +2,7 @@ import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onInfbutSearow() {
/*async onInfbutSearow() {
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
......@@ -19,13 +19,92 @@ export default {
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},*/
async handleReset() {
this.model.infcon.seaownref = "";
this.model.infcon.searef = "";
this.model.infcon.pty.extkey = "";
this.model.infcon.seapty = "";
this.model.infcon.opndatfrom = "";
this.model.infcon.opndatto = "";
this.model.infcon.seaamtfr = "";
this.model.infcon.seaamtto = "";
this.model.infcon.seasta = "";
this.model.infcon.usr.extkey = "";
this.model.infcon.nam = "";
this.model.infcon.hndtyp = "";
this.model.infcon.pty.nam = "";
this.model.infcon.searol = "";
this.model.infcon.seacur = "";
this.stmData.data = "";
},
async handleSearch() {
this.stmData.data = [];
let opndatfrom = this.model.infcon.opndatfrom;
if(!opndatfrom || opndatfrom == ''){
this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
return;
}
let opndatto = this.model.infcon.opndatto;
if(!opndatto || opndatto == ''){
this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
return;
}
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
//console.log("smhstm:",rtnmsg);
if (rtnmsg.data.infbut_dspstm.rows.length == 0) {
this.$notify({
title: '成功',
message: '搜索完毕,无满足条件记录',
type: 'success'
});
}
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
// this.stmData.data = [];
// let opndatfrom = this.model.infcon.opndatfrom;
// if(!opndatfrom || opndatfrom == ''){
// this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
// return;
// }
// let opndatto = this.model.infcon.opndatto;
// if(!opndatto || opndatto == ''){
// this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
// return;
// }
// let rtnmsg = await this.executeRule("infbut.searow")
// if (rtnmsg.respCode == SUCCESS) {
// this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
// }
// else {
// this.$notify.error({ title: '错误', message: '服务请求失败!' });
// }
},
display(index, row) {
debugger;
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 onInfbutDsp(row) {
let rtnmsg = await this.executeRule("infbut.dsp")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
console.log("rows:", row);
console.log("你猜", rtnmsg);
}
else {
......
<template>
<div class="busnavbar">
<div class="busnavbar-items">
<c-button style="margin-left:7px;" class="medium_bcs" size="medium" type="primary" 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 Litsel from "~/model/Ditsel"
import CommonProcess from "~/mixin/CommonProcess"
export default {
props:["ownref"],
components:{
},
mixins: [CommonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
trnName:'ditsel',
model:new Litsel().data,
navcode:[
// {code:"",label:"",isDis:"",title:""},
],
}
},
methods:{
//各入口按钮请求
async onNarBtnClick(code,i){
this.model.cfgfil.subtrn1= code
let rtnmsg = await this.executeRule("cfgfil.hotsub3")
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.didgrp.rec.ownref = 'KZ3500210540AA'
this.model.bddgrp.rec.ownref = this.ownref
console.log("ownref:" + this.ownref );
// let rtnmsg = await this.executeRule("didgrp.rec.ownref");//didgrp_rec_ownref
let rtnmsg0 = await this.executeRule("ltdgrp.rec.ownref");//cfgfil.hotreg3
if(rtnmsg0.respCode == SUCCESS){
this.updateModel(rtnmsg0.data)
let rtnmsg = await this.executeRule("cfgfil.hotreg3");//cfgfil.hotreg3
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
for(let i=0; i < length; i++){
//获取数组中每行的数据
let arr = btnStr[i].split("\t");
let newList = {
code:arr[0],
label:arr[1],
isDis:arr[2],
//isDis:'Y',
title:arr[3]
}
//添加到navcode数组中
this.navcode.splice(i,0,newList)
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
})
})
}
}
</script>
<style>
</style>
......@@ -21,7 +21,7 @@
</c-button>
</c-col> -->
<c-list-search>
<c-list-search @form-reset="handleReset" @form-search="handleSearch">
<template v-slot="searchSlot">
<c-col :span="11" :offset="1">
<el-form-item label="Own Reference" prop="infcon.seaownref">
......@@ -55,15 +55,6 @@
</c-col>
<el-row v-show="searchSlot.searchToggle">
<c-col :span="11" :offset="1">
<c-col :span="20">
<el-form-item label="Own Reference" prop="infcon.seaownref">
<c-input
v-model="model.infcon.seaownref"
maxlength="16"
placeholder="请输入Own Reference"
></c-input>
</el-form-item>
</c-col>
<c-col :span="22">
<el-form-item label="Party Reference" prop="infcon.searef">
<c-input
......@@ -94,32 +85,32 @@
></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Opening between" prop="infcon.opndatfrom">
<c-date-picker
type="date"
v-model="model.infcon.opndatfrom"
<c-col :span="24">
<el-form-item label="Currency" prop="infcon.seacur">
<c-select
v-model="model.infcon.seacur"
style="width: 100%"
placeholder="请选择Opening between"
></c-date-picker>
placeholder="请选择Currency"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Open Date to" prop="infcon.opndatto">
<c-date-picker
type="date"
v-model="model.infcon.opndatto"
style="width: 100%"
placeholder="请选择Open Date to"
></c-date-picker>
<el-form-item label="Responsible" prop="infcon.usr.extkey">
<c-input
v-model="model.infcon.usr.extkey"
maxlength="8"
placeholder="请输入User ID"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Currency" prop="infcon.seacur">
<c-col :span="12">
<el-form-item label="Status" prop="infcon.seasta">
<c-select
v-model="model.infcon.seacur"
v-model="model.infcon.seasta"
style="width: 100%"
placeholder="请选择Currency"
placeholder="请选择Status"
>
</c-select>
</el-form-item>
......@@ -166,25 +157,7 @@
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Responsible" prop="infcon.usr.extkey">
<c-input
v-model="model.infcon.usr.extkey"
maxlength="8"
placeholder="请输入User ID"
></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Status" prop="infcon.seasta">
<c-select
v-model="model.infcon.seasta"
style="width: 100%"
placeholder="请选择Status"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Amount between" prop="infcon.seaamtfr">
<c-input
......@@ -205,20 +178,92 @@
</el-row>
</template>
</c-list-search>
<c-row>
<c-col :span="24">
<c-istream-table
:list="stmData.data"
:columns="stmData.columns"
prop="infbut.dspstm"
>
<el-table-column fixed="right" prop="op" label="操作" width="140px">
<el-table-column fixed="right" prop="op" label="操作" width="210px">
<template slot="header">
<c-col :span="11" style="text-align: left"><span>操作</span></c-col>
<c-col :span="12" style="text-align: right"
<c-col :span="11" :offset="1" style="text-align: left"><span>操作</span></c-col>
<c-col :span="10" style="text-align: center"
><c-button icon="el-icon-s-tools"></c-button
></c-col>
</template>
<template slot-scope="scope">
<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>
<!-- <c-button
style="margin-left: 0"
size="small"
>
关闭
</c-button> -->
</el-popover>
<!-- <c-button
style="margin-left: 0"
size="small"
@click="getTrnInfo(scope.$index,scope.row)"
>
详情
</c-button> -->
<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="getDitSelInfo(scope.$index, scope.row)"
>
display
</c-button>
</template>
<!-- <template slot-scope="scope">
<c-button style="margin-left: 0" size="small" @click="onDetails"
>详情
</c-button>
......@@ -229,46 +274,137 @@
@click="onInfbutDsp(scope.row)"
>处理
</c-button>
</template>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="getDitSelInfo(scope.$index, scope.row)"
>
info
</c-button>
</template> -->
</el-table-column>
<!--el-table-column prop="op" label="OP" width="100">placeholder="请输入display stream"</el-table-column-->
</c-istream-table>
</c-row>
</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>
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infltd/Event";
import BusNavbar from "~/views/Business/Infltd/BusNavbar";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [CommonProcess],
components: { "m-busbtn": BusNavbar },
data() {
return {
ownref: "",
initdialog: false,
dialogTableVisible: false,
trnData: {
columns: [
'1 1 "编号" 200',
'2 2 "交易名称" 120',
// '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 "金额" 110',
],
data: [],
},
stmData: {
columns: [
'1 1 "Reference" 275 ',
'1 1 "Reference" 150 ',
'8 2 "Party Number" 275',
'9 2 "1st Beneficiary" 275',
'11 3 "Party Number" 275',
'12 3 "2nd Beneficiary" 275',
// "18 5 \"MT\" 100",
'3 4 "Opened" 275',
'4 4 "Expired" 275',
'5 4 "Closed" 275',
'15 5 "Cur" 275',
'17 5 "Cur" 275',
'16 6"Amt" 275',
'18 6"Amt" 275',
'3 4 "Opened" 200',
'4 4 "Expired" 200',
'5 4 "Closed" 200',
'15 5 "Cur" 75',
//'17 5 "Cur" 75',
'16 6"Open Amt" 150',
'18 7"Account Amt" 150',
],
data: [],
},
};
},
methods: { ...Event },
methods: { ...Event ,
closeTrn(refId){
this.$refs[refId].doClose();
},
async onChoose(code){
//跳转交易
this.$router.history.push("/business/" + code)
this.initdialog = false
} ,
async getTrnInfo(idx, row) {
this.model.infcon.objinr = row["INR"];
this.model.ltdgrp.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;
}
},
async getButtons(ownref){
this.initdialog = true
this.ownref = ownref
console.log("ownref:" +ownref);
setTimeout(()=>{
this.$refs.childs.$emit("childmethods")
},10)
},
async getDitSelInfo(idx,row){
//TD中选中行触发
var params = {selDst:"infbut.dspstm",selIds:[idx+1]}
let rtnmsg = await this.executeRule("infbut.dspstm", params);
if(rtnmsg.respCode = SUCCESS){
this.updateModel(rtnmsg.data);
// Utils.copyValueFromVO(this.model, rtnmsg.data);
//TD中点击display时触发
params = {selDst:"infbut.dsp",selIds:[idx+1]}
let rtnmsgNew = await this.executeRule("infbut.dsp", params);
if(rtnmsgNew.respCode = SUCCESS){
console.log(rtnmsgNew);
this.updateModel(rtnmsgNew.data);
let rtnmsgOitset = await this.executeDefault("mtabut.coninf.oitset.oit");
if(rtnmsgOitset.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, rtnmsgOitset.data);
}
}
}
//触发父组件中updateShowPanel 事件,修改index中showPanel ,控制 index中组件的显示和隐藏
this.$emit('updateShowPanel', true)
},
},
created: function () {},
};
</script>
......
......@@ -9,13 +9,16 @@
size="small"
:validate-on-rule-change="false"
>
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<m-infsea v-show="!showPanel" @updateShowPanel="updateShowPanel($event)" :model="model" :codes="codes" ref="infsea"/>
<c-tabs v-model="tabVal" v-show="showPanel" ref="elment" type="card" @tab-click="tabClick">
<!--PD000006 -->
<el-tab-pane label="Selection" name="infsea">
<!-- <el-tab-pane label="Selection" name="infsea">
<c-content>
<m-infsea :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
</el-tab-pane> -->
<!--PD000001 -->
<el-tab-pane label="Overview" name="ovwp">
......@@ -90,6 +93,14 @@
</el-tab-pane>
</c-tabs>
</el-form>
<c-button
v-show="showPanel"
style="margin-left: 75%;bottom: 10%;position:sticky"
size="small"
@click="goBack()">
<!-- @click="getDitSelInfo(scope.$index, scope.row)" -->
返回
</c-button>
</div>
</template>
<script>
......@@ -149,11 +160,47 @@ export default {
defaultRules: Default,
pattern: Pattern,
rules: null,
showPanel:false,
codes: { ...CodeTable },
};
},
methods: {
tabClick() {},
goBack(){
this.showPanel = false;
},
tabClick(tab) {
const name = tab.name
let rulePath;
if (name === "fepinfp") {
rulePath = "infcon.fepinfp";
}
if (name === "coninfp") {
rulePath = "coninf.coninfp";
}
if (!!rulePath) {
this.executeRule(rulePath).then(res => {
if (res.respCode == SUCCESS) {
this.updateModel(res.data);
}
})
}
},
initPanel(val){
if(val){
this.tabVal = "ovwp"
//
}else{
this.tabVal = ""
}
},
async updateShowPanel(value) {
this.showPanel = value;
this.initPanel(value);
},
},
created: async function () {
console.log("进入infltd交易");
......
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