From 983ac71559b0339e7a482c43188db1a8b49ddf62 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Jun 2026 06:32:17 -0700 Subject: [PATCH] =?UTF-8?q?fix(ts):=20=E8=A1=A5=E5=85=A8=20ERP=20=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=20VO=20=E5=B9=B6=E6=94=B6=E6=95=9B=20items=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PurchaseOrderVO/SaleOrderVO 补齐详情/表单实际字段,新增 PurchaseOrderItemVO/SaleOrderItemVO - 修正采购 VO 错字段:customerId→supplierId、outCount→inCount - 采购/销售订单及入库/出库/退货表单 items 从 never[] 收敛到对应 item VO - 订单选择弹窗选中行明确类型,提交用 !(对应按钮未选禁用约束) - 财务付款/收款补 item 金额类型;价格计算对空值做 ?? 0 Co-Authored-By: Codex ts:check 85 → 26,ERP 错误清零,无新增类型错误 --- src/api/erp/finance/payment/index.ts | 5 ++ src/api/erp/finance/receipt/index.ts | 5 ++ src/api/erp/purchase/order/index.ts | 47 ++++++++++++++---- src/api/erp/sale/order/index.ts | 48 +++++++++++++++---- src/views/erp/finance/account/AccountForm.vue | 3 +- .../finance/payment/FinancePaymentForm.vue | 10 ++-- .../finance/receipt/FinanceReceiptForm.vue | 10 ++-- src/views/erp/purchase/in/PurchaseInForm.vue | 16 ++++--- .../erp/purchase/order/PurchaseOrderForm.vue | 12 +++-- .../components/PurchaseOrderInEnableList.vue | 8 ++-- .../PurchaseOrderReturnEnableList.vue | 8 ++-- src/views/erp/purchase/order/index.vue | 4 +- .../purchase/return/PurchaseReturnForm.vue | 16 ++++--- src/views/erp/purchase/return/index.vue | 1 + src/views/erp/sale/order/SaleOrderForm.vue | 12 +++-- .../components/SaleOrderOutEnableList.vue | 8 ++-- .../components/SaleOrderReturnEnableList.vue | 8 ++-- src/views/erp/sale/order/index.vue | 4 +- src/views/erp/sale/out/SaleOutForm.vue | 16 ++++--- src/views/erp/sale/return/SaleReturnForm.vue | 16 ++++--- src/views/erp/sale/return/index.vue | 1 + src/views/erp/stock/check/StockCheckForm.vue | 8 ++-- src/views/erp/stock/in/StockInForm.vue | 8 ++-- src/views/erp/stock/in/index.vue | 1 + src/views/erp/stock/move/StockMoveForm.vue | 8 ++-- src/views/erp/stock/out/StockOutForm.vue | 8 ++-- 26 files changed, 196 insertions(+), 95 deletions(-) diff --git a/src/api/erp/finance/payment/index.ts b/src/api/erp/finance/payment/index.ts index c6749db08..9bfdffc4e 100644 --- a/src/api/erp/finance/payment/index.ts +++ b/src/api/erp/finance/payment/index.ts @@ -11,6 +11,11 @@ export interface FinancePaymentVO { remark: string // 备注 } +// ERP 付款单项 VO +export interface FinancePaymentItemVO { + paymentPrice: number // 本次付款金额,单位:元 +} + // ERP 付款单 API export const FinancePaymentApi = { // 查询付款单分页 diff --git a/src/api/erp/finance/receipt/index.ts b/src/api/erp/finance/receipt/index.ts index 4de28ca77..0391bf111 100644 --- a/src/api/erp/finance/receipt/index.ts +++ b/src/api/erp/finance/receipt/index.ts @@ -11,6 +11,11 @@ export interface FinanceReceiptVO { remark: string // 备注 } +// ERP 收款单项 VO +export interface FinanceReceiptItemVO { + receiptPrice: number // 本次收款金额,单位:元 +} + // ERP 收款单 API export const FinanceReceiptApi = { // 查询收款单分页 diff --git a/src/api/erp/purchase/order/index.ts b/src/api/erp/purchase/order/index.ts index ad3222fac..35d640e20 100644 --- a/src/api/erp/purchase/order/index.ts +++ b/src/api/erp/purchase/order/index.ts @@ -2,16 +2,45 @@ import request from '@/config/axios' // ERP 采购订单 VO export interface PurchaseOrderVO { - id: number // 订单工单编号 - no: string // 采购订单号 - customerId: number // 客户编号 - orderTime: Date // 订单时间 - totalCount: number // 合计数量 + id?: number // 订单工单编号 + no?: string // 采购订单号 + supplierId?: number // 供应商编号 + accountId?: number // 结算账户编号 + orderTime?: Date // 订单时间 + totalCount?: number // 合计数量 + totalProductPrice?: number // 合计产品金额,单位:元 + discountPercent?: number // 优惠率 + discountPrice?: number // 优惠金额,单位:元 totalPrice: number // 合计金额,单位:元 - status: number // 状态 - remark: string // 备注 - outCount: number // 采购出库数量 - returnCount: number // 采购退货数量 + depositPrice?: number // 订金金额,单位:元 + status?: number // 状态 + remark?: string // 备注 + fileUrl: string // 附件地址 + inCount?: number // 采购入库数量 + returnCount?: number // 采购退货数量 + items: PurchaseOrderItemVO[] // 订单项 +} + +// ERP 采购订单项 VO +export interface PurchaseOrderItemVO { + id?: number + orderItemId?: number + productId?: number + productName?: string + productUnitName?: string + productBarCode?: string + productPrice?: number + stockCount?: number + count: number + totalCount?: number + inCount?: number + returnCount?: number + totalProductPrice?: number + taxPercent?: number + taxPrice?: number + totalPrice: number + remark?: string + warehouseId?: number } // ERP 采购订单 API diff --git a/src/api/erp/sale/order/index.ts b/src/api/erp/sale/order/index.ts index 2d2ac53e6..1130dc7e6 100644 --- a/src/api/erp/sale/order/index.ts +++ b/src/api/erp/sale/order/index.ts @@ -2,16 +2,46 @@ import request from '@/config/axios' // ERP 销售订单 VO export interface SaleOrderVO { - id: number // 订单工单编号 - no: string // 销售订单号 - customerId: number // 客户编号 - orderTime: Date // 订单时间 - totalCount: number // 合计数量 + id?: number // 订单工单编号 + no?: string // 销售订单号 + customerId?: number // 客户编号 + accountId?: number // 结算账户编号 + saleUserId?: number // 销售人员编号 + orderTime?: Date // 订单时间 + totalCount?: number // 合计数量 + totalProductPrice?: number // 合计产品金额,单位:元 + discountPercent?: number // 优惠率 + discountPrice?: number // 优惠金额,单位:元 totalPrice: number // 合计金额,单位:元 - status: number // 状态 - remark: string // 备注 - outCount: number // 销售出库数量 - returnCount: number // 销售退货数量 + depositPrice?: number // 订金金额,单位:元 + status?: number // 状态 + remark?: string // 备注 + fileUrl: string // 附件地址 + outCount?: number // 销售出库数量 + returnCount?: number // 销售退货数量 + items: SaleOrderItemVO[] // 订单项 +} + +// ERP 销售订单项 VO +export interface SaleOrderItemVO { + id?: number + orderItemId?: number + productId?: number + productName?: string + productUnitName?: string + productBarCode?: string + productPrice?: number + stockCount?: number + count: number + totalCount?: number + outCount?: number + returnCount?: number + totalProductPrice?: number + taxPercent?: number + taxPrice?: number + totalPrice: number + remark?: string + warehouseId?: number } // ERP 销售订单 API diff --git a/src/views/erp/finance/account/AccountForm.vue b/src/views/erp/finance/account/AccountForm.vue index bde4bd2d5..38e9a511e 100644 --- a/src/views/erp/finance/account/AccountForm.vue +++ b/src/views/erp/finance/account/AccountForm.vue @@ -117,7 +117,8 @@ const resetForm = () => { no: undefined, remark: undefined, status: undefined, - sort: undefined + sort: undefined, + defaultStatus: undefined } formRef.value?.resetFields() } diff --git a/src/views/erp/finance/payment/FinancePaymentForm.vue b/src/views/erp/finance/payment/FinancePaymentForm.vue index 9aebc4ee3..8061e9d03 100644 --- a/src/views/erp/finance/payment/FinancePaymentForm.vue +++ b/src/views/erp/finance/payment/FinancePaymentForm.vue @@ -145,7 +145,11 @@