From 7dfbaba5930676252d8339f7d04861c1c2351d5b Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 13 八月 2026 16:27:56 +0800
Subject: [PATCH] feat(mes): 增加产品设计项目审批流程和批次追溯功能
---
src/views/mes/qc/batchtrace/data.ts | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 175 insertions(+), 0 deletions(-)
diff --git a/src/views/mes/qc/batchtrace/data.ts b/src/views/mes/qc/batchtrace/data.ts
index 52e9620..3013c2e 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';
@@ -227,3 +229,176 @@
},
];
}
+
+/** 閲囪喘鏉ユ簮鍒楄〃鐨勫瓧娈� */
+export function usePurchaseSourceColumns(): VxeTableGridOptions<MesWmBatchApi.PurchaseSource>['columns'] {
+ return [
+ {
+ field: 'receiptCode',
+ title: '閲囪喘鍏ュ簱鍗曞彿',
+ minWidth: 160,
+ },
+ {
+ field: 'receiptDate',
+ title: '鍏ュ簱鏃ユ湡',
+ minWidth: 160,
+ formatter: 'formatDateTime',
+ },
+ {
+ field: 'purchaseOrderCode',
+ title: '閲囪喘璁㈠崟缂栧彿',
+ minWidth: 160,
+ },
+ {
+ field: 'vendorCode',
+ title: '渚涘簲鍟嗙紪鐮�',
+ minWidth: 140,
+ },
+ {
+ 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: 'formatDateTime',
+ },
+ {
+ 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