diff --git a/src/api/yieldReport/produce_order.js b/src/api/yieldReport/produce_order.js index a678a1d..37cef00 100644 --- a/src/api/yieldReport/produce_order.js +++ b/src/api/yieldReport/produce_order.js @@ -11,3 +11,11 @@ export const getOrderScheduleList = data => createAPI('schedule/getOrderSchedule // 点击报工校验 export const reportCheck = data => createAPI('schedule/reportCheck', 'POST', data) + +// 获取指定用户权限 +export const getUserSpecialSecurity = data => createAPI('schedule/getUserSpecialSecurity', 'POST', data) + +// 关闭/打开生产订单 +export const closeOrOpenProduceOrder = data => createAPI('schedule/closeOrOpenProduceOrder', 'POST', data) +// 暂停/重开 +export const pauseOrOpenProduceOrder = data => createAPI('schedule/pauseOrOpenProduceOrder', 'POST', data) diff --git a/src/views/modules/yieldReport/otherReport/bulk_inspection.vue b/src/views/modules/yieldReport/otherReport/bulk_inspection.vue index 9c4ef04..7a82318 100644 --- a/src/views/modules/yieldReport/otherReport/bulk_inspection.vue +++ b/src/views/modules/yieldReport/otherReport/bulk_inspection.vue @@ -6,8 +6,8 @@ title="批量直接送检" :close-on-click-modal="false" :visible.sync="visible"> - - + + @@ -18,7 +18,7 @@ - +
排程班次信息 @@ -136,7 +136,7 @@ export default { }, methods: { - init(val,val2) { + init(val, val2) { this.visible = true this.repairOrderFlag = val2 this.sfdcRolls.site = val.site @@ -180,9 +180,9 @@ export default { resourceId: this.sfdcRolls.resourceId, scheduleDate: this.currentDate, rollNo: item.rollNo, - repairOrderFlag: this.repairOrderFlag , + repairOrderFlag: this.repairOrderFlag, operatorId: this.operatorId, - currentDatetime: this.scheduleDateShiftDto.currentDateTime , + currentDatetime: this.scheduleDateShiftDto.currentDateTime, remark: '' } return item @@ -192,20 +192,20 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - workbenchPostinspection(paramData).then(({data}) =>{ - if (data.code == 0){ - this.$message.success(data.msg) - } - if (data.code == 400){ - this.$message.warning(data.msg) - } - if (data.code == 500){ + workbenchPostinspection(paramData).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + } + if (data.code == 400) { + this.$message.warning(data.msg) + } + if (data.code == 500) { this.$message.error(data.msg) } }) }) }, - closeDialog(){ + closeDialog() { Object.assign(this.$data.sfdcRolls, this.$options.data.call(this).sfdcRolls); } }, @@ -231,4 +231,8 @@ export default { } +.el-table /deep/ th { + padding: 0; +} + diff --git a/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue b/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue index 41e7497..3ad8cce 100644 --- a/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue +++ b/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue @@ -2692,7 +2692,7 @@ export default { }, scheduleData: { site: this.$store.state.user.site, - userName: this.$store.state.user.name, + username: this.$store.state.user.name, seqNo: '', orderNo: '', itemNo: 0, diff --git a/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue b/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue index 09d38de..7e3f454 100644 --- a/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue +++ b/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue @@ -2593,7 +2593,7 @@ export default { }, scheduleData: { site: this.$store.state.user.site, - userName: this.$store.state.user.name, + username: this.$store.state.user.name, seqNo: '', orderNo: '', itemNo: 0, diff --git a/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue b/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue index d7f5c84..44b4eb4 100644 --- a/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue +++ b/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue @@ -2693,7 +2693,7 @@ export default { }, scheduleData: { site: this.$store.state.user.site, - userName: this.$store.state.user.name, + username: this.$store.state.user.name, seqNo: '', orderNo: '', itemNo: 0, diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index 25983da..0130f85 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -78,7 +78,7 @@ - + @@ -88,9 +88,10 @@ 生产订单 关闭 - 打开 - 暂停 - 重新开工 + 打开 + 暂停 + 重新开工 + @@ -161,7 +162,10 @@ import { getProduceScheduleList, - reportCheck + reportCheck, + getUserSpecialSecurity, + closeOrOpenProduceOrder, + pauseOrOpenProduceOrder } from '@/api/yieldReport/produce_order.js'; /*引入组件*/ @@ -1016,11 +1020,50 @@ export default { this.menuButton.pauseButton = true this.menuButton.openReverseButton = true } else { + // 前往生产订单按钮 this.menuButton.prdButton = false - // 获取用户权限 - if (this.currentRow.closedFlag == 'N'){ - this.menuButton.closedButton = false + // 关闭按钮 + if (this.currentRow.closedFlag == 'N') { + let data = { + userSpecialSecurityNo: 230, + 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 + } + + // 打开按钮 + if (this.currentRow.closedFlag == 'Y') { + this.menuButton.closedButton = true + let data = { + userSpecialSecurityNo: 231, + username: this.$store.state.user.name, + } + getUserSpecialSecurity(data).then(({data}) => { + if (data.userSpecialSecurity == 'Y') { + this.menuButton.openButton = false + } 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 } } @@ -1028,6 +1071,7 @@ export default { /*区分不同的菜单 调用不同的方法 调用不同的方法*/ handleCommand(val) { //区分是哪一个方法调用 + //页面跳转 if ('0' == val) { if (JSON.stringify(this.currentRow) == '{}') { this.$message.error('请先选择派工单!'); @@ -1035,11 +1079,106 @@ export default { } this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo) } + // 关闭 if ('1' == val) { //调用提示的方法 - this.warnReScheduleConfirm(); + this.$confirm(`确定要关闭当前派工单吗?`, `关闭派工单`, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let data = { + username: this.$store.state.user.name, + itemNo: this.currentRow.itemNo, + site: this.currentRow.site, + orderNo: this.currentRow.orderNo, + seqNo: this.currentRow.seqNo, + closedFlag: 'Y', + } + closeOrOpenProduceOrder(data).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + } else { + this.$message.error(data.msg) + } + }) + }); + } + // 打开 + if ('2' == val) { + //调用提示的方法 + this.$confirm(`确定要打开当前派工单吗?`, `关闭派工单`, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let data = { + username: this.$store.state.user.name, + itemNo: this.currentRow.itemNo, + site: this.currentRow.site, + orderNo: this.currentRow.orderNo, + seqNo: this.currentRow.seqNo, + closedFlag: 'N', + } + closeOrOpenProduceOrder(data).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + } else { + this.$message.error(data.msg) + } + }) + }); + } + // 暂停 + if ('3' == val) { + //调用提示的方法 + this.$confirm(`确定要暂停当前派工单吗?`, `关闭派工单`, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let data = { + username: this.$store.state.user.name, + itemNo: this.currentRow.itemNo, + site: this.currentRow.site, + orderNo: this.currentRow.orderNo, + seqNo: this.currentRow.seqNo, + parkFlag: 'Y', + } + pauseOrOpenProduceOrder(data).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + } else { + this.$message.error(data.msg) + } + }) + }); + } + // 重开 + if ('4' == val) { + //调用提示的方法 + this.$confirm(`确定要重开当前派工单吗?`, `关闭派工单`, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let data = { + username: this.$store.state.user.name, + itemNo: this.currentRow.itemNo, + site: this.currentRow.site, + orderNo: this.currentRow.orderNo, + seqNo: this.currentRow.seqNo, + parkFlag: 'N', + } + pauseOrOpenProduceOrder(data).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + } else { + this.$message.error(data.msg) + } + }) + }); } - }, // FQC 报工 fqcReportModal() {