Compare commits
46 Commits
ec74ebbca5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ed889105a | |||
| 134fadf47c | |||
| 1be44c0ae2 | |||
| c778603b66 | |||
| 29fcdca8d4 | |||
| f87c0e2aeb | |||
| aad11de594 | |||
| 17adfabb44 | |||
| 1fdbc29a5c | |||
| dc9b6a4dad | |||
| c0e57856b1 | |||
| a623223e67 | |||
| a3a35e37f6 | |||
| be1ba847f5 | |||
| 361c61cbe7 | |||
| e3874373f5 | |||
| 88992cc8ba | |||
| 0342008f42 | |||
| 22af038358 | |||
| 93524fca2f | |||
| 6717454a79 | |||
| fbf9ba96bc | |||
| 9f74a84866 | |||
| b0cb790daa | |||
| fa5a9c9e20 | |||
| f6e573a132 | |||
| 3371938767 | |||
| 08bce95691 | |||
| d1008ce9e8 | |||
| 148787617d | |||
| 9ef5fe9c57 | |||
| ed845dfa62 | |||
| 2f375087ef | |||
| eeefb47f82 | |||
| 6520d78067 | |||
| 3c1fa079cf | |||
| eb4c3e3241 | |||
| d44f208a84 | |||
| 0315faea07 | |||
| 5813fe05ce | |||
| 0a1d70d064 | |||
| f16cf90f12 | |||
| 8d5d6a6fb6 | |||
| e3701c9514 | |||
| a165b59d61 | |||
| 75e66aab81 |
@@ -12,6 +12,9 @@ const (
|
||||
BusinessTypeShipmentModifyAudit BusinessType = "shipmentModifyAudit" // 订舱单修改单审核
|
||||
BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核
|
||||
BusinessTypeAccountingAuditV2 BusinessType = "accountingAuditV2" // 做账合同审核
|
||||
BusinessTypeExpense BusinessType = "expenseAudit" // 报销单
|
||||
BusinessTypeRequest BusinessType = "requestAudit" // 申请单
|
||||
BusinessTypePayment BusinessType = "paymentAudit" // 申请单
|
||||
)
|
||||
|
||||
var BusinessTypeName = map[BusinessType]string{
|
||||
@@ -24,6 +27,9 @@ var BusinessTypeName = map[BusinessType]string{
|
||||
BusinessTypeShipmentModifyAudit: "订舱修改单审核",
|
||||
BusinessTypeAccountingAudit: "做账合同审核",
|
||||
BusinessTypeAccountingAuditV2: "做账合同审核",
|
||||
BusinessTypeExpense: "报销单审核",
|
||||
BusinessTypeRequest: "申请单审核",
|
||||
BusinessTypePayment: "付款单审核",
|
||||
}
|
||||
|
||||
type AuditStatus = int64 // 审核状态
|
||||
@@ -54,6 +60,7 @@ const (
|
||||
ExportTypeSaleBenefit = "saleBenefit" // 效益测算导出
|
||||
ExportTypePurchase = "purchase" // 采购导出
|
||||
ExportTypeShipment = "shipment" // 订舱导出
|
||||
ExportTypeShipmentModify = "shipmentModify" // 订舱修改单导出
|
||||
ExportTypeShipmentInfo = "shipmentInfo" // 出运明细导出
|
||||
ExportTypeSerial = "serial" // 商检导出
|
||||
ExportTypeCustoms = "customs" // 报关导出
|
||||
@@ -62,6 +69,8 @@ const (
|
||||
ExportTypeAccountingFactory = "accountingFactory" // 做账工厂导出
|
||||
ExportTypeAccountingV2 = "accountingV2" // 做账导出
|
||||
ExportTypeAccountingFactoryV2 = "accountingFactoryV2" // 做账工厂导出
|
||||
ExportTypePaymentList = "paymentList" // 采购付款单
|
||||
ExportTypeRequestList = "requestList" // 费用申请单
|
||||
)
|
||||
|
||||
type BanFlag = int64 // 出舱状态
|
||||
@@ -87,3 +96,18 @@ const (
|
||||
DomesticFeeTypeForeign DomesticFeeType = 1 // 外币
|
||||
DomesticFeeTypeRMB DomesticFeeType = 2 // 人民币
|
||||
)
|
||||
|
||||
type Ik3cloudStatus = int64 // 金蝶推送状态
|
||||
const (
|
||||
Ik3cloudStatusNone Ik3cloudStatus = 1 // 未推送
|
||||
Ik3cloudStatusIng Ik3cloudStatus = 2 // 推送中
|
||||
Ik3cloudStatusSuccess Ik3cloudStatus = 3 // 推送成功
|
||||
Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败
|
||||
)
|
||||
|
||||
type PaymentType = int64
|
||||
|
||||
const (
|
||||
PaymentTypePurchase PaymentType = 1 // 采购付款单
|
||||
PaymentTypeCost PaymentType = 2 // 费用付款单
|
||||
)
|
||||
|
||||
@@ -13,6 +13,7 @@ type Erp struct {
|
||||
Template template
|
||||
Accounting accounting
|
||||
Payable payable
|
||||
Payment payment
|
||||
Receivable receivable
|
||||
Receipt receipt
|
||||
Expense expense
|
||||
|
||||
111
erp/expense.go
111
erp/expense.go
@@ -21,23 +21,37 @@ type ExpenseSearch struct {
|
||||
ExpenseSerial string // 报销单号
|
||||
CreatedAtStart *time.Time // 创建开始时间
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
ExpenseIds []int64 // 报销单id
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
type ReplyExpenseList struct {
|
||||
List []ExpenseItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type ExpenseItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ExpenseSerial string `json:"expenseSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Remarks string `json:"remarks"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Id int64 `json:"id"`
|
||||
ExpenseSerial string `json:"expenseSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
ExpenseStaffId int64 `json:"expenseStaffId"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
@@ -60,7 +74,9 @@ type ExpenseAdd struct {
|
||||
CurrencySymbol string // 币种符号
|
||||
CurrencyRate decimal.Decimal // 币种汇率
|
||||
Remarks string // 备注
|
||||
Amount decimal.Decimal // 金额
|
||||
ExpenseStaffId int64 // 报销人
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -74,17 +90,27 @@ func (r *expense) Add(ctx context.Context, args ArgsExpenseAdd) (expenseId int64
|
||||
}
|
||||
|
||||
type ReplyExpenseInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
ExpenseSerial string `json:"expenseSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Id int64 `json:"id"`
|
||||
ExpenseSerial string `json:"expenseSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
ExpenseStaffId int64 `json:"expenseStaffId"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// Info @TITLE 详情
|
||||
@@ -111,3 +137,42 @@ func (r *expense) Edit(ctx context.Context, args ArgsExpenseEdit) (err error) {
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Edit", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsExpenseChange struct {
|
||||
ExpenseIds []int64 // 报销单id
|
||||
ExpenseChangeItem
|
||||
}
|
||||
type ExpenseChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (r *expense) BatchChange(ctx context.Context, args ArgsExpenseChange) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 同步
|
||||
func (r *expense) Ik3cloud(ctx context.Context, expenseId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Ik3cloud", expenseId, &reply)
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *expense) Cancel(ctx context.Context, expenseId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", expenseId, &reply)
|
||||
}
|
||||
|
||||
26
erp/expense/audit.go
Normal file
26
erp/expense/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package expense
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
ExpenseId int64 // 报销单id
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
@@ -26,7 +26,8 @@ type CostItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ExpenseId int64 `json:"expenseId"`
|
||||
Date time.Time `json:"date"`
|
||||
Type int64 `json:"type"`
|
||||
TypeNumber string `json:"typeNumber"`
|
||||
TypeName string `json:"typeName"`
|
||||
Value string `json:"value"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
DepartmentId int64 `json:"departmentId"`
|
||||
@@ -46,12 +47,14 @@ func (c *cost) List(ctx context.Context, args ArgsCostList) (reply ReplyCostList
|
||||
}
|
||||
|
||||
type ArgsCostAdd struct {
|
||||
ExpenseId int64 // 报销单ID
|
||||
Date time.Time // 费用日期
|
||||
Type int64 // 费用类型
|
||||
Value string // 费用名称
|
||||
Amount decimal.Decimal // 金额
|
||||
DepartmentId int64 // 部门
|
||||
ExpenseId int64 // 报销单ID
|
||||
Date time.Time // 费用日期
|
||||
TypeNumber string // 费用类型
|
||||
TypeName string // 费用类型名称
|
||||
Value string // 费用名称
|
||||
Amount decimal.Decimal // 金额
|
||||
DepartmentId int64 // 部门
|
||||
InvoiceSerial string // 发票编号
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package expense
|
||||
|
||||
type Expense struct {
|
||||
Cost cost
|
||||
Cost cost
|
||||
Audit audit
|
||||
}
|
||||
|
||||
@@ -28,19 +28,22 @@ type ReplyPayableList struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type PayableItem struct {
|
||||
Id int64 `json:"id"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
IsConfirm int64 `json:"isConfirm"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Id int64 `json:"id"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
IsConfirm int64 `json:"isConfirm"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
@@ -54,32 +57,35 @@ func (p *payable) List(ctx context.Context, args ArgsPayableList) (reply ReplyPa
|
||||
}
|
||||
|
||||
type ReplyPayableInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
FactoryBank string `json:"factoryBank"`
|
||||
FactoryBankAccount string `json:"factoryBankAccount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
IsConfirm int64 `json:"isConfirm"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Products []PayableProductItem `json:"products"`
|
||||
Costs []PayableCostItem `json:"costs"`
|
||||
Id int64 `json:"id"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
IsConfirm int64 `json:"isConfirm"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Products []PayableProductItem `json:"products"`
|
||||
Costs []PayableCostItem `json:"costs"`
|
||||
}
|
||||
|
||||
type PayableProductItem struct {
|
||||
Id int64 `json:"id"`
|
||||
AccountingProductId int64 `json:"accountingProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
Name string `json:"name"`
|
||||
Serial string `json:"serial"`
|
||||
PayableCount int64 `json:"payableCount"`
|
||||
PayableCount decimal.Decimal `json:"payableCount"`
|
||||
InvoiceUnit string `json:"invoiceUnit"`
|
||||
AddTaxRate decimal.Decimal `json:"addTaxRate"`
|
||||
UnitPrice decimal.Decimal `json:"unitPrice"`
|
||||
ExTaxUnitPrice decimal.Decimal `json:"exTaxUnitPrice"`
|
||||
@@ -89,10 +95,11 @@ type PayableProductItem struct {
|
||||
}
|
||||
|
||||
type PayableCostItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
Id int64 `json:"id"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
Name string `json:"name"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
}
|
||||
|
||||
// Info @TITLE 详情
|
||||
@@ -101,7 +108,7 @@ func (p *payable) Info(ctx context.Context, payableId int64) (reply ReplyPayable
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "List", payableId, &reply)
|
||||
err = xClient.Call(ctx, "Info", payableId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -114,3 +121,13 @@ func (p *payable) Confirm(ctx context.Context, payableId int64) (err error) {
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Confirm", payableId, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶同步
|
||||
func (p *payable) Ik3cloud(ctx context.Context, payableId int64) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Ik3cloud", payableId, &reply)
|
||||
}
|
||||
|
||||
108
erp/payment.go
Normal file
108
erp/payment.go
Normal file
@@ -0,0 +1,108 @@
|
||||
package erp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
payment2 "git.kumo.work/shama/service/erp/payment"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type payment struct {
|
||||
payment2.Payment
|
||||
}
|
||||
type ArgsPaymentList struct {
|
||||
Page bean.Page
|
||||
Search PaymentSearch
|
||||
}
|
||||
type PaymentSearch struct {
|
||||
PaymentIds []int64 // 付款单id
|
||||
PaymentSerial string // 付款单号
|
||||
AccountingSerial string // 做账合同号
|
||||
CreatedAtStart *time.Time
|
||||
CreatedAtEnd *time.Time
|
||||
PurchaseStaffIds []int64 // 采购人员
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
type ReplyPaymentList struct {
|
||||
Total int64 `json:"total"`
|
||||
List []PaymentItem `json:"list"`
|
||||
}
|
||||
type PaymentItem struct {
|
||||
Id int64 `json:"id"`
|
||||
PaymentSerial string `json:"paymentSerial"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaidAmount decimal.Decimal `json:"paidAmount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
func (p *payment) List(ctx context.Context, args ArgsPaymentList) (reply ReplyPaymentList, err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Gen @TITLE 生成付款单
|
||||
func (p *payment) Gen(ctx context.Context, payableId int64) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Gen", payableId, &reply)
|
||||
}
|
||||
|
||||
type ArgsPaymentChange struct {
|
||||
PaymentIds []int64
|
||||
PaymentChangeItem
|
||||
}
|
||||
type PaymentChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (p *payment) BatchChange(ctx context.Context, args ArgsPaymentChange) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶同步
|
||||
func (p *payment) Ik3cloud(ctx context.Context, paymentId int64) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Ik3cloud", paymentId, &reply)
|
||||
}
|
||||
26
erp/payment/audit.go
Normal file
26
erp/payment/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package payment
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
PaymentId int64 // 付款单
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
5
erp/payment/payment.go
Normal file
5
erp/payment/payment.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package payment
|
||||
|
||||
type Payment struct {
|
||||
Audit audit
|
||||
}
|
||||
@@ -2,12 +2,13 @@ package erp
|
||||
|
||||
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 {
|
||||
@@ -40,6 +41,7 @@ type ProductItem struct {
|
||||
CustomSerial string `json:"customSerial"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CategoryId *int64 `json:"categoryId"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
@@ -81,6 +83,7 @@ type ProductAdd struct {
|
||||
CustomSerial string // 客户货号
|
||||
Name string // 中文品名
|
||||
EngName string // 英文品名
|
||||
BlEngName string // 提单英文品名
|
||||
CategoryId *int64 // 类目ID
|
||||
Weight *decimal.Decimal // 重量
|
||||
Texture string // 材质
|
||||
@@ -163,6 +166,7 @@ type ReplyProductInfo struct {
|
||||
CustomSerial string `json:"customSerial"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
CategoryId *int64 `json:"categoryId"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
|
||||
@@ -18,33 +18,63 @@ type ArgsReceiptList struct {
|
||||
Search ReceiptSearch
|
||||
}
|
||||
type ReceiptSearch struct {
|
||||
ReceiptSerial string // 收汇单号
|
||||
PayName string // 付款单位
|
||||
BankName string // 结汇银行
|
||||
ReceiptDateStart *time.Time // 创建开始时间
|
||||
ReceiptDateEnd *time.Time // 创建结束时间
|
||||
ReceiptSerial string // 收汇单号
|
||||
CustomId int64 // 客户筛选
|
||||
CustomName string // 客户筛选
|
||||
PayCustomId int64 // 付款客户
|
||||
PayCustomName string // 付款客户名称
|
||||
BankName string // 结汇银行
|
||||
ReceiptDateStart *time.Time // 创建开始时间
|
||||
ReceiptDateEnd *time.Time // 创建结束时间
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
ClaimStatus int64 // 认领状态 1=待认领 2=部分认领 3=已认领
|
||||
InvoiceSerialEq string // 发票号
|
||||
PayCompany string // 付款公司
|
||||
BankAccount string // 结汇银行账号
|
||||
EntryAmountStart *decimal.Decimal // 入账金额开始
|
||||
EntryAmountEnd *decimal.Decimal // 入账金额结束
|
||||
Ik3cloudStatus int64 // 金蝶同步状态 1=待同步 2=同步成功 3=同步失败
|
||||
IsConfirm int64 // 确认状态 1=已确认 2=待确认
|
||||
}
|
||||
type ReplyReceiptList struct {
|
||||
List []ReceiptItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
Count ReceiptCount `json:"count"`
|
||||
}
|
||||
type ReceiptItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ReceiptSerial string `json:"receiptSerial"`
|
||||
PayName string `json:"payName"`
|
||||
CustomId int64 `json:"customId"`
|
||||
CustomName string `json:"customName"`
|
||||
PayCustomId int64 `json:"payCustomId"`
|
||||
PayCustomName string `json:"payCustomName"`
|
||||
PayCompany string `json:"payCompany"`
|
||||
ReceiptDate time.Time `json:"receiptDate"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
EntryAmount decimal.Decimal `json:"entryAmount"`
|
||||
ReceivableFxAmount decimal.Decimal `json:"receivableFxAmount"`
|
||||
ClaimAmount decimal.Decimal `json:"claimAmount"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
IsConfirm int64 `json:"isConfirm"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type ReceiptCount struct {
|
||||
EntryAmount decimal.Decimal `json:"entryAmount"`
|
||||
ReceivableFxAmount decimal.Decimal `json:"receivableFxAmount"`
|
||||
ClaimAmount decimal.Decimal `json:"claimAmount"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
func (r *receipt) List(ctx context.Context, args ArgsReceiptList) (reply ReplyReceiptList, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
@@ -65,7 +95,9 @@ type ReceiptAdd struct {
|
||||
CurrencyName string // 币种名称
|
||||
CurrencySymbol string // 币种符号
|
||||
CurrencyRate decimal.Decimal // 币种汇率
|
||||
PayName string // 付款单位
|
||||
PayCustomId int64 // 付款客户id
|
||||
PayCompany string // 付款公司
|
||||
BankAccount string // 结汇银行账号
|
||||
BankName string // 结汇银行
|
||||
EntryAmount decimal.Decimal // 外币入账金额
|
||||
ForeignFee decimal.Decimal // 国外扣费
|
||||
@@ -91,14 +123,24 @@ type ReplyReceiptInfo struct {
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
PayName string `json:"payName"`
|
||||
CustomId int64 `json:"customId"`
|
||||
CustomName string `json:"customName"`
|
||||
PayCustomId int64 `json:"payCustomId"`
|
||||
PayCustomName string `json:"payCustomName"`
|
||||
PayCompany string `json:"payCompany"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
EntryAmount decimal.Decimal `json:"entryAmount"`
|
||||
ForeignFee decimal.Decimal `json:"foreignFee"`
|
||||
DomesticFee decimal.Decimal `json:"domesticFee"`
|
||||
DomesticFeeType int64 `json:"domesticFeeType"`
|
||||
ReceivableFxAmount decimal.Decimal `json:"receivableFxAmount"`
|
||||
ClaimAmount decimal.Decimal `json:"claimAmount"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
@@ -127,3 +169,23 @@ func (r *receipt) Edit(ctx context.Context, args ArgsReceiptEdit) (err error) {
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Edit", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶同步
|
||||
func (r *receipt) Ik3cloud(ctx context.Context, receiptId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Ik3cloud", receiptId, &reply)
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *receipt) Cancel(ctx context.Context, receiptId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", receiptId, &reply)
|
||||
}
|
||||
|
||||
@@ -50,10 +50,11 @@ type ArgsClaimAdd struct {
|
||||
ClaimAdd
|
||||
}
|
||||
type ClaimAdd struct {
|
||||
ReceiptId int64 // 收汇单ID
|
||||
ReceivableId int64 // 应收单ID
|
||||
Amount decimal.Decimal // 应收金额
|
||||
Remarks string // 备注
|
||||
ReceiptId int64 // 收汇单ID
|
||||
ReceivableId int64 // 应收单ID
|
||||
Amount decimal.Decimal // 应收金额
|
||||
Remarks string // 备注
|
||||
InvoiceSerial string // 发票编号
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
|
||||
@@ -18,6 +18,7 @@ type ArgsReceivableList struct {
|
||||
type ReceivableSearch struct {
|
||||
ReceivableSerial string // 收款单据号
|
||||
CustomId int64 // 客户id
|
||||
CustomName string // 客户名称
|
||||
InvoiceSerial string // 出运发票号
|
||||
CreatedAtStart *time.Time // 创建开始时间
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
@@ -39,7 +40,9 @@ type ReceivableItem struct {
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CreatedStaffID int64 `json:"createdStaffID"`
|
||||
Ik3cloudStatus Flag `json:"ik3CloudStatus"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
@@ -55,36 +58,47 @@ func (r *receivable) List(ctx context.Context, args ArgsReceivableList) (reply R
|
||||
}
|
||||
|
||||
type ReplyReceivableInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
ReceivableSerial string `json:"receivableSerial"`
|
||||
CustomName string `json:"customName"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
ReceivableAmount decimal.Decimal `json:"receivableAmount"`
|
||||
ReceivedAmount decimal.Decimal `json:"receivedAmount"`
|
||||
OutstandingAmount decimal.Decimal `json:"outstandingAmount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CreatedStaffID int64 `json:"createdStaffID"`
|
||||
Ik3cloudStatus Flag `json:"ik3CloudStatus"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Products []ReceivableProductItem `json:"products"`
|
||||
Id int64 `json:"id"`
|
||||
ReceivableSerial string `json:"receivableSerial"`
|
||||
CustomName string `json:"customName"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
ReceivableAmount decimal.Decimal `json:"receivableAmount"`
|
||||
ReceivedAmount decimal.Decimal `json:"receivedAmount"`
|
||||
OutstandingAmount decimal.Decimal `json:"outstandingAmount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"`
|
||||
ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"`
|
||||
ForeignCommission decimal.Decimal `json:"foreignCommission"`
|
||||
CreatedStaffID int64 `json:"createdStaffID"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Products []ReceivableProductItem `json:"products"`
|
||||
}
|
||||
|
||||
type ReceivableProductItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ShipmentProductId int64 `json:"shipmentProductId"`
|
||||
Name string `json:"name"`
|
||||
Serial string `json:"serial"`
|
||||
ReceivableCount int64 `json:"receivableCount"`
|
||||
AddTaxRate decimal.Decimal `json:"addTaxRate"`
|
||||
UnitPrice decimal.Decimal `json:"unitPrice"`
|
||||
ExTaxUnitPrice decimal.Decimal `json:"exTaxUnitPrice"`
|
||||
UnitAmount decimal.Decimal `json:"unitAmount"`
|
||||
ExTaxUnitAmount decimal.Decimal `json:"exTaxUnitAmount"`
|
||||
TaxAmount decimal.Decimal `json:"taxAmount"`
|
||||
Id int64 `json:"id"`
|
||||
ShipmentProductId int64 `json:"shipmentProductId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
Name string `json:"name"`
|
||||
Serial string `json:"serial"`
|
||||
ReceivableCount decimal.Decimal `json:"receivableCount"`
|
||||
InvoiceUnit string `json:"invoiceUnit"`
|
||||
AddTaxRate decimal.Decimal `json:"addTaxRate"`
|
||||
UnitPrice decimal.Decimal `json:"unitPrice"`
|
||||
ExTaxUnitPrice decimal.Decimal `json:"exTaxUnitPrice"`
|
||||
UnitAmount decimal.Decimal `json:"unitAmount"`
|
||||
ExTaxUnitAmount decimal.Decimal `json:"exTaxUnitAmount"`
|
||||
TaxAmount decimal.Decimal `json:"taxAmount"`
|
||||
ExportCost decimal.Decimal `json:"exportCost"`
|
||||
MinusTaxRate decimal.Decimal `json:"minusTaxRate"`
|
||||
MinusTaxAmount decimal.Decimal `json:"minusTaxAmount"`
|
||||
MinusTaxDifference decimal.Decimal `json:"minusTaxDifference"`
|
||||
}
|
||||
|
||||
// Info @TITLE 详情
|
||||
|
||||
111
erp/request.go
111
erp/request.go
@@ -18,13 +18,30 @@ type ArgsRequestList struct {
|
||||
Search RequestSearch
|
||||
}
|
||||
type RequestSearch struct {
|
||||
RequestSerial string // 报销单号
|
||||
CreatedAtStart *time.Time // 创建开始时间
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
RequestSerial string // 报销单号
|
||||
InvoiceSerial string // 发票号
|
||||
CreatedAtStart *time.Time // 创建开始时间
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
PayAtStart *time.Time // 付款开始时间
|
||||
PayAtEnd *time.Time // 付款结束时间
|
||||
AuditAtStart *time.Time // 审核开始时间
|
||||
AuditAtEnd *time.Time // 审核结束时间
|
||||
RequestIds []int64 // 申请单id
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
AccountingSerial string // 做账合同号
|
||||
WorkflowStatus int64 // 审核状态
|
||||
PaidAmountStart *decimal.Decimal // 实付金额开始
|
||||
PaidAmountEnd *decimal.Decimal // 实付金额结束
|
||||
CreatedStaffIds []int64 // 创建人
|
||||
Currency string // 币种
|
||||
Ik3cloudStatus int64 // ik3cloud状态
|
||||
}
|
||||
type ReplyRequestList struct {
|
||||
List []RequestItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
Count RequestCount `json:"count"`
|
||||
}
|
||||
type RequestItem struct {
|
||||
Id int64 `json:"id"`
|
||||
@@ -32,17 +49,38 @@ type RequestItem struct {
|
||||
FactoryName string `json:"factoryName"`
|
||||
FactoryBank string `json:"factoryBank"`
|
||||
FactoryBankAccount string `json:"factoryBankAccount"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
PaymentType int64 `json:"paymentType"`
|
||||
RequestSerial string `json:"requestSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
PayAt *time.Time `json:"payAt"`
|
||||
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaidAmount decimal.Decimal `json:"paidAmount"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
type RequestCount struct {
|
||||
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaidAmount decimal.Decimal `json:"paidAmount"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
func (r *request) List(ctx context.Context, args ArgsRequestList) (reply ReplyRequestList, err error) {
|
||||
@@ -69,6 +107,8 @@ type RequestAdd struct {
|
||||
CurrencyRate decimal.Decimal // 币种汇率
|
||||
Remarks string // 备注
|
||||
Amount decimal.Decimal // 金额
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -81,6 +121,16 @@ func (r *request) Add(ctx context.Context, args ArgsRequestAdd) (requestId int64
|
||||
return
|
||||
}
|
||||
|
||||
// Gen @TITLE 生成付款单
|
||||
func (r *request) Gen(ctx context.Context, payableId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Gen", payableId, &reply)
|
||||
}
|
||||
|
||||
type ReplyRequestInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
RequestSerial string `json:"requestSerial"`
|
||||
@@ -88,13 +138,29 @@ type ReplyRequestInfo struct {
|
||||
FactoryName string `json:"factoryName"`
|
||||
FactoryBank string `json:"factoryBank"`
|
||||
FactoryBankAccount string `json:"factoryBankAccount"`
|
||||
AccountingSerial string `json:"accountingSerial"`
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
PaymentType int64 `json:"paymentType"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaidAmount decimal.Decimal `json:"paidAmount"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
PayAt *time.Time `json:"payAt"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
@@ -123,3 +189,42 @@ func (r *request) Edit(ctx context.Context, args ArgsRequestEdit) (err error) {
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Edit", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsRequestChange struct {
|
||||
RequestIds []int64
|
||||
RequestChangeItem
|
||||
}
|
||||
type RequestChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (r *request) BatchChange(ctx context.Context, args ArgsRequestChange) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 同步
|
||||
func (r *request) Ik3cloud(ctx context.Context, requestId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Ik3cloud", requestId, &reply)
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *request) Cancel(ctx context.Context, requestId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", requestId, &reply)
|
||||
}
|
||||
|
||||
26
erp/request/audit.go
Normal file
26
erp/request/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
RequestId int64 // 申请单id
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
@@ -23,13 +23,16 @@ type ReplyCostList struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type CostItem struct {
|
||||
Id int64 `json:"id"`
|
||||
RequestId int64 `json:"requestId"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
DepartmentId int64 `json:"departmentId"`
|
||||
Remarks string `json:"remarks"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Id int64 `json:"id"`
|
||||
RequestId int64 `json:"requestId"`
|
||||
TypeNumber string `json:"typeNumber"`
|
||||
TypeName string `json:"typeName"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
DepartmentId int64 `json:"departmentId"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
Remarks string `json:"remarks"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
@@ -43,10 +46,13 @@ func (c *cost) List(ctx context.Context, args ArgsCostList) (reply ReplyCostList
|
||||
}
|
||||
|
||||
type ArgsCostAdd struct {
|
||||
RequestId int64 // 报销单ID
|
||||
Amount decimal.Decimal // 金额
|
||||
DepartmentId int64 // 部门
|
||||
Remarks string // 备注
|
||||
RequestId int64 // 报销单ID
|
||||
TypeNumber string // 费用类型
|
||||
TypeName string // 费用类型名称
|
||||
Amount decimal.Decimal // 金额
|
||||
DepartmentId int64 // 部门
|
||||
Remarks string // 备注
|
||||
InvoiceSerial string // 发票号
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package request
|
||||
|
||||
type Request struct {
|
||||
Cost cost
|
||||
Cost cost
|
||||
Audit audit
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ type ProductListItem struct {
|
||||
CustomSerial string `json:"customSerial"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
Weight *decimal.Decimal `json:"weight"`
|
||||
Texture string `json:"texture"`
|
||||
@@ -98,6 +99,7 @@ type ProductItem struct {
|
||||
CustomSerial string `json:"customSerial"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
Weight *decimal.Decimal `json:"weight"`
|
||||
Texture string `json:"texture"`
|
||||
@@ -156,6 +158,7 @@ type ProductAdd struct {
|
||||
CustomSerial string // 客户货号
|
||||
Name string // 中文品名
|
||||
EngName string // 英文品名
|
||||
BlEngName string // 提单英文品名
|
||||
Weight *decimal.Decimal // 重量
|
||||
Texture string // 材质
|
||||
SalePrice decimal.Decimal // 销售单价
|
||||
@@ -254,6 +257,7 @@ type ReplyProductInfo struct {
|
||||
CustomSerial string `json:"customSerial"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
BlEngName string `json:"blEngName"`
|
||||
ImgFilePaths []string `json:"imgFilePaths"`
|
||||
Weight *decimal.Decimal `json:"weight"`
|
||||
Texture string `json:"texture"`
|
||||
@@ -361,6 +365,7 @@ type ProductEdit struct {
|
||||
CustomSerial string // 客户货号
|
||||
Name string // 中文品名
|
||||
EngName string // 英文品名
|
||||
BlEngName string // 提单英文品名
|
||||
Weight *decimal.Decimal // 重量
|
||||
Texture string // 材质
|
||||
SalePrice decimal.Decimal // 销售单价
|
||||
|
||||
@@ -131,6 +131,9 @@ type ShipmentAdd struct {
|
||||
MarkText string // 唛头文字
|
||||
MarkImg string // 唛头图片
|
||||
SaleIds []int64 // 销售合同
|
||||
DomesticShippingCost decimal.Decimal // 国内运费
|
||||
ForeignShippingCost decimal.Decimal // 国外运费
|
||||
ForeignCommission decimal.Decimal // 国外佣金
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -214,6 +217,9 @@ type ArgsShipmentData struct {
|
||||
MarkText string // 唛头文字
|
||||
MarkImg string // 唛头图片
|
||||
VouchingClerkId int64 // 单证id
|
||||
DomesticShippingCost decimal.Decimal // 国内运费
|
||||
ForeignShippingCost decimal.Decimal // 国外运费
|
||||
ForeignCommission decimal.Decimal // 国外佣金
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
@@ -227,6 +233,24 @@ func (s *shipment) Edit(ctx context.Context, args ArgsShipmentEdit) (err error)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsShipmentEditCost struct {
|
||||
ShipmentId int64 // 订舱单id
|
||||
DomesticShippingCost decimal.Decimal // 国内运费
|
||||
ForeignShippingCost decimal.Decimal // 国外运费
|
||||
ForeignCommission decimal.Decimal // 国外佣金
|
||||
}
|
||||
|
||||
// EditCost @TITLE 编辑费用
|
||||
func (s *shipment) EditCost(ctx context.Context, args ArgsShipmentEditCost) (err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "EditCost", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (s *shipment) Customs(ctx context.Context, shipmentId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
|
||||
@@ -68,6 +68,9 @@ type ReplyShipmentInfo struct {
|
||||
TaxExemptionNature string `json:"taxExemptionNature"`
|
||||
MarkText string `json:"markText"`
|
||||
MarkImg string `json:"markImg"`
|
||||
DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"`
|
||||
ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"`
|
||||
ForeignCommission decimal.Decimal `json:"foreignCommission"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
|
||||
@@ -2,12 +2,13 @@ package shipment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
modify2 "git.kumo.work/shama/service/erp/shipment/modify"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
"time"
|
||||
)
|
||||
|
||||
type modify struct {
|
||||
@@ -144,6 +145,9 @@ type ReplyModifyInfo struct {
|
||||
TaxExemptionNature string `json:"taxExemptionNature"`
|
||||
MarkText string `json:"markText"`
|
||||
MarkImg string `json:"markImg"`
|
||||
DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"`
|
||||
ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"`
|
||||
ForeignCommission decimal.Decimal `json:"foreignCommission"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
@@ -227,6 +231,9 @@ type ArgsShipmentData struct {
|
||||
MarkText string // 唛头文字
|
||||
MarkImg string // 唛头图片
|
||||
VouchingClerkId int64 // 单证id
|
||||
DomesticShippingCost decimal.Decimal // 国内运费
|
||||
ForeignShippingCost decimal.Decimal // 海外运费
|
||||
ForeignCommission decimal.Decimal // 海外佣金
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
|
||||
@@ -17,32 +17,33 @@ type ArgsGiftSearch struct {
|
||||
}
|
||||
|
||||
type GiftItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
OuterBoxCount int64 `json:"outerBoxCount"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
Brand string `json:"brand"`
|
||||
Remark string `json:"remark"`
|
||||
Sort int64 `json:"sort"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
EngName string `json:"engName"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsMeasureUnit string `json:"customsMeasureUnit"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
CustomsDetail string `json:"customsDetail"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
ShipmentCountUnit string `json:"shipmentCountUnit"`
|
||||
OuterBoxCount int64 `json:"outerBoxCount"`
|
||||
TotalVolume decimal.Decimal `json:"totalVolume"`
|
||||
TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"`
|
||||
TotalNetWeight decimal.Decimal `json:"totalNetWeight"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
DomesticSupply string `json:"domesticSupply"`
|
||||
TaxExemption string `json:"taxExemption"`
|
||||
ContainerNumber string `json:"containerNumber"`
|
||||
SealNumber string `json:"sealNumber"`
|
||||
Brand string `json:"brand"`
|
||||
Remark string `json:"remark"`
|
||||
Sort int64 `json:"sort"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
IsExchangeSettlement int64 `json:"isExchangeSettlement"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
// All @TITLE 全部赠品
|
||||
|
||||
@@ -86,6 +86,7 @@ type SaleProductItem struct {
|
||||
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"`
|
||||
@@ -119,59 +120,54 @@ 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 // 封号
|
||||
PurchaseProducts []PurchaseProduct // 采购商品
|
||||
Children []SaleProductAdd // 子产品
|
||||
}
|
||||
type PurchaseProduct struct {
|
||||
PurchaseProductId int64 // 采购商品id
|
||||
ShipmentCount int64 // 出运数量
|
||||
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 // 封号
|
||||
Children []SaleProductAdd // 子产品
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -189,61 +185,60 @@ 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 // 封号
|
||||
PurchaseProducts []PurchaseProduct // 采购商品
|
||||
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 // 封号
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
|
||||
@@ -121,60 +121,55 @@ 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 // 封号
|
||||
PurchaseProducts []PurchaseProduct // 采购商品
|
||||
Children []SaleProductAdd // 子产品
|
||||
}
|
||||
type PurchaseProduct struct {
|
||||
PurchaseProductId int64 // 采购商品id
|
||||
ShipmentCount int64 // 出运数量
|
||||
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 // 封号
|
||||
Children []SaleProductAdd // 子产品
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -192,61 +187,60 @@ 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 // 封号
|
||||
PurchaseProducts []PurchaseProduct // 采购商品
|
||||
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 // 封号
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
|
||||
@@ -20,6 +20,8 @@ const (
|
||||
ActionExpense Action = "BD_Expense" // 费用项目
|
||||
ActionPayment Action = "AP_PAYBILL" // 付款单
|
||||
ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料
|
||||
ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单
|
||||
ActionBankAccount Action = "CN_BANKACNT" // 银行账户
|
||||
)
|
||||
|
||||
var ActionIdField = map[Action]string{
|
||||
@@ -40,6 +42,7 @@ var ActionIdField = map[Action]string{
|
||||
ActionExpense: "",
|
||||
ActionPayment: "FID",
|
||||
ActionInformation: "FEntryID",
|
||||
ActionReceiptAction: "FID",
|
||||
}
|
||||
var ActionNumberField = map[Action]string{
|
||||
ActionDepartment: "FNumber",
|
||||
@@ -59,6 +62,7 @@ var ActionNumberField = map[Action]string{
|
||||
ActionExpense: "FNumber",
|
||||
ActionPayment: "FBillNo",
|
||||
ActionInformation: "FNumber",
|
||||
ActionReceiptAction: "FBillNo",
|
||||
}
|
||||
|
||||
type OperatorType = string
|
||||
@@ -76,8 +80,29 @@ const (
|
||||
PaymentTypeRequest PaymentType = "FKDLX11_SYS" // 报销付款单
|
||||
)
|
||||
|
||||
type PaymentPurpose = string
|
||||
|
||||
const (
|
||||
PaymentPurposePurchase PaymentPurpose = "SFKYT08_SYS" // 采购付款单
|
||||
PaymentPurposeExpense PaymentPurpose = "SFKYT009" // 费用报销
|
||||
PaymentPurposeOther PaymentPurpose = "SFKYT12_SYS" // 其他支出
|
||||
)
|
||||
|
||||
type ReceiptType = string
|
||||
|
||||
const (
|
||||
ReceiptTypeReceiptFx ReceiptType = "SKDLX08_SYS" // 收汇水单
|
||||
ReceiptTypeReceipt ReceiptType = "SKDLX09_SYS" // 收款单
|
||||
)
|
||||
|
||||
type InformationType = string
|
||||
|
||||
const (
|
||||
InformationTypeInvoiceSerial InformationType = "FYP" // 采购付款单
|
||||
)
|
||||
|
||||
type FilterCompare = string
|
||||
|
||||
const (
|
||||
FilterCompareEqual FilterCompare = "67"
|
||||
)
|
||||
|
||||
@@ -46,11 +46,11 @@ func (d *department) Save(ctx context.Context, args ArgsDepartmentSave) (entity
|
||||
}
|
||||
|
||||
// Delete @TITLE 删除部门
|
||||
func (d *department) Delete(ctx context.Context, numbers []string) (err error) {
|
||||
func (d *department) Delete(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Delete", numbers, &reply)
|
||||
return xClient.Call(ctx, "Delete", args, &reply)
|
||||
}
|
||||
|
||||
@@ -20,12 +20,25 @@ type DictItem struct {
|
||||
Field8 any `json:"field8"`
|
||||
}
|
||||
|
||||
type ArgsDictAll struct {
|
||||
CompanyType constant.Action // 类型
|
||||
FilterItem []FilterItem // 筛选
|
||||
}
|
||||
type FilterItem struct {
|
||||
FieldName string `json:"FieldName"`
|
||||
Compare constant.FilterCompare `json:"Compare"`
|
||||
Value string `json:"Value"`
|
||||
Left string `json:"Left"`
|
||||
Right string `json:"Right"`
|
||||
Logic string `json:"Logic"`
|
||||
}
|
||||
|
||||
// All @TITLE 获取字典
|
||||
func (d *dict) All(ctx context.Context, companyType constant.Action) (reply []DictItem, err error) {
|
||||
func (d *dict) All(ctx context.Context, args ArgsDictAll) (reply []DictItem, err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "All", companyType, &reply)
|
||||
err = xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ type Ik3cloud struct {
|
||||
Dict dict // 字典
|
||||
Payment payment // 付款单
|
||||
Information information // 资料
|
||||
Receipt receipt // 收款单
|
||||
}
|
||||
|
||||
type Entity struct {
|
||||
|
||||
@@ -28,13 +28,15 @@ type PayableProductItem struct {
|
||||
FactoryNumber string // 工厂编码
|
||||
Number string // 商品编码
|
||||
Name string // 商品名称
|
||||
Count int64 // 数量
|
||||
Count decimal.Decimal // 数量
|
||||
UnitPrice decimal.Decimal // 含税单价
|
||||
AddTaxRate decimal.Decimal // 税率
|
||||
ExTaxUnitPrice decimal.Decimal // 不含税单价
|
||||
TaxAmount decimal.Decimal // 税额
|
||||
UnitAmount decimal.Decimal // 含税金额
|
||||
ExTaxUnitAmount decimal.Decimal // 不含税金额
|
||||
CostAmount decimal.Decimal // 加减费用金额
|
||||
Unit string // 单位
|
||||
}
|
||||
|
||||
// Save @TITLE 保存应付
|
||||
@@ -46,3 +48,13 @@ func (p *payable) Save(ctx context.Context, args ArgsPayableSave) (entity Entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (p *payable) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
@@ -31,9 +31,10 @@ type PaymentCostItem struct {
|
||||
Date time.Time // 费用日期
|
||||
InvoiceSerial string // 发票号
|
||||
DepartmentNumber string // 核算部门
|
||||
SettlementMethod string // 结算方式
|
||||
PaymentPurpose string // 付款用途
|
||||
ExpenseItem string // 费用项目
|
||||
//SettlementMethod string // 结算方式
|
||||
PaymentPurpose constant.PaymentPurpose // 付款用途
|
||||
ExpenseItem string // 费用项目
|
||||
BankAccount string // 银行账号
|
||||
}
|
||||
|
||||
// Save @TITLE 保存付款单
|
||||
@@ -45,3 +46,13 @@ func (p *payment) Save(ctx context.Context, args ArgsPaymentSave) (entity Entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (p *payment) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
55
ik3cloud/receipt.go
Normal file
55
ik3cloud/receipt.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/ik3cloud/constant"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type receipt struct {
|
||||
}
|
||||
type ArgsReceiptSave struct {
|
||||
ReceiptId int64 // 收款单ID
|
||||
Number string // 单据编号
|
||||
ReceiptType constant.ReceiptType // 收款单类型
|
||||
Date time.Time // 收款单日期
|
||||
DepartmentNumber string // 部门编号
|
||||
StaffXsyNumber string // 业务员编号
|
||||
CurrencyNumber string // 币种编号
|
||||
Rate decimal.Decimal // 汇率
|
||||
Remarks string // 备注
|
||||
Costs []ReceiptCost // 费用明细
|
||||
CustomNumber string // 客户编号
|
||||
PayCustomNumber string // 付款客户编号
|
||||
}
|
||||
|
||||
type ReceiptCost struct {
|
||||
InvoiceSerial string // 发票号
|
||||
DepartmentNumber string // 部门编号
|
||||
Amount decimal.Decimal // 金额
|
||||
Remarks string // 备注
|
||||
BankAccount string // 银行账户
|
||||
}
|
||||
|
||||
// Save @TITLE 保存收款单
|
||||
func (r *receipt) Save(ctx context.Context, args ArgsReceiptSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *receipt) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
@@ -27,18 +27,20 @@ type ArgsReceivableSave struct {
|
||||
}
|
||||
|
||||
type ReceivableProductItem struct {
|
||||
Number string // 商品编码
|
||||
Name string // 商品名称
|
||||
Count int64 // 数量
|
||||
UnitPrice decimal.Decimal // 含税单价
|
||||
AddTaxRate decimal.Decimal // 税率
|
||||
ExTaxUnitPrice decimal.Decimal // 不含税单价
|
||||
TaxAmount decimal.Decimal // 税额
|
||||
UnitAmount decimal.Decimal // 含税金额
|
||||
ExTaxUnitAmount decimal.Decimal // 不含税金额
|
||||
ExportCost decimal.Decimal // 外销成本
|
||||
MinusTaxRate decimal.Decimal // 退税率
|
||||
MinusTaxAmount decimal.Decimal // 退税额
|
||||
Number string // 商品编码
|
||||
Name string // 商品名称
|
||||
Count decimal.Decimal // 数量
|
||||
UnitPrice decimal.Decimal // 含税单价
|
||||
AddTaxRate decimal.Decimal // 税率
|
||||
ExTaxUnitPrice decimal.Decimal // 不含税单价
|
||||
TaxAmount decimal.Decimal // 税额
|
||||
UnitAmount decimal.Decimal // 含税金额
|
||||
ExTaxUnitAmount decimal.Decimal // 不含税金额
|
||||
ExportCost decimal.Decimal // 外销成本
|
||||
MinusTaxRate decimal.Decimal // 退税率
|
||||
MinusTaxAmount decimal.Decimal // 退税额
|
||||
Unit string // 单位
|
||||
MinusTaxDifference decimal.Decimal // 退税差额
|
||||
}
|
||||
|
||||
// Save @TITLE 保存应收
|
||||
@@ -50,3 +52,13 @@ func (r *receivable) Save(ctx context.Context, args ArgsReceivableSave) (entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *receivable) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
@@ -106,6 +106,16 @@ func (d *department) SetStaff(ctx context.Context, args ArgsDepartmentSetStaff)
|
||||
return xClient.Call(ctx, "SetStaff", args, &reply)
|
||||
}
|
||||
|
||||
// Parents @TITLE 获取上级部门
|
||||
func (d *department) Parents(ctx context.Context, departmentId int64) (reply []DepartmentItem, err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Parents", departmentId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplyDepartmentIk3cloudInfo struct {
|
||||
Id int64 `json:"id"` // 金蝶员工id
|
||||
Number string `json:"number"` // 金蝶员工编码
|
||||
|
||||
@@ -272,9 +272,7 @@ type ReplyStaffIk3cloudInfo struct {
|
||||
PositionId int64 `json:"positionId"` // 金蝶部门职位id
|
||||
PositionNumber string `json:"positionNumber"` // 金蝶部门职位编码
|
||||
XsyId int64 `json:"xsyId"` // 金蝶员工销售员id
|
||||
XsyNumber string `json:"xsyNumber"` // 金蝶员工销售员编码
|
||||
CgyId int64 `json:"cgyId"` // 金蝶员工采购员id
|
||||
CgyNumber string `json:"cgyNumber"` // 金蝶员工采购员编码
|
||||
Department ReplyDepartmentIk3cloudInfo `json:"department"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user