From ec1aca6a35f0d08ff312b7a54cffba23ae3da2a8 Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Sat, 8 Aug 2026 15:22:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=A4=87=E8=B4=A7?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=88=E4=BB=BB=E5=8A=A15=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/lms/stockingivt/data.ts | 198 ++++++++++++++++++ .../src/views/lms/stockingivt/index.vue | 103 +++++++++ .../views/lms/stockingivt/modules/form.vue | 67 ++++++ 3 files changed, 368 insertions(+) create mode 100644 nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/data.ts create mode 100644 nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/index.vue create mode 100644 nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/modules/form.vue diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/data.ts new file mode 100644 index 00000000..17fa6689 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/data.ts @@ -0,0 +1,198 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { LmsStockingIvtApi } from '#/api/lms/stockingivt'; + +import { getDictOptions } from '@vben/hooks'; +import { DICT_TYPE } from '@vben/constants'; + +/** 修改表单。 */ +export function useFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'ivtId', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + fieldName: 'pointCode', + label: '点位编码', + component: 'Input', + componentProps: { disabled: true }, + }, + { + fieldName: 'pointName', + label: '点位名称', + component: 'Input', + componentProps: { disabled: true }, + }, + { + fieldName: 'vehicleCode', + label: '托盘号', + component: 'Input', + componentProps: { placeholder: '请输入托盘号' }, + }, + { + fieldName: 'pointType', + label: '点位类型', + rules: 'required', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.LMS_STOCKING_IVT_POINT_TYPE), + placeholder: '请选择点位类型', + }, + }, + { + fieldName: 'ivtStatus', + label: '点位状态', + rules: 'required', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.LMS_STOCKING_IVT_STATUS), + placeholder: '请选择点位状态', + }, + }, + { + fieldName: 'pointLocation', + label: '位置', + component: 'Input', + componentProps: { placeholder: '请输入位置' }, + }, + { + fieldName: 'sortSeq', + label: '顺序号', + rules: 'required', + component: 'InputNumber', + componentProps: { min: 0, placeholder: '请输入顺序号' }, + }, + { + fieldName: 'isUsed', + label: '是否启用', + rules: 'required', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.COMMON_STATUS), + placeholder: '请选择是否启用', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Textarea', + componentProps: { maxlength: 1000, placeholder: '请输入备注', showCount: true }, + }, + ]; +} + +/** 列表查询表单。 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'pointCode', + label: '点位编码', + component: 'Input', + componentProps: { allowClear: true, placeholder: '请输入点位编码' }, + }, + { + fieldName: 'pointName', + label: '点位名称', + component: 'Input', + componentProps: { allowClear: true, placeholder: '请输入点位名称' }, + }, + { + fieldName: 'vehicleCode', + label: '托盘号', + component: 'Input', + componentProps: { allowClear: true, placeholder: '请输入托盘号' }, + }, + { + fieldName: 'pointType', + label: '点位类型', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DICT_TYPE.LMS_STOCKING_IVT_POINT_TYPE), + placeholder: '请选择点位类型', + }, + }, + { + fieldName: 'ivtStatus', + label: '点位状态', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DICT_TYPE.LMS_STOCKING_IVT_STATUS), + placeholder: '请选择点位状态', + }, + }, + { + fieldName: 'isUsed', + label: '是否启用', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DICT_TYPE.COMMON_STATUS), + placeholder: '请选择是否启用', + }, + }, + ]; +} + +/** 列表字段。 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { field: 'pointCode', title: '点位编码', minWidth: 120 }, + { field: 'pointName', title: '点位名称', minWidth: 120 }, + { + field: 'vehicleCode', + title: '托盘号', + minWidth: 120, + slots: { default: 'vehicleCode' }, + }, + { + field: 'pointType', + title: '点位类型', + minWidth: 110, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.LMS_STOCKING_IVT_POINT_TYPE }, + }, + }, + { + field: 'ivtStatus', + title: '点位状态', + minWidth: 110, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.LMS_STOCKING_IVT_STATUS }, + }, + }, + { field: 'pointLocation', title: '位置', minWidth: 100 }, + { field: 'sortSeq', title: '顺序号', minWidth: 90 }, + { + field: 'isUsed', + title: '是否启用', + minWidth: 100, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.COMMON_STATUS }, + }, + }, + { field: 'remark', title: '备注', minWidth: 160 }, + { field: 'updater', title: '修改人', minWidth: 120 }, + { + field: 'updateTime', + title: '修改时间', + minWidth: 170, + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 100, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/index.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/index.vue new file mode 100644 index 00000000..2c5a718a --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/index.vue @@ -0,0 +1,103 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/modules/form.vue new file mode 100644 index 00000000..a677bf88 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/stockingivt/modules/form.vue @@ -0,0 +1,67 @@ + + +