diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/data.ts new file mode 100644 index 00000000..0cddc600 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/data.ts @@ -0,0 +1,138 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { LmsDailyPlanApi } from '#/api/lms/dailyplan'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; + +import { getRangePickerDefaultProps } from '#/utils'; + +const DAILY_PLAN_DICT_TYPE = DICT_TYPE as typeof DICT_TYPE & { + LMS_DAILY_PLAN_ORDER_STATUS: string; + LMS_DAILY_PLAN_SOURCE_TYPE: string; + LMS_DAILY_PLAN_WORK_STATUS: string; +}; + +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'planOrOrderCode', + label: '计划/订单号', + component: 'Input', + componentProps: { allowClear: true, placeholder: '请输入计划或订单号' }, + }, + { + fieldName: 'planDateRange', + label: '计划日期', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + valueFormat: 'YYYY-MM-DD', + }, + }, + { + fieldName: 'materialKeyword', + label: '管芯', + component: 'Input', + componentProps: { allowClear: true, placeholder: '请输入管芯编码或名称' }, + }, + { + fieldName: 'sourceType', + label: '来源', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_SOURCE_TYPE), + placeholder: '请选择来源', + }, + }, + { + fieldName: 'orderStatus', + label: '订单状态', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_ORDER_STATUS), + placeholder: '请选择订单状态', + }, + }, + ]; +} + +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { field: 'planCode', title: '日计划编号', minWidth: 150 }, + { field: 'orderCode', title: '订单号', minWidth: 150, slots: { default: 'orderCode' } }, + { field: 'planDate', title: '计划日期', minWidth: 115 }, + { field: 'materialCode', title: '管芯编码', minWidth: 140 }, + { field: 'materialName', title: '管芯名称', minWidth: 150 }, + { field: 'materialSpec', title: '规格', minWidth: 120 }, + { field: 'totalQty', title: '需求总量', minWidth: 100 }, + { field: 'stockingProgress', title: '备货进度', minWidth: 115, slots: { default: 'stockingProgress' } }, + { field: 'sleevingProgress', title: '套管进度', minWidth: 115, slots: { default: 'sleevingProgress' } }, + { + field: 'orderStatus', title: '订单状态', minWidth: 105, + cellRender: { name: 'CellDict', props: { type: DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_ORDER_STATUS } }, + }, + { + field: 'stockingStatus', title: '备货状态', minWidth: 105, + cellRender: { name: 'CellDict', props: { type: DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_WORK_STATUS } }, + }, + { + field: 'sleevingStatus', title: '套管状态', minWidth: 105, + cellRender: { name: 'CellDict', props: { type: DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_WORK_STATUS } }, + }, + { + field: 'sourceType', title: '来源', minWidth: 90, + cellRender: { name: 'CellDict', props: { type: DAILY_PLAN_DICT_TYPE.LMS_DAILY_PLAN_SOURCE_TYPE } }, + }, + { field: 'updaterName', title: '修改人', minWidth: 110 }, + { field: 'updateTime', title: '修改时间', minWidth: 170, formatter: 'formatDateTime' }, + { title: '操作', width: 210, fixed: 'right', slots: { default: 'actions' } }, + ]; +} + +export function usePlanFormSchema(): VbenFormSchema[] { + return [ + { fieldName: 'dailyPlanId', component: 'Input', dependencies: { triggerFields: [''], show: () => false } }, + { fieldName: 'version', component: 'Input', dependencies: { triggerFields: [''], show: () => false } }, + { + fieldName: 'planDate', label: '计划日期', component: 'DatePicker', rules: 'required', + componentProps: { class: 'w-full', valueFormat: 'YYYY-MM-DD', placeholder: '请选择计划日期' }, + }, + { + fieldName: 'manualOrderCode', label: '人工订单号', component: 'Input', + componentProps: { maxlength: 64, placeholder: '不填写时自动使用日计划编号' }, + }, + { fieldName: 'materialId', component: 'Input', rules: 'required', dependencies: { triggerFields: [''], show: () => false } }, + { + fieldName: 'materialCode', label: '管芯物料', component: 'Input', rules: 'required', + componentProps: { readonly: true, placeholder: '点击选择管芯物料' }, + }, + { + fieldName: 'materialName', label: '管芯名称', component: 'Input', + componentProps: { disabled: true }, + }, + { + fieldName: 'materialSpec', label: '管芯规格', component: 'Input', + componentProps: { disabled: true }, + }, + { + fieldName: 'planQty', label: '计划数量', component: 'InputNumber', rules: 'required', + componentProps: { min: 1, precision: 0, placeholder: '请输入计划数量' }, + }, + { + fieldName: 'sortSeq', label: '顺序', component: 'InputNumber', rules: 'required', + componentProps: { min: 1, precision: 0, placeholder: '请输入顺序' }, + }, + { + fieldName: 'weight', label: '权重', component: 'InputNumber', rules: 'required', + componentProps: { min: 1, precision: 0, placeholder: '请输入权重' }, + }, + { + fieldName: 'packingInfo', label: '装箱信息', component: 'Textarea', formItemClass: 'col-span-2', + componentProps: { maxlength: 4000, placeholder: '请输入装箱信息', rows: 5, showCount: true }, + }, + ]; +} diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/index.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/index.vue new file mode 100644 index 00000000..5b42dbc4 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/index.vue @@ -0,0 +1,137 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/detail.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/detail.vue new file mode 100644 index 00000000..63090be5 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/detail.vue @@ -0,0 +1,98 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/form.vue new file mode 100644 index 00000000..6a99ffa4 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/form.vue @@ -0,0 +1,109 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/start-order.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/start-order.vue new file mode 100644 index 00000000..55004064 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/daily-plan/management/modules/start-order.vue @@ -0,0 +1,63 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts index 67304596..bc2ad45e 100644 --- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts @@ -311,6 +311,10 @@ const RawFoil_DICT = { EMPTYROLLER_CASHEPOSITION_TYPE: 'emptyroller_casheposition_type', // 空辊缓存位点位类型 LMS_STOCKING_IVT_POINT_TYPE: 'lms_stocking_ivt_point_type', // LMS 备货区域点位类型 LMS_STOCKING_IVT_STATUS: 'lms_stocking_ivt_status', // LMS 备货区域点位状态 + LMS_DAILY_PLAN_SOURCE_TYPE: 'lms_daily_plan_source_type', // LMS 日计划来源 + LMS_DAILY_PLAN_ORDER_STATUS: 'lms_daily_plan_order_status', // LMS 日计划订单状态 + LMS_DAILY_PLAN_WORK_STATUS: 'lms_daily_plan_work_status', // LMS 日计划作业状态 + LMS_DAILY_PLAN_STRATEGY_MODE: 'lms_daily_plan_strategy_mode', // LMS 日计划策略模式 } as const; /** 字典类型枚举 - 统一导出 */