feat(erp): 添加采购商品关联信息- 在产品详情中增加采购商品列表字段
- 扩展出舱单产品与采购商品的关联结构 - 新增采购商品详情信息结构体定义 - 支持在出运产品中关联多个采购商品- 完善产品添加和编辑时的采购商品数据处理
This commit is contained in:
parent
9aba2baa8c
commit
0593a556e4
@ -2,12 +2,13 @@ package sale
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
product2 "git.kumo.work/shama/service/erp/product"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
"time"
|
||||
)
|
||||
|
||||
type product struct {
|
||||
@ -281,6 +282,7 @@ type ReplyProductInfo struct {
|
||||
Quote ProductQuoteInfo `json:"quote"`
|
||||
Children []ReplyProductInfo `json:"children"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
PurchaseProducts []PurchaseProduct `json:"purchaseProducts"`
|
||||
}
|
||||
|
||||
type ProductPackageInfo struct {
|
||||
@ -311,6 +313,23 @@ type ProductQuoteInfo struct {
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
type PurchaseProduct struct {
|
||||
Id int64 `json:"id"`
|
||||
PurchaseId int64 `json:"purchaseId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
PoSerial string `json:"poSerial"`
|
||||
BatchNo int64 `json:"batchNo"`
|
||||
FactoryId int64 `json:"factoryId"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
DeliveryDate *time.Time `json:"deliveryDate"`
|
||||
DeliveryDateEnd *time.Time `json:"deliveryDateEnd"`
|
||||
PurchaseCount int64 `json:"purchaseCount"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShippedCount int64 `json:"shippedCount"`
|
||||
AccountingCount int64 `json:"accountingCount"`
|
||||
AccountedCount int64 `json:"accountedCount"`
|
||||
}
|
||||
|
||||
// Info @TITLE 产品详情
|
||||
func (p *product) Info(ctx context.Context, saleProductId int64) (reply ReplyProductInfo, err error) {
|
||||
|
||||
@ -12,81 +12,104 @@ type saleProduct struct {
|
||||
}
|
||||
|
||||
type SaleProductItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Mold int64 `json:"mold"`
|
||||
ParentSaleProductId int64 `json:"parentSaleProductId"`
|
||||
SaleProductId int64 `json:"saleProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
Sort int64 `json:"sort"`
|
||||
Po string `json:"po"`
|
||||
Serial string `json:"serial"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CustomSerial string `json:"customSerial"`
|
||||
PackageDescription string `json:"packageDescription"`
|
||||
PackageEngDescription string `json:"packageEngDescription"`
|
||||
PackageWeight decimal.Decimal `json:"packageWeight"`
|
||||
EngName string `json:"engName"`
|
||||
Name string `json:"name"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
BoxCount int64 `json:"boxCount"`
|
||||
InnerNum int64 `json:"innerNum"`
|
||||
InnerBoxCount *int64 `json:"innerBoxCount"`
|
||||
BoxNumUnit string `json:"boxNumUnit"`
|
||||
OuterNum int64 `json:"outerNum"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
Length decimal.Decimal `json:"length"`
|
||||
Width decimal.Decimal `json:"width"`
|
||||
Height decimal.Decimal `json:"height"`
|
||||
Volume decimal.Decimal `json:"volume"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
NetGrossVolume int64 `json:"netGrossVolume"`
|
||||
GrossWeight decimal.Decimal `json:"grossWeight"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
NetWeight decimal.Decimal `json:"netWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsVolume decimal.Decimal `json:"customsVolume"`
|
||||
TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"`
|
||||
CustomsNetWeight decimal.Decimal `json:"customsNetWeight"`
|
||||
TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"`
|
||||
CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"`
|
||||
TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Brand string `json:"brand"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
EpmNo string `json:"epmNo"`
|
||||
HsSerial int64 `json:"hsSerial"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ItemNumber string `json:"itemNumber"`
|
||||
Texture string `json:"texture"`
|
||||
EngTexture string `json:"engTexture"`
|
||||
Remark1 string `json:"remark1"`
|
||||
Remark2 string `json:"remark2"`
|
||||
Remark3 string `json:"remark3"`
|
||||
Remark4 string `json:"remark4"`
|
||||
Remark5 string `json:"remark5"`
|
||||
Remark6 string `json:"remark6"`
|
||||
ExchangeSettlementRemark string `json:"exchangeSettlementRemark"`
|
||||
RemarkImg string `json:"remarkImg"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Children []*SaleProductItem `json:"children"`
|
||||
Id int64 `json:"id"`
|
||||
Mold int64 `json:"mold"`
|
||||
ParentSaleProductId int64 `json:"parentSaleProductId"`
|
||||
SaleProductId int64 `json:"saleProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
Sort int64 `json:"sort"`
|
||||
Po string `json:"po"`
|
||||
Serial string `json:"serial"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CustomSerial string `json:"customSerial"`
|
||||
PackageDescription string `json:"packageDescription"`
|
||||
PackageEngDescription string `json:"packageEngDescription"`
|
||||
PackageWeight decimal.Decimal `json:"packageWeight"`
|
||||
EngName string `json:"engName"`
|
||||
Name string `json:"name"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
BoxCount int64 `json:"boxCount"`
|
||||
InnerNum int64 `json:"innerNum"`
|
||||
InnerBoxCount *int64 `json:"innerBoxCount"`
|
||||
BoxNumUnit string `json:"boxNumUnit"`
|
||||
OuterNum int64 `json:"outerNum"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
Length decimal.Decimal `json:"length"`
|
||||
Width decimal.Decimal `json:"width"`
|
||||
Height decimal.Decimal `json:"height"`
|
||||
Volume decimal.Decimal `json:"volume"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
NetGrossVolume int64 `json:"netGrossVolume"`
|
||||
GrossWeight decimal.Decimal `json:"grossWeight"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
NetWeight decimal.Decimal `json:"netWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsVolume decimal.Decimal `json:"customsVolume"`
|
||||
TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"`
|
||||
CustomsNetWeight decimal.Decimal `json:"customsNetWeight"`
|
||||
TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"`
|
||||
CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"`
|
||||
TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Brand string `json:"brand"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
EpmNo string `json:"epmNo"`
|
||||
HsSerial int64 `json:"hsSerial"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ItemNumber string `json:"itemNumber"`
|
||||
Texture string `json:"texture"`
|
||||
EngTexture string `json:"engTexture"`
|
||||
Remark1 string `json:"remark1"`
|
||||
Remark2 string `json:"remark2"`
|
||||
Remark3 string `json:"remark3"`
|
||||
Remark4 string `json:"remark4"`
|
||||
Remark5 string `json:"remark5"`
|
||||
Remark6 string `json:"remark6"`
|
||||
ExchangeSettlementRemark string `json:"exchangeSettlementRemark"`
|
||||
RemarkImg string `json:"remarkImg"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Children []*SaleProductItem `json:"children"`
|
||||
PurchaseProducts []PurchaseProductItem `json:"purchaseProducts"`
|
||||
}
|
||||
type PurchaseProductItem struct {
|
||||
ShipmentPurchaseProductId int64 `json:"shipmentPurchaseProductId"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
PurchaseProduct PurchaseProductInfo `json:"purchaseProduct"`
|
||||
}
|
||||
type PurchaseProductInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
PurchaseId int64 `json:"purchaseId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
PoSerial string `json:"poSerial"`
|
||||
BatchNo int64 `json:"batchNo"`
|
||||
FactoryId int64 `json:"factoryId"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
DeliveryDate *time.Time `json:"deliveryDate"`
|
||||
DeliveryDateEnd *time.Time `json:"deliveryDateEnd"`
|
||||
PurchaseCount int64 `json:"purchaseCount"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShippedCount int64 `json:"shippedCount"`
|
||||
AccountingCount int64 `json:"accountingCount"`
|
||||
AccountedCount int64 `json:"accountedCount"`
|
||||
}
|
||||
type ArgsSaleProductSearch struct {
|
||||
ModifyId int64 // 订舱单修改id
|
||||
@ -110,53 +133,58 @@ 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 // 封号
|
||||
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 // 采购商品
|
||||
}
|
||||
type PurchaseProduct struct {
|
||||
PurchaseProductId int64 // 采购商品id
|
||||
ShipmentCount int64 // 出运数量
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@ -174,60 +202,61 @@ 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 // 封号
|
||||
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 // 采购商品
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
|
||||
@ -2,91 +2,116 @@ package shipment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"github.com/shopspring/decimal"
|
||||
"time"
|
||||
)
|
||||
|
||||
type saleProduct struct {
|
||||
}
|
||||
|
||||
type SaleProductItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Mold int64 `json:"mold"`
|
||||
ParentSaleProductId int64 `json:"parentSaleProductId"`
|
||||
SaleProductId int64 `json:"saleProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
Sort int64 `json:"sort"`
|
||||
Po string `json:"po"`
|
||||
Serial string `json:"serial"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CustomSerial string `json:"customSerial"`
|
||||
PackageDescription string `json:"packageDescription"`
|
||||
PackageEngDescription string `json:"packageEngDescription"`
|
||||
PackageWeight decimal.Decimal `json:"packageWeight"`
|
||||
EngName string `json:"engName"`
|
||||
Name string `json:"name"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
BoxCount int64 `json:"boxCount"`
|
||||
InnerNum int64 `json:"innerNum"`
|
||||
InnerBoxCount *int64 `json:"innerBoxCount"`
|
||||
BoxNumUnit string `json:"boxNumUnit"`
|
||||
OuterNum int64 `json:"outerNum"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
Length decimal.Decimal `json:"length"`
|
||||
Width decimal.Decimal `json:"width"`
|
||||
Height decimal.Decimal `json:"height"`
|
||||
Volume decimal.Decimal `json:"volume"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
NetGrossVolume int64 `json:"netGrossVolume"`
|
||||
GrossWeight decimal.Decimal `json:"grossWeight"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
NetWeight decimal.Decimal `json:"netWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsVolume decimal.Decimal `json:"customsVolume"`
|
||||
TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"`
|
||||
CustomsNetWeight decimal.Decimal `json:"customsNetWeight"`
|
||||
TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"`
|
||||
CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"`
|
||||
TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Brand string `json:"brand"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
EpmNo string `json:"epmNo"`
|
||||
HsSerial int64 `json:"hsSerial"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ItemNumber string `json:"itemNumber"`
|
||||
Texture string `json:"texture"`
|
||||
EngTexture string `json:"engTexture"`
|
||||
Remark1 string `json:"remark1"`
|
||||
Remark2 string `json:"remark2"`
|
||||
Remark3 string `json:"remark3"`
|
||||
Remark4 string `json:"remark4"`
|
||||
Remark5 string `json:"remark5"`
|
||||
Remark6 string `json:"remark6"`
|
||||
ExchangeSettlementRemark string `json:"exchangeSettlementRemark"`
|
||||
RemarkImg string `json:"remarkImg"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
IsExchangeSettlement int64 `json:"isExchangeSettlement"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Children []*SaleProductItem `json:"children"`
|
||||
Id int64 `json:"id"`
|
||||
Mold int64 `json:"mold"`
|
||||
ParentSaleProductId int64 `json:"parentSaleProductId"`
|
||||
SaleProductId int64 `json:"saleProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
Sort int64 `json:"sort"`
|
||||
Po string `json:"po"`
|
||||
Serial string `json:"serial"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CustomSerial string `json:"customSerial"`
|
||||
PackageDescription string `json:"packageDescription"`
|
||||
PackageEngDescription string `json:"packageEngDescription"`
|
||||
PackageWeight decimal.Decimal `json:"packageWeight"`
|
||||
EngName string `json:"engName"`
|
||||
Name string `json:"name"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
BoxCount int64 `json:"boxCount"`
|
||||
InnerNum int64 `json:"innerNum"`
|
||||
InnerBoxCount *int64 `json:"innerBoxCount"`
|
||||
BoxNumUnit string `json:"boxNumUnit"`
|
||||
OuterNum int64 `json:"outerNum"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
Length decimal.Decimal `json:"length"`
|
||||
Width decimal.Decimal `json:"width"`
|
||||
Height decimal.Decimal `json:"height"`
|
||||
Volume decimal.Decimal `json:"volume"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
NetGrossVolume int64 `json:"netGrossVolume"`
|
||||
GrossWeight decimal.Decimal `json:"grossWeight"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
NetWeight decimal.Decimal `json:"netWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsVolume decimal.Decimal `json:"customsVolume"`
|
||||
TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"`
|
||||
CustomsNetWeight decimal.Decimal `json:"customsNetWeight"`
|
||||
TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"`
|
||||
CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"`
|
||||
TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Brand string `json:"brand"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
EpmNo string `json:"epmNo"`
|
||||
HsSerial int64 `json:"hsSerial"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ItemNumber string `json:"itemNumber"`
|
||||
Texture string `json:"texture"`
|
||||
EngTexture string `json:"engTexture"`
|
||||
Remark1 string `json:"remark1"`
|
||||
Remark2 string `json:"remark2"`
|
||||
Remark3 string `json:"remark3"`
|
||||
Remark4 string `json:"remark4"`
|
||||
Remark5 string `json:"remark5"`
|
||||
Remark6 string `json:"remark6"`
|
||||
ExchangeSettlementRemark string `json:"exchangeSettlementRemark"`
|
||||
RemarkImg string `json:"remarkImg"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
IsExchangeSettlement int64 `json:"isExchangeSettlement"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Children []*SaleProductItem `json:"children"`
|
||||
PurchaseProducts []PurchaseProductItem `json:"purchaseProducts"`
|
||||
}
|
||||
|
||||
type PurchaseProductItem struct {
|
||||
ShipmentPurchaseProductId int64 `json:"shipmentPurchaseProductId"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
PurchaseProduct PurchaseProductInfo `json:"purchaseProduct"`
|
||||
}
|
||||
type PurchaseProductInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
PurchaseId int64 `json:"purchaseId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
PoSerial string `json:"poSerial"`
|
||||
BatchNo int64 `json:"batchNo"`
|
||||
FactoryId int64 `json:"factoryId"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
DeliveryDate *time.Time `json:"deliveryDate"`
|
||||
DeliveryDateEnd *time.Time `json:"deliveryDateEnd"`
|
||||
PurchaseCount int64 `json:"purchaseCount"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShippedCount int64 `json:"shippedCount"`
|
||||
AccountingCount int64 `json:"accountingCount"`
|
||||
AccountedCount int64 `json:"accountedCount"`
|
||||
}
|
||||
type ArgsSaleProductSearch struct {
|
||||
ShipmentId int64 // 出舱单
|
||||
@ -110,54 +135,59 @@ type ArgsSaleProductAdd struct {
|
||||
Products []SaleProductAdd // 产品信息
|
||||
}
|
||||
type SaleProductAdd struct {
|
||||
SaleProductId int64 // 销售商品id
|
||||
CustomSerial string // 客户货号
|
||||
Po string // po
|
||||
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 // 封号
|
||||
SaleProductId int64 // 销售商品id
|
||||
CustomSerial string // 客户货号
|
||||
Po string // po
|
||||
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 // 采购商品
|
||||
}
|
||||
type PurchaseProduct struct {
|
||||
PurchaseProductId int64 // 采购商品id
|
||||
ShipmentCount int64 // 出运数量
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@ -175,60 +205,61 @@ 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 // 销售单价
|
||||
CustomsBrand string // 品牌
|
||||
CustomsPrice decimal.Decimal // 报关价格
|
||||
CustomsAmount decimal.Decimal // 报关总价
|
||||
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 // 封号
|
||||
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 // 销售单价
|
||||
CustomsBrand string // 品牌
|
||||
CustomsPrice decimal.Decimal // 报关价格
|
||||
CustomsAmount decimal.Decimal // 报关总价
|
||||
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 // 采购商品
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user