Ver Fonte

修改bug

695593266@qq.com há 3 dias atrás
pai
commit
1edb86ac2a
2 ficheiros alterados com 16 adições e 6 exclusões
  1. 14 4
      src/views/produce/index.vue
  2. 2 2
      src/views/produceOrder/workReport.vue

+ 14 - 4
src/views/produce/index.vue

@@ -1240,7 +1240,7 @@
           }
 
           this.operationType = t;
-        } else if (t !== 'feed') {
+        } else if (t !== 'feed' && t !== 'job') {
           this.operationType = t;
         }
         if (!this.checkTaskSelected()) return;
@@ -1250,7 +1250,9 @@
           this.operationType = 'feed';
         }
 
-        this.workOrderDetailPreviewSuppressed = true;
+        if (t !== 'job') {
+          this.workOrderDetailPreviewSuppressed = true;
+        }
 
         const handler = this.actionMap[t];
         if (handler) {
@@ -1405,6 +1407,8 @@
 
         if (!this.checkTaskJob(row)) return;
 
+        this.operationType = 'job';
+        this.workOrderDetailPreviewSuppressed = true;
         this.isFinalCheckProduction = true;
 
         const currentRow = this.buildCurrentRow(row);
@@ -1517,7 +1521,11 @@
       },
 
       async validateTaskAssignBeforeWorkOrderJob() {
-        if (this.info?.clientEnvironmentId != 9 || this.activeName !== '0') {
+        if (
+          this.info?.clientEnvironmentId != 9 ||
+          this.activeName !== '0' ||
+          this.taskObj.id == -1
+        ) {
           return true;
         }
 
@@ -1527,7 +1535,7 @@
             rows.map(async (row) => {
               const workOrderId =
                 row.id || row.workOrderId || row.mesWorkOrderId;
-              const taskId = row.taskId || this.workTaskId || this.taskObj.id;
+              const taskId = this.taskObj.id || this.workTaskId || row.taskId;
               const res = await getTaskReport({ workOrderId, taskId });
               return {
                 row,
@@ -1572,6 +1580,8 @@
           }
         }
 
+        this.operationType = 'job';
+        this.workOrderDetailPreviewSuppressed = true;
         this.isFinalCheckProduction = true;
 
         if ([2, 3, 6].includes(this.taskObj.type)) {

+ 2 - 2
src/views/produceOrder/workReport.vue

@@ -943,7 +943,7 @@
       },
 
       async validateTaskAssignBeforeWorkOrderJob() {
-        if (this.info?.clientEnvironmentId != 9 || this.activeName !== '0') {
+        if (this.info?.clientEnvironmentId != 9 || this.taskObj.id == -1) {
           return true;
         }
 
@@ -953,7 +953,7 @@
             rows.map(async (row) => {
               const workOrderId =
                 row.id || row.workOrderId || row.mesWorkOrderId;
-              const taskId = row.taskId || this.workTaskId || this.taskObj.id;
+              const taskId = this.taskObj.id || this.workTaskId || row.taskId;
               const res = await getTaskReport({ workOrderId, taskId });
               return {
                 row,