部署
This commit is contained in:
parent
2c977e19e3
commit
2c467a3aec
@ -18,12 +18,14 @@ type ArgsAccountingList struct {
|
|||||||
}
|
}
|
||||||
type AccountingSearch struct {
|
type AccountingSearch struct {
|
||||||
AccountingSerial string // 做账单号
|
AccountingSerial string // 做账单号
|
||||||
|
CustomId int64 // 客户id
|
||||||
CustomName string // 客户名称
|
CustomName string // 客户名称
|
||||||
CustomShortName string // 客户简称
|
CustomShortName string // 客户简称
|
||||||
WorkflowStatus []int64 // 审批状态
|
WorkflowStatus []int64 // 审批状态
|
||||||
CreatedAtStart *time.Time // 创建开始时间
|
CreatedAtStart *time.Time // 创建开始时间
|
||||||
CreatedAtEnd *time.Time // 创建结束时间
|
CreatedAtEnd *time.Time // 创建结束时间
|
||||||
CreatedStaffIds []int64 // 创建人
|
CreatedStaffIds []int64 // 创建人
|
||||||
|
StaffIds []int64 // 业务员
|
||||||
AccountingIds []int64 // 做账id
|
AccountingIds []int64 // 做账id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package erp
|
|||||||
type BusinessType = string // 业务类型
|
type BusinessType = string // 业务类型
|
||||||
const (
|
const (
|
||||||
BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核
|
BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核
|
||||||
|
BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核
|
||||||
BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核
|
BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核
|
||||||
BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核
|
BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核
|
||||||
BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核
|
BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核
|
||||||
@ -10,6 +11,7 @@ const (
|
|||||||
|
|
||||||
var BusinessTypeName = map[BusinessType]string{
|
var BusinessTypeName = map[BusinessType]string{
|
||||||
BusinessTypeSaleAudit: "销售合同审核",
|
BusinessTypeSaleAudit: "销售合同审核",
|
||||||
|
BusinessTypeSaleAuditClose: "销售合同关单审核",
|
||||||
BusinessTypePurchaseAudit: "采购合同审核",
|
BusinessTypePurchaseAudit: "采购合同审核",
|
||||||
BusinessTypeShipmentAudit: "订舱单审核",
|
BusinessTypeShipmentAudit: "订舱单审核",
|
||||||
BusinessTypeAccountingAudit: "做账合同审核",
|
BusinessTypeAccountingAudit: "做账合同审核",
|
||||||
@ -24,6 +26,12 @@ const (
|
|||||||
AuditStatusCancel AuditStatus = 5 // 审核撤回
|
AuditStatusCancel AuditStatus = 5 // 审核撤回
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ProductMold = int64 // 产品类型
|
||||||
|
const (
|
||||||
|
ProductMoldSingle ProductMold = 1 // 单件
|
||||||
|
ProductMoldSuite ProductMold = 2 // 套件
|
||||||
|
)
|
||||||
|
|
||||||
type IsOpen = int64 // 开启状态
|
type IsOpen = int64 // 开启状态
|
||||||
const (
|
const (
|
||||||
IsOpenTrue IsOpen = 1 // 开启
|
IsOpenTrue IsOpen = 1 // 开启
|
||||||
|
@ -86,6 +86,7 @@ type ProductAdd struct {
|
|||||||
SalePrice *decimal.Decimal // 销售单价
|
SalePrice *decimal.Decimal // 销售单价
|
||||||
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
||||||
Mold int64 // 组成类型 1=单件 2=套件
|
Mold int64 // 组成类型 1=单件 2=套件
|
||||||
|
MoldCount int64 // 子组件数量
|
||||||
ParentId int64 // 子套件父级ID
|
ParentId int64 // 子套件父级ID
|
||||||
Type string // 产品类型
|
Type string // 产品类型
|
||||||
Barcode string // 条形码
|
Barcode string // 条形码
|
||||||
@ -155,6 +156,7 @@ type ProductCustomsInfo struct {
|
|||||||
type ReplyProductInfo struct {
|
type ReplyProductInfo struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Mold int64 `json:"mold"`
|
Mold int64 `json:"mold"`
|
||||||
|
MoldCount int64 `json:"moldCount"`
|
||||||
Serial string `json:"serial"`
|
Serial string `json:"serial"`
|
||||||
CustomSerial string `json:"customSerial"`
|
CustomSerial string `json:"customSerial"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
@ -19,10 +19,15 @@ type ArgsPurchaseList struct {
|
|||||||
type PurchaseSearch struct {
|
type PurchaseSearch struct {
|
||||||
PiSerial string // 采购合同编号
|
PiSerial string // 采购合同编号
|
||||||
PoSerial string // po
|
PoSerial string // po
|
||||||
|
CustomId int64 // 客户id
|
||||||
CustomShortName string // 客户简称
|
CustomShortName string // 客户简称
|
||||||
CreatedStaffIds []int64 // 创建人筛选
|
CreatedStaffIds []int64 // 创建人筛选
|
||||||
|
StaffIds []int64 // 业务员
|
||||||
FactoryName string // 采购工厂
|
FactoryName string // 采购工厂
|
||||||
PurchaseIds []int64 // 采购id
|
PurchaseIds []int64 // 采购id
|
||||||
|
OrderDateStart *time.Time // 下单日期
|
||||||
|
OrderDateEnd *time.Time // 下单日期
|
||||||
|
WorkflowStatus []int64 // 状态
|
||||||
}
|
}
|
||||||
type ReplyPurchaseList struct {
|
type ReplyPurchaseList struct {
|
||||||
List []PurchaseItem `json:"list"`
|
List []PurchaseItem `json:"list"`
|
||||||
@ -43,6 +48,8 @@ type PurchaseItem struct {
|
|||||||
WorkflowStatus int64 `json:"workflowStatus"`
|
WorkflowStatus int64 `json:"workflowStatus"`
|
||||||
FactoryName string `json:"factoryName"`
|
FactoryName string `json:"factoryName"`
|
||||||
FactoryId int64 `json:"factoryId"`
|
FactoryId int64 `json:"factoryId"`
|
||||||
|
ProductAmount decimal.Decimal `json:"productAmount"`
|
||||||
|
CostAmount decimal.Decimal `json:"costAmount"`
|
||||||
CreatedAt *time.Time `json:"createdAt"`
|
CreatedAt *time.Time `json:"createdAt"`
|
||||||
UpdatedAt *time.Time `json:"updatedAt"`
|
UpdatedAt *time.Time `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ type product struct {
|
|||||||
}
|
}
|
||||||
type ProductItem struct {
|
type ProductItem struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
|
SaleProductId int64 `json:"saleProductId"`
|
||||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||||
PurchaseCount int64 `json:"purchaseCount"`
|
PurchaseCount int64 `json:"purchaseCount"`
|
||||||
BoxCount int64 `json:"boxCount"`
|
BoxCount int64 `json:"boxCount"`
|
||||||
|
28
erp/sale.go
28
erp/sale.go
@ -20,11 +20,16 @@ type SaleSearch struct {
|
|||||||
PiSerial string // pi
|
PiSerial string // pi
|
||||||
PoSerial string // po
|
PoSerial string // po
|
||||||
CustomIds []int64 // 客户
|
CustomIds []int64 // 客户
|
||||||
|
CustomShortName string // 客户简称
|
||||||
PurchaseStatus []int64 // 采购状态
|
PurchaseStatus []int64 // 采购状态
|
||||||
ShipmentStatus []int64 // 出舱状态
|
ShipmentStatus []int64 // 出舱状态
|
||||||
CreatedStaffIds []int64 // 业务员
|
CreatedStaffIds []int64 // 业务员
|
||||||
|
StaffIds []int64 // 业务员
|
||||||
SaleIds []int64 // 销售id
|
SaleIds []int64 // 销售id
|
||||||
|
ContractDateStart *time.Time // 合同日期
|
||||||
|
ContractDateEnd *time.Time // 合同日期
|
||||||
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
||||||
|
WorkflowStatus []int64 // 审批状态
|
||||||
}
|
}
|
||||||
type ReplySaleList struct {
|
type ReplySaleList struct {
|
||||||
List []SaleItem `json:"list"`
|
List []SaleItem `json:"list"`
|
||||||
@ -88,6 +93,9 @@ type SaleItem struct {
|
|||||||
CreatedStaffId int64 `json:"createdStaffId"`
|
CreatedStaffId int64 `json:"createdStaffId"`
|
||||||
CreatedAt *time.Time `json:"createdAt"`
|
CreatedAt *time.Time `json:"createdAt"`
|
||||||
UpdatedAt *time.Time `json:"updatedAt"`
|
UpdatedAt *time.Time `json:"updatedAt"`
|
||||||
|
CloseWorkflowId int64 `json:"closeWorkflowId"`
|
||||||
|
CloseWorkflowStatus int64 `json:"closeWorkflowStatus"`
|
||||||
|
BanFlag int64 `json:"banFlag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List @TITLE 销售合同列表
|
// List @TITLE 销售合同列表
|
||||||
@ -224,6 +232,10 @@ type ReplySaleInfo struct {
|
|||||||
CreatedStaffId int64 `json:"createdStaffId"`
|
CreatedStaffId int64 `json:"createdStaffId"`
|
||||||
CreatedAt *time.Time `json:"createdAt"`
|
CreatedAt *time.Time `json:"createdAt"`
|
||||||
UpdatedAt *time.Time `json:"updatedAt"`
|
UpdatedAt *time.Time `json:"updatedAt"`
|
||||||
|
BanFlag int64 `json:"banFlag"`
|
||||||
|
CloseWorkflowId int64 `json:"closeWorkflowId"`
|
||||||
|
CloseWorkflowStatus int64 `json:"closeWorkflowStatus"`
|
||||||
|
CloseWorkflowReason string `json:"closeWorkflowReason"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info @TITLE 销售合同详情
|
// Info @TITLE 销售合同详情
|
||||||
@ -250,3 +262,19 @@ func (s *sale) Edit(ctx context.Context, args ArgsSaleEdit) (err error) {
|
|||||||
reply := 0
|
reply := 0
|
||||||
return xClient.Call(ctx, "Edit", args, &reply)
|
return xClient.Call(ctx, "Edit", args, &reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ArgsSaleClone struct {
|
||||||
|
StaffId int64 // 员工id
|
||||||
|
SaleId int64 // saleId
|
||||||
|
PiSerial string // PI number
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone @TITLE 销售合同克隆
|
||||||
|
func (s *sale) Clone(ctx context.Context, args ArgsSaleClone) (reply int64, err error) {
|
||||||
|
xClient, err := client.GetClient(s)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Clone", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -23,3 +23,14 @@ func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
|||||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cancel @TITLE 提交审核
|
||||||
|
func (a *audit) Cancel(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
err = xClient.Call(ctx, "Cancel", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,7 @@ type BenefitProductItem struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
EngName string `json:"engName"`
|
EngName string `json:"engName"`
|
||||||
Mold int64 `json:"mold"`
|
Mold int64 `json:"mold"`
|
||||||
|
MoldCount int64 `json:"moldCount"`
|
||||||
FactoryId int64 `json:"factoryId"`
|
FactoryId int64 `json:"factoryId"`
|
||||||
FactoryName string `json:"factoryName"`
|
FactoryName string `json:"factoryName"`
|
||||||
FactorySerial string `json:"factorySerial"`
|
FactorySerial string `json:"factorySerial"`
|
||||||
|
@ -24,6 +24,7 @@ type ProductSearch struct {
|
|||||||
Serial string // 货号
|
Serial string // 货号
|
||||||
CreatedStaffIds []int64 // 录入人
|
CreatedStaffIds []int64 // 录入人
|
||||||
SaleIds []int64 // 销售合同id
|
SaleIds []int64 // 销售合同id
|
||||||
|
ParentIds []int64 // 父id
|
||||||
}
|
}
|
||||||
type ReplyProductList struct {
|
type ReplyProductList struct {
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
@ -89,6 +90,7 @@ func (p *product) List(ctx context.Context, args ArgsProductList) (reply ReplyPr
|
|||||||
type ProductItem struct {
|
type ProductItem struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Mold int64 `json:"mold"`
|
Mold int64 `json:"mold"`
|
||||||
|
MoldCount int64 `json:"moldCount"`
|
||||||
ParentId int64 `json:"parentId"`
|
ParentId int64 `json:"parentId"`
|
||||||
Serial string `json:"serial"`
|
Serial string `json:"serial"`
|
||||||
Po string `json:"po"`
|
Po string `json:"po"`
|
||||||
@ -155,6 +157,7 @@ type ProductAdd struct {
|
|||||||
SalePrice decimal.Decimal // 销售单价
|
SalePrice decimal.Decimal // 销售单价
|
||||||
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
||||||
Mold int64 // 组成类型 1=单件 2=套件
|
Mold int64 // 组成类型 1=单件 2=套件
|
||||||
|
MoldCount int64 // 子组件数量
|
||||||
Type string // 产品类型
|
Type string // 产品类型
|
||||||
Barcode string // 条形码
|
Barcode string // 条形码
|
||||||
SellCountry string // 销售国家
|
SellCountry string // 销售国家
|
||||||
@ -240,6 +243,7 @@ type ReplyProductInfo struct {
|
|||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
ProductId int64 `json:"productId"`
|
ProductId int64 `json:"productId"`
|
||||||
Mold int64 `json:"mold"`
|
Mold int64 `json:"mold"`
|
||||||
|
MoldCount int64 `json:"moldCount"`
|
||||||
Serial string `json:"serial"`
|
Serial string `json:"serial"`
|
||||||
CustomSerial string `json:"customSerial"`
|
CustomSerial string `json:"customSerial"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -336,6 +340,7 @@ type ProductEdit struct {
|
|||||||
SalePrice decimal.Decimal // 销售单价
|
SalePrice decimal.Decimal // 销售单价
|
||||||
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
BanFlag int64 // 禁用标记 1=禁用,2=可用
|
||||||
Mold int64 // 组成类型 1=单件 2=套件
|
Mold int64 // 组成类型 1=单件 2=套件
|
||||||
|
MoldCount int64 // 子组件数量
|
||||||
Type string // 产品类型
|
Type string // 产品类型
|
||||||
Barcode string // 条形码
|
Barcode string // 条形码
|
||||||
SellCountry string // 销售国家
|
SellCountry string // 销售国家
|
||||||
@ -380,6 +385,21 @@ func (p *product) MultiEdit(ctx context.Context, args []MultiData) (err error) {
|
|||||||
return xClient.Call(ctx, "MultiEdit", args, &reply)
|
return xClient.Call(ctx, "MultiEdit", args, &reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ChangeCount struct {
|
||||||
|
SaleProductId int64 // 产品id
|
||||||
|
SaleCount int64 // 销售数量
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChangeCount @TITLE 修改数量
|
||||||
|
func (p *product) ChangeCount(ctx context.Context, args []ChangeCount) (err error) {
|
||||||
|
xClient, err := client.GetClient(p)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
return xClient.Call(ctx, "ChangeCount", args, &reply)
|
||||||
|
}
|
||||||
|
|
||||||
// Delete @TITLE 删除产品
|
// Delete @TITLE 删除产品
|
||||||
func (p *product) Delete(ctx context.Context, saleProductIds []int64) (err error) {
|
func (p *product) Delete(ctx context.Context, saleProductIds []int64) (err error) {
|
||||||
xClient, err := client.GetClient(p)
|
xClient, err := client.GetClient(p)
|
||||||
|
@ -21,9 +21,14 @@ type ShipmentSearch struct {
|
|||||||
InvoiceSerial string // 出运发票号
|
InvoiceSerial string // 出运发票号
|
||||||
CustomIds []int64 // 客户筛选
|
CustomIds []int64 // 客户筛选
|
||||||
StaffIds []int64 // 业务员筛选
|
StaffIds []int64 // 业务员筛选
|
||||||
|
CreatedStaffIds []int64 // 业务员筛选
|
||||||
WorkflowStatus []int64 // 审核状态
|
WorkflowStatus []int64 // 审核状态
|
||||||
IsAudit int64 // 审核状态 是否审核 1=是 2=否
|
IsAudit int64 // 审核状态 是否审核 1=是 2=否
|
||||||
ShipmentIds []int64 // 出舱id
|
ShipmentIds []int64 // 出舱id
|
||||||
|
InvoiceDateStart *time.Time // 发票日期
|
||||||
|
InvoiceDateEnd *time.Time // 发票日期
|
||||||
|
ContractDateStart *time.Time // 合同日期
|
||||||
|
ContractDateEnd *time.Time // 合同日期
|
||||||
}
|
}
|
||||||
type ReplyShipmentList struct {
|
type ReplyShipmentList struct {
|
||||||
List []ShipmentItem `json:"list"`
|
List []ShipmentItem `json:"list"`
|
||||||
|
@ -29,6 +29,7 @@ type ReplyExchangeSettlementList struct {
|
|||||||
|
|
||||||
type ExchangeSettlementItem struct {
|
type ExchangeSettlementItem struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
|
ShipmentId int64 `json:"shipmentId"`
|
||||||
InvoiceSerial string `json:"invoiceSerial"`
|
InvoiceSerial string `json:"invoiceSerial"`
|
||||||
ExchangeSettlementNo string `json:"exchangeSettlementNo"`
|
ExchangeSettlementNo string `json:"exchangeSettlementNo"`
|
||||||
ContractDate *time.Time `json:"contractDate"`
|
ContractDate *time.Time `json:"contractDate"`
|
||||||
|
@ -12,6 +12,9 @@ type saleProduct struct {
|
|||||||
|
|
||||||
type SaleProductItem struct {
|
type SaleProductItem struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
|
Mold int64 `json:"mold"`
|
||||||
|
ParentSaleProductId int64 `json:"parentSaleProductId"`
|
||||||
|
SaleProductId int64 `json:"saleProductId"`
|
||||||
PiSerial string `json:"piSerial"`
|
PiSerial string `json:"piSerial"`
|
||||||
Sort int64 `json:"sort"`
|
Sort int64 `json:"sort"`
|
||||||
Po string `json:"po"`
|
Po string `json:"po"`
|
||||||
@ -74,6 +77,7 @@ type SaleProductItem struct {
|
|||||||
IsCustoms int64 `json:"isCustoms"`
|
IsCustoms int64 `json:"isCustoms"`
|
||||||
CreatedAt *time.Time `json:"createdAt"`
|
CreatedAt *time.Time `json:"createdAt"`
|
||||||
UpdatedAt *time.Time `json:"updatedAt"`
|
UpdatedAt *time.Time `json:"updatedAt"`
|
||||||
|
Children []*SaleProductItem `json:"children"`
|
||||||
}
|
}
|
||||||
type ArgsSaleProductSearch struct {
|
type ArgsSaleProductSearch struct {
|
||||||
ShipmentId int64 // 出舱单
|
ShipmentId int64 // 出舱单
|
||||||
|
@ -19,6 +19,7 @@ type ArgsWorkflowList struct {
|
|||||||
type WorkflowSearch struct {
|
type WorkflowSearch struct {
|
||||||
BusinessId int64 // 业务id
|
BusinessId int64 // 业务id
|
||||||
BusinessType string
|
BusinessType string
|
||||||
|
BusinessTypes []string
|
||||||
Status AuditStatus
|
Status AuditStatus
|
||||||
AuditStaffIds []int64 // 审核人
|
AuditStaffIds []int64 // 审核人
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ type NodeSearch struct {
|
|||||||
StaffIds []int64 // 员工筛选
|
StaffIds []int64 // 员工筛选
|
||||||
Status []int64 // 状态筛选
|
Status []int64 // 状态筛选
|
||||||
BusinessType string // 业务类型
|
BusinessType string // 业务类型
|
||||||
|
BusinessTypes []string // 业务类型
|
||||||
}
|
}
|
||||||
type ReplyNodeList struct {
|
type ReplyNodeList struct {
|
||||||
List []NodeItem `json:"list"`
|
List []NodeItem `json:"list"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user