bill.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. package model
  2. import (
  3. "time"
  4. "go.mongodb.org/mongo-driver/bson/primitive"
  5. )
  6. // 采购单
  7. type PaperBill struct {
  8. //名字
  9. Name string `bson:"name,omitempty" json:"name"`
  10. //规格
  11. Norm string `bson:"norm,omitempty" json:"norm"`
  12. //宽
  13. Width string `bson:"width,omitempty" json:"width"`
  14. //长
  15. Height string `bson:"height,omitempty" json:"height"`
  16. Price float64 `bson:"price,omitempty" json:"price"`
  17. Price2 float64 `bson:"price2,omitempty" json:"price2"`
  18. PriceUnit string `bson:"priceUnit,omitempty" json:"priceUnit"`
  19. Price2Unit string `bson:"price2Unit,omitempty" json:"price2Unit"`
  20. //数量
  21. // Count int `bson:"count,omitempty" json:"count"`
  22. // 下单数量
  23. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  24. //备注
  25. Remark string `bson:"remark,omitempty" json:"remark"`
  26. //交货时间
  27. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  28. }
  29. type PurchaseBill struct {
  30. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  31. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  32. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  33. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  34. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  35. UserName string `bson:"userName,omitempty" json:"userName"`
  36. //类别
  37. Type string `bson:"type,omitempty" json:"type"`
  38. // 进行中 created 已完成 complete 已弃用 deprecated 已审核 reviewed
  39. Status string `bson:"status,omitempty" json:"status"`
  40. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  41. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  42. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  43. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  44. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  45. //供应商
  46. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  47. //送货地址
  48. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  49. //商品名字
  50. ProductName string `bson:"productName,omitempty" json:"productName"`
  51. //纸张类采购
  52. Paper []*PaperBill `bson:"papers,omitempty" json:"papers"`
  53. // 序号
  54. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  55. Remark string `bson:"remark,omitempty" json:"remark"`
  56. // 实际金额
  57. RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"`
  58. // 预算金额
  59. BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"`
  60. //确认收货数量
  61. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  62. }
  63. // 工艺生产数据
  64. type ProduceBillData struct {
  65. //名字
  66. Name string `bson:"name,omitempty" json:"name"`
  67. //规格(质量要求)
  68. Norm string `bson:"norm,omitempty" json:"norm"`
  69. //单价 数量
  70. Price float64 `bson:"price,omitempty" json:"price"`
  71. Price2 float64 `bson:"price2,omitempty" json:"price2"`
  72. // 成品数量
  73. // Count int `bson:"count,omitempty" json:"count"`
  74. // 下单数量
  75. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  76. //备注
  77. Remark string `bson:"remark,omitempty" json:"remark"`
  78. //纸张
  79. Paper string `bson:"paper,omitempty" json:"paper"`
  80. //来纸尺寸
  81. PaperSize string `bson:"paperSize,omitempty" json:"paperSize"`
  82. //印刷尺寸
  83. PrintSize string `bson:"printSize,omitempty" json:"printSize"`
  84. //交货时间
  85. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  86. // 确认收货数量
  87. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  88. // 确认收货数量
  89. BatchCount int `bson:"batchCount,omitempty" json:"batchCount"`
  90. // 工艺数量
  91. CraftNum int `bson:"craftNum,omitempty" json:"craftNum"`
  92. }
  93. type ProduceBill struct {
  94. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  95. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  96. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  97. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  98. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  99. UserName string `bson:"userName,omitempty" json:"userName"`
  100. // 类别
  101. Type string `bson:"type,omitempty" json:"type"`
  102. // 进行中 created 已完成 complete 已弃用 deprecated
  103. Status string `bson:"status,omitempty" json:"status"`
  104. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  105. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  106. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  107. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  108. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  109. //确认收货数量
  110. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  111. // 实际金额
  112. RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"`
  113. // 预算金额
  114. BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"`
  115. //供应商
  116. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  117. //送货地址
  118. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  119. //商品名字
  120. ProductName string `bson:"productName,omitempty" json:"productName"`
  121. //纸张类采购
  122. Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"`
  123. // 序号
  124. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  125. }
  126. // 成品采购单据
  127. type ProductBill struct {
  128. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  129. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  130. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  131. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  132. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  133. UserName string `bson:"userName,omitempty" json:"userName"`
  134. // 类别
  135. Type string `bson:"type,omitempty" json:"type"`
  136. // 进行中 created 已完成 complete 已弃用 deprecated
  137. Status string `bson:"status,omitempty" json:"status"`
  138. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  139. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  140. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  141. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  142. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  143. //确认收货数量
  144. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  145. // 实际金额
  146. RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"`
  147. // 预算金额
  148. BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"`
  149. //供应商
  150. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  151. //送货地址
  152. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  153. //商品名字
  154. ProductName string `bson:"productName,omitempty" json:"productName"`
  155. //有哪些成品采购数据
  156. Products []*ProductBillData `bson:"products,omitempty" json:"products"`
  157. // 序号
  158. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  159. //备注
  160. Remark string `bson:"serialNumber,omitempty" json:"serialNumber"`
  161. }
  162. // 工艺生产数据
  163. type ProductBillData struct {
  164. //名字
  165. Name string `bson:"name,omitempty" json:"name"`
  166. //规格(质量要求)
  167. Norm string `bson:"norm,omitempty" json:"norm"`
  168. //单价 数量
  169. Price float64 `bson:"price,omitempty" json:"price"`
  170. // 下单数量
  171. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  172. //备注
  173. Remark string `bson:"remark,omitempty" json:"remark"`
  174. //交货时间
  175. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  176. // 确认收货数量
  177. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  178. //纸张
  179. Unit string `bson:"unit,omitempty" json:"unit"`
  180. }