From fbf9ba96bc9fbd6ce60aaa30d1934d6e71e5f566 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 6 Jan 2026 15:33:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(payment):=20=E6=B7=BB=E5=8A=A0=E4=BB=98?= =?UTF-8?q?=E6=AC=BE=E7=94=A8=E9=80=94=E5=B8=B8=E9=87=8F=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 定义 PaymentPurpose 类型和相关常量值 - 在 ERP 服务中添加 Payment 模块引用 - 更新 Payment 结构体中的 PaymentPurpose 字段类型 - 将字符串类型替换为常量类型以增强类型安全 - 添加采购付款单、费用报销和其他支出的用途常量 --- erp/erp.go | 1 + ik3cloud/constant/constant.go | 8 ++++++++ ik3cloud/payment.go | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/erp/erp.go b/erp/erp.go index 222bbc5..66070be 100644 --- a/erp/erp.go +++ b/erp/erp.go @@ -13,6 +13,7 @@ type Erp struct { Template template Accounting accounting Payable payable + Payment payment Receivable receivable Receipt receipt Expense expense diff --git a/ik3cloud/constant/constant.go b/ik3cloud/constant/constant.go index ad09c0e..c8c8cd0 100644 --- a/ik3cloud/constant/constant.go +++ b/ik3cloud/constant/constant.go @@ -79,6 +79,14 @@ const ( PaymentTypeRequest PaymentType = "FKDLX11_SYS" // 报销付款单 ) +type PaymentPurpose = string + +const ( + PaymentPurposePurchase PaymentPurpose = "SFKYT08_SYS" // 采购付款单 + PaymentPurposeExpense PaymentPurpose = "SFKYT009" // 费用报销 + PaymentPurposeOther PaymentPurpose = "SFKYT12_SYS" // 其他支出 +) + type ReceiptType = string const ( diff --git a/ik3cloud/payment.go b/ik3cloud/payment.go index e69080e..90415b8 100644 --- a/ik3cloud/payment.go +++ b/ik3cloud/payment.go @@ -32,8 +32,8 @@ type PaymentCostItem struct { InvoiceSerial string // 发票号 DepartmentNumber string // 核算部门 //SettlementMethod string // 结算方式 - //PaymentPurpose string // 付款用途 - ExpenseItem string // 费用项目 + PaymentPurpose constant.PaymentPurpose // 付款用途 + ExpenseItem string // 费用项目 } // Save @TITLE 保存付款单