添加追加商品功能
This commit is contained in:
parent
d11f17c532
commit
b1a318ff13
@ -4,6 +4,7 @@ type BusinessType = string // 业务类型
|
|||||||
const (
|
const (
|
||||||
BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核
|
BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核
|
||||||
BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核
|
BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核
|
||||||
|
BusinessTypeSaleAppendAudit BusinessType = "saleAuditAppend" // 销售合同追加商品
|
||||||
BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核
|
BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核
|
||||||
BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核
|
BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核
|
||||||
BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核
|
BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核
|
||||||
@ -12,6 +13,7 @@ const (
|
|||||||
var BusinessTypeName = map[BusinessType]string{
|
var BusinessTypeName = map[BusinessType]string{
|
||||||
BusinessTypeSaleAudit: "销售合同审核",
|
BusinessTypeSaleAudit: "销售合同审核",
|
||||||
BusinessTypeSaleAuditClose: "销售合同关单审核",
|
BusinessTypeSaleAuditClose: "销售合同关单审核",
|
||||||
|
BusinessTypeSaleAppendAudit: "销售合同追加商品审核",
|
||||||
BusinessTypePurchaseAudit: "采购合同审核",
|
BusinessTypePurchaseAudit: "采购合同审核",
|
||||||
BusinessTypeShipmentAudit: "订舱单审核",
|
BusinessTypeShipmentAudit: "订舱单审核",
|
||||||
BusinessTypeAccountingAudit: "做账合同审核",
|
BusinessTypeAccountingAudit: "做账合同审核",
|
||||||
|
94
erp/sale/append.go
Normal file
94
erp/sale/append.go
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
package sale
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"git.kumo.work/shama/service/client"
|
||||||
|
)
|
||||||
|
|
||||||
|
type append struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// List @TITLE 产品列表
|
||||||
|
func (a *append) List(ctx context.Context, args ArgsProductList) (reply ReplyProductList, err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "List", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
type ArgsAppendAllSearch struct {
|
||||||
|
SaleId int64 // 销售合同id
|
||||||
|
WorkflowId int64 // 审核id
|
||||||
|
}
|
||||||
|
|
||||||
|
// All @TITLE 获取产品
|
||||||
|
func (a *append) All(ctx context.Context, args ArgsAppendAllSearch) (reply []ProductItem, err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "All", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add @TITLE 添加商品
|
||||||
|
func (a *append) Add(ctx context.Context, args ArgsProductAdd) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
return xClient.Call(ctx, "Add", args, &reply)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info @TITLE 产品详情
|
||||||
|
func (a *append) Info(ctx context.Context, saleProductId int64) (reply ReplyProductInfo, err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Info", saleProductId, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Infos @TITLE 产品详情
|
||||||
|
func (a *append) Infos(ctx context.Context, saleProductIds []int64) (reply []ReplyProductInfo, err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Infos", saleProductIds, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Edit @TITLE 编辑产品
|
||||||
|
func (a *append) Edit(ctx context.Context, args ArgsProductEdit) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
return xClient.Call(ctx, "Edit", args, &reply)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MultiEdit @TITLE 批量编辑
|
||||||
|
func (a *append) MultiEdit(ctx context.Context, args []MultiData) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
return xClient.Call(ctx, "MultiEdit", args, &reply)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete @TITLE 删除产品
|
||||||
|
func (a *append) Delete(ctx context.Context, saleProductIds []int64) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
return xClient.Call(ctx, "Delete", saleProductIds, &reply)
|
||||||
|
}
|
@ -34,3 +34,14 @@ func (a *audit) Cancel(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
|||||||
err = xClient.Call(ctx, "Cancel", args, &reply)
|
err = xClient.Call(ctx, "Cancel", args, &reply)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Append @TITLE 追加商品审核
|
||||||
|
func (a *audit) Append(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||||
|
xClient, err := client.GetClient(a)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reply := 0
|
||||||
|
err = xClient.Call(ctx, "Append", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -5,4 +5,5 @@ type Sale struct {
|
|||||||
Product product
|
Product product
|
||||||
Audit audit
|
Audit audit
|
||||||
Benefit benefit
|
Benefit benefit
|
||||||
|
Append append
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,8 @@ type ReplyNodeList struct {
|
|||||||
}
|
}
|
||||||
type NodeItem struct {
|
type NodeItem struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
|
WorkflowId int64 `json:"workflowId"`
|
||||||
|
ReviewStaffId int64 `json:"reviewStaffId"`
|
||||||
BusinessId int64 `json:"businessId"`
|
BusinessId int64 `json:"businessId"`
|
||||||
BusinessName string `json:"businessName"`
|
BusinessName string `json:"businessName"`
|
||||||
BusinessType string `json:"businessType"`
|
BusinessType string `json:"businessType"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user