From 0d2c7ffceeb2c700109685acb3aacaf3a7a081be Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 15 May 2024 09:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=8F=91=E8=B4=A7=E9=A2=84?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/customerDeliveryForecast/index.ts | 63 +++++ .../customerDeliveryForecast.data.ts | 135 ++++++++++ .../customerDeliveryForecast/index.vue | 244 ++++++++++++++++++ 3 files changed, 442 insertions(+) create mode 100644 src/api/wms/customerDeliveryForecast/index.ts create mode 100644 src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts create mode 100644 src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue diff --git a/src/api/wms/customerDeliveryForecast/index.ts b/src/api/wms/customerDeliveryForecast/index.ts new file mode 100644 index 000000000..65322ff1d --- /dev/null +++ b/src/api/wms/customerDeliveryForecast/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface CustomerDeliveryForecastVO { + schdSite: string + schdOrder: string + schdLine: string + schdCust: string + schdShipto: string + schdDock: string + schdPart: string + schdNetReq: string + schdDate: Date + schdTime: Date + schdReference: string + schdOrdMult: string + schdCustpart: string + schdPkgCode: string + schdModelyr: string + schdCustref: string + schdPcrQty: string + available: string +} + +// 查询客户发货预测列表 +export const getCustomerDeliveryForecastPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/customer-delivery-forecast/senior', data }) + } else { + return await request.get({ url: `/wms/customer-delivery-forecast/page`, params }) + } +} + +// 查询客户发货预测详情 +export const getCustomerDeliveryForecast = async (id: number) => { + return await request.get({ url: `/wms/customer-delivery-forecast/get?id=` + id }) +} + +// 新增客户发货预测 +export const createCustomerDeliveryForecast = async (data: CustomerDeliveryForecastVO) => { + return await request.post({ url: `/wms/customer-delivery-forecast/create`, data }) +} + +// 修改客户发货预测 +export const updateCustomerDeliveryForecast = async (data: CustomerDeliveryForecastVO) => { + return await request.put({ url: `/wms/customer-delivery-forecast/update`, data }) +} + +// 删除客户发货预测 +export const deleteCustomerDeliveryForecast = async (id: number) => { + return await request.delete({ url: `/wms/customer-delivery-forecast/delete?id=` + id }) +} + +// 导出客户发货预测 Excel +export const exportCustomerDeliveryForecast = async (params) => { + return await request.download({ url: `/wms/customer-delivery-forecast/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/customer-delivery-forecast/get-import-template' }) +} diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts new file mode 100644 index 000000000..ef5e1682f --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts @@ -0,0 +1,135 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const CustomerDeliveryForecastRules = reactive({ +}) + +export const CustomerDeliveryForecast = useCrudSchemas(reactive([ + { + label: '地点代码', + field: 'schdSite', + sort: 'custom', + isSearch: true + }, + { + label: '销售日程单号', + field: 'schdOrder', + sort: 'custom', + isSearch: true + }, + { + label: '日程单行号', + field: 'schdLine', + sort: 'custom', + isSearch: true + }, + { + label: '客户代码', + field: 'schdCust', + sort: 'custom', + isSearch: true + }, + { + label: '发货至', + field: 'schdShipto', + sort: 'custom', + }, + { + label: '码头', + field: 'schdDock', + sort: 'custom', + }, + { + label: '物料编码', + field: 'schdPart', + sort: 'custom', + }, + { + label: '净需求', + field: 'schdNetReq', + sort: 'custom', + }, + { + label: '需求日期', + field: 'schdDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '需求时间', + field: 'schdTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '需求参考', + field: 'schdReference', + sort: 'custom', + }, + { + label: '包装倍数', + field: 'schdOrdMult', + sort: 'custom', + }, + { + label: '客户零件号', + field: 'schdCustpart', + sort: 'custom', + }, + { + label: '包装代码', + field: 'schdPkgCode', + sort: 'custom', + }, + { + label: '模型年', + field: 'schdModelyr', + sort: 'custom', + }, + { + label: '客户参考', + field: 'schdCustref', + sort: 'custom', + }, + { + label: '先前累计需求数量', + field: 'schdPcrQty', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue new file mode 100644 index 000000000..a018a70e7 --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue @@ -0,0 +1,244 @@ + + +