From 258de86a06ecba2e4f689ef184af114f9c399cb0 Mon Sep 17 00:00:00 2001 From: "[li_she]" <[li.she@xujiesoft.com]> Date: Thu, 17 Mar 2022 19:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95=20?= =?UTF-8?q?=EF=BC=8C=20=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1=20=EF=BC=8C=20?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=20sxm=202022-3-15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/produce_order.vue | 128 +++++++++++------- 1 file changed, 78 insertions(+), 50 deletions(-) diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index 1fc086f..25983da 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -5,7 +5,9 @@ 菜单 - 列表 + 列表 + - + - + 显示已结束派工单 @@ -75,18 +79,18 @@ - - - - + + + + 主菜单 - 生产订单 - 关闭 - 打开 - 暂停 - 重新开工 + 生产订单 + 关闭 + 打开 + 暂停 + 重新开工 @@ -135,8 +139,8 @@ + :visible.sync="showFinishScheduleFlag" ref="comFinishSchedule" + @processFinishScheduleOperation="processFinishScheduleOperation"> @@ -146,10 +150,10 @@ + :visible.sync="reworkShowReportFlag" ref="reworkInspectReport"> + :visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"> @@ -174,10 +178,10 @@ export default { height: 800, showOperatorFlag: false, showReportFlag: false, - fqcShowReportFlag:false, - reworkShowReportFlag:false, + fqcShowReportFlag: false, + reworkShowReportFlag: false, fqcRollShowReportFlag: false, - showFinishScheduleFlag:false, + showFinishScheduleFlag: false, searchData: { site: this.$store.state.user.site, resourceId: '', @@ -980,8 +984,12 @@ export default { fixed: false } ], - menuButton:{ - prdButton:true + menuButton: { + prdButton: true, + openButton: true, + closedButton: true, + pauseButton: true, + openReverseButton: true } } }, @@ -999,27 +1007,42 @@ export default { }) }, methods: { - /*区分不同的菜单 调用不同的方法 调用不同的方法*/ - handleCommand(val){ + // 控制是否显示功能 + menuButtonFlag() { if (JSON.stringify(this.currentRow) == '{}') { + this.menuButton.prdButton = true + this.menuButton.openButton = true + this.menuButton.closedButton = true + this.menuButton.pauseButton = true + this.menuButton.openReverseButton = true + } else { this.menuButton.prdButton = false + + // 获取用户权限 + if (this.currentRow.closedFlag == 'N'){ + this.menuButton.closedButton = false + } } + + }, + /*区分不同的菜单 调用不同的方法 调用不同的方法*/ + handleCommand(val) { //区分是哪一个方法调用 - if('0' == val){ + if ('0' == val) { if (JSON.stringify(this.currentRow) == '{}') { this.$message.error('请先选择派工单!'); return false; } - this.$router.push('/shopOrder-shopOrder/shopOrder',this.currentRow.orderNo) + this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo) } - if('1' == val){ + if ('1' == val) { //调用提示的方法 this.warnReScheduleConfirm(); } }, // FQC 报工 - fqcReportModal(){ + fqcReportModal() { //首先判断是否选择好派工单 if (JSON.stringify(this.currentRow) == '{}') { this.$message.error('请先选择派工单!'); @@ -1032,7 +1055,7 @@ export default { }); }, // FQC 分卷 - fqcSplitRollModal(){ + fqcSplitRollModal() { if (JSON.stringify(this.currentRow) == '{}') { this.$message.error('请先选择派工单!'); return false; @@ -1044,7 +1067,7 @@ export default { }); }, // 返工重捡 - reworkInspectModal(){ + reworkInspectModal() { //首先判断是否选择好派工单 if (JSON.stringify(this.currentRow) == '{}') { this.$message.error('请先选择派工单!'); @@ -1057,7 +1080,7 @@ export default { }); }, // 换包装 - changePackaging(){ + changePackaging() { }, /*查询派工单*/ @@ -1072,6 +1095,7 @@ export default { /*刷新页面table*/ refreshPageTables() { + this.currentRow = {} this.getProduceScheduleList(); }, /*设置选中行的参数*/ @@ -1080,50 +1104,50 @@ export default { }, //设置参数 - initOperatorData(operatorData){ + initOperatorData(operatorData) { this.showOperatorFlag = false; this.operatorData = JSON.parse(JSON.stringify(operatorData)); - if (operatorData.reportType == 0){ + if (operatorData.reportType == 0) { //切换到报工组件 this.switchProduceReportModal(); } - if (operatorData.reportType == 1){ + if (operatorData.reportType == 1) { //切换到fqc报工组件 this.fqcReportModal(); } - if (operatorData.reportType == 2){ + if (operatorData.reportType == 2) { //切换到返工 重检组件 this.reworkInspectModal(); } - if (operatorData.reportType == 3){ + if (operatorData.reportType == 3) { //切换到fqc分卷组件 this.fqcSplitRollModal(); } }, - notInitOperatorData(val){ + notInitOperatorData(val) { //注销用户信息 this.operatorData.operatorId = ''; this.operatorData.operatorName = ''; //关闭切换用户模态框 this.showOperatorFlag = false; - if (val == 0){ + if (val == 0) { //切换到报工组件 this.switchProduceReportModal(); } - if (val == 1){ + if (val == 1) { //切换到fqc报工组件 this.fqcReportModal(); } - if (val == 2){ + if (val == 2) { //切换到返工 重检组件 this.reworkInspectModal(); } - if (val == 3){ + if (val == 3) { //切换到fqc分卷组件 this.fqcSplitRollModal(); } @@ -1138,26 +1162,26 @@ export default { this.$message.error('请先选择派工单!'); return false; } - if(val == 0){ + if (val == 0) { let data = { site: this.currentRow.site, resourceId: this.currentRow.resourceId, workCenterNo: this.currentRow.workCenterNo, - seqNo:this.currentRow.seqNo, + seqNo: this.currentRow.seqNo, username: this.$store.state.user.name } - reportCheck(data).then(({data})=>{ - if (data.code==0){ + reportCheck(data).then(({data}) => { + if (data.code == 0) { //打开操作员切换功能 this.showOperatorFlag = true; this.$nextTick(() => { this.$refs.comSwitchOperator.init(val); }); } - if (data.code == 300){ + if (data.code == 300) { this.$message.warning(data.msg) } - if (data.code == 400){ + if (data.code == 400) { this.$confirm(`${data.msg}`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1171,7 +1195,7 @@ export default { }) } }) - }else { + } else { //打开操作员切换功能 this.showOperatorFlag = true; this.$nextTick(() => { @@ -1210,7 +1234,7 @@ export default { }, //结束派工单后刷新页面 - processFinishScheduleOperation(){ + processFinishScheduleOperation() { //刷新当前页面的数据 this.refreshPageTables(); }, @@ -1321,19 +1345,23 @@ div.customer-el-card-blue { .el-radio + .el-radio { margin-left: 0px; } + /*当前按钮的通用样式*/ -.customer-css .customer-bun-mid{ +.customer-css .customer-bun-mid { width: 65px; text-align: center; } + /*当前按钮的通用样式*/ .customer-css .el-button--medium { padding: 5px 5px; } + /*添加主菜单和明细菜单的样式*/ -.customer-css .customer-dropdown .el-button--primary{ +.customer-css .customer-dropdown .el-button--primary { padding: 2px; font-size: 12px; } + /*控制上下间距*/