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;
+ }
+ });
}
}