From ee628011dd8557e17965f2a17697369cd5f87106 Mon Sep 17 00:00:00 2001
From: rui_li <877258667@qq.com>
Date: Tue, 21 Jun 2022 15:51:14 +0800
Subject: [PATCH] =?UTF-8?q?2022-06-21=20=E6=B4=BE=E5=B7=A5=E5=8D=95?=
=?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=8A=A5=E5=B7=A5?=
=?UTF-8?q?=20=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/yieldReport/produce_order.js | 4 ++
.../modules/yieldReport/produce_order.vue | 72 ++++++++++++++++++-
2 files changed, 74 insertions(+), 2 deletions(-)
diff --git a/src/api/yieldReport/produce_order.js b/src/api/yieldReport/produce_order.js
index d72a507..b812cf2 100644
--- a/src/api/yieldReport/produce_order.js
+++ b/src/api/yieldReport/produce_order.js
@@ -33,3 +33,7 @@ export const soscheduleNewReinspectjob = data => createAPI('schedule/soscheduleN
//获取订单信息
export const getShopOrder = data => createAPI(`schedule/getShopOrderType`,'POST',data)
+
+//获取订单信息
+export const getScheduleMultiReportSpecialAuth = data => createAPI('scheduling/getScheduleMultiReportSpecialAuth','POST',data)
+
diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue
index d2f4119..47683bc 100644
--- a/src/views/modules/yieldReport/produce_order.vue
+++ b/src/views/modules/yieldReport/produce_order.vue
@@ -11,31 +11,37 @@
报工
FQC报工
返工重检
换包装
FQC分卷
分切报工
@@ -218,7 +224,8 @@ import {
manualProduceOrder,
repairSOFlagProduceOrder,
workbenchCancelallops,
- getShopOrder
+ getShopOrder,
+ getScheduleMultiReportSpecialAuth,/*获取派工单的特殊权限*/
} from '@/api/yieldReport/produce_order.js';
/*引入组件*/
@@ -1090,6 +1097,14 @@ export default {
},
],
+ reportButton: {
+ normalReportButton: true,
+ fqcReportButton: true,
+ reworkReportButton: true,
+ packReportButton: true,
+ fqcSegmentReportButton: true,
+ slitReportButton: true,
+ },
menuButton: {
prdButton: true,
openButton: true,
@@ -1105,7 +1120,7 @@ export default {
canceledAllPrdButton: false,
createRecheckButton: false,
partStockFlag: true,/*查看物料库存*/
- }
+ },
}
},
components: {
@@ -1781,6 +1796,13 @@ export default {
}
if (val == 0) {
+ let orderType = this.currentRow.orderType;
+ let workCenterNo = this.currentRow.workCenterNo;
+ if(orderType != 'S' || workCenterNo === 'FQC'){
+ //验证通过
+ this.$message.error('当前派工单无法使用报工!');
+ return false;
+ }
let data = {
site: this.currentRow.site,
resourceId: this.currentRow.resourceId,
@@ -1823,6 +1845,16 @@ export default {
this.$message.error('当前工单非分切工单!');
return false;
}
+ }else if(val == 1){//处理 FQC
+ //判断订单类型和加工中心
+ let workCenterNo = this.currentRow.workCenterNo;
+ if(workCenterNo === 'FQC'){
+ this.showOperatorFlag = true;
+ this.$refs.comSwitchOperator.init(val);
+ }else{
+ this.$message.error('当前派工单非FQC报工派工单!');
+ return false;
+ }
}else{
if (val == 4){
getShopOrder(this.currentRow).then(({data}) =>{
@@ -1959,6 +1991,42 @@ export default {
this.searchData.searchFlag = false;
this.produceScheduleList = data.rows;
});
+
+ /*获取报工的特殊权限*/
+ getScheduleMultiReportSpecialAuth(this.searchData).then(({data}) => {
+ let authMap = data.authMap;
+ //区分是否打开按钮
+ if(authMap.normalReportFlag === 'Y'){
+ this.reportButton.normalReportButton = false;
+ }else {
+ this.reportButton.normalReportButton = true;
+ }
+ if(authMap.fqcReportFlag === 'Y'){
+ this.reportButton.fqcReportButton = false;
+ }else {
+ this.reportButton.fqcReportButton = true;
+ }
+ if(authMap.reworkReportFlag === 'Y'){
+ this.reportButton.reworkReportButton = false;
+ }else {
+ this.reportButton.reworkReportButton = true;
+ }
+ if(authMap.packReportFlag === 'Y'){
+ this.reportButton.packReportButton = false;
+ }else {
+ this.reportButton.packReportButton = true;
+ }
+ if(authMap.fqcSegmentReportFlag === 'Y'){
+ this.reportButton.fqcSegmentReportButton = false;
+ }else {
+ this.reportButton.fqcSegmentReportButton = true;
+ }
+ if(authMap.slitReportFlag === 'Y'){
+ this.reportButton.slitReportButton = false;
+ }else{
+ this.reportButton.slitReportButton = true;
+ }
+ });
}
}