This commit is contained in:
守护自己的云 2024-09-03 17:47:24 +08:00
parent 05e2ab8bb8
commit f2014976c9
4 changed files with 27 additions and 4 deletions

18
erp/bean/file.go Normal file
View File

@ -0,0 +1,18 @@
package bean
import "encoding/json"
type FileData struct {
Name string `json:"name"`
Path string `json:"path"`
}
func (f FileData) ToString() string {
marshal, _ := json.Marshal(f)
return string(marshal)
}
func (f FileData) Parse(data string) FileData {
json.Unmarshal([]byte(data), &f)
return f
}

View File

@ -3,6 +3,7 @@ package erp
import (
"context"
"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"
@ -93,7 +94,7 @@ type ProductAdd struct {
EngDescription string // 英文描述
PackageDescription string // 包装中文描述
PackageEngDescription string // 包装英文描述
PackageInfoFile string // 包装描述文件
PackageInfoFile bean2.FileData // 包装描述文件
Packages []ProductPackage // 包装
Customs ProductCustoms // 海关
Quotes []product2.ArgsQuoteAdd // 工厂报价
@ -172,7 +173,7 @@ type ReplyProductInfo struct {
EngDescription string `json:"engDescription"`
PackageDescription string `json:"packageDescription"`
PackageEngDescription string `json:"packageEngDescription"`
PackageInfoFile string `json:"packageInfoFile"`
PackageInfoFile bean2.FileData `json:"packageInfoFile"`
CreatedStaffId int64 `json:"createdStaffId"`
DepartmentId int64 `json:"departmentId"`
CreatedAt *time.Time `json:"createdAt"`

View File

@ -3,6 +3,7 @@ package sale
import (
"context"
"git.kumo.work/shama/service/client"
bean2 "git.kumo.work/shama/service/erp/bean"
product2 "git.kumo.work/shama/service/erp/product"
"github.com/shopspring/decimal"
"time"
@ -82,7 +83,7 @@ type ProductAdd struct {
EngDescription string // 英文描述
PackageDescription string // 包装中文描述
PackageEngDescription string // 包装英文描述
PackageInfoFile string // 包装描述文件
PackageInfoFile bean2.FileData // 包装描述文件
Sort int64 // 排序
SaleCount int64 // 销售数量/合同数量
Packages []ProductPackage // 包装
@ -175,7 +176,7 @@ type ReplyProductInfo struct {
EngDescription string `json:"engDescription"`
PackageDescription string `json:"packageDescription"`
PackageEngDescription string `json:"packageEngDescription"`
PackageInfoFile string `json:"packageInfoFile"`
PackageInfoFile bean2.FileData `json:"packageInfoFile"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
Packages []ProductPackageInfo `json:"packages"`

View File

@ -89,6 +89,7 @@ type ShipmentAdd struct {
DeliveryCountryEng string // 运抵国英文
Destination string // 目的地
FactoryHaulAdress string // 工厂拖柜地址
LogisticsCompanyId int64 // 物流公司id
LogisticsCompany string // 物流公司
LogisticsCompanyContactName string // 物流公司联系人
LogisticsCompanyContactPhone string // 物流公司手机号
@ -160,6 +161,7 @@ type ReplyShipmentInfo struct {
DeliveryCountryEng string `json:"deliveryCountryEng"`
Destination string `json:"destination"`
FactoryHaulAdress string `json:"factoryHaulAdress"`
LogisticsCompanyId int64 `json:"logisticsCompanyId"`
LogisticsCompany string `json:"logisticsCompany"`
LogisticsCompanyContactName string `json:"logisticsCompanyContactName"`
LogisticsCompanyContactPhone string `json:"logisticsCompanyContactPhone"`
@ -236,6 +238,7 @@ type ArgsShipmentData struct {
Destination string // 目的地
FactoryHaulAdress string // 工厂拖柜地址
SeparableFlag int64 // 可分批标记1=可分 2=不可分)
LogisticsCompanyId int64 // 物流公司id
LogisticsCompany string // 物流公司
LogisticsCompanyContactName string // 物流公司联系人
LogisticsCompanyContactPhone string // 物流公司联系人电话