base_distributor.go 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. Fill this file as you wish.
  3. // ==========================================================================
  4. package base
  5. import (
  6. "dashoo.cn/opms_libary/request"
  7. "github.com/gogf/gf/os/gtime"
  8. "dashoo.cn/micro/app/model/base/internal"
  9. )
  10. // BaseDistributor is the golang structure for table base_distributor.
  11. type BaseDistributor internal.BaseDistributor
  12. // Fill with you ideas below.
  13. type BaseDistributorSearchReq struct {
  14. DistCode string `json:"distCode"` // 经销商code
  15. DistName string `json:"distName"` // 经销商名称
  16. BelongSale string `json:"belongSale"` // 所属经销商
  17. ProvinceId []string `json:"provinceId"` // 省份ID
  18. DistType string `json:"distType"` // 经销商类型
  19. WithStatistic bool `json:"withStatistic"` // 经销商统计
  20. BelongSaleIdList []int64 `json:"belongSaleIdList"` //销售id
  21. request.PageReq
  22. }
  23. type BaseDistributorStatistic struct {
  24. ProjectNum int `json:"projectNum"` // ABC项目总数量
  25. AllProductAmount float64 `json:"allProductAmount"` // ABC项目出货总金额(项目出货金额字段)
  26. SaledProjectNum int `json:"saledProjectNum"` // 成交项目数量
  27. SaledAmount float64 `json:"saledAmount"` // 成交总金额
  28. UnpaidAmount float64 `json:"unpaidAmount"` // 未回款总金额
  29. InvoicedAmount float64 `json:"invoicedAmount"` // 开票总金额
  30. }
  31. type BaseDistributorListRsp struct {
  32. BaseDistributor
  33. BaseDistributorStatistic
  34. YearTarget float64 `json:"yearTarget"` // 年度代理指标
  35. }
  36. // 创建经销商字段
  37. type AddDistributor struct {
  38. DistType string `json:"distType" v:"required#经销商类型不能为空"` // 经销商类型 10 经销商 20 代理商
  39. DistName string `json:"distName" v:"required#经销商名称不能为空"` // 经销商名称
  40. ProvinceId int `json:"provinceId" v:"required|min:1#所属省份Id不能为空|所属省份Id不能为空"` // 所属省份ID
  41. ProvinceDesc string `json:"provinceDesc" v:"required#所属省份不能为空"` // 所属省份
  42. Capital float64 `json:"capital" v:"required#注册资金不能为空" ` // 注册资金
  43. BusinessScope string `json:"businessScope" v:"required#业务范围不能为空"` // 业务范围
  44. CustomerType string `json:"customerType" v:"required#授权客户类型不能为空"` // 授权客户类型
  45. ExistedProduct string `json:"existedProduct" v:"required#已有代理品牌和产品不能为空"` // 已有代理品牌和产品
  46. AbbrName string `json:"abbrName"` // 助记名称
  47. BelongSaleId int `json:"belongSaleId" v:"required|min:1#|归属销售ID不能为空"` // 归属销售ID
  48. BelongSale string `json:"belongSale" v:"required#归属销售不能为空"` // 归属销售
  49. AssistantSaleId string `json:"assistantSaleId"` // 助理人员Id
  50. AssistantSale string `json:"assistantSale"` // 助理人员
  51. RegisterDistrict string `json:"registerDistrict"` // 注册地
  52. SaleNum int `json:"saleNum"` // 现有销售人数
  53. HistoryCustomer string `json:"historyCustomer"` // 历史合作的终端客户名称
  54. ProxyStartTime *gtime.Time `json:"proxyStartTime"` // 代理签约有效期开始(代理商)
  55. ProxyEndTime *gtime.Time `json:"proxyEndTime"` // 代理签约有效期结束(代理商)
  56. ProxyDistrict string `json:"proxyDistrict"` // 授权代理区域(代理商)
  57. ContractUrl string `json:"contractUrl"` // 代理合同(代理商)
  58. ContractFileName string `json:"contracFileName"` // 代理合同(代理商)
  59. }
  60. type DistributorToProxyReq struct {
  61. Id int `p:"id" json:"id" v:"required# id不能为空"`
  62. CustomerType string `json:"customerType" v:"required#授权客户类型不能为空"` // 授权客户类型
  63. ProxyStartTime *gtime.Time `json:"proxyStartTime" v:"required#代理签约有效期不能为空"` // 代理签约有效期开始(代理商)
  64. ProxyEndTime *gtime.Time `json:"proxyEndTime" v:"required#代理签约有效期不能为空"` // 代理签约有效期结束(代理商)
  65. ProxyDistrict string `json:"proxyDistrict" v:"required#授权代理区域不能为空"` // 授权代理区域(代理商)
  66. ContractUrl string `json:"contractUrl"` // 代理合同(代理商)
  67. ContractFileName string `json:"contracFileName"` // 代理合同(代理商)
  68. }
  69. type ToProxyApproveData struct {
  70. CustomerType string `json:"customerType"`
  71. ProxyStartTime *gtime.Time `json:"proxyStartTime"`
  72. ProxyEndTime *gtime.Time `json:"proxyEndTime"`
  73. ProxyDistrict string `json:"proxyDistrict"`
  74. ContractUrl string `json:"contractUrl"`
  75. OperatedId int `json:"operatedId"`
  76. OperatedName string `json:"operatedName"`
  77. }
  78. type ToDistApproveData struct {
  79. ToDistReason string `json:"customerType"` // 转移经销商原因
  80. OperatedId int `json:"operatedId"`
  81. OperatedName string `json:"operatedName"`
  82. }
  83. type DistributorRenewReq DistributorToProxyReq
  84. type RenewApproveData ToProxyApproveData
  85. type DistributorToDistReq struct {
  86. Id int `p:"id" json:"id" v:"required# id不能为空"`
  87. ToDistReason string `json:"customerType" v:"required#转移原因不能为空"` // 转移经销商原因
  88. }
  89. type DistributorTransRecordReq struct {
  90. request.PageReq
  91. DistId int `json:"distId"` // ID
  92. }
  93. // 编辑参数
  94. type UpdateDistributorReq struct {
  95. *AddDistributor
  96. Id int `p:"id" json:"id" v:"required# id不能为空"`
  97. }
  98. type DistributorDynamicsListReq struct {
  99. request.PageReq
  100. SearchText string `json:"searchText"` // 操作人,操作内容
  101. DistId int `json:"distId"` // ID
  102. OpnPeopleId int `json:"opnPeopleId"` // 操作人ID
  103. OpnPeople string `json:"opnPeople"` // 操作人
  104. OpnType string `json:"opnType"` // 操作类型
  105. }
  106. type DistributorProjectListReq struct {
  107. request.PageReq
  108. DistId int `json:"distId"` // 经销商/代理商ID
  109. SearchText string `json:"searchText"` // 项目名称,项目名称
  110. NboName string `json:"nboName"` // 项目名称
  111. CustName string `json:"custName"` // 项目名称
  112. CreatedTimeStart *gtime.Time `json:"createdTimeStart"` // 创建时间
  113. CreatedTimeEnd *gtime.Time `json:"createdTimeEnd"` // 创建时间
  114. }
  115. type DistributorContractListReq struct {
  116. request.PageReq
  117. DistId int `json:"distId"` // 经销商/代理商ID
  118. SearchText string `json:"searchText"` // 合同编号,合同名称,客户名称,项目名称
  119. ContractCode string `json:"contractCode"` // 合同编号
  120. ContractName string `json:"contractName"` // 合同名称
  121. CustId int `json:"custId"` // 关联客户
  122. CustName string `json:"custName"` // 客户名称
  123. NboId int `json:"nboId"` // 关联项目
  124. NboName string `json:"nboName"` // 项目名称
  125. ApproStatus string `json:"approStatus"` // 审批状态
  126. ContractType string `json:"contractType"` // 合同类型
  127. InchargeId int `json:"inchargeId"` // 负责人ID
  128. InchargeName string `json:"inchargeName"` // 负责人
  129. SignatoryId int `json:"signatoryId"` // 公司签约人ID
  130. SignatoryName string `json:"signatoryName"` // 公司签约人
  131. DistributorName string `json:"distributorName"` // 经销商
  132. }
  133. // 删除
  134. type DeleteDistributorReq struct {
  135. Ids []int64 `p:"id" json:"ids" v:"required# id不能为空"`
  136. }
  137. // SysAdminTransferDistributorReq 系统管理员转移渠道请求
  138. type SysAdminTransferDistributorReq struct {
  139. Ids []int `json:"ids" v:"required# ids不能为空"` // 主键
  140. UserId int `json:"userId" v:"required# 负责人不能为空"` // 负责人
  141. UserName string `json:"userName" v:"required# 负责人不能为空"` // 负责人
  142. Remark string `json:"remark"` // 备注
  143. }