From fb4db4ae9b6a7f113ba049f6789e6916c0dcc276 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 12 十月 2026 09:15:08 +0800
Subject: [PATCH] feat(mes): 新增业务码支持并优化追溯查询功能

---
 src/views/mes/pro/bagCode/data.ts |   47 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/src/views/mes/pro/bagCode/data.ts b/src/views/mes/pro/bagCode/data.ts
index f611bcc..2f23149 100644
--- a/src/views/mes/pro/bagCode/data.ts
+++ b/src/views/mes/pro/bagCode/data.ts
@@ -2,8 +2,12 @@
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { MesProBagCodeApi } from '#/api/mes/pro/bagCode';
 
+import { markRaw } from 'vue';
+
 import { DICT_TYPE } from '@vben/constants';
 import { getDictOptions } from '@vben/hooks';
+
+import { MdmItemSelect } from '#/views/basicData/mdm/components';
 
 import { getRangePickerDefaultProps } from '#/utils';
 
@@ -12,12 +16,16 @@
   return [
     {
       fieldName: 'code',
-      label: '琚嬬爜',
+      label: '杩芥函鐮�',
       component: 'Input',
       componentProps: {
         allowClear: true,
-        placeholder: '璇疯緭鍏ヨ鐮侊紙浜岀淮鐮佸唴瀹癸級',
+        placeholder: '璇疯緭鍏ヨ拷婧爜',
       },
+    },
+    {
+      fieldName: 'businessCode', label: '涓氬姟鐮�', component: 'Input',
+      componentProps: { allowClear: true, placeholder: '璇疯緭鍏ュ嚭鍏ュ簱涓氬姟鐮�' },
     },
     {
       fieldName: 'batchCode',
@@ -35,6 +43,14 @@
       componentProps: {
         allowClear: true,
         placeholder: '璇疯緭鍏ョ敓鎴愮粍缂栧彿',
+      },
+    },
+    {
+      fieldName: 'itemId',
+      label: '鍝佺',
+      component: markRaw(MdmItemSelect),
+      componentProps: {
+        placeholder: '璇烽�夋嫨鍝佺锛堜骇鍝佸搧绉嶏級',
       },
     },
     {
@@ -65,10 +81,11 @@
     { type: 'checkbox', width: 50 },
     {
       field: 'code',
-      title: '琚嬬爜锛堜簩缁寸爜鍐呭锛�',
+      title: '杩芥函鐮�',
       fixed: 'left',
       minWidth: 220,
     },
+    { field: 'businessCode', title: '涓氬姟鐮侊紙鍑哄叆搴擄級', minWidth: 210 },
     {
       field: 'bagNo',
       title: '琚嬪簭鍙�',
@@ -85,6 +102,16 @@
       minWidth: 190,
     },
     {
+      field: 'itemCode',
+      title: '鍝佺缂栫爜',
+      width: 120,
+    },
+    {
+      field: 'itemName',
+      title: '鍝佺鍚嶇О',
+      width: 140,
+    },
+    {
       field: 'lineCode',
       title: '浜х嚎缂栫爜',
       width: 100,
@@ -99,6 +126,7 @@
       title: '缁戝畾鎵樼洏鐮�',
       minWidth: 190,
     },
+    { field: 'inboundTime', title: '鍏ュ簱鐘舵��', width: 100, formatter: ({ cellValue }) => cellValue ? '宸插叆搴�' : '鏈叆搴�' },
     {
       field: 'status',
       title: '琚嬬爜鐘舵��',
@@ -115,6 +143,17 @@
       formatter: 'formatDateTime',
     },
     {
+      field: 'cancelTime',
+      title: '浣滃簾鏃堕棿',
+      width: 170,
+      formatter: 'formatDateTime',
+    },
+    {
+      field: 'cancelReason',
+      title: '浣滃簾鍘熷洜',
+      minWidth: 160,
+    },
+    {
       field: 'createTime',
       title: '鍒涘缓鏃堕棿',
       width: 170,
@@ -122,7 +161,7 @@
     },
     {
       title: '鎿嶄綔',
-      width: 180,
+      width: 350,
       fixed: 'right',
       slots: { default: 'actions' },
     },

--
Gitblit v1.9.3