From f575f6a5039fca0018cf85b62f59cd81f17d7015 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 7 Feb 2024 15:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=85=B6=E5=AE=83=E5=87=BA=E5=BA=93=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 616fd3f7ba29b5e39eca4adcf8ad4446ff4606d5) --- src/api/erp/stock/out/index.ts | 62 +++ src/views/erp/stock/in/StockInForm.vue | 10 +- .../stock/in/components/StockInItemForm.vue | 1 - src/views/erp/stock/in/index.vue | 5 +- src/views/erp/stock/out/StockOutForm.vue | 169 ++++++++ .../stock/out/components/StockOutItemForm.vue | 274 +++++++++++++ src/views/erp/stock/out/index.vue | 368 ++++++++++++++++++ 7 files changed, 880 insertions(+), 9 deletions(-) create mode 100644 src/api/erp/stock/out/index.ts create mode 100644 src/views/erp/stock/out/StockOutForm.vue create mode 100644 src/views/erp/stock/out/components/StockOutItemForm.vue create mode 100644 src/views/erp/stock/out/index.vue diff --git a/src/api/erp/stock/out/index.ts b/src/api/erp/stock/out/index.ts new file mode 100644 index 00000000..f0f40d34 --- /dev/null +++ b/src/api/erp/stock/out/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +// ERP 其它出库单 VO +export interface StockOutVO { + id: number // 出库编号 + no: string // 出库单号 + customerId: number // 客户编号 + outTime: Date // 出库时间 + totalCount: number // 合计数量 + totalPrice: number // 合计金额,单位:元 + status: number // 状态 + remark: string // 备注 +} + +// ERP 其它出库单 API +export const StockOutApi = { + // 查询其它出库单分页 + getStockOutPage: async (params: any) => { + return await request.get({ url: `/erp/stock-out/page`, params }) + }, + + // 查询其它出库单详情 + getStockOut: async (id: number) => { + return await request.get({ url: `/erp/stock-out/get?id=` + id }) + }, + + // 新增其它出库单 + createStockOut: async (data: StockOutVO) => { + return await request.post({ url: `/erp/stock-out/create`, data }) + }, + + // 修改其它出库单 + updateStockOut: async (data: StockOutVO) => { + return await request.put({ url: `/erp/stock-out/update`, data }) + }, + + // 更新其它出库单的状态 + updateStockOutStatus: async (id: number, status: number) => { + return await request.put({ + url: `/erp/stock-out/update-status`, + params: { + id, + status + } + }) + }, + + // 删除其它出库单 + deleteStockOut: async (ids: number[]) => { + return await request.delete({ + url: `/erp/stock-out/delete`, + params: { + ids: ids.join(',') + } + }) + }, + + // 导出其它出库单 Excel + exportStockOut: async (params) => { + return await request.download({ url: `/erp/stock-out/export-excel`, params }) + } +} diff --git a/src/views/erp/stock/in/StockInForm.vue b/src/views/erp/stock/in/StockInForm.vue index fd339520..3522ec2d 100644 --- a/src/views/erp/stock/in/StockInForm.vue +++ b/src/views/erp/stock/in/StockInForm.vue @@ -62,8 +62,8 @@ - - + + @@ -106,8 +106,8 @@ const formRef = ref() // 表单 Ref const supplierList = ref([]) // 供应商列表 /** 子表的表单 */ -const subTabsName = ref('stockInItem') -const stockInItemFormRef = ref() +const subTabsName = ref('item') +const itemFormRef = ref() /** 打开弹窗 */ const open = async (type: string, id?: number) => { @@ -134,7 +134,7 @@ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成 const submitForm = async () => { // 校验表单 await formRef.value.validate() - await stockInItemFormRef.value.validate() + await itemFormRef.value.validate() // 提交请求 formLoading.value = true try { diff --git a/src/views/erp/stock/in/components/StockInItemForm.vue b/src/views/erp/stock/in/components/StockInItemForm.vue index 5a397aa0..8bf980b7 100644 --- a/src/views/erp/stock/in/components/StockInItemForm.vue +++ b/src/views/erp/stock/in/components/StockInItemForm.vue @@ -142,7 +142,6 @@ import { erpPriceMultiply, getSumValue } from '@/utils' -import { fenToYuanFormat } from '@/utils/formatter' const props = defineProps<{ items: undefined diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue index c030375d..dd08c649 100644 --- a/src/views/erp/stock/in/index.vue +++ b/src/views/erp/stock/in/index.vue @@ -239,7 +239,7 @@ diff --git a/src/views/erp/stock/out/components/StockOutItemForm.vue b/src/views/erp/stock/out/components/StockOutItemForm.vue new file mode 100644 index 00000000..8ac8b1ee --- /dev/null +++ b/src/views/erp/stock/out/components/StockOutItemForm.vue @@ -0,0 +1,274 @@ + + diff --git a/src/views/erp/stock/out/index.vue b/src/views/erp/stock/out/index.vue new file mode 100644 index 00000000..39fd61b3 --- /dev/null +++ b/src/views/erp/stock/out/index.vue @@ -0,0 +1,368 @@ + + +