From b55c8417fb1a3a38064ff013e8799b448d1dfca6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 9 Feb 2024 20:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=A2=9E=E5=8A=A0=20ER?= =?UTF-8?q?P=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=2030%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/sale/order/index.ts | 62 +++ src/views/erp/sale/order/SaleOrderForm.vue | 169 +++++++++ .../order/components/SaleOrderItemForm.vue | 274 ++++++++++++++ src/views/erp/sale/order/index.vue | 352 ++++++++++++++++++ 4 files changed, 857 insertions(+) create mode 100644 src/api/erp/sale/order/index.ts create mode 100644 src/views/erp/sale/order/SaleOrderForm.vue create mode 100644 src/views/erp/sale/order/components/SaleOrderItemForm.vue create mode 100644 src/views/erp/sale/order/index.vue diff --git a/src/api/erp/sale/order/index.ts b/src/api/erp/sale/order/index.ts new file mode 100644 index 00000000..b0847aec --- /dev/null +++ b/src/api/erp/sale/order/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +// ERP 销售订单 VO +export interface SaleOrderVO { + id: number // 迪卡侬工单编号 + no: string // 销售订单号 + customerId: number // 客户编号 + orderTime: Date // 迪卡侬工单时间 + totalCount: number // 合计数量 + totalPrice: number // 合计金额,单位:元 + status: number // 状态 + remark: string // 备注 +} + +// ERP 销售订单 API +export const SaleOrderApi = { + // 查询销售订单分页 + getSaleOrderPage: async (params: any) => { + return await request.get({ url: `/erp/sale-order/page`, params }) + }, + + // 查询销售订单详情 + getSaleOrder: async (id: number) => { + return await request.get({ url: `/erp/sale-order/get?id=` + id }) + }, + + // 新增销售订单 + createSaleOrder: async (data: SaleOrderVO) => { + return await request.post({ url: `/erp/sale-order/create`, data }) + }, + + // 修改销售订单 + updateSaleOrder: async (data: SaleOrderVO) => { + return await request.put({ url: `/erp/sale-order/update`, data }) + }, + + // 更新销售订单的状态 + updateSaleOrderStatus: async (id: number, status: number) => { + return await request.put({ + url: `/erp/sale-order/update-status`, + params: { + id, + status + } + }) + }, + + // 删除销售订单 + deleteSaleOrder: async (ids: number[]) => { + return await request.delete({ + url: `/erp/sale-order/delete`, + params: { + ids: ids.join(',') + } + }) + }, + + // 导出销售订单 Excel + exportSaleOrder: async (params: any) => { + return await request.download({ url: `/erp/sale-order/export-excel`, params }) + } +} diff --git a/src/views/erp/sale/order/SaleOrderForm.vue b/src/views/erp/sale/order/SaleOrderForm.vue new file mode 100644 index 00000000..a19b43d9 --- /dev/null +++ b/src/views/erp/sale/order/SaleOrderForm.vue @@ -0,0 +1,169 @@ + + diff --git a/src/views/erp/sale/order/components/SaleOrderItemForm.vue b/src/views/erp/sale/order/components/SaleOrderItemForm.vue new file mode 100644 index 00000000..8ac8b1ee --- /dev/null +++ b/src/views/erp/sale/order/components/SaleOrderItemForm.vue @@ -0,0 +1,274 @@ + + diff --git a/src/views/erp/sale/order/index.vue b/src/views/erp/sale/order/index.vue new file mode 100644 index 00000000..32f5e1d2 --- /dev/null +++ b/src/views/erp/sale/order/index.vue @@ -0,0 +1,352 @@ + + +