From 220db80e605945ced1b33443020933206b0915db Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期四, 24 七月 2025 14:56:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'bak/master' into master-lpyun

---
 src/views/dry/dataDefine/DryEquipment.data.ts |  378 +++++++++++++++++++++++++++++++++++------------------
 1 files changed, 251 insertions(+), 127 deletions(-)

diff --git a/src/views/dry/dataDefine/DryEquipment.data.ts b/src/views/dry/dataDefine/DryEquipment.data.ts
index 6ada1e5..1e6d6bd 100644
--- a/src/views/dry/dataDefine/DryEquipment.data.ts
+++ b/src/views/dry/dataDefine/DryEquipment.data.ts
@@ -1,140 +1,246 @@
+import { dryOrder } from './DryOrder.data'
 import { BasicColumn, FormSchema } from '/@/components/Table'
 import { getTenantId } from '/@/utils/auth'
 import { render } from '/@/utils/common/renderUtils'
 import { rules } from '/@/utils/helper/validator'
 //鍒楄〃鏁版嵁
 export const columns: BasicColumn[] = [
-  {
-    title: '璁惧缂栧彿',
-    align: 'center',
-    dataIndex: 'code',
-  },
-  {
-    title: '璁惧鍚嶇О',
-    align: 'center',
-    dataIndex: 'name',
-  },
-  {
-    title: '璁惧绫诲瀷',
-    align: 'center',
-    dataIndex: 'type_dictText',
-  },
-  {
-    title: '璁惧鎻忚堪',
-    align: 'center',
-    dataIndex: 'remark',
-  },
-  {
-    title: '杞﹂棿id',
-    align: 'center',
-    dataIndex: 'shopId_dictText',
-  },
-  {
-    title: '鍚敤鐘舵��',
-    align: 'center',
-    dataIndex: 'enable',
-    customRender: ({ text }) => {
-      return render.renderSwitch(text, [
-        { text: '鏄�', value: 'Y' },
-        { text: '鍚�', value: 'N' },
-      ])
-    },
-  },
+	{
+		title: '璁惧缂栧彿',
+		align: 'center',
+		dataIndex: 'code',
+	},
+	{
+		title: '璁惧鍚嶇О',
+		align: 'center',
+		dataIndex: 'name',
+	},
+	{
+		title: '璁惧绫诲瀷',
+		align: 'center',
+		dataIndex: 'type_dictText',
+	},
+	{
+		title: '鍒堕�犲晢',
+		align: 'center',
+		dataIndex: 'manufacturer',
+	},
+	{
+		title: '璐叆鏃ユ湡',
+		align: 'center',
+		dataIndex: 'purchaseDate',
+	},
+	{
+		title: '鍚敤鏃ユ湡',
+		align: 'center',
+		dataIndex: 'startDate',
+	},
+	{
+		title: '瀹夎浣嶇疆',
+		align: 'center',
+		dataIndex: 'location',
+	},
+	{
+		title: '璁惧鐘舵��',
+		align: 'center',
+		dataIndex: 'status',
+		customRender: ({text}) => {
+			// 0-'鏂板',1-'鍦ㄧ敤', 2-'鍋滅敤', 3-'缁翠慨', 4-'鎶ュ簾'
+      const options = {
+        '0': '鏂板',
+        '1': '鍦ㄧ敤',
+        '2': '鍋滅敤',
+        '3': '缁翠慨',
+        '4': '鎶ュ簾'
+      };
+      return options[text] || text;
+    }
+	},
+	{
+		title: '鎶ュ簾鏃ユ湡',
+		align: 'center',
+		dataIndex: 'scrapDate',
+	},
+	{
+		title: '璁惧鎻忚堪',
+		align: 'center',
+		dataIndex: 'remark',
+	},
+	{
+		title: '璁惧IP',
+		align: 'center',
+		dataIndex: 'ip',
+	},
+	{
+		title: '杞﹂棿',
+		align: 'center',
+		dataIndex: 'shopId_dictText',
+	},
+	{
+		title: '鍚敤鐘舵��',
+		align: 'center',
+		dataIndex: 'enable',
+		customRender: ({ text }) => {
+			return render.renderSwitch(text, [
+				{ text: '鏄�', value: 'Y' },
+				{ text: '鍚�', value: 'N' },
+			])
+		},
+	},
 ]
 //鏌ヨ鏁版嵁
 export const searchFormSchema: FormSchema[] = [
-  {
-    label: '璁惧缂栧彿',
-    field: 'code',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    label: '璁惧鍚嶇О',
-    field: 'name',
-    component: 'Input',
-    colProps: { span: 6 },
-  },
-  {
-    label: '璁惧绫诲瀷',
-    field: 'type',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
-    },
-    colProps: { span: 6 },
-  },
-  {
-    label: '杞﹂棿id',
-    field: 'shopId',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
-    },
-    colProps: { span: 6 },
-  },
+	{
+		label: '璁惧缂栧彿',
+		field: 'code',
+		component: 'Input',
+		colProps: { span: 6 },
+	},
+	{
+		label: '璁惧鍚嶇О',
+		field: 'name',
+		component: 'Input',
+		colProps: { span: 6 },
+	},
+	{
+		label: '璁惧绫诲瀷',
+		field: 'type',
+		component: 'JDictSelectTag',
+		componentProps: {
+			dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
+		},
+		colProps: { span: 6 },
+	},
+	{
+		label: '杞﹂棿id',
+		field: 'shopId',
+		component: 'JDictSelectTag',
+		componentProps: {
+			dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
+		},
+		colProps: { span: 6 },
+	},
 ]
 //琛ㄥ崟鏁版嵁
 export const formSchema: FormSchema[] = [
-  {
-    label: '璁惧缂栧彿',
-    field: 'code',
-    component: 'Input',
-    dynamicRules: ({ model, schema }) => {
-      return [{ required: true, message: '璇疯緭鍏ヨ澶囩紪鍙�!' }, { ...rules.duplicateCheckRule('dry_equipment', 'code', model, schema)[0] }]
-    },
-  },
-  {
-    label: '璁惧鍚嶇О',
-    field: 'name',
-    component: 'Input',
-    dynamicRules: ({ model, schema }) => {
-      return [{ required: true, message: '璇疯緭鍏ヨ澶囧悕绉�!' }, { ...rules.duplicateCheckRule('dry_equipment', 'name', model, schema)[0] }]
-    },
-  },
-  {
-    label: '璁惧绫诲瀷',
-    field: 'type',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
-    },
-    dynamicRules: ({ model, schema }) => {
-      return [{ required: true, message: '璇疯緭鍏ヨ澶囩被鍨�!' }]
-    },
-  },
-  {
-    label: '璁惧鎻忚堪',
-    field: 'remark',
-    component: 'Input',
-  },
-  {
-    label: '杞﹂棿id',
-    field: 'shopId',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
-    },
-    dynamicRules: ({ model, schema }) => {
-      return [{ required: true, message: '璇疯緭鍏ヨ溅闂磇d!' }]
-    },
-  },
-  {
-    label: '鍚敤鐘舵��',
-    field: 'enable',
-    component: 'JSwitch',
-    componentProps: {},
-    dynamicRules: ({ model, schema }) => {
-      return [{ required: true, message: '璇疯緭鍏ュ惎鐢ㄧ姸鎬�!' }]
-    },
-  },
-  // TODO 涓婚敭闅愯棌瀛楁锛岀洰鍓嶅啓姝讳负ID
-  {
-    label: '',
-    field: 'id',
-    component: 'Input',
-    show: false,
-  },
+	{
+		label: '璁惧缂栧彿',
+		field: 'code',
+		component: 'Input',
+		dynamicRules: ({ model, schema }) => {
+			return [{ required: true, message: '璇疯緭鍏ヨ澶囩紪鍙�!' }, { ...rules.duplicateCheckRule('dry_equipment', 'code', model, schema)[0] }]
+		},
+	},
+	{
+		label: '璁惧鍚嶇О',
+		field: 'name',
+		component: 'Input',
+		dynamicRules: ({ model, schema }) => {
+			return [{ required: true, message: '璇疯緭鍏ヨ澶囧悕绉�!' }, { ...rules.duplicateCheckRule('dry_equipment', 'name', model, schema)[0] }]
+		},
+	},
+	{
+		label: '鍒堕�犲晢',
+		field: 'manufacturer',
+		component: 'Input',
+	},
+	{
+		label: '璐叆鏃ユ湡',
+		field: 'purchaseDate',
+		component: 'DatePicker',
+		componentProps: {
+			valueFormat: 'YYYY-MM-DD',
+			format: 'YYYY-MM-DD'
+		},
+	},
+	{
+		label: '鍚敤鏃ユ湡',
+		field: 'startDate',
+		component: 'DatePicker',
+		componentProps: {
+			valueFormat: 'YYYY-MM-DD',
+			format: 'YYYY-MM-DD'
+		},
+	},
+	{
+		label: '瀹夎浣嶇疆',
+		field: 'location',
+		component: 'Input',
+	},
+	{
+		label: '璁惧鐘舵��',
+		field: 'status',
+		component: 'Select',
+		componentProps: {
+			options: [ // '鍛ㄤ繚','鏈堜繚','瀛d繚','骞翠繚'
+              { label: '鏂板', value: '0' },
+              { label: '鍦ㄧ敤', value: '1' },
+              { label: '鍋滅敤', value: '2' },
+              { label: '缁翠慨', value: '3' },
+              { label: '鎶ュ簾', value: '4' }
+            ]
+		},
+	},
+	{
+		label: '鎶ュ簾鏃ユ湡',
+		field: 'scrapDate',
+		component: 'DatePicker',
+		componentProps: {
+			valueFormat: 'YYYY-MM-DD',
+			format: 'YYYY-MM-DD'
+		},
+	},
+	{
+		label: '璁惧IP',
+		field: 'ip',
+		component: 'Input',
+		dynamicRules: ({ model, schema }) => {
+			return [{ required: true, message: '璇风粦瀹氳澶嘔P!' }, { ...rules.duplicateCheckRule('dry_equipment', 'ip', model, schema)[0] }]
+		},
+	},
+	{
+		label: '璁惧绫诲瀷',
+		field: 'type',
+		component: 'JDictSelectTag',
+		componentProps: {
+			dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(),
+		},
+		dynamicRules: ({  }) => {
+			return [{ required: true, message: '璇疯緭鍏ヨ澶囩被鍨�!' }]
+		},
+	},
+	{
+		label: '璁惧鎻忚堪',
+		field: 'remark',
+		component: 'Input',
+	},
+	{
+		label: '杞﹂棿id',
+		field: 'shopId',
+		component: 'JDictSelectTag',
+		componentProps: {
+			dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(),
+		},
+		dynamicRules: ({ }) => {
+			return [{ required: true, message: '璇疯緭鍏ヨ溅闂磇d!' }]
+		},
+	},
+	{
+		label: '鍚敤鐘舵��',
+		field: 'enable',
+		component: 'JSwitch',
+		componentProps: {},
+		dynamicRules: ({  }) => {
+			return [{ required: true, message: '璇疯緭鍏ュ惎鐢ㄧ姸鎬�!' }]
+		},
+	},
+	// TODO 涓婚敭闅愯棌瀛楁锛岀洰鍓嶅啓姝讳负ID
+	{
+		label: '',
+		field: 'id',
+		component: 'Input',
+		show: false,
+	},
 ]
 
 /**
@@ -142,6 +248,24 @@
  * @param param
  */
 export function getBpmFormSchema(_formData): FormSchema[] {
-  // 榛樿鍜屽師濮嬭〃鍗曚繚鎸佷竴鑷� 濡傛灉娴佺▼涓厤缃簡鏉冮檺鏁版嵁锛岃繖閲岄渶瑕佸崟鐙鐞唂ormSchema
-  return formSchema
+	// 榛樿鍜屽師濮嬭〃鍗曚繚鎸佷竴鑷� 濡傛灉娴佺▼涓厤缃簡鏉冮檺鏁版嵁锛岃繖閲岄渶瑕佸崟鐙鐞唂ormSchema
+	return formSchema
+}
+
+export interface dryEquipment {
+	id: string
+	code: string
+	name: string
+	type: string
+	type_dictText: string
+	remark: string
+	shop_id: string
+	enable: string
+	create_by: string
+	create_time: Date
+	update_by: string
+	update_time: Date
+	tenant_id: number
+	ip: string
+	order: dryOrder
 }

--
Gitblit v1.9.3