diff --git a/src/views/modules/schedule/order_schedule.vue b/src/views/modules/schedule/order_schedule.vue index f4beb13..3fbbb1d 100644 --- a/src/views/modules/schedule/order_schedule.vue +++ b/src/views/modules/schedule/order_schedule.vue @@ -167,7 +167,7 @@ - + 主菜单 @@ -220,7 +220,7 @@ - + 明细菜单 @@ -230,13 +230,13 @@ 工作日历 批量维护工作日历 + :disabled="detailMenuButton.batchWorkCalendarFlag">批量维护工作日历 分批排产 + :disabled="detailMenuButton.splitScheduleFlag">分批排产 重新排产 + :disabled="detailMenuButton.reScheduleOrderFlag">重新排产 查看物料库存 + :disabled="detailMenuButton.partStockFlag">查看物料库存 @@ -1862,7 +1862,7 @@ export default { }, /*区分不同的菜单 调用不同的方法 调用不同的方法*/ - OrderHandleCommand(menuName){ + orderHandleCommand(menuName){ //区分是哪一个方法调用 if('生产工单' === menuName){ //判断是否选择好了工单 @@ -1946,7 +1946,92 @@ export default { } }, - /*打开分批排产*/ + /*区分不同的菜单 调用不同的方法 调用不同的方法*/ + scheduleHandleCommand(menuName){ + //区分是哪一个方法调用 + if('生产工单' === menuName){ + //判断是否选择好了工单 + if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ + //重置按钮 + this.detailMenuButton.shopOrderFlag = true; + //返回错误 + this.$message.error('请选择派工单!'); + return false; + } + this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentSchedlingRow.orderNo) + }else if('工作日历' === menuName){ + //判断是否选择好了工单 + if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ + //重置按钮 + this.detailMenuButton.workCalendarOutFlag = true; + //返回错误 + this.$message.error('请选择派工单!'); + return false; + } + let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId, + 'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate}; + //打开组件 需要的数据 展示需要的数据 + this.$nextTick(() => { + this.showWorkCalendarOut = true; + this.$refs.comWorkCalendarOut.init(tempData); + }) + + }else if('批量维护工作日历' === menuName){ + //判断是否选择好了工单 + if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ + //重置按钮 + this.primaryMenuButton.workCalendarOutFlag = true; + //返回错误 + this.$message.error('请选择工单!'); + return false; + } + let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId, + 'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate}; + //打开组件 需要的数据 展示需要的数据 + this.$nextTick(() => { + this.showBatchWorkCalendar = true; + this.$refs.comBatchWorkCalendar.init(tempData); + }) + }else if('分批排产' === menuName){ + //判断是否选择好了工单 + if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ + //重置按钮 + this.primaryMenuButton.workCalendarOutFlag = true; + //返回错误 + this.$message.error('请选择工单!'); + return false; + } + this.openSplitScheduleModal(); + }else if('重新排产' === menuName){ + //判断是否选择好了工单 + if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ + //重置按钮 + this.primaryMenuButton.workCalendarOutFlag = true; + //返回错误 + this.$message.error('请选择工单!'); + return false; + } + //调用提示的方法 + this.warnReScheduleConfirm(); + }else if('查看物料库存' === menuName){ + //判断是否选择好了工单 + if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ + //重置按钮 + this.primaryMenuButton.partStockFlag = true; + //返回错误 + this.$message.error('请选择工单!'); + return false; + } + let tempData = {'site': this.pageData.site, 'orderNo': this.currentRoutingRow.orderNo}; + //打开组件 需要的数据 展示需要的数据 + this.$nextTick(() => { + this.showPartStockFlag = true; + this.$refs.comPartStock.init(tempData); + }) + } + }, + + /*打开分批排产 openSplitScheduleModal(){ let routingRow = this.currentRoutingRow; //首先判断是否选好