Compare commits

...

46 Commits

Author SHA1 Message Date
6ed889105a feat(erp): 添加收付款单据统计功能
- 在ReplyReceiptList中增加Count字段返回收据统计数据
- 新增ReceiptCount结构体包含EntryAmount、ReceivableFxAmount和ClaimAmount字段
- 在ReplyRequestList中增加Count字段返回请求统计数据
- 新增RequestCount结构体包含PrepaidAmount、Amount和PaidAmount字段
- 为收付款列表接口提供金额汇总统计支持
2026-02-04 09:50:04 +08:00
134fadf47c feat(erp): 添加发票编号和确认状态字段
- 在收汇认领结构体中添加发票编号字段
- 在收汇单结构体中添加确认状态字段
- 更新收汇单响应结构体以包含确认状态信息
2026-02-02 16:43:40 +08:00
1be44c0ae2 feat(erp): 扩展收汇单和报销单搜索功能
- 在收汇单搜索条件中添加付款公司、结汇银行账号、入账金额范围和金蝶同步状态字段
- 在报销单搜索条件中添加付款时间范围、审核时间范围、审核状态、实付金额范围、创建人和币种字段
- 为报销单项添加付款时间字段支持
- 优化结构体字段对齐格式
2026-02-02 16:10:18 +08:00
c778603b66 feat(erp): 更新收据和应收账款数据结构
- 在收据结构中添加付款公司字段
- 将应收账款数量类型从int64改为decimal.Decimal
- 在应收账款项目中添加发票单位字段
- 更新ik3cloud中应收账款产品项目的数量类型为decimal.Decimal
2026-01-27 14:26:36 +08:00
29fcdca8d4 feat(erp): 添加发票单位字段到应付账款模型
- 在 payable 结构体中新增 InvoiceUnit 字段
- 为 InvoiceUnit 字段添加 JSON 序列化标签
2026-01-23 16:33:18 +08:00
f87c0e2aeb refactor(erp): 将应付账款数量字段类型从整型改为高精度小数
- 修改 service/erp/payable.go 中 PayableCount 字段类型为 decimal.Decimal
- 修改 service/ik3cloud/payable.go 中 Count 字段类型为 decimal.Decimal
- 保持其他相关金额字段的数据类型一致性
- 提高数量计算的精度和准确性
2026-01-23 16:00:45 +08:00
aad11de594 feat(erp): 添加付款类型常量和费用付款单相关字段
- 新增 PaymentType 类型和 Purchase、Cost 枚举值
- 在 RequestSearch 结构体中添加 AccountingSerial 字段
- 在 RequestItem 结构体中添加 AccountingSerial、PayableSerial、PaymentType 等字段
- 在请求结构体中移除已弃用的 DueDate 和 ExpectedPayDate 字段
- 添加 PrepaidAmount 和 PaidAmount 金额相关字段
2026-01-21 13:36:08 +08:00
17adfabb44 feat(payment): 添加工作流相关字段支持
- 新增 WorkflowId 字段用于标识工作流ID
- 新增 WorkflowStatus 字段用于记录工作流状态
- 新增 WorkflowReason 字段用于存储工作流原因说明
2026-01-21 11:39:30 +08:00
1fdbc29a5c feat(erp): 添加付款单审核功能
- 新增 BusinessTypePayment 类型用于付款单审核
- 添加 payment 包结构体定义
- 扩展 PaymentSearch 结构体支持 PaymentIds 查询字段
- 在 Payment 结构体中增加 prepaidAmount 和 paidAmount 字段
- 新增 receipt 和 request 查询参数中的发票号字段
- 添加付款单审核提交接口实现
2026-01-21 11:17:56 +08:00
dc9b6a4dad feat(erp): 添加订舱修改单导出功能和提单英文品名字段
- 新增 ExportTypeShipmentModify 常量用于订舱修改单导出
- 在产品结构体中添加 BlEngName 字段用于存储提单英文品名
- 更新多个产品相关结构体以支持提单英文品名字段
- 调整 import 顺序将 time 包移到适当位置
2026-01-20 11:04:05 +08:00
c0e57856b1 feat(service): 添加应收产品项目减税差异字段
- 在 ReceivableProductItem 结构体中新增 MinusTaxDifference 字段
- 调整结构体字段排列格式以提高可读性
- 为新增字段添加 JSON 标签映射
2026-01-16 16:48:10 +08:00
a623223e67 feat(service): 添加退税差额字段到应收账款产品项
- 在ReceivableProductItem结构体中新增MinusTaxDifference字段
- 该字段用于记录退税差额信息
- 扩展了应收账款产品的税务相关数据结构
2026-01-16 15:01:17 +08:00
a3a35e37f6 feat(erp): 添加应收款项导出成本和减税相关字段
- 新增 ExportCost 字段用于记录导出成本
- 新增 MinusTaxRate 字段用于记录减税率
- 新增 MinusTaxAmount 字段用于记录减税金额
2026-01-15 14:55:38 +08:00
be1ba847f5 feat(shipment): 添加订舱单费用编辑功能
- 新增 ArgsShipmentEditCost 结构体定义费用字段
- 实现 EditCost 方法用于编辑国内运费、国外运费和佣金
- 集成客户端调用逻辑处理费用更新请求
2026-01-15 11:39:50 +08:00
361c61cbe7 fix(receipt): 修复银行账户字段映射问题
- 将银行账户字段从配置项改为付款成本项目的银行账户字段
- 解决了发票逻辑中银行账户信息错误映射的问题
2026-01-15 10:22:27 +08:00
e3874373f5 feat(erp): 添加运费和佣金字段支持
- 在 shipment 模块中新增国内运费、海外运费和海外佣金字段
- 在 receipt 模块中添加银行账户字段
- 更新 receivable 模块中的应收款项信息结构体
- 扩展 shipment 相关的数据传输对象和修改逻辑
- 为所有相关模块添加新的财务计算字段
- 重构数据结构以支持更详细的成本跟踪功能
2026-01-14 17:22:47 +08:00
88992cc8ba feat(erp): 添加应收产品项中的PI序列号字段
- 在ReceivableProductItem结构体中新增PiSerial字段
- 该字段用于存储PI序列信息并支持JSON序列化
2026-01-14 14:20:22 +08:00
0342008f42 feat(erp): 添加采购付款单和费用申请单导出类型常量
- 新增 ExportTypePaymentList 常量用于采购付款单导出
- 新增 ExportTypeRequestList 常量用于费用申请单导出
2026-01-13 12:15:32 +08:00
22af038358 refactor(dict): 修改字典查询方法参数结构
- 将 All 方法的 companyType 参数替换为 ArgsDictAll 结构体
- 更新客户端调用时传入的参数类型
- 保持方法返回值和错误处理逻辑不变
2026-01-08 13:13:59 +08:00
93524fca2f feat(erp): 添加银行账户信息字段和批量修改功能
- 在报销单、付款单和申请单中添加银行账号和账号名称字段
- 为报销单、付款单和申请单实现批量修改银行账户信息功能
- 在ik3cloud常量中添加银行账户操作类型
- 新增字典查询相关结构体和过滤条件类型
- 更新金蝶同步相关服务以支持银行账户信息处理
2026-01-08 11:54:02 +08:00
6717454a79 feat(erp): 添加付款模块功能
- 实现付款单列表查询功能,支持分页和多条件搜索
- 添加付款单生成功能,根据应付单ID创建付款单
- 集成金蝶同步功能,支持付款单数据同步到金蝶系统
- 定义完整的付款单数据结构,包含金额、币种、采购人员等字段
- 实现付款单搜索功能,支持按付款单号、合同号、时间范围等条件查询
- 添加IK3Cloud状态管理,处理金蝶同步状态和错误信息
2026-01-06 15:34:12 +08:00
fbf9ba96bc feat(payment): 添加付款用途常量定义并更新数据结构
- 定义 PaymentPurpose 类型和相关常量值
- 在 ERP 服务中添加 Payment 模块引用
- 更新 Payment 结构体中的 PaymentPurpose 字段类型
- 将字符串类型替换为常量类型以增强类型安全
- 添加采购付款单、费用报销和其他支出的用途常量
2026-01-06 15:33:39 +08:00
9f74a84866 feat(erp): 添加收款单认领状态和认领金额字段
- 在 ReceiptQuery 结构体中添加 ClaimStatus 字段用于标识认领状态
- 在 ReceiptItem 结构体中添加 ClaimAmount 字段用于记录认领金额
- 在 Receipt 结构体中添加 ClaimAmount 字段用于记录认领金额
2026-01-05 16:34:56 +08:00
b0cb790daa feat(erp): 添加收汇单付款客户信息字段
- 新增 PayCustomId 字段用于存储付款客户ID
- 新增 PayCustomName 字段用于存储付款客户名称
- 扩展收汇单数据结构以支持付款客户信息存储
2026-01-05 11:24:23 +08:00
fa5a9c9e20 feat(erp): 添加付款客户信息字段支持
- 在收据结构体中增加PayCustomId和PayCustomName字段
- 将原有的CustomId字段注释明确为付款客户id
- 在收据明细结构体中添加PayCustomId和PayCustomName字段
- 在ik3cloud收据服务中增加PayCustomNumber字段
- 保持原有客户信息字段的同时支持付款客户信息的存储
2026-01-05 11:14:26 +08:00
f6e573a132 feat(shipment): 添加兑换结算字段支持
- 在 GiftItem 结构体中添加 IsExchangeSettlement 字段
- 在 SaleProductItem 结构体中添加 IsExchangeSettlement 字段
- 更新数据结构以支持兑换结算业务场景
2026-01-05 09:58:49 +08:00
3371938767 fix(logic): 添加 Ik3cloudID 验证防止无效取消操作
- 在 expense.go 中添加 expenseThird.Ik3cloudID > 0 的验证条件
- 在 receipt.go 中添加 receiptThird.Ik3cloudID > 0 的验证条件
- 在 request.go 中添加 requestThird.Ik3cloudID > 0 的验证条件
- 避免对 Ik3cloudID 为 0 的记录执行取消操作
- 防止因无效 ID 导致的第三方支付取消失败
2026-01-04 11:38:12 +08:00
08bce95691 feat(erp): 添加报销单和申请单审核业务类型
- 新增报销单审核业务类型常量
- 新增申请单审核业务类型常量
- 扩展业务类型枚举以支持新的审核流程
2025-12-30 14:30:32 +08:00
d1008ce9e8 refactor(erp): 更新报销单和申请单业务类型常量
- 将 BusinessTypeExpense 从 "expense" 重命名为 "expenseAudit"
- 将 BusinessTypeRequest 从 "request" 重命名为 "requestAudit"
- 保持报销单和申请单的业务类型名称一致性
- 更新常量定义以更好地反映业务审核流程
2025-12-30 14:11:57 +08:00
148787617d refactor(department): 优化部门模块代码结构
- 调整部门相关代码的组织结构
- 改进部门模块的实现逻辑
- 提升代码可读性和维护性
2025-12-30 11:53:34 +08:00
9ef5fe9c57 feat(erp): 添加金蝶推送状态字段
- 在constant.go中添加Ik3cloudStatus类型和相关常量定义
- 为ExpenseItem和ReplyExpenseInfo结构体添加Ik3cloudStatus、Ik3cloudErrMsg和Ik3cloudUpdatedAt字段
- 为PayableItem和ReplyPayableInfo结构体添加Ik3cloudStatus、Ik3cloudErrMsg和Ik3cloudUpdatedAt字段
- 为receipt.go中的结构体添加Ik3cloudStatus、Ik3cloudErrMsg和Ik3cloudUpdatedAt字段
- 为receivable.go中的结构体添加Ik3cloudStatus、Ik3cloudErrMsg和Ik3cloudUpdatedAt字段
- 为request.go中的结构体添加Ik3cloudStatus、Ik3cloudErrMsg和Ik3cloudUpdatedAt字段
- 修正receivable.go中Ik3cloudStatus字段的数据类型从Flag改为int64
2025-12-23 14:29:40 +08:00
ed845dfa62 feat(erp): 添加应付账款相关序列号字段
- 在 PayableItem 结构体中添加 InvoiceSerial 字段
- 在 PayableProductItem 结构体中添加 PiSerial 字段
2025-12-23 11:14:55 +08:00
2f375087ef fix(erp): 修改应付账款服务调用方法
- 将 payable.go 中的 "List" 方法调用更改为 "Info"
- 确保正确获取单条应付账款信息而非列表
2025-12-22 15:08:30 +08:00
eeefb47f82 refactor(erp): 优化销售商品结构体字段对齐
- 移除 PurchaseProduct 结构体定义
- 调整 SaleProductAdd 和 SaleProductEdit 字段布局
- 统一结构体字段的换行与缩进格式
- 删除重复的类型声明和注释
- 保持代码风格一致性
2025-12-22 11:47:37 +08:00
6520d78067 feat(erp): 添加禁用标记字段以支持状态过滤
- 在 expense.go 中添加 BanFlag 字段用于标识报销单状态
- 在 receipt.go 中添加 BanFlag 字段用于标识结汇单状态
- 在 request.go 中添加 BanFlag 字段用于标识申请单状态
- 所有新增字段均支持 1=禁用 2=启用 的状态定义
2025-12-19 17:22:10 +08:00
3c1fa079cf feat(receipt): 添加客户编号字段
- 在 Receipt 结构体中新增 CustomNumber 字段
- 用于存储客户的唯一标识信息
- 支持后续按客户编号查询和统计功能
2025-12-19 16:58:39 +08:00
eb4c3e3241 feat(ik3cloud): 新增收款单功能并完善作废接口
- 新增收款单常量定义及映射配置
- 新增收款单类型枚举定义
- 新增收款单服务模块,支持保存和作废操作
- 在应付、应收、付款模块中补充作废接口实现
- 定义收款单保存参数结构体及费用明细结构体
2025-12-19 16:31:29 +08:00
d44f208a84 feat(erp): 更新报销单据结构并移除工作流字段
- 在 payable.go 中添加 CostAmount 字段用于加减费用金额
- 移除 request.go 中 RequestIds 字段
- 移除 RequestItem 和 ReplyRequestList 结构中的 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
2025-12-19 14:12:42 +08:00
0315faea07 feat(erp): 添加报销人字段并调整付款单结构
- 在 expense.go 的 Expense 结构体中添加 ExpenseStaffId 字段
- 在 expense.go 的 Add 和 Update 结构体中同步添加 ExpenseStaffId 字段
- 在 payment.go 中移除 SettlementMethod 和 PaymentPurpose 字段
- 在 payment.go 中保留 ExpenseItem 字段并调整其位置
2025-12-18 17:00:50 +08:00
5813fe05ce feat(erp): 添加工作流相关字段到费用和请求模型
- 在 expense.go 的 Expense 结构体中添加 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
- 在 expense.go 的 ExpenseResponse 结构体中添加 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
- 在 request.go 的 Request 结构体中添加 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
- 在 request.go 的 RequestResponse 结构体中添加 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
2025-12-18 16:37:42 +08:00
0a1d70d064 feat(erp): 为费用和请求结构体添加审计字段
- 在 expense 结构体中增加 Audit 字段
- 在 request 结构体中增加 Audit 字段
- 调整结构体字段顺序以保持一致性
2025-12-18 16:26:42 +08:00
f16cf90f12 feat(erp): 添加报销和申请审核提交功能
- 新增 expense 包下的审核提交接口
- 新增 request 包下的审核提交接口
- 实现审核提交的统一调用逻辑
- 支持指定审核人员进行审核操作
- 添加审核提交相关的参数结构体定义
2025-12-18 16:22:58 +08:00
8d5d6a6fb6 feat(erp): 新增报销单和申请单业务类型及查询功能
- 在常量定义中增加报销单和申请单业务类型
- 为报销单查询条件添加报销单ID列表过滤
- 为申请单查询条件添加申请单ID列表过滤
- 完善相关结构体字段定义以支持新功能
2025-12-18 16:20:35 +08:00
e3701c9514 feat(erp): 更新费用成本结构以支持发票编号和到期日期
- 将费用类型字段拆分为类型编号和类型名称
- 在费用添加参数中新增发票编号字段
- 在请求成本项中增加发票编号、到期日期和期望付款日期
- 更新相关结构体字段以适应新的业务需求
2025-12-18 16:03:28 +08:00
a165b59d61 feat(oa): 移除员工销售员和采购员编码字段
- 删除 XsyNumber 字段(金蝶员工销售员编码)
- 删除 CgyNumber 字段(金蝶员工采购员编码)
- 简化 Staff 结构体定义,仅保留必要字段
- 更新相关 JSON 标签以保持数据一致性
2025-12-18 14:32:12 +08:00
75e66aab81 chore: 更新部门和员工模块
- 修改了部门模块的代码结构
- 调整了员工模块的相关配置
- 优化了两个模块间的依赖关系
2025-12-18 14:31:55 +08:00
35 changed files with 1051 additions and 390 deletions

View File

@@ -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 // 费用付款单
)

View File

@@ -13,6 +13,7 @@ type Erp struct {
Template template
Accounting accounting
Payable payable
Payment payment
Receivable receivable
Receipt receipt
Expense expense

View File

@@ -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
View 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
}

View File

@@ -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 添加

View File

@@ -1,5 +1,6 @@
package expense
type Expense struct {
Cost cost
Cost cost
Audit audit
}

View File

@@ -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
View 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
View 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
View File

@@ -0,0 +1,5 @@
package payment
type Payment struct {
Audit audit
}

View File

@@ -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"`

View File

@@ -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)
}

View File

@@ -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 添加

View File

@@ -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 详情

View File

@@ -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
View 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
}

View File

@@ -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 添加

View File

@@ -1,5 +1,6 @@
package request
type Request struct {
Cost cost
Cost cost
Audit audit
}

View File

@@ -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 // 销售单价

View File

@@ -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)

View File

@@ -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"`

View File

@@ -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 编辑

View File

@@ -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 全部赠品

View File

@@ -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 编辑

View File

@@ -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 编辑

View File

@@ -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"
)

View File

@@ -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)
}

View File

@@ -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
}

View File

@@ -19,6 +19,7 @@ type Ik3cloud struct {
Dict dict // 字典
Payment payment // 付款单
Information information // 资料
Receipt receipt // 收款单
}
type Entity struct {

View File

@@ -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)
}

View File

@@ -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
View 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)
}

View File

@@ -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)
}

View File

@@ -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"` // 金蝶员工编码

View File

@@ -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"`
}