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 @@ + + +