From 723470be0a6b3e6765ac3f151179615fbefa35e7 Mon Sep 17 00:00:00 2001 From: rui_li <877258667@qq.com> Date: Wed, 23 Mar 2022 18:32:42 +0800 Subject: [PATCH] =?UTF-8?q?Fqc=E6=8E=92=E4=BA=A7=E5=8F=B3=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/schedule/order_schedule_fqc.js | 2 + src/views/modules/schedule/order_schedule.vue | 10 +- .../modules/schedule/order_schedule_fqc.vue | 175 ++++++++++++++++-- .../modules/yieldReport/com_defect_roll.vue | 2 - 4 files changed, 167 insertions(+), 22 deletions(-) diff --git a/src/api/schedule/order_schedule_fqc.js b/src/api/schedule/order_schedule_fqc.js index 22e113e..f8fb581 100644 --- a/src/api/schedule/order_schedule_fqc.js +++ b/src/api/schedule/order_schedule_fqc.js @@ -24,5 +24,7 @@ export const moveUpSchedule = data => createAPI('scheduling/moveUpSchedule', 'PO //上移派工单 export const moveDownSchedule = data => createAPI('scheduling/moveDownSchedule', 'POST', data) +//获取当前人员的日历编码和描述 +export const getCalendarMapByResourceId = data => createAPI('scheduling/getCalendarMapByResourceId', 'POST', data) diff --git a/src/views/modules/schedule/order_schedule.vue b/src/views/modules/schedule/order_schedule.vue index 7f2b5aa..fc0b45b 100644 --- a/src/views/modules/schedule/order_schedule.vue +++ b/src/views/modules/schedule/order_schedule.vue @@ -2030,7 +2030,7 @@ export default { this.warnChangeScheduleByCalendar(this.currentSchedlingRow); }else if('查看物料库存' === menuName){ //判断是否选择好了工单 - if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ + if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ //重置按钮 this.detailMenuButton.partStockFlag = true; //返回错误 @@ -2294,7 +2294,6 @@ export default { this.$message.error('已经是首行,无法继续上行!'); return false; } - debugger; //请求的参数 let requestData = {'site': this.pageData.site, 'workCenterNo': this.pageData.workCenterNo, @@ -2388,7 +2387,12 @@ export default { } this.detailMenuButton.changeScheduleByRoutingFlag = false; this.detailMenuButton.changeScheduleByCalendarFlag = false; - this.detailMenuButton.partStockFlag = false; + //等待订单无法查询物料库存 + if(this.currentSchedlingRow.orderNo === '9999'){ + this.detailMenuButton.partStockFlag = true; + }else{ + this.detailMenuButton.partStockFlag = false; + } } }, diff --git a/src/views/modules/schedule/order_schedule_fqc.vue b/src/views/modules/schedule/order_schedule_fqc.vue index faedd1b..3a108f1 100644 --- a/src/views/modules/schedule/order_schedule_fqc.vue +++ b/src/views/modules/schedule/order_schedule_fqc.vue @@ -114,19 +114,34 @@
可用操作员 - + + + + 菜单 + + + 工作日历 + 批量维护工作日历 + 重新排产 + + + + 排产 - + 刷新数据 - + 虚拟机台排产 @@ -191,6 +206,12 @@ 重新排产 + + + 生产订单 + + @@ -237,31 +258,31 @@ value-format="yyyy-MM-dd"> - + - + - + - + - + @@ -276,10 +297,14 @@ - + 刷新排产清单 + + 生产工单 + + @@ -290,6 +315,7 @@ highlight-current-row v-loading="dataListLoading" @row-dblclick="startScheduleBun" + @row-click="setCurrentRoutingRow" style="margin-left: -15px; margin-top: -5px;"> { this.tableHeight = (window.innerHeight - 270); @@ -1472,11 +1511,21 @@ export default { //判断是否是获取焦点的事件 if(row){ this.currentOperatorRow = JSON.parse(JSON.stringify(row)); - //设置当前的序号 - //this.operatorIndex = row.index; + //设置日历编码和日历描述 + this.refreshCalendarMapByResourceId(); } }, + /*刷新日历编码和日历的描述*/ + refreshCalendarMapByResourceId(){ + let requestData = {'site': this.pageData.site, + 'workCenterNo': 'FQC', 'resourceId': this.currentOperatorRow.operatorId}; + getCalendarMapByResourceId(requestData).then(({data}) => { + this.pageData.calendarId = data.row.calendarId; + this.pageData.calendarDesc = data.row.calendarDesc; + }); + }, + /*设置当前派工单行的下标*/ scheduleRowClassName({row, rowIndex}){ row.index = rowIndex; @@ -1547,7 +1596,6 @@ export default { }); }else { this.$message.success(data.msg); - debugger; //刷新明FQC操作员 this.getOperatorList(); this.pageData.virtualFlag = 'N'; @@ -1730,6 +1778,99 @@ export default { }); }, + /*区分不同的菜单 调用不同的方法 调用不同的方法*/ + operatorHandleCommand(menuName){ + //区分是哪一个方法调用 + if('工作日历' === menuName){ + //判断是否选择好了工单 + if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ + //重置按钮 + this.operatorMenuButton.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.currentOperatorRow == null || this.currentOperatorRow == {}){ + //重置按钮 + this.operatorMenuButton.batchWorkCalendarFlag = 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.currentOperatorRow == null || this.currentOperatorRow == {}){ + //重置按钮 + this.operatorMenuButton.reScheduleOrderFlag = true; + //返回错误 + this.$message.error('请选择人员!'); + return false; + } + //调用提示的方法 + this.warnReScheduleConfirm(); + } + }, + + //控制菜单的按钮 + /*控制明细菜单是否显示*/ + controlOperatorMenuBun(){ + //没有选择行 所有的按钮都是灰色 + if(this.currentOperatorRow == null || this.currentOperatorRow == {}){ + this.operatorMenuButton.workCalendarOutFlag = true; + this.operatorMenuButton.batchWorkCalendarFlag = true; + this.operatorMenuButton.reScheduleOrderFlag = true; + this.operatorMenuButton.changeScheduleByCalendarFlag = true; + this.operatorMenuButton.partStockFlag = true; + }else{ + this.operatorMenuButton.workCalendarOutFlag = false; + this.operatorMenuButton.batchWorkCalendarFlag = false; + this.operatorMenuButton.reScheduleOrderFlag = false; + this.operatorMenuButton.changeScheduleByCalendarFlag = false; + this.operatorMenuButton.partStockFlag = false; + } + }, + + /*打开已经排产工单的页面*/ + openSchedledOrderPage(){ + //判断是否选择好了工单 + if(this.currentScheduleRow == null || this.currentScheduleRow == {}){ + //返回错误 + this.$message.error('请选择派工单!'); + return false; + } + //跳转页面 + this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentScheduleRow.orderNo) + }, + + /*打开工单的页面*/ + openOrderPage(){ + //判断是否选择好了工单 + if(!this.currentRoutingRow){ + //返回错误 + this.$message.error('请选择工单!'); + return false; + } + //跳转页面 + this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRoutingRow.orderNo) + }, + }, created() { //查询工单的数据 @@ -1835,7 +1976,7 @@ div.customer-el-card-blue { /*添加主菜单和明细菜单的样式*/ .customer-css .customer-dropdown .el-button--primary { - padding: 2px; + padding: 5px; font-size: 12px; } diff --git a/src/views/modules/yieldReport/com_defect_roll.vue b/src/views/modules/yieldReport/com_defect_roll.vue index 4b2ed31..e0614e0 100644 --- a/src/views/modules/yieldReport/com_defect_roll.vue +++ b/src/views/modules/yieldReport/com_defect_roll.vue @@ -397,8 +397,6 @@ export default { /*强制大写属性编码*/ upCaseDefectCode(){ - console.log(this.pageData.defectCode); - debugger; this.pageData.defectCode = this.pageData.defectCode.toUpperCase(); },