diff --git a/fe/PC/src/components/currenDescriptions/index.vue b/fe/PC/src/components/currenDescriptions/index.vue index fc49a673f..5bf4242e9 100644 --- a/fe/PC/src/components/currenDescriptions/index.vue +++ b/fe/PC/src/components/currenDescriptions/index.vue @@ -52,7 +52,7 @@ > - {{ propsData[item.prop] }} + {{ propsData[item.prop] ? propsData[item.prop] + "" : "" }} {{ scope.row[item.prop] }}{{ scope.row[item.prop] ? scope.row[item.prop] + "" : "" }} diff --git a/fe/PC/src/mixins/drawerMixins.js b/fe/PC/src/mixins/drawerMixins.js index fedd69bed..490e906d8 100644 --- a/fe/PC/src/mixins/drawerMixins.js +++ b/fe/PC/src/mixins/drawerMixins.js @@ -54,6 +54,7 @@ export const drawerMixins = { this.displayDialog.editDialog = true } // 申请业务 流程按钮实现 + // 【提交】操作 if (val == 'submitRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/submit/').then(res => { @@ -67,7 +68,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'agreeRequest') { + } + // 【审批】操作 + else if (val == 'agreeRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/agree/').then(res => { that.$successMsg('已同意') @@ -80,7 +83,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'handleRequest') { + } + // 【处理】操作 + else if (val == 'handleRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/handle/').then(res => { that.$successMsg('处理完成') @@ -93,7 +98,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作 + } + // 【执行】操作 + else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作 that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/handle/').then(res => { that.$successMsg('执行成功') @@ -106,7 +113,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'abortRequest') { + } + // 【中止】操作 + else if (val == 'abortRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/abort/').then(res => { that.$successMsg('已中止') @@ -119,7 +128,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'completeRequest') { + } + // 【执行完成】操作 + else if (val == 'completeRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/complete/').then(res => { that.$successMsg('执行完成') @@ -132,7 +143,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'cancelRequest') { + } + // 【取消】操作 + else if (val == 'cancelRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/cancel/').then(res => { that.$successMsg('已取消') @@ -145,7 +158,9 @@ export const drawerMixins = { console.log(err) that.Loading.appMainLoading = false }) - } else if (val == 'refuseRequest') { + } + // 【驳回】操作 + else if (val == 'refuseRequest') { that.Loading.appMainLoading = true processRequest(that.propsData.id, that.URL + '/refuse/').then(res => { that.$successMsg('已驳回') diff --git a/fe/PC/src/utils/processButtonData.js b/fe/PC/src/utils/processButtonData.js index 01d1f6b8c..a50c346db 100644 --- a/fe/PC/src/utils/processButtonData.js +++ b/fe/PC/src/utils/processButtonData.js @@ -1,70 +1,96 @@ //申请流程按钮 /** - * @param {*} that 主页this + * @param {*} that 主页this + * @param {*} label 特殊label名称更改 示例:{submitRequest:'确认提交'} + * @param {*} initHide 自定义返回是否隐藏函数 {submitRequest:() => {return false)} + * @param {*} noShow 不显示的按钮 示例:['submitRequest'] + * initHide优先级大于noShow 如果initHide和noShow中都有对应数据,则noShow无效 + * vue调用文件参考示例: + * 1、使用 label 更改按钮名称 + DrawerButtonData: [ + ...requestData(this,{againHandleRequest:'新按钮名称'}), + ] + * 2、使用 initHide 函数处理是否隐藏 againHandleRequestInit为业务线判断隐藏函数,返回值为false/true + DrawerButtonData: [ + ...requestData(this,false,{ + againHandleRequest:() => {return this.againHandleRequestInit([9])} + }), + ] + * 3、使用 noShow 隐藏按钮 + DrawerButtonData: [ + ...requestData(this,false,false,['againHandleRequest']), + ] * @returns */ - export function requestData(that,label){ + export function requestData(that,label,initHide,noShow){ return [ { type: 'primary', icon: 'el-icon-circle-check', - label: label==undefined?'提交':label, + // label: label==undefined?'提交':label, + label: changeLabelText(label,'submitRequest')?changeLabelText(label,'submitRequest'):'提交', name: "submitRequest", - hide: () => { return hideButtonRequest(that, [1]) }, + hide: () => { return hideButtonRequest(that, [1], initHide, noShow , 'submitRequest') }, size: 'mini' }, { type: 'primary', icon: 'el-icon-circle-check', - label: label==undefined?'审批':label, + // label: label==undefined?'审批':label, + label: changeLabelText(label,'agreeRequest')?changeLabelText(label,'agreeRequest'):'审批', name: "agreeRequest", - hide: () => { return hideButtonRequest(that, [2]) }, + hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'agreeRequest') }, size: 'mini' }, { type: 'primary', icon: 'el-icon-circle-check', - label: label==undefined?'处理':label, + // label: label==undefined?'处理':label, + label: changeLabelText(label,'handleRequest')?changeLabelText(label,'handleRequest'):'处理', name: "handleRequest", - hide: () => { return hideButtonRequest(that, [4]) }, + hide: () => { return hideButtonRequest(that, [4], initHide, noShow , 'handleRequest') }, size: 'mini' }, { type: 'primary', icon: 'el-icon-circle-check', - label: '执行', + // label: '执行', + label: changeLabelText(label,'againHandleRequest')?changeLabelText(label,'againHandleRequest'):'执行', name: "againHandleRequest", - hide: () => { return hideButtonRequest(that, [9]) }, + hide: () => { return hideButtonRequest(that, [9], initHide, noShow , 'againHandleRequest') }, size: 'mini' }, { type: 'danger', icon: 'el-icon-delete-solid', - label: '中止', + // label: '中止', + label: changeLabelText(label,'abortRequest')?changeLabelText(label,'abortRequest'):'中止', name: "abortRequest", - hide: () => { return hideButtonRequest(that, [5]) }, + hide: () => { return hideButtonRequest(that, [5], initHide, noShow , 'abortRequest') }, size: 'mini' }, { type: 'danger', icon: 'el-icon-circle-check', - label: '驳回', + // label: '驳回', + label: changeLabelText(label,'refuseRequest')?changeLabelText(label,'refuseRequest'):'驳回', name: "refuseRequest", - hide: () => { return hideButtonRequest(that, [2]) }, + hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'refuseRequest') }, size: 'mini' }, { type: 'danger', icon: 'el-icon-delete-solid', - label: '取消', + // label: '取消', + label: changeLabelText(label,'cancelRequest')?changeLabelText(label,'cancelRequest'):'取消', name: "cancelRequest", - hide: () => { return hideButtonRequest(that, [1,2,4]) }, + hide: () => { return hideButtonRequest(that, [1,2,4], initHide, noShow , 'cancelRequest') }, size: 'mini' }, // { // type: 'primary', // icon: 'el-icon-circle-check', - // label: '执行', + // label: '执行完成', // name: "completeRequest", // hide: () => { return hideButtonRequest(that, [5]) }, // size: 'mini' @@ -130,13 +156,23 @@ ] } -function hideButtonRequest(that, val) { +function hideButtonRequest(that, val, initHide, noShow, name) { let data = true - val.forEach(key => { - if (that.propsData.requestStatus == key) { - data = false + // 走自定义是否隐藏事件 + if(initHide && initHide[name]){ + data = initHide[name]() + }else{ + // 隐藏按钮中是否有此按钮 + if(noShow && noShow.indexOf(name) >= 0){ + data = true + }else{ + val.forEach(key => { + if (that.propsData.requestStatus == key) { + data = false + } + }) } - }) + } return data } @@ -148,4 +184,12 @@ function hideButtonJob(that, val) { } }) return data +} + +// 更改按钮自定义特殊名称 +function changeLabelText(labels,name){ + if(labels && labels[name]){ + return labels[name] + } + return false } \ No newline at end of file diff --git a/fe/PC/src/utils/tableColumns/index.js b/fe/PC/src/utils/tableColumns/index.js index d4d062d3d..0edc64fac 100644 --- a/fe/PC/src/utils/tableColumns/index.js +++ b/fe/PC/src/utils/tableColumns/index.js @@ -657,8 +657,10 @@ export const TransactionType = [ { label: "来源库存状态", prop: 'outInventoryStatuses', type: "filterList", filters: "inventoryStage" }, { label: "目标库存状态", prop: 'inInventoryStatuses', type: "filterList", filters: "inventoryStage" }, { label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" }, - { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" }, - { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" }, + // { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" }, + // { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" }, + { label: "入库库区列表", prop: 'inLocationAreas' }, + { label: "出库库区列表", prop: 'outLocationAreas' }, { label: "自动提交审批", prop: 'autoSubmitRequest', type: "filter", filters: "whetherOrNot" }, { label: "自动审批通过", prop: 'autoAgreeRequest', type: "filter", filters: "whetherOrNot" }, { label: "自动执行", prop: 'autoHandleRequest', type: "filter", filters: "whetherOrNot" }, diff --git a/fe/PC/src/utils/tabsDesTions/index.js b/fe/PC/src/utils/tabsDesTions/index.js index d1ac16901..9510309e0 100644 --- a/fe/PC/src/utils/tabsDesTions/index.js +++ b/fe/PC/src/utils/tabsDesTions/index.js @@ -493,6 +493,8 @@ export const TransactionType = [ { label: "直接生成记录", prop: 'directCreateNote', type: "filter", filters: "whetherOrNot" }, { label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" }, { label: "描述", prop: 'description' }, + // { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" }, + // { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" }, { label: "入库库区列表", prop: 'inLocationAreas' }, { label: "出库库区列表", prop: 'outLocationAreas' }, { label: "备注", prop: 'remark' }, diff --git a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue index 4710a1752..214fed896 100644 --- a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue +++ b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue @@ -82,8 +82,32 @@ export default { return this.displayDialog.newDialog || this.displayDialog.editDialog; }, }, + // againHandleRequestLabel: function (val) { + // // console.log(val) + // // return function (val) { + // // let _label = false + // // // let _details = this.propsData ? this.propsData.details : null + // console.log(this.propsData) + // // } + // // val.forEach(key => { + // // if (this.propsData.requestStatus == key) { + // // _label = false + // // } + // // }) + // // return _label + // // return function (val) { + // // let data = true + // // val.forEach(key => { + // // if (this.propsData.requestStatus == key) { + // // data = false + // // } + // // }) + // // return data + // // } + // } }, data () { + let _this = this; return { URL: 'wms/store/material-request', tableLoading: false, @@ -95,7 +119,22 @@ export default { this.defaultFreshBtn(),//刷新 this.defaultFilterBtn(),//筛选 ], - DrawerButtonData: requestData(this) + DrawerButtonData: [ + ...requestData(this), + //使用 initHide 函数处理是否隐藏 + // ...requestData(this,false,{ + // againHandleRequest:() => {return this.againHandleRequestInit([9])} + // }), + //使用 noShow 隐藏按钮 + // ...requestData(this,false,false,['againHandleRequest']), + { + type: 'primary', + icon: 'el-icon-circle-check', + label: '完成', + name: "completeRequest", + size: 'mini' + }, + ], }; }, mounted () { @@ -117,7 +156,25 @@ export default { }).catch(err => { this.Loading.tableLoading = false }) - } + }, + // 重新定义【执行按钮】显示判断 + againHandleRequestInit(val){ + let data = true + val.forEach(key => { + if (this.propsData.requestStatus == key) { + data = false + } + }) + return data + }, + //抽屉常用按钮 + // drawerbutton (val) { + // // 完成 + // // if(val == 'IssueRequest-over'){ + // // } else { + // // drawerMixins.methods.drawerbutton(val, this) + // // } + // }, } }; diff --git a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue index de93c859d..6f572e029 100644 --- a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue +++ b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue @@ -103,14 +103,14 @@ export default { name: "print-shd", size: 'mini' }, - { - type: 'info', - icon: 'el-icon-printer', - label: '打印退货单', - name: "print-thd", - hide: () => { return this.hideButton('bhgpshmx') }, - size: 'mini' - }, + // { + // type: 'info', + // icon: 'el-icon-printer', + // label: '打印退货单', + // name: "print-thd", + // hide: () => { return this.hideButton('bhgpshmx') }, + // size: 'mini' + // }, ], // 自定义详情明细汇总等table页 dropdownTabsData: [ @@ -230,24 +230,24 @@ export default { }) } // 打印退货单(不合格品收货明细显示) - if(val == 'print-thd'){ - this.toPrintHttp(()=>{ - let _printData = JSON.parse(JSON.stringify(this.propsData)) - _printData.details = [] - this.propsData.details.forEach(item => { - if(item.purchaseReceiptInspectStatus == 3){ - _printData.details.push(item) - } - }); - let _option = { - details:{ - reason:"failedReason" - } - } - let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); - this.Print(data) - }) - } + // if(val == 'print-thd'){ + // this.toPrintHttp(()=>{ + // let _printData = JSON.parse(JSON.stringify(this.propsData)) + // _printData.details = [] + // this.propsData.details.forEach(item => { + // if(item.purchaseReceiptInspectStatus == 3){ + // _printData.details.push(item) + // } + // }); + // let _option = { + // details:{ + // reason:"failedReason" + // } + // } + // let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); + // this.Print(data) + // }) + // } }, // 明细table按钮 currenDrawerButtonClick(row){