Commit f77272eb by niewei

前端info界面跳转

parent 26f1dc23
......@@ -2,23 +2,43 @@ import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onInfbutSearow (callback) {
async onInfbutSearow () {
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
this.$message({
type: 'success',
message: '获取成功!'
});
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
callback();
},
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;
//this.model.infbut.dspstm = rtnmsg.data.infbut_dspstm
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async handleReset () {
},
async onInfbutDsp () {
let rtnmsg = await this.executeRule("infbut.dsp")
if (rtnmsg.respCode == SUCCESS) {
......@@ -90,4 +110,15 @@ export default {
}
},
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');
}
});
},
}
\ No newline at end of file
......@@ -65,6 +65,7 @@ export default class Infbfd {
diastm: "", // stream for diaries to selected contract .infcon.diastm
liastm: "", // Stream for all engagements to selected contract .infcon.liastm
ordstm: "", // Stream for Orders for Contract .infcon.ordstm
objinr: "",
},
seadoctypcod: "", // Document Type .seadoctypcod
infbut: {
......
......@@ -2,21 +2,41 @@ import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onInfbutSearow (callback) {
async onInfbutSearow () {
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
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;
//this.model.infbut.dspstm = rtnmsg.data.infbut_dspstm
this.$message({
type: 'success',
message: '获取成功!'
});
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
callback();
},
async handleReset () {
},
async onInfbutDsp () {
let rtnmsg = await this.executeRule("infbut.dsp")
......@@ -179,4 +199,15 @@ export default {
}
},
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');
}
});
},
}
\ No newline at end of file
<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 Letsel from "~/model/Detsel"
import commonProcess from "~/mixin/commonProcess"
export default {
props:["ownref"],
components:{
},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
trnName:'detsel',
model:new Letsel().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.bfdgrp.rec.ownref = this.ownref
console.log("ownref:" + this.ownref );
let rtnmsg0 = await this.executeRule("bfdgrp.rec.ownref");//bfdgrp_rec_ownref
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.bfdgrp.rec.inr = rtnmsg.data.bfdgrp_rec_inr
console.log("ownref:" + this.ownref );
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++){
//获取数组中每行的数据
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)
/*
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)
}
*/
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
}
else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
})
})
}
}
</script>
<style>
</style>
<template>
<c-content class="eibs-tab" :height="200">
<c-infsearch-group @handleSearch="onInfbutSearow" @handleReset="onInfbutClr">
<div class="eibs-tab">
<c-list-search @form-reset="handleReset" @form-search="handleSearch">
<!-- 持续展示区 -->
<template slot="keepShow">
<template v-slot="searchSlot">
<el-form
class="m-table-search-form"
ref="paramsForm"
:inline="true"
label-position="right"
label-width="110px"
size="small"
>
<c-row>
<c-col :span="24">
<c-col :span="12">
......@@ -19,10 +28,10 @@
</c-col>
</c-col>
</c-row>
</template>
<!-- 可控展示区 -->
<template slot="changeShow">
<el-row v-show="searchSlot.searchToggle">
<c-row>
<c-col :span="24">
<c-col :span="12">
......@@ -136,9 +145,12 @@
</c-col>
</c-row>
</el-row>
</el-form>
</template>
</c-infsearch-group>
</c-list-search>
<!--
<c-row style="margin-top:20px; padding: 0 10px 0 10px;">
<c-col>
......@@ -198,6 +210,16 @@
详情
</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"
......@@ -246,6 +268,7 @@
>
注销
</c-button>
-->
</template>
</el-table-column>
</c-istream-table>
......@@ -269,18 +292,29 @@
</c-row>
-->
</c-content>
<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 Utils from "~/utils/index";
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Infbfd/Event"
//交易跳转逻辑
import BusNavbar from "~/views/Business/Infbfd/BusNavbar";
export default {
inject: ['root'],
props:["model","codes"],
mixins: [commonProcess],
components: { "m-busbtn": BusNavbar },
data(){
return {
ownref: "",
......@@ -339,19 +373,53 @@ export default {
this.initdialog = true
this.ownref = ownref
console.log("ownref:" +ownref);
setTimeout(()=>{
this.$refs.childs.$emit("childmethods")
},10)
// setTimeout(()=>{
// // this.$refs.childs.$emit("childmethods")
// console.log(this)
// console.log(this.$refs)
// console.log(this.$refs.childs)
// },10)
this.$router.history.push({ path: "/business/" + frm, query: { ownref } })
//this.$router.history.push({ path: "/business/" + frm, query: { ownref } })
},
async onChoose(code){
//跳转交易
this.$router.history.push("/business/" + code)
this.initdialog = false
},
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)
},
async getTrnInfo(idx, row) {
this.model.infcon.objinr = row["INR"];
......
......@@ -81,6 +81,7 @@
</c-page>
</template>
<script>
import Utils from "~/utils/index";
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Infbfd from "~/model/Infbfd"
......
<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 Letsel from "~/model/Detsel"
import commonProcess from "~/mixin/commonProcess"
export default {
props:["ownref"],
components:{
},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
trnName:'detsel',
model:new Letsel().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.dedgrp.rec.ownref = this.ownref
console.log("ownref:" + this.ownref );
let rtnmsg = await this.executeRule("dedgrp.rec.ownref");//dedgrp_rec_ownref
if(rtnmsg.respCode == SUCCESS){
//重置数组
this.navcode = []
this.updateModel(rtnmsg.data)
//this.model.cfgfil.btnstm = rtnmsg.data.cfgfil_btnstm.rows
//给inr赋值,后面弹窗里面的按钮请求会用到
//this.model.dedgrp.rec.inr = rtnmsg.data.dedgrp_rec_inr
console.log("ownref:" + this.ownref );
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)
}
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
})
})
}
}
</script>
<style>
</style>
<template>
<!-- Selection -->
<c-content class="eibs-tab" :height="200">
<div class="eibs-tab">
<c-infsearch-group @handleSearch="onInfbutSearow" @handleReset="onInfbutClr">
<c-list-search @form-reset="handleReset" @form-search="handleSearch">
<!-- 持续展示区 -->
<template slot="keepShow">
<template v-slot="searchSlot">
<el-form
class="m-table-search-form"
ref="paramsForm"
:inline="true"
label-position="right"
label-width="110px"
size="small"
>
<c-row>
<c-col :span="11" :offset="1">
<el-form-item label="业务编号" prop="infcon.seaownref">
......@@ -18,10 +26,9 @@
</el-form-item>
</c-col>
</c-row>
</template>
<!-- 可控展示区 -->
<template slot="changeShow">
<el-row v-show="searchSlot.searchToggle">
<c-row>
<c-col :span="11" :offset="1">
<el-form-item label="参考号" prop="infcon.searef">
......@@ -187,9 +194,10 @@
</c-col>
</c-row>
</el-row>
</el-form>
</template>
</c-infsearch-group>
</c-list-search>
<c-col :span="24" style="margin-top: 10px">
<c-button class="medium_bcs" size="medium" type="primary" @click="toDetopn">卖方信用证国内证通知</c-button>
</c-col>
......@@ -245,6 +253,15 @@
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="getButtons(scope.row['Reference'], 'detame')"
>
修改通知
......@@ -257,6 +274,7 @@
>
收单
</c-button>
-->
</template>
</el-table-column>
</c-istream-table>
......@@ -292,19 +310,29 @@
</template>
</el-table-column>
-->
</c-content>
<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 Utils from "~/utils/index";
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Infdet/Event"
//交易跳转逻辑
import BusNavbar from "~/views/Business/Infdet/BusNavbar";
export default {
inject: ['root'],
props:["model","codes"],
mixins: [commonProcess],
components: { "m-busbtn": BusNavbar },
data(){
return {
ownref: "",
......@@ -356,23 +384,49 @@ export default {
},
*/
methods:{ ...Event,
async getButtons(ownref, frm){
async getButtons(ownref){
this.initdialog = true
this.ownref = ownref
console.log("ownref:" +ownref);
// setTimeout(()=>{
// // this.$refs.childs.$emit("childmethods")
// console.log(this)
// console.log(this.$refs)
// console.log(this.$refs.childs)
// },10)
this.$router.history.push({ path: "/business/" + frm, query: { ownref } })
setTimeout(()=>{
this.$refs.childs.$emit("childmethods")
},10)
//this.$router.history.push({ path: "/business/" + frm, query: { ownref } })
},
async onChoose(code){
//跳转交易
this.$router.history.push("/business/" + code)
this.initdialog = false
} ,
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)
},
async getTrnInfo(idx, row) {
this.model.infcon.objinr = row["INR"];
......@@ -400,10 +454,8 @@ export default {
},
created:function(){
}
}
created:function(){},
};
</script>
<style>
......
......@@ -38,13 +38,16 @@
<div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="left" size="small" :validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<!--PD000006 -->
<!--
<el-tab-pane label="查詢界面" name="infsea">
<m-infsea :model="model" :codes="codes"/>
</el-tab-pane>
-->
<c-content>
<m-infsea v-show="!showPanel" @updateShowPanel="updateShowPanel($event)" :model="model" :codes="codes" ref="infsea"/>
</c-content>
<c-tabs v-model="tabVal" v-show="showPanel" ref="elment" type="card" @tab-click="tabClick">
<!--PD000017 -->
<el-tab-pane label="内容" name="ovwp">
<m-ovwp :model="model" :codes="codes"/>
......@@ -131,11 +134,21 @@
-->
</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>
</c-page>
</template>
<script>
import Utils from "~/utils/index";
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Infdet from "~/model/Infdet"
......@@ -164,6 +177,7 @@ import Stament from "./Stament"
export default {
name: "Infdet",
components:{
"m-infsea" : Infsea,
"m-ovwp" : Ovwp,
......@@ -192,36 +206,76 @@ export default {
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
tabVal: "infsea",
tabVal: "",
trnName: "infdet",
model: new Infdet().data,
checkRules: Check,
defaultRules: Default,
pattern: Pattern,
showPanel:false,
rules: null,
codes: {...CodeTable},
showflg: true,
};
},
methods:{
tabClick(){
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);
},
goBack(){
this.showPanel = false;
},
},
created:async function(){
console.log("进入infdet交易");
let rtnmsg = await this.init({})
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
Utils.copyValueFromVO(this.model, rtnmsg.data);
this.$refs.infsea.handleSearch();
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
watch:{
}
}
</script>
<style>
<style scoped>
</style>
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