From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/views/mes/pro/bagCode/data.ts | 130 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 130 insertions(+), 0 deletions(-)
diff --git a/src/views/mes/pro/bagCode/data.ts b/src/views/mes/pro/bagCode/data.ts
new file mode 100644
index 0000000..09b3d69
--- /dev/null
+++ b/src/views/mes/pro/bagCode/data.ts
@@ -0,0 +1,130 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesProBagCodeApi } from '#/api/mes/pro/bagCode';
+
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+
+import { getRangePickerDefaultProps } from '#/utils';
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'code',
+ label: '琚嬬爜',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ヨ鐮侊紙浜岀淮鐮佸唴瀹癸級',
+ },
+ },
+ {
+ fieldName: 'batchCode',
+ label: '鎵规鍙�',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ユ壒娆″彿',
+ },
+ },
+ {
+ fieldName: 'uuid',
+ label: '鐢熸垚缁�',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ョ敓鎴愮粍缂栧彿',
+ },
+ },
+ {
+ fieldName: 'status',
+ label: '琚嬬爜鐘舵��',
+ component: 'Select',
+ componentProps: {
+ allowClear: true,
+ options: getDictOptions(DICT_TYPE.MES_PRO_BAG_CODE_STATUS, 'number'),
+ placeholder: '璇烽�夋嫨琚嬬爜鐘舵��',
+ },
+ },
+ {
+ fieldName: 'createTime',
+ label: '鍒涘缓鏃堕棿',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
+ allowClear: true,
+ },
+ },
+ ];
+}
+
+/** 鍒楄〃鐨勫瓧娈� */
+export function useGridColumns(): VxeTableGridOptions<MesProBagCodeApi.BagCode>['columns'] {
+ return [
+ { type: 'checkbox', width: 50 },
+ {
+ field: 'code',
+ title: '琚嬬爜锛堜簩缁寸爜鍐呭锛�',
+ fixed: 'left',
+ minWidth: 220,
+ },
+ {
+ field: 'bagNo',
+ title: '琚嬪簭鍙�',
+ width: 80,
+ },
+ {
+ field: 'uuid',
+ title: '鐢熸垚缁�',
+ minWidth: 150,
+ },
+ {
+ field: 'batchCode',
+ title: '鎵规鍙�',
+ minWidth: 190,
+ },
+ {
+ field: 'lineCode',
+ title: '浜х嚎缂栫爜',
+ width: 100,
+ },
+ {
+ field: 'lineName',
+ title: '浜х嚎鍚嶇О',
+ width: 120,
+ },
+ {
+ field: 'palletCode',
+ title: '缁戝畾鎵樼洏鐮�',
+ minWidth: 190,
+ },
+ {
+ field: 'status',
+ title: '琚嬬爜鐘舵��',
+ width: 110,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.MES_PRO_BAG_CODE_STATUS },
+ },
+ },
+ {
+ field: 'printTime',
+ title: '瀵煎嚭鍗板埛鏃堕棿',
+ width: 170,
+ formatter: 'formatDateTime',
+ },
+ {
+ field: 'createTime',
+ title: '鍒涘缓鏃堕棿',
+ width: 170,
+ formatter: 'formatDateTime',
+ },
+ {
+ title: '鎿嶄綔',
+ width: 200,
+ fixed: 'right',
+ slots: { default: 'actions' },
+ },
+ ];
+}
--
Gitblit v1.9.3