Files
service/erp/shipment/mixed.go
kanade 5555a14c3c feat(erp): 新增多模块驳回功能及搜索筛选字段
- 新增做账合同一键驳回方法(accounting.Reject)
- 新增报销单驳回方法(expense.Reject)
- 新增付款申请单驳回方法(request.Reject)
- 出运发票搜索新增创建人精确筛选字段(CreatedStaffId)
- 产品搜索新增工厂名称筛选字段(FactoryName)
- 应收款搜索新增收汇客户名称筛选字段(RecCustomName)
2026-11-03 14:44:06 +08:00

71 lines
1.6 KiB
Go

package shipment
import (
"context"
"time"
"git.kumo.work/shama/service/client"
mixed2 "git.kumo.work/shama/service/erp/shipment/mixed"
"git.kumo.work/shama/service/lib/bean"
)
type mixed struct {
Mixed mixed2.Mixed
}
type ArgsMixedList struct {
Page bean.Page
Search MixedSearch
}
type MixedSearch struct {
InvoiceSerial string // 出运发票号
CreatedStaffId int64 // 创建人(精确筛选)
CreatedStaffIds []int64 // 业务员筛选
}
type ReplyMixedList struct {
List []MixedItem `json:"list"`
Total int64 `json:"total"`
}
type MixedItem struct {
Id int64 `json:"id"`
ShipmentId int64 `json:"shipmentId"`
InvoiceSerial string `json:"invoiceSerial"`
CreatedStaffId int64 `json:"createdStaffId"`
CreatedAt *time.Time `json:"createdAt"`
}
// List @TITLE 列表
func (m *mixed) List(ctx context.Context, args ArgsMixedList) (reply ReplyMixedList, err error) {
xClient, err := client.GetClient(m)
if err != nil {
return
}
err = xClient.Call(ctx, "List", args, &reply)
return
}
type ArgsMixedGen struct {
ShipmentId int64 // 订舱单id
StaffId int64 // 业务员id
}
// Gen @TITLE 生成
func (m *mixed) Gen(ctx context.Context, args ArgsMixedGen) (mixedId int64, err error) {
xClient, err := client.GetClient(m)
if err != nil {
return mixedId, err
}
err = xClient.Call(ctx, "Gen", args, &mixedId)
return
}
// Delete @TITLE 删除
func (m *mixed) Delete(ctx context.Context, mixedId int64) (err error) {
xClient, err := client.GetClient(m)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Delete", mixedId, &reply)
}