695593266@qq.com 1 dienu atpakaļ
vecāks
revīzija
9ebf0f602e

+ 13 - 13
src/views/productionPlan/components/newFactoryProductionScheduling.columns.js

@@ -14,6 +14,12 @@ export function createSchedulingColumns() {
       align: 'center',
       showOverflowTooltip: true
     },
+    {
+      prop: 'batchNo',
+      label: '批次号',
+      align: 'center',
+      minWidth: 140
+    },
     {
       prop: 'code',
       label: '计划编号',
@@ -58,12 +64,6 @@ export function createSchedulingColumns() {
       align: 'center',
       minWidth: 150
     },
-    {
-      prop: 'batchNo',
-      label: '批次号',
-      align: 'center',
-      minWidth: 140
-    },
     {
       prop: 'productCode',
       label: '编码',
@@ -233,6 +233,13 @@ export function createWorkOrderSchedulingColumns() {
       align: 'center',
       showOverflowTooltip: true
     },
+    {
+      prop: 'batchNo',
+      label: '批次号',
+      align: 'center',
+      minWidth: 120,
+      showOverflowTooltip: true
+    },
     {
       prop: 'code',
       label: '生产工单号',
@@ -268,13 +275,6 @@ export function createWorkOrderSchedulingColumns() {
       minWidth: 150,
       showOverflowTooltip: true
     },
-    {
-      prop: 'batchNo',
-      label: '批次号',
-      align: 'center',
-      minWidth: 120,
-      showOverflowTooltip: true
-    },
     {
       prop: 'formingNum',
       label: '订单数量',

+ 15 - 18
src/views/productionPlan/components/newFactoryProductionScheduling.vue

@@ -1930,34 +1930,30 @@
             source.apsWorkOrderCode ||
             source.workOrderCode ||
             '',
+          batchNo: source.batchNo || source.batchNum || '',
           mesWorkOrderId,
           mesWorkOrderCode,
           productionOrderNumber: mesWorkOrderCode,
           workOrderCode: mesWorkOrderCode
         };
       },
-      getOrderSchedulingDisplayOrderCode(...sources) {
+      getOrderSchedulingDisplayBatchNo(...sources) {
         for (const source of sources) {
           if (!source) continue;
-          const code =
-            source.mesWorkOrderCode ||
-            source.workOrderCode ||
-            source.productionOrderNumber ||
-            source.apsWorkOrderCode ||
-            source.orderCode ||
-            source.code ||
-            source.planCode ||
-            '';
-          if (code) return code;
+          const batchNo = source.batchNo || source.batchNum || '';
+          if (batchNo) return batchNo;
         }
         return '';
       },
       buildGanttPlanLabel(planInfo = {}, fallbackInfo = {}) {
-        const displayCode = this.getOrderSchedulingDisplayOrderCode(
+        const displayBatchNo = this.getOrderSchedulingDisplayBatchNo(
           planInfo,
           fallbackInfo
         );
-        return [displayCode, planInfo.productName || fallbackInfo.productName]
+        return [
+          displayBatchNo,
+          planInfo.productName || fallbackInfo.productName
+        ]
           .filter(Boolean)
           .join(' ');
       },
@@ -2388,8 +2384,10 @@
               matchedPlanInfo,
               period
             );
-            const childDisplayOrderCode =
-              this.getOrderSchedulingDisplayOrderCode(matchedPlanInfo, period);
+            const childDisplayBatchNo = this.getOrderSchedulingDisplayBatchNo(
+              matchedPlanInfo,
+              period
+            );
             const displayRange = this.getOrderSchedulingFullDayRange(
               period.startTime,
               period.endTime
@@ -2473,9 +2471,8 @@
                 taskLabel,
               text: [
                 taskLabel,
-                childDisplayOrderCode,
-                matchedPlanInfo.productName,
-                matchedPlanInfo.batchNo
+                childDisplayBatchNo,
+                matchedPlanInfo.productName
               ]
                 .filter(Boolean)
                 .join(' / '),