Commit c531d770 by wangna

单据交易状态显示

parent 78d429f4
<template>
<el-dialog
:visible.sync="initdialog"
:title="'交易列表'"
append-to-body
:before-close="beforeClose"
@opened="opened"
>
<div class="m-list-btns">
<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 navcode"
v-bind:key="index"
@click.native="onNarBtnClick(item.code, item.index)"
:title="item.title"
:disabled="item.isDis === 'N'"
>{{ item.label }}</c-button
>
<div style="margin-top: 15px; margin-left: 10px">
<div
v-for="(str, idx) in tState"
:key="idx"
style="margin-bottom: 5px; font-weight: bold"
>
{{ str }}
</div>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import _ from "~/utils/Lodash";
export default {
props: {
ownref: {
required: true,
},
trnCode: {
required: true,
},
model: {
required: true,
},
ownrefPath: {
required: false,
default: "didgrp",
},
tabIndex: {
required: false,
default: 1,
},
},
components: {},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data() {
return {
initdialog: false,
navcode: [
// {code:"",label:"",isDis:"",title:""},
],
tState: [],
};
},
methods: {
//各入口按钮请求
async onNarBtnClick(code, i) {
this.model.cfgfil[`subtrn${i}`] = code;
let rtnmsg = await this.executeRule(`cfgfil.hotsub${i}`);
if (rtnmsg.respCode == SUCCESS) {
this.navcode = [];
this.$emit("onChoose", code.toLowerCase());
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
getIndex(module) {
for (let i = 1; i <= 12; i++) {
var temp = this.model.cfgfil[`subtxt${i}`];
if (module == temp) {
return i;
}
}
return 1;
},
opened() {
this.tState = [];
this.$emit("childmethods");
},
beforeClose() {
this.navcode = [];
this.initdialog = false;
},
},
mounted() {
this.trnName = this.trnCode;
this.$nextTick(function () {
this.$on("childmethods", async function () {
let res = await this.executeRule(`cfgfil.hotreg${this.tabIndex}`);
if (res.respCode == SUCCESS) {
this.updateModel(res.data);
} else {
this.$notify.error({
title: "错误",
message: "服务请求失败!",
});
}
this.navcode = [];
//请求按钮数据
let rulePath;
if (this.ownrefPath.endsWith(".ownref")) {
_.set(this.model, this.ownrefPath, this.ownref);
rulePath = this.ownrefPath;
} else {
this.model[this.ownrefPath].rec.ownref = this.ownref;
rulePath = this.ownrefPath + ".rec.ownref";
}
let rtnmsg = await this.executeRule(rulePath); //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;
for (let i = 0; i < length; i++) {
let arr = btnStr[i].split("\t");
var index = this.getIndex(arr[1]);
let newList = {
code: arr[0],
label: arr[1],
isDis: arr[2],
title: arr[3],
index: index,
};
this.navcode.push(newList);
}
// 交易状态信息
const arr = [];
arr.push(this.model.dspbrdclsdat);
this.tState = arr.filter((s) => {
const v = s.trim();
return v !== "";
});
} else {
this.navcode = [];
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
});
});
},
};
</script>
<style>
</style>
......@@ -312,7 +312,7 @@ import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infbdd/Event";
import DitselModel from "~/model/Ditsel"
import BusNavbar from "~/views/Public/BusNavbar";
import BusNavbar from "./BusNavbar";
export default {
inject: ["root"],
......
<template>
<el-dialog
:visible.sync="initdialog"
:title="'交易列表'"
append-to-body
:before-close="beforeClose"
@opened="opened"
>
<div class="m-list-btns">
<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 navcode"
v-bind:key="index"
@click.native="onNarBtnClick(item.code, item.index)"
:title="item.title"
:disabled="item.isDis === 'N'"
>{{ item.label }}</c-button
>
<div style="margin-top: 15px; margin-left: 10px">
<div
v-for="(str, idx) in tState"
:key="idx"
style="margin-bottom: 5px; font-weight: bold"
>
{{ str }}
</div>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import _ from "~/utils/Lodash";
export default {
props: {
ownref: {
required: true,
},
trnCode: {
required: true,
},
model: {
required: true,
},
ownrefPath: {
required: false,
default: "didgrp",
},
tabIndex: {
required: false,
default: 1,
},
},
components: {},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data() {
return {
initdialog: false,
navcode: [
// {code:"",label:"",isDis:"",title:""},
],
tState: [],
};
},
methods: {
//各入口按钮请求
async onNarBtnClick(code, i) {
this.model.cfgfil[`subtrn${i}`] = code;
let rtnmsg = await this.executeRule(`cfgfil.hotsub${i}`);
if (rtnmsg.respCode == SUCCESS) {
this.navcode = [];
this.$emit("onChoose", code.toLowerCase());
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
getIndex(module) {
for (let i = 1; i <= 12; i++) {
var temp = this.model.cfgfil[`subtxt${i}`];
if (module == temp) {
return i;
}
}
return 1;
},
opened() {
this.tState = [];
this.$emit("childmethods");
},
beforeClose() {
this.navcode = [];
this.initdialog = false;
},
},
mounted() {
this.trnName = this.trnCode;
this.$nextTick(function () {
this.$on("childmethods", async function () {
let res = await this.executeRule(`cfgfil.hotreg${this.tabIndex}`);
if (res.respCode == SUCCESS) {
this.updateModel(res.data);
} else {
this.$notify.error({
title: "错误",
message: "服务请求失败!",
});
}
this.navcode = [];
//请求按钮数据
let rulePath;
if (this.ownrefPath.endsWith(".ownref")) {
_.set(this.model, this.ownrefPath, this.ownref);
rulePath = this.ownrefPath;
} else {
this.model[this.ownrefPath].rec.ownref = this.ownref;
rulePath = this.ownrefPath + ".rec.ownref";
}
let rtnmsg = await this.executeRule(rulePath); //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;
for (let i = 0; i < length; i++) {
let arr = btnStr[i].split("\t");
var index = this.getIndex(arr[1]);
let newList = {
code: arr[0],
label: arr[1],
isDis: arr[2],
title: arr[3],
index: index,
};
this.navcode.push(newList);
}
// 交易状态信息
const arr = [];
arr.push(this.model.dspbfdclsdat);
this.tState = arr.filter((s) => {
const v = s.trim();
return v !== "";
});
} else {
this.navcode = [];
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
});
});
},
};
</script>
<style>
</style>
......@@ -309,7 +309,7 @@ import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infbfd/Event";
//交易跳转逻辑
import DetselModel from "~/model/Detsel";
import BusNavbar from "~/views/Public/BusNavbar";
import BusNavbar from "./BusNavbar";
export default {
inject: ["root"],
......
<template>
<el-dialog
:visible.sync="initdialog"
:title="'交易列表'"
append-to-body
:before-close="beforeClose"
@opened="opened"
>
<div class="m-list-btns">
<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 navcode"
v-bind:key="index"
@click.native="onNarBtnClick(item.code, item.index)"
:title="item.title"
:disabled="item.isDis === 'N'"
>{{ item.label }}</c-button
>
<div style="margin-top: 15px; margin-left: 10px">
<div
v-for="(str, idx) in tState"
:key="idx"
style="margin-bottom: 5px; font-weight: bold"
>
{{ str }}
</div>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import _ from "~/utils/Lodash";
export default {
props: {
ownref: {
required: true,
},
trnCode: {
required: true,
},
model: {
required: true,
},
ownrefPath: {
required: false,
default: "didgrp",
},
tabIndex: {
required: false,
default: 1,
},
},
components: {},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data() {
return {
initdialog: false,
navcode: [
// {code:"",label:"",isDis:"",title:""},
],
tState: [],
};
},
methods: {
//各入口按钮请求
async onNarBtnClick(code, i) {
this.model.cfgfil[`subtrn${i}`] = code;
let rtnmsg = await this.executeRule(`cfgfil.hotsub${i}`);
if (rtnmsg.respCode == SUCCESS) {
this.navcode = [];
this.$emit("onChoose", code.toLowerCase());
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
getIndex(module) {
for (let i = 1; i <= 12; i++) {
var temp = this.model.cfgfil[`subtxt${i}`];
if (module == temp) {
return i;
}
}
return 1;
},
opened() {
this.tState = [];
this.$emit("childmethods");
},
beforeClose() {
this.navcode = [];
this.initdialog = false;
},
},
mounted() {
this.trnName = this.trnCode;
this.$nextTick(function () {
this.$on("childmethods", async function () {
let res = await this.executeRule(`cfgfil.hotreg${this.tabIndex}`);
if (res.respCode == SUCCESS) {
this.updateModel(res.data);
} else {
this.$notify.error({
title: "错误",
message: "服务请求失败!",
});
}
this.navcode = [];
//请求按钮数据
let rulePath;
if (this.ownrefPath.endsWith(".ownref")) {
_.set(this.model, this.ownrefPath, this.ownref);
rulePath = this.ownrefPath;
} else {
this.model[this.ownrefPath].rec.ownref = this.ownref;
rulePath = this.ownrefPath + ".rec.ownref";
}
let rtnmsg = await this.executeRule(rulePath); //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;
for (let i = 0; i < length; i++) {
let arr = btnStr[i].split("\t");
var index = this.getIndex(arr[1]);
let newList = {
code: arr[0],
label: arr[1],
isDis: arr[2],
title: arr[3],
index: index,
};
this.navcode.push(newList);
}
// 交易状态信息
const arr = [];
arr.push(this.model.dspbrdclsdat);
this.tState = arr.filter((s) => {
const v = s.trim();
return v !== "";
});
} else {
this.navcode = [];
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
});
});
},
};
</script>
<style>
</style>
......@@ -343,7 +343,7 @@ import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infbrd/Event";
import LitselModel from "~/model/Litsel"
import BusNavbar from "~/views/Public/BusNavbar";
import BusNavbar from "./BusNavbar";
export default {
inject: ["root"],
......
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