From 19da7e3b64962075e2de6aa8a4db7f707b5076c9 Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Mon, 3 Mar 2025 17:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=BF=E6=AC=A1=E6=97=B6=E9=97=B4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/deliTime/index.ts | 53 ++++ .../supplierManage/deliTime/deliTime.data.ts | 148 +++++++++++ .../supplierManage/deliTime/index.vue | 251 ++++++++++++++++++ 3 files changed, 452 insertions(+) create mode 100644 src/api/wms/deliTime/index.ts create mode 100644 src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts create mode 100644 src/views/wms/basicDataManage/supplierManage/deliTime/index.vue diff --git a/src/api/wms/deliTime/index.ts b/src/api/wms/deliTime/index.ts new file mode 100644 index 000000000..1fabe5abe --- /dev/null +++ b/src/api/wms/deliTime/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface DeliTimeVO { + id: number + code: string + shift: string + begeinTime: Date + remark: string + available: string + siteId: string + concurrencyStamp: number +} + +// 查询便次时间配置列表 +export const getDeliTimePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/deli-time/senior', data }) + } else { + return await request.get({ url: `/wms/deli-time/page`, params }) + } +} + +// 查询便次时间配置详情 +export const getDeliTime = async (id: number) => { + return await request.get({ url: `/wms/deli-time/get?id=` + id }) +} + +// 新增便次时间配置 +export const createDeliTime = async (data: DeliTimeVO) => { + return await request.post({ url: `/wms/deli-time/create`, data }) +} + +// 修改便次时间配置 +export const updateDeliTime = async (data: DeliTimeVO) => { + return await request.put({ url: `/wms/deli-time/update`, data }) +} + +// 删除便次时间配置 +export const deleteDeliTime = async (id: number) => { + return await request.delete({ url: `/wms/deli-time/delete?id=` + id }) +} + +// 导出便次时间配置 Excel +export const exportDeliTime = async (params) => { + return await request.download({ url: `/wms/deli-time/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/deli-time/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts b/src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts new file mode 100644 index 000000000..1ca39a2d8 --- /dev/null +++ b/src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts @@ -0,0 +1,148 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const DeliTimeRules = reactive({ + code: [required], + shift: [required], + begeinTime: [required], + concurrencyStamp: [required], +}) + +export const DeliTime = useCrudSchemas(reactive([ + { + label: '编号', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '班次', + field: 'shift', + dictType: DICT_TYPE.SHIFT, + dictClass: 'string', + isTable: true, + isDetail: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: true, + tableForm: { + type: 'Select' + } + }, + { + label: '开始时间', + field: 'begeinTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable:true, + isForm: false, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, + + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable:true, + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/basicDataManage/supplierManage/deliTime/index.vue b/src/views/wms/basicDataManage/supplierManage/deliTime/index.vue new file mode 100644 index 000000000..42ee0083a --- /dev/null +++ b/src/views/wms/basicDataManage/supplierManage/deliTime/index.vue @@ -0,0 +1,251 @@ + + +