From cd8b52bdf89a4d1101f72e0ece9f4df22a3d3f7a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 十月 2026 16:03:32 +0800
Subject: [PATCH] feat(mdm): 物料列表隐藏辅单位与销售价列

---
 src/views/mes/qc/batchtrace/data.ts |  201 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 165 insertions(+), 36 deletions(-)

diff --git a/src/views/mes/qc/batchtrace/data.ts b/src/views/mes/qc/batchtrace/data.ts
index 52e9620..92ff6dc 100644
--- a/src/views/mes/qc/batchtrace/data.ts
+++ b/src/views/mes/qc/batchtrace/data.ts
@@ -5,6 +5,8 @@
 
 import { markRaw } from 'vue';
 
+import { DICT_TYPE } from '@vben/constants';
+
 import { MdClientSelect } from '#/views/mes/md/client/components';
 import { MdItemSelect } from '#/views/mes/md/item/components';
 import { MdVendorSelect } from '#/views/mes/md/vendor/components';
@@ -54,15 +56,6 @@
         placeholder: '璇疯緭鍏ラ攢鍞鍗曠紪鍙�',
       },
     },
-    {
-      fieldName: 'purchaseOrderCode',
-      label: '閲囪喘璁㈠崟缂栧彿',
-      component: 'Input',
-      componentProps: {
-        allowClear: true,
-        placeholder: '璇疯緭鍏ラ噰璐鍗曠紪鍙�',
-      },
-    },
   ];
 }
 
@@ -95,19 +88,9 @@
       width: 80,
     },
     {
-      field: 'vendorCode',
-      title: '渚涘簲鍟嗙紪鐮�',
-      minWidth: 140,
-    },
-    {
       field: 'vendorName',
       title: '渚涘簲鍟嗗悕绉�',
       minWidth: 160,
-    },
-    {
-      field: 'clientCode',
-      title: '瀹㈡埛缂栫爜',
-      minWidth: 140,
     },
     {
       field: 'clientName',
@@ -117,11 +100,6 @@
     {
       field: 'salesOrderCode',
       title: '閿�鍞鍗曠紪鍙�',
-      minWidth: 160,
-    },
-    {
-      field: 'purchaseOrderCode',
-      title: '閲囪喘璁㈠崟缂栧彿',
       minWidth: 160,
     },
     {
@@ -190,24 +168,12 @@
       span: 3,
     },
     {
-      field: 'purchaseOrderCode',
-      label: '閲囪喘璁㈠崟缂栧彿',
-    },
-    {
-      field: 'vendorCode',
-      label: '渚涘簲鍟嗙紪鐮�',
-    },
-    {
       field: 'vendorName',
       label: '渚涘簲鍟嗗悕绉�',
     },
     {
       field: 'salesOrderCode',
       label: '閿�鍞鍗曠紪鍙�',
-    },
-    {
-      field: 'clientCode',
-      label: '瀹㈡埛缂栫爜',
     },
     {
       field: 'clientName',
@@ -227,3 +193,166 @@
     },
   ];
 }
+
+/** 閲囪喘鏉ユ簮鍒楄〃鐨勫瓧娈� */
+export function usePurchaseSourceColumns(): VxeTableGridOptions<MesWmBatchApi.PurchaseSource>['columns'] {
+  return [
+    {
+      field: 'receiptCode',
+      title: '閲囪喘鍏ュ簱鍗曞彿',
+      minWidth: 160,
+    },
+    {
+      field: 'receiptDate',
+      title: '鍏ュ簱鏃ユ湡',
+      minWidth: 160,
+      formatter: 'formatDate',
+    },
+    {
+      field: 'vendorName',
+      title: '渚涘簲鍟嗗悕绉�',
+      minWidth: 140,
+    },
+    {
+      field: 'itemCode',
+      title: '鐗╂枡缂栫爜',
+      minWidth: 140,
+    },
+    {
+      field: 'itemName',
+      title: '鐗╂枡鍚嶇О',
+      minWidth: 160,
+    },
+    {
+      field: 'iqcCode',
+      title: 'IQC 妫�楠屽崟鍙�',
+      minWidth: 160,
+    },
+    {
+      field: 'checkResult',
+      title: 'IQC 妫�楠岀粨璁�',
+      width: 110,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_QC_CHECK_RESULT },
+      },
+    },
+    {
+      field: 'receivedQuantity',
+      title: '鍏ュ簱鏁伴噺',
+      width: 100,
+    },
+  ];
+}
+
+/** 閿�鍞幓鍚戝垪琛ㄧ殑瀛楁 */
+export function useSalesTargetColumns(): VxeTableGridOptions<MesWmBatchApi.SalesTarget>['columns'] {
+  return [
+    {
+      field: 'salesCode',
+      title: '閿�鍞嚭搴撳崟鍙�',
+      minWidth: 160,
+    },
+    {
+      field: 'salesDate',
+      title: '鍑哄簱鏃ユ湡',
+      minWidth: 160,
+      formatter: 'formatDate',
+    },
+    {
+      field: 'salesOrderCode',
+      title: '閿�鍞鍗曠紪鍙�',
+      minWidth: 160,
+    },
+    {
+      field: 'clientName',
+      title: '瀹㈡埛鍚嶇О',
+      minWidth: 140,
+    },
+    {
+      field: 'itemCode',
+      title: '鐗╂枡缂栫爜',
+      minWidth: 140,
+    },
+    {
+      field: 'itemName',
+      title: '鐗╂枡鍚嶇О',
+      minWidth: 160,
+    },
+    {
+      field: 'oqcCode',
+      title: 'OQC 妫�楠屽崟鍙�',
+      minWidth: 160,
+    },
+    {
+      field: 'checkResult',
+      title: 'OQC 妫�楠岀粨璁�',
+      width: 110,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_QC_CHECK_RESULT },
+      },
+    },
+    {
+      field: 'quantity',
+      title: '鍑哄簱鏁伴噺',
+      width: 100,
+    },
+    {
+      field: 'qualityStatus',
+      title: '璐ㄩ噺鐘舵��',
+      width: 100,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_WM_QUALITY_STATUS },
+      },
+    },
+  ];
+}
+
+/** 宸ュ簭娴佽浆鍒楄〃鐨勫瓧娈� */
+export function useProcessTraceColumns(): VxeTableGridOptions<MesWmBatchApi.ProcessTrace>['columns'] {
+  return [
+    {
+      field: 'eventType',
+      title: '浜嬩欢绫诲瀷',
+      width: 90,
+      slots: { default: 'eventType' },
+    },
+    {
+      field: 'workOrderCode',
+      title: '鐢熶骇宸ュ崟鍙�',
+      minWidth: 160,
+    },
+    {
+      field: 'processCode',
+      title: '宸ュ簭缂栫爜',
+      minWidth: 120,
+    },
+    {
+      field: 'processName',
+      title: '宸ュ簭鍚嶇О',
+      minWidth: 140,
+    },
+    {
+      field: 'quantity',
+      title: '鏁伴噺',
+      width: 100,
+    },
+    {
+      field: 'qualityStatus',
+      title: '璐ㄩ噺鐘舵��',
+      width: 100,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_WM_QUALITY_STATUS },
+      },
+    },
+    {
+      field: 'eventTime',
+      title: '浜嬩欢鏃堕棿',
+      minWidth: 160,
+      formatter: 'formatDateTime',
+    },
+  ];
+}

--
Gitblit v1.9.3