From f546c3f22a576409b33b497545b100d51542258f Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 8 Sep 2026 15:04:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=B7=BB=E5=8A=A0=E9=94=80?= =?UTF-8?q?=E5=94=AE=E4=BB=B7=E6=A0=BC=E5=AD=97=E6=AE=B5=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E6=B1=87=E5=AE=A2=E6=88=B7=E4=BF=A1=E6=81=AF=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在销售审核模块中为产品项目添加销售单价字段 - 在销售变更模块中为产品添加变更前后销售价格字段 - 在发货单相关结构体中添加收汇客户ID、名称和地址字段 - 在应收账款模块中添加收汇客户相关信息字段 - 统一在发货单主结构体和详情结构体中添加收汇客户字段 - 引入decimal库支持精确的价格计算和存储 --- erp/receivable.go | 3 +++ erp/sale/audit.go | 6 ++++-- erp/sale/change.go | 18 +++++++++++------- erp/shipment.go | 9 +++++++++ erp/shipment/bean.go | 3 +++ erp/shipment/modify.go | 9 +++++++++ 6 files changed, 39 insertions(+), 9 deletions(-) diff --git a/erp/receivable.go b/erp/receivable.go index 7e088dc..68d1f55 100644 --- a/erp/receivable.go +++ b/erp/receivable.go @@ -84,6 +84,9 @@ type ReplyReceivableInfo struct { ReceivableSerial string `json:"receivableSerial"` BusinessDate *time.Time `json:"businessDate"` CustomName string `json:"customName"` + RecCustomId int64 `json:"recCustomId"` + RecCustomName string `json:"recCustomName"` + RecCustomAddress string `json:"recCustomAddress"` InvoiceSerial string `json:"invoiceSerial"` ReceivableAmount decimal.Decimal `json:"receivableAmount"` ReceivedAmount decimal.Decimal `json:"receivedAmount"` diff --git a/erp/sale/audit.go b/erp/sale/audit.go index 6dc5616..d017343 100644 --- a/erp/sale/audit.go +++ b/erp/sale/audit.go @@ -5,6 +5,7 @@ import ( "git.kumo.work/shama/service/client" "git.kumo.work/shama/service/erp/bean" + "github.com/shopspring/decimal" ) type audit struct { @@ -54,8 +55,9 @@ type ArgsAuditChange struct { Products []ChangeProductItem // 产品信息 } type ChangeProductItem struct { - Id int64 // 产品id - SaleCount int64 // 销售数量 + Id int64 // 产品id + SaleCount int64 // 销售数量 + SalePrice decimal.Decimal // 销售单价 } // Change @TITLE 编辑商品审核 diff --git a/erp/sale/change.go b/erp/sale/change.go index e46fecf..de328b1 100644 --- a/erp/sale/change.go +++ b/erp/sale/change.go @@ -2,8 +2,10 @@ package sale import ( "context" - "git.kumo.work/shama/service/client" "time" + + "git.kumo.work/shama/service/client" + "github.com/shopspring/decimal" ) type change struct { @@ -14,12 +16,14 @@ type ArgsChangeAllSearch struct { WorkflowId int64 // 审核id } type ChangeProduct struct { - Id int64 `json:"id"` - SaleProductID int64 `json:"saleProductID"` - BeforeSaleCount int64 `json:"beforeSaleCount"` - SaleCount int64 `json:"saleCount"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` + Id int64 `json:"id"` + SaleProductID int64 `json:"saleProductID"` + BeforeSaleCount int64 `json:"beforeSaleCount"` + SaleCount int64 `json:"saleCount"` + BeforeSalePrice decimal.Decimal `json:"beforeSalePrice"` + SalePrice decimal.Decimal `json:"salePrice"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` } // All @TITLE 获取产品 diff --git a/erp/shipment.go b/erp/shipment.go index f9c0143..c3966a2 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -47,6 +47,9 @@ type ShipmentItem struct { InvoiceDate *time.Time `json:"invoiceDate"` CustomName string `json:"customName"` CustomShortName string `json:"customShortName"` + RecCustomId int64 `json:"recCustomId"` + RecCustomName string `json:"recCustomName"` + RecCustomAddress string `json:"recCustomAddress"` EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` @@ -95,6 +98,9 @@ type ShipmentAdd struct { RecBankCardNo string // 收汇银行卡号 RecBankCardName string // 收汇银行户名 RecBankAddress string // 收汇银行地址 + RecCustomId int64 // 收汇客户 + RecCustomName string // 收汇客户名称 + RecCustomAddress string // 收汇客户地址 RecCompanyName string // 收汇公司名称 Shipper string // 托运人 Consignee string // 收货人 @@ -175,6 +181,9 @@ type ArgsShipmentData struct { RecBankCardNo string // 收款银行卡号 RecBankCardName string // 收款银行卡名 RecBankAddress string // 收汇银行地址 + RecCustomId int64 // 收汇客户 + RecCustomName string // 收汇客户名称 + RecCustomAddress string // 收汇客户地址 RecCompanyName string // 收汇公司名称 PaymentTerms string // 付款条件 TradeCountry string // 贸易国 diff --git a/erp/shipment/bean.go b/erp/shipment/bean.go index df4d5c3..0e8a576 100644 --- a/erp/shipment/bean.go +++ b/erp/shipment/bean.go @@ -32,6 +32,9 @@ type ReplyShipmentInfo struct { RecBankCardNo string `json:"recBankCardNo"` RecBankCardName string `json:"recBankCardName"` RecBankAddress string `json:"recBankAddress"` + RecCustomId int64 `json:"recCustomId"` + RecCustomName string `json:"recCustomName"` + RecCustomAddress string `json:"recCustomAddress"` RecCompanyName string `json:"recCompanyName"` Shipper string `json:"shipper"` Consignee string `json:"consignee"` diff --git a/erp/shipment/modify.go b/erp/shipment/modify.go index 9e55d4c..404bdb4 100644 --- a/erp/shipment/modify.go +++ b/erp/shipment/modify.go @@ -48,6 +48,9 @@ type ShipmentItem struct { InvoiceDate *time.Time `json:"invoiceDate"` CustomName string `json:"customName"` CustomShortName string `json:"customShortName"` + RecCustomId int64 `json:"recCustomId"` + RecCustomName string `json:"recCustomName"` + RecCustomAddress string `json:"recCustomAddress"` EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` @@ -109,6 +112,9 @@ type ReplyModifyInfo struct { RecBankCardNo string `json:"recBankCardNo"` RecBankCardName string `json:"recBankCardName"` RecBankAddress string `json:"recBankAddress"` + RecCustomId int64 `json:"recCustomId"` + RecCustomName string `json:"recCustomName"` + RecCustomAddress string `json:"recCustomAddress"` RecCompanyName string `json:"recCompanyName"` Shipper string `json:"shipper"` Consignee string `json:"consignee"` @@ -189,6 +195,9 @@ type ArgsShipmentData struct { RecBankCardNo string // 收款银行卡号 RecBankCardName string // 收款银行卡名 RecBankAddress string // 收汇银行地址 + RecCustomId int64 // 收汇客户 + RecCustomName string // 收汇客户名称 + RecCustomAddress string // 收汇客户地址 RecCompanyName string // 收汇公司名称 PaymentTerms string // 付款条件 TradeCountry string // 贸易国