refactor(erp): 优化销售商品结构体字段对齐

- 移除 PurchaseProduct 结构体定义
- 调整 SaleProductAdd 和 SaleProductEdit 字段布局
- 统一结构体字段的换行与缩进格式
- 删除重复的类型声明和注释
- 保持代码风格一致性
This commit is contained in:
2025-12-22 11:47:37 +08:00
parent 6520d78067
commit eeefb47f82
2 changed files with 205 additions and 217 deletions

View File

@@ -119,59 +119,54 @@ type ArgsSaleProductAdd struct {
Products []SaleProductAdd // 产品信息
}
type SaleProductAdd struct {
SaleProductId int64 // 销售商品id
CustomSerial string // 客户货号
PackageDescription string // 包装描述
PackageEngDescription string // 包装英文描述
Name string // 中文品名
EngName string // 英文品名
CustomsSerial string // 海关编码
CustomsName string // 中文报关名称
CustomsMeasureUnit string // 报关单位
CustomsInvoiceUnit string // 开票单位
CustomsDetail string // 申报要素
BlEngName string // 提单英文名
InnerNum *int64 // 内盒入数
BoxNumUnit string // 箱数单位
OuterNum *int64 // 装箱单数
ShipmentCount int64 // 出运数量
ShipmentCountUnit string // 数量单位
Length *decimal.Decimal // 长
Width *decimal.Decimal // 宽
Height *decimal.Decimal // 高
NetWeight *decimal.Decimal // 净重
GrossWeight *decimal.Decimal // 毛重
NetGrossVolume int64 // 净毛体计算类型 1=内盒 2=外箱
CustomsVolume decimal.Decimal // 报关体积
TotalCustomsVolume decimal.Decimal // 报关总体积
CustomsNetWeight decimal.Decimal // 报关净重
TotalCustomsNetWeight decimal.Decimal // 报关总净重
CustomsGrossWeight decimal.Decimal // 报关毛重
TotalCustomsGrossWeight decimal.Decimal // 报关总毛重
CustomsBrand string // 品牌
DomesticSupply string // 货源地
FactoryName string // 工厂名称
HsSerial int64 // 是否商检 1=商检 2=未商检
Texture string // 材质
EngTexture string // 英文材质
EpmNo string // EPM NO
TaxExemption string // 免征税
ItemNumber string // 项号
Remark1 string // 备注1
Remark2 string // 备注2
Remark3 string // 备注3
Remark4 string // 备注4
Remark5 string // 备注5
Remark6 string // 备注6
RemarkImg string // 图片备注
ContainerNumber string // 箱号
SealNumber string // 封号
PurchaseProducts []PurchaseProduct // 采购商
Children []SaleProductAdd // 子产品
}
type PurchaseProduct struct {
PurchaseProductId int64 // 采购商品id
ShipmentCount int64 // 出运数量
SaleProductId int64 // 销售商品id
CustomSerial string // 客户货号
PackageDescription string // 包装描述
PackageEngDescription string // 包装英文描述
Name string // 中文品名
EngName string // 英文品名
CustomsSerial string // 海关编码
CustomsName string // 中文报关名称
CustomsMeasureUnit string // 报关单位
CustomsInvoiceUnit string // 开票单位
CustomsDetail string // 申报要素
BlEngName string // 提单英文名
InnerNum *int64 // 内盒入数
BoxNumUnit string // 箱数单位
OuterNum *int64 // 装箱单数
ShipmentCount int64 // 出运数量
ShipmentCountUnit string // 数量单位
Length *decimal.Decimal // 长
Width *decimal.Decimal // 宽
Height *decimal.Decimal // 高
NetWeight *decimal.Decimal // 净重
GrossWeight *decimal.Decimal // 毛重
NetGrossVolume int64 // 净毛体计算类型 1=内盒 2=外箱
CustomsVolume decimal.Decimal // 报关体积
TotalCustomsVolume decimal.Decimal // 报关总体积
CustomsNetWeight decimal.Decimal // 报关净重
TotalCustomsNetWeight decimal.Decimal // 报关总净重
CustomsGrossWeight decimal.Decimal // 报关毛重
TotalCustomsGrossWeight decimal.Decimal // 报关总毛重
CustomsBrand string // 品牌
DomesticSupply string // 货源地
FactoryName string // 工厂名称
HsSerial int64 // 是否商检 1=商检 2=未商检
Texture string // 材质
EngTexture string // 英文材质
EpmNo string // EPM NO
TaxExemption string // 免征税
ItemNumber string // 项号
Remark1 string // 备注1
Remark2 string // 备注2
Remark3 string // 备注3
Remark4 string // 备注4
Remark5 string // 备注5
Remark6 string // 备注6
RemarkImg string // 图片备注
ContainerNumber string // 箱号
SealNumber string // 封号
Children []SaleProductAdd // 子产
}
// Add @TITLE 添加
@@ -189,61 +184,60 @@ type ArgsSaleProductEdit struct {
Products []SaleProductEdit
}
type SaleProductEdit struct {
ShipmentSaleProductId int64 // 出舱单商品id
Sort int64 // 排序
Po string // Po
CustomSerial string // 客户货号
PackageDescription string // 包装
PackageEngDescription string // 包装英文描述
PackageWeight decimal.Decimal // 包装重量
Name string // 中文品名
EngName string // 英文品名
CustomsSerial string // 海关编码
CustomsName string // 中文报关名称
CustomsMeasureUnit string // 报关单位
CustomsInvoiceUnit string // 开票单位
CustomsDetail string // 申报要素
BlEngName string // 提单英文名
InnerNum *int64 // 内盒入数
BoxNumUnit string // 箱数单位
OuterNum *int64 // 装箱单数
ShipmentCount int64 // 出运数量
ShipmentCountUnit string // 数量单位
Length *decimal.Decimal // 长
Width *decimal.Decimal // 宽
Height *decimal.Decimal // 高
NetWeight *decimal.Decimal // 净重
GrossWeight *decimal.Decimal // 毛重
NetGrossVolume int64 // 净毛体计算类型 1=内盒 2=外箱
CustomsVolume decimal.Decimal // 报关体积
TotalCustomsVolume decimal.Decimal // 报关总体积
CustomsNetWeight decimal.Decimal // 报关净重
TotalCustomsNetWeight decimal.Decimal // 报关总净重
CustomsGrossWeight decimal.Decimal // 报关毛重
TotalCustomsGrossWeight decimal.Decimal // 报关总毛重
SalePrice decimal.Decimal // 销售单价
CustomsPrice decimal.Decimal // 报关单价
CustomsAmount decimal.Decimal // 报关总价
CustomsBrand string // 品牌
DomesticSupply string // 货源地
FactoryName string // 工厂名称
HsSerial int64 // 是否商检 1=商检 2=未商检
Texture string // 材质
EngTexture string // 英文材质
EpmNo string // EPM NO
TaxExemption string // 免征税
ItemNumber string // 项号
Remark1 string // 备注1
Remark2 string // 备注2
Remark3 string // 备注3
Remark4 string // 备注4
Remark5 string // 备注5
Remark6 string // 备注6
ExchangeSettlementRemark string // 结汇备注
RemarkImg string // 图片备注
ContainerNumber string // 箱号
SealNumber string // 封号
PurchaseProducts []PurchaseProduct // 采购商品
ShipmentSaleProductId int64 // 出舱单商品id
Sort int64 // 排序
Po string // Po
CustomSerial string // 客户货号
PackageDescription string // 包装
PackageEngDescription string // 包装英文描述
PackageWeight decimal.Decimal // 包装重量
Name string // 中文品名
EngName string // 英文品名
CustomsSerial string // 海关编码
CustomsName string // 中文报关名称
CustomsMeasureUnit string // 报关单位
CustomsInvoiceUnit string // 开票单位
CustomsDetail string // 申报要素
BlEngName string // 提单英文名
InnerNum *int64 // 内盒入数
BoxNumUnit string // 箱数单位
OuterNum *int64 // 装箱单数
ShipmentCount int64 // 出运数量
ShipmentCountUnit string // 数量单位
Length *decimal.Decimal // 长
Width *decimal.Decimal // 宽
Height *decimal.Decimal // 高
NetWeight *decimal.Decimal // 净重
GrossWeight *decimal.Decimal // 毛重
NetGrossVolume int64 // 净毛体计算类型 1=内盒 2=外箱
CustomsVolume decimal.Decimal // 报关体积
TotalCustomsVolume decimal.Decimal // 报关总体积
CustomsNetWeight decimal.Decimal // 报关净重
TotalCustomsNetWeight decimal.Decimal // 报关总净重
CustomsGrossWeight decimal.Decimal // 报关毛重
TotalCustomsGrossWeight decimal.Decimal // 报关总毛重
SalePrice decimal.Decimal // 销售单价
CustomsPrice decimal.Decimal // 报关单价
CustomsAmount decimal.Decimal // 报关总价
CustomsBrand string // 品牌
DomesticSupply string // 货源地
FactoryName string // 工厂名称
HsSerial int64 // 是否商检 1=商检 2=未商检
Texture string // 材质
EngTexture string // 英文材质
EpmNo string // EPM NO
TaxExemption string // 免征税
ItemNumber string // 项号
Remark1 string // 备注1
Remark2 string // 备注2
Remark3 string // 备注3
Remark4 string // 备注4
Remark5 string // 备注5
Remark6 string // 备注6
ExchangeSettlementRemark string // 结汇备注
RemarkImg string // 图片备注
ContainerNumber string // 箱号
SealNumber string // 封号
}
// Edit @TITLE 编辑