diff --git a/src/views/modules/yieldReport/otherReport/change_packaging.vue b/src/views/modules/yieldReport/otherReport/change_packaging.vue new file mode 100644 index 0000000..9800568 --- /dev/null +++ b/src/views/modules/yieldReport/otherReport/change_packaging.vue @@ -0,0 +1,3662 @@ + + + + + diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index bba8315..3b99476 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -87,7 +87,7 @@ 主菜单 - + 生产订单
@@ -220,6 +220,7 @@ export default { data() { return { height: 800, + menuShow:false, showOperatorFlag: false, showReportFlag: false, fqcShowReportFlag: false, @@ -1065,6 +1066,7 @@ export default { methods: { // 控制是否显示功能 menuButtonFlag() { + this.menuShow = false if (JSON.stringify(this.currentRow) == '{}') { this.menuButton.prdButton = true this.menuButton.openButton = true @@ -1079,167 +1081,173 @@ export default { this.menuButton.canceledAllPrdButton = true this.menuButton.createRecheckButton = true } else { + let currentRow = null // 获取订单信息 let searchOrder = { orderNo: this.currentRow.orderNo, seqNo: this.currentRow.seqNo, site: this.currentRow.site, - searchFlag:true + username: this.$store.state.user.name, + searchFlag: true } - getProduceScheduleList(searchOrder).then(({data}) => { + currentRow = getProduceScheduleList(searchOrder).then(({data}) => { //设置查询数据 - this.currentRow = data.rows[0]; - }); - this.menuButton.canceledAllPrdButton = false - this.menuButton.createRecheckButton = false - // 前往生产订单按钮 - this.menuButton.prdButton = false - // 关闭按钮 - if (this.currentRow.closedFlag == 'N') { - let data = { - userSpecialSecurityNo: 230, - username: this.$store.state.user.name, + currentRow = data.rows[0]; + if (currentRow == null){ + return; } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.closedButton = false - } else { - this.menuButton.closedButton = true + this.menuButton.canceledAllPrdButton = false + this.menuButton.createRecheckButton = false + // 判断是否具有该页面权限 + + this.menuButton.prdButton = false + // 关闭按钮 + if (currentRow.closedFlag == 'N') { + let data = { + userSpecialSecurityNo: 230, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.closedButton = true - } - // 打开按钮 - if (this.currentRow.closedFlag == 'Y') { - let data = { - userSpecialSecurityNo: 231, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.closedButton = false + } else { + this.menuButton.closedButton = true + } + }) + } else { + this.menuButton.closedButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.openButton = false - } else { - this.menuButton.openButton = true + // 打开按钮 + if (currentRow.closedFlag == 'Y') { + let data = { + userSpecialSecurityNo: 231, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.openButton = true - } - // 暂停 - if (this.currentRow.closedFlag == 'N' && this.currentRow.parkFlag == 'N') { - this.menuButton.pauseButton = false - this.menuButton.openReverseButton = true - } - // 重开 - if (this.currentRow.closedFlag == 'N' & this.currentRow.parkFlag == 'Y') { - this.menuButton.openReverseButton = false - this.menuButton.pauseButton = true - } - // 生产排料 - if (this.currentRow.costRollUpFlag == 'N') { - // 获取特殊权限 - let data = { - userSpecialSecurityNo: 238, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.openButton = false + } else { + this.menuButton.openButton = true + } + }) + } else { + this.menuButton.openButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.costRollUpFlagButton = false - } else { - this.menuButton.costRollUpFlagButton = true + // 暂停 + if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'N') { + this.menuButton.pauseButton = false + this.menuButton.openReverseButton = true + } + // 重开 + if (currentRow.closedFlag == 'N' & currentRow.parkFlag == 'Y') { + menuButton.openReverseButton = false + menuButton.pauseButton = true + } + // 生产排料 + if (currentRow.costRollUpFlag == 'N') { + // 获取特殊权限 + let data = { + userSpecialSecurityNo: 238, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.costRollUpFlagButton = true - } - // 取消生产排料 - if (this.currentRow.costRollUpFlag == 'Y') { - // 获取特殊权限 - let data = { - userSpecialSecurityNo: 238, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.costRollUpFlagButton = false + } else { + this.menuButton.costRollUpFlagButton = true + } + }) + } else { + this.menuButton.costRollUpFlagButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.canceledCostRollUpFlagButton = false - } else { - this.menuButton.canceledCostRollUpFlagButton = true + // 取消生产排料 + if (currentRow.costRollUpFlag == 'Y') { + // 获取特殊权限 + let data = { + userSpecialSecurityNo: 238, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.canceledCostRollUpFlagButton = true - } - // 刀模已发 确认 - if (this.currentRow.manualFlag == 'N') { - // 获取特殊权限 - let data = { - userSpecialSecurityNo: 258, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.canceledCostRollUpFlagButton = false + } else { + this.menuButton.canceledCostRollUpFlagButton = true + } + }) + } else { + this.menuButton.canceledCostRollUpFlagButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.manualFlagButton = false - } else { - this.menuButton.manualFlagButton = true + // 刀模已发 确认 + if (currentRow.manualFlag == 'N') { + // 获取特殊权限 + let data = { + userSpecialSecurityNo: 258, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.manualFlagButton = true - } - // 刀模已发 取消 - if (this.currentRow.manualFlag == 'Y') { - // 获取特殊权限 - let canceledAllPrdData = { - userSpecialSecurityNo: 259, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.manualFlagButton = false + } else { + this.menuButton.manualFlagButton = true + } + }) + } else { + this.menuButton.manualFlagButton = true } - getUserSpecialSecurity(canceledAllPrdData).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.canceledManualFlagButton = false - } else { - this.menuButton.canceledManualFlagButton = true + // 刀模已发 取消 + if (currentRow.manualFlag == 'Y') { + // 获取特殊权限 + let canceledAllPrdData = { + userSpecialSecurityNo: 259, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.canceledManualFlagButton = true - } - // 印版已发 确认 - if (this.currentRow.repairSOFlag == 'N') { - // 获取特殊权限 - let data = { - userSpecialSecurityNo: 259, - username: this.$store.state.user.name, + getUserSpecialSecurity(canceledAllPrdData).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.canceledManualFlagButton = false + } else { + this.menuButton.canceledManualFlagButton = true + } + }) + } else { + this.menuButton.canceledManualFlagButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.repairSOFlagButton = false - } else { - this.menuButton.repairSOFlagButton = true + // 印版已发 确认 + if (currentRow.repairSOFlag == 'N') { + // 获取特殊权限 + let data = { + userSpecialSecurityNo: 259, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.repairSOFlagButton = true - } - // 印版已发 取消 - if (this.currentRow.repairSOFlag == 'Y') { - // 获取特殊权限 - let data = { - userSpecialSecurityNo: 259, - username: this.$store.state.user.name, + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.repairSOFlagButton = false + } else { + this.menuButton.repairSOFlagButton = true + } + }) + } else { + this.menuButton.repairSOFlagButton = true } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.menuButton.canceledRepairSOFlagButton = false - } else { - this.menuButton.canceledRepairSOFlagButton = true + // 印版已发 取消 + if (currentRow.repairSOFlag == 'Y') { + // 获取特殊权限 + let data = { + userSpecialSecurityNo: 259, + username: this.$store.state.user.name, } - }) - } else { - this.menuButton.canceledRepairSOFlagButton = true - } + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.canceledRepairSOFlagButton = false + } else { + this.menuButton.canceledRepairSOFlagButton = true + } + }) + } else { + this.menuButton.canceledRepairSOFlagButton = true + } + this.menuShow=true + }); } - }, /*区分不同的菜单 调用不同的方法 调用不同的方法*/ handleCommand(val) {