diff --git a/src/api/system/sysMenuHelp.js b/src/api/system/sysMenuHelp.js index 6627c50..3f36175 100644 --- a/src/api/system/sysMenuHelp.js +++ b/src/api/system/sysMenuHelp.js @@ -41,11 +41,11 @@ export function selectAuthMenu(query) { }); } -export function selectAuthMenuByMenuKey(query) { +export function selectAuthMenuByMenuKeys(query) { return axios({ - url: "/system/param/help/selectAuthMenuByMenuKey", - method: "get", - params: query + url: "/system/param/help/selectAuthMenuByMenuKeys", + method: "post", + data: query }); } diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index 12a1da5..0afa31f 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -248,7 +248,7 @@ import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; import {parseTime} from "../../utils/coTools"; import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain" import editCodeDialog from "./DialogEditCode"; -import {selectAuthMenuByMenuKey } from '@/api/system/sysMenuHelp' +import {selectAuthMenuByMenuKeys } from '@/api/system/sysMenuHelp' import codesPanel from "./PanelCreateOrderCodes" @@ -282,18 +282,25 @@ export default { data() { return { //查看帮助相关 - helpMenuKey: "ioCreateOrderHelp", - help:{ - id: null, - menuKey: null, - menuName: null, - status: null, - filePath: null, - remark: null, - updateTime: null, - helpType: null, - urlPath: null, - }, + ioCreateOrderHelp500:{}, + // ioCreateOrderHelp502:{}, + // ioCreateOrderHelp503:{}, + ioCreateOrderHelp504:{}, + ioCreateOrderHelp505:{}, + // ioCreateOrderHelp507:{}, + ioCreateOrderHelp605:{}, + ioCreateOrderHelp604:{}, + helpMenuKeys:[ + "ioCreateOrderHelp500", + // "ioCreateOrderHelp502", + // "ioCreateOrderHelp503", + "ioCreateOrderHelp504", + "ioCreateOrderHelp505", + // "ioCreateOrderHelp507", + "ioCreateOrderHelp605", + "ioCreateOrderHelp604" + ] , + help:[], //单据相关 orderFormData: { billNo: null, @@ -387,15 +394,29 @@ export default { }, methods: { //获取查看帮助url - selectAuthMenuByMenuKey() { - let params = {menuKey: this.helpMenuKey} - selectAuthMenuByMenuKey(params).then((res) => { + selectAuthMenuByMenuKeys() { + selectAuthMenuByMenuKeys(this.helpMenuKeys).then((res) => { if (res.code === 20000) { this.help = res.data; + if (this.help.length >0){ + this.help.forEach( x => { + let menuKey = x.menuKey; + this[menuKey] = x; + }) + } } }) }, + //查看帮助新开标签页 + helpOpenWindow(code) { + let helpType = this["ioCreateOrderHelp"+code].helpType; + //为url类型 + if (helpType == 1) { + window.open(this["ioCreateOrderHelp"+code].urlPath, '_blank') + } + }, + //获取用户仓库列表 findInvListByUser() { this.curInvOptions = []; @@ -631,45 +652,53 @@ export default { } else if (response.code == 504) { this.$confirm(response.message, "提示", { confirmButtonText: "确定", - cancelButtonText: "忽略", + cancelButtonText: "查看帮助", type: "error", + showClose: false, + showCancelButton: this.ioCreateOrderHelp504==null?false:true, }).then(() => { tQuery.ignoreExpire = true; this.addCodeSubmit(tQuery) }).catch(() => { - + this.helpOpenWindow(response.code); }); } else if (response.code == 505) { this.$confirm(response.message, "提示", { confirmButtonText: "确定", - cancelButtonText: "忽略", + cancelButtonText: "查看帮助", type: "warning", + showClose: false, + showCancelButton: this.ioCreateOrderHelp505==null?false:true, }).then(() => { tQuery.ignoreRecentExpire = true; this.addCodeSubmit(tQuery) }).catch(() => { - + this.helpOpenWindow(response.code); }); } else if (response.code == 605) { this.$confirm(response.message, "提示", { confirmButtonText: "确定", - cancelButtonText: "取消", + cancelButtonText: "查看帮助", + showClose: false, type: "warning", + showCancelButton: this.ioCreateOrderHelp605==null?false:true, }).then(() => { }).catch(() => { - + this.helpOpenWindow(response.code); }); return; } else if (response.code == 604) { this.$confirm(response.message, "提示", { confirmButtonText: "确定", - cancelButtonText: "取消", + cancelButtonText: "查看帮助", + showClose: false, type: "warning", + showCancelButton: this.ioCreateOrderHelp604==null?false:true, }).then(() => { }).catch(() => { - + this.helpOpenWindow(response.code); }); return; } else if (response.code == 507) { @@ -691,19 +720,15 @@ export default { confirmButtonText: '确定', cancelButtonText: "查看帮助", type: 'warning', - closeOnClickModal: true, - showCancelButton: true, + showClose: false, + showCancelButton: this.ioCreateOrderHelp500==null?false:true, // callback: action => { // this.$refs.inputRef.focus(); // this.$refs.inputRef.select(); // } }).then(() => { }).catch(() => { - let helpType = this.help.helpType; - //为url类型 - if (helpType == 1){ - window.open(this.help.urlPath,'_blank') - } + this.helpOpenWindow(response.code); }); } } @@ -1014,7 +1039,7 @@ export default { } this.findInvListByUser(); } - this.selectAuthMenuByMenuKey(); + this.selectAuthMenuByMenuKeys(); } , }