From e3874373f5c6fe4f670921f65fab4015c6ee6d5b Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 14 Jan 2026 17:22:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=B7=BB=E5=8A=A0=E8=BF=90?= =?UTF-8?q?=E8=B4=B9=E5=92=8C=E4=BD=A3=E9=87=91=E5=AD=97=E6=AE=B5=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 shipment 模块中新增国内运费、海外运费和海外佣金字段 - 在 receipt 模块中添加银行账户字段 - 更新 receivable 模块中的应收款项信息结构体 - 扩展 shipment 相关的数据传输对象和修改逻辑 - 为所有相关模块添加新的财务计算字段 - 重构数据结构以支持更详细的成本跟踪功能 --- erp/receipt.go | 3 +++ erp/receivable.go | 39 +++++++++++++++++++++------------------ erp/shipment.go | 6 ++++++ erp/shipment/bean.go | 3 +++ erp/shipment/modify.go | 9 ++++++++- ik3cloud/receipt.go | 1 + 6 files changed, 42 insertions(+), 19 deletions(-) diff --git a/erp/receipt.go b/erp/receipt.go index 2be91e6..965aa6c 100644 --- a/erp/receipt.go +++ b/erp/receipt.go @@ -45,6 +45,7 @@ type ReceiptItem struct { CurrencyName string `json:"currencyName"` CurrencySymbol string `json:"currencySymbol"` CurrencyRate decimal.Decimal `json:"currencyRate"` + BankAccount string `json:"bankAccount"` BankName string `json:"bankName"` EntryAmount decimal.Decimal `json:"entryAmount"` ReceivableFxAmount decimal.Decimal `json:"receivableFxAmount"` @@ -79,6 +80,7 @@ type ReceiptAdd struct { CurrencySymbol string // 币种符号 CurrencyRate decimal.Decimal // 币种汇率 PayCustomId int64 // 付款客户id + BankAccount string // 结汇银行账号 BankName string // 结汇银行 EntryAmount decimal.Decimal // 外币入账金额 ForeignFee decimal.Decimal // 国外扣费 @@ -108,6 +110,7 @@ type ReplyReceiptInfo struct { CustomName string `json:"customName"` PayCustomId int64 `json:"payCustomId"` PayCustomName string `json:"payCustomName"` + BankAccount string `json:"bankAccount"` BankName string `json:"bankName"` EntryAmount decimal.Decimal `json:"entryAmount"` ForeignFee decimal.Decimal `json:"foreignFee"` diff --git a/erp/receivable.go b/erp/receivable.go index 124aa98..49f7612 100644 --- a/erp/receivable.go +++ b/erp/receivable.go @@ -58,24 +58,27 @@ func (r *receivable) List(ctx context.Context, args ArgsReceivableList) (reply R } type ReplyReceivableInfo struct { - Id int64 `json:"id"` - ReceivableSerial string `json:"receivableSerial"` - CustomName string `json:"customName"` - InvoiceSerial string `json:"invoiceSerial"` - ReceivableAmount decimal.Decimal `json:"receivableAmount"` - ReceivedAmount decimal.Decimal `json:"receivedAmount"` - OutstandingAmount decimal.Decimal `json:"outstandingAmount"` - Currency string `json:"currency"` - CurrencyName string `json:"currencyName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - CurrencySymbol string `json:"currencySymbol"` - CreatedStaffID int64 `json:"createdStaffID"` - Ik3cloudStatus int64 `json:"ik3CloudStatus"` - Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` - Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Products []ReceivableProductItem `json:"products"` + Id int64 `json:"id"` + ReceivableSerial string `json:"receivableSerial"` + CustomName string `json:"customName"` + InvoiceSerial string `json:"invoiceSerial"` + ReceivableAmount decimal.Decimal `json:"receivableAmount"` + ReceivedAmount decimal.Decimal `json:"receivedAmount"` + OutstandingAmount decimal.Decimal `json:"outstandingAmount"` + Currency string `json:"currency"` + CurrencyName string `json:"currencyName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + CurrencySymbol string `json:"currencySymbol"` + DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"` + ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"` + ForeignCommission decimal.Decimal `json:"foreignCommission"` + CreatedStaffID int64 `json:"createdStaffID"` + Ik3cloudStatus int64 `json:"ik3CloudStatus"` + Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` + Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Products []ReceivableProductItem `json:"products"` } type ReceivableProductItem struct { diff --git a/erp/shipment.go b/erp/shipment.go index 96c9d14..2666abc 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -131,6 +131,9 @@ type ShipmentAdd struct { MarkText string // 唛头文字 MarkImg string // 唛头图片 SaleIds []int64 // 销售合同 + DomesticShippingCost decimal.Decimal // 国内运费 + ForeignShippingCost decimal.Decimal // 国外运费 + ForeignCommission decimal.Decimal // 国外佣金 } // Add @TITLE 添加 @@ -214,6 +217,9 @@ type ArgsShipmentData struct { MarkText string // 唛头文字 MarkImg string // 唛头图片 VouchingClerkId int64 // 单证id + DomesticShippingCost decimal.Decimal // 国内运费 + ForeignShippingCost decimal.Decimal // 国外运费 + ForeignCommission decimal.Decimal // 国外佣金 } // Edit @TITLE 编辑 diff --git a/erp/shipment/bean.go b/erp/shipment/bean.go index 3a1f49f..a0ade07 100644 --- a/erp/shipment/bean.go +++ b/erp/shipment/bean.go @@ -68,6 +68,9 @@ type ReplyShipmentInfo struct { TaxExemptionNature string `json:"taxExemptionNature"` MarkText string `json:"markText"` MarkImg string `json:"markImg"` + DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"` + ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"` + ForeignCommission decimal.Decimal `json:"foreignCommission"` WorkflowId int64 `json:"workflowId"` WorkflowStatus int64 `json:"workflowStatus"` WorkflowReason string `json:"workflowReason"` diff --git a/erp/shipment/modify.go b/erp/shipment/modify.go index 05390cf..c1d122e 100644 --- a/erp/shipment/modify.go +++ b/erp/shipment/modify.go @@ -2,12 +2,13 @@ package shipment import ( "context" + "time" + "git.kumo.work/shama/service/client" bean2 "git.kumo.work/shama/service/erp/bean" modify2 "git.kumo.work/shama/service/erp/shipment/modify" "git.kumo.work/shama/service/lib/bean" "github.com/shopspring/decimal" - "time" ) type modify struct { @@ -144,6 +145,9 @@ type ReplyModifyInfo struct { TaxExemptionNature string `json:"taxExemptionNature"` MarkText string `json:"markText"` MarkImg string `json:"markImg"` + DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"` + ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"` + ForeignCommission decimal.Decimal `json:"foreignCommission"` WorkflowId int64 `json:"workflowId"` WorkflowStatus int64 `json:"workflowStatus"` WorkflowReason string `json:"workflowReason"` @@ -227,6 +231,9 @@ type ArgsShipmentData struct { MarkText string // 唛头文字 MarkImg string // 唛头图片 VouchingClerkId int64 // 单证id + DomesticShippingCost decimal.Decimal // 国内运费 + ForeignShippingCost decimal.Decimal // 海外运费 + ForeignCommission decimal.Decimal // 海外佣金 } // Edit @TITLE 编辑 diff --git a/ik3cloud/receipt.go b/ik3cloud/receipt.go index a074c51..6a02cc9 100644 --- a/ik3cloud/receipt.go +++ b/ik3cloud/receipt.go @@ -31,6 +31,7 @@ type ReceiptCost struct { DepartmentNumber string // 部门编号 Amount decimal.Decimal // 金额 Remarks string // 备注 + BankAccount string // 银行账户 } // Save @TITLE 保存收款单