From fa3ac93010bea3805438ee3ab0a182bfbf7423da Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期一, 27 五月 2024 16:19:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/src/views/dry/dataDefine/DryEquipment.data.ts b/src/views/dry/dataDefine/DryEquipment.data.ts
new file mode 100644
index 0000000..215fbd8
--- /dev/null
+++ b/src/views/dry/dataDefine/DryEquipment.data.ts
@@ -0,0 +1,179 @@
+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: '璁惧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 },
+	},
+]
+//琛ㄥ崟鏁版嵁
+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: '璁惧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: ({ 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,
+	},
+]
+
+/**
+ * 娴佺▼琛ㄥ崟璋冪敤杩欎釜鏂规硶鑾峰彇formSchema
+ * @param param
+ */
+export function getBpmFormSchema(_formData): 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