From f7c526601557a1e19a9f4109628518426f7d0176 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 10 Feb 2024 21:48: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=2090%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/finance/account/index.ts | 5 +++ src/views/erp/sale/order/SaleOrderForm.vue | 31 ++++++++++++++++++- .../order/components/SaleOrderItemForm.vue | 1 + src/views/erp/sale/order/index.vue | 2 ++ .../check/components/StockCheckItemForm.vue | 2 ++ src/views/erp/stock/check/index.vue | 2 ++ src/views/erp/stock/in/StockInForm.vue | 1 + .../stock/in/components/StockInItemForm.vue | 2 ++ src/views/erp/stock/in/index.vue | 3 ++ .../move/components/StockMoveItemForm.vue | 9 +++++- src/views/erp/stock/move/index.vue | 4 ++- src/views/erp/stock/out/StockOutForm.vue | 1 + .../stock/out/components/StockOutItemForm.vue | 2 ++ src/views/erp/stock/out/index.vue | 3 ++ src/views/erp/stock/record/index.vue | 1 + src/views/erp/stock/stock/index.vue | 1 + 16 files changed, 67 insertions(+), 3 deletions(-) diff --git a/src/api/erp/finance/account/index.ts b/src/api/erp/finance/account/index.ts index 85b90080..a62b1807 100644 --- a/src/api/erp/finance/account/index.ts +++ b/src/api/erp/finance/account/index.ts @@ -18,6 +18,11 @@ export const AccountApi = { return await request.get({ url: `/erp/account/page`, params }) }, + // 查询结算账户精简列表 + getAccountSimpleList: async () => { + return await request.get({ url: `/erp/account/simple-list` }) + }, + // 查询结算账户详情 getAccount: async (id: number) => { return await request.get({ url: `/erp/account/get?id=` + id }) diff --git a/src/views/erp/sale/order/SaleOrderForm.vue b/src/views/erp/sale/order/SaleOrderForm.vue index 16e7ffbd..fab99f59 100644 --- a/src/views/erp/sale/order/SaleOrderForm.vue +++ b/src/views/erp/sale/order/SaleOrderForm.vue @@ -29,6 +29,7 @@ + + + + + + + formType.value === 'detail') const formRef = ref() // 表单 Ref const customerList = ref([]) // 客户列表 +const accountList = ref([]) // 账户列表 /** 子表的表单 */ const subTabsName = ref('item') @@ -189,6 +211,12 @@ const open = async (type: string, id?: number) => { } // 加载客户列表 customerList.value = await CustomerApi.getCustomerSimpleList() + // 加载账户列表 + accountList.value = await AccountApi.getAccountSimpleList() + const defaultAccount = accountList.value.find((item) => item.defaultStatus) + if (defaultAccount) { + formData.value.accountId = defaultAccount.id + } } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -222,6 +250,7 @@ const resetForm = () => { formData.value = { id: undefined, customerId: undefined, + accountId: undefined, orderTime: undefined, remark: undefined, fileUrl: undefined, diff --git a/src/views/erp/sale/order/components/SaleOrderItemForm.vue b/src/views/erp/sale/order/components/SaleOrderItemForm.vue index 4b034ac6..0422dc75 100644 --- a/src/views/erp/sale/order/components/SaleOrderItemForm.vue +++ b/src/views/erp/sale/order/components/SaleOrderItemForm.vue @@ -15,6 +15,7 @@ - +