bill.go 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  22. //备注
  23. Remark string `bson:"remark,omitempty" json:"remark"`
  24. //备注
  25. ConfirmCount string `bson:"confirmCount,omitempty" json:"confirmCount"`
  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. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  74. //备注
  75. Remark string `bson:"remark,omitempty" json:"remark"`
  76. //纸张
  77. Paper string `bson:"paper,omitempty" json:"paper"`
  78. //来纸尺寸
  79. PaperSize string `bson:"paperSize,omitempty" json:"paperSize"`
  80. //印刷尺寸
  81. PrintSize string `bson:"printSize,omitempty" json:"printSize"`
  82. //交货时间
  83. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  84. // 确认收货数量
  85. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  86. // 确认收货数量
  87. BatchCount int `bson:"batchCount,omitempty" json:"batchCount"`
  88. // 工艺数量
  89. CraftNum int `bson:"craftNum,omitempty" json:"craftNum"`
  90. }
  91. type ProduceBill struct {
  92. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  93. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  94. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  95. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  96. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  97. UserName string `bson:"userName,omitempty" json:"userName"`
  98. // 类别
  99. Type string `bson:"type,omitempty" json:"type"`
  100. // 进行中 created 已完成 complete 已弃用 deprecated
  101. Status string `bson:"status,omitempty" json:"status"`
  102. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  103. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  104. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  105. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  106. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  107. //确认收货数量
  108. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  109. // 实际金额
  110. RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"`
  111. // 预算金额
  112. BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"`
  113. //供应商
  114. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  115. //送货地址
  116. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  117. //商品名字
  118. ProductName string `bson:"productName,omitempty" json:"productName"`
  119. //纸张类采购
  120. Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"`
  121. // 序号
  122. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  123. }
  124. // 成品采购单据
  125. type ProductBill struct {
  126. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  127. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  128. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  129. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  130. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  131. UserName string `bson:"userName,omitempty" json:"userName"`
  132. // 类别
  133. Type string `bson:"type,omitempty" json:"type"`
  134. // 进行中 created 已完成 complete 已弃用 deprecated
  135. Status string `bson:"status,omitempty" json:"status"`
  136. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  137. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  138. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  139. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  140. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  141. //确认收货数量
  142. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  143. // 实际金额
  144. RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"`
  145. // 预算金额
  146. BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"`
  147. //供应商
  148. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  149. //送货地址
  150. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  151. //商品名字
  152. ProductName string `bson:"productName,omitempty" json:"productName"`
  153. //有哪些成品采购数据
  154. Products []*ProductBillData `bson:"products,omitempty" json:"products"`
  155. // 序号
  156. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  157. //备注
  158. Remark string `bson:"remark,omitempty" json:"remark"`
  159. }
  160. // 工艺生产数据
  161. type ProductBillData struct {
  162. //名字
  163. Name string `bson:"name,omitempty" json:"name"`
  164. //规格(质量要求)
  165. Norm string `bson:"norm,omitempty" json:"norm"`
  166. //单价 数量
  167. Price float64 `bson:"price,omitempty" json:"price"`
  168. // 下单数量
  169. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  170. //备注
  171. Remark string `bson:"remark,omitempty" json:"remark"`
  172. //交货时间
  173. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  174. // 确认收货数量
  175. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  176. //纸张
  177. Unit string `bson:"unit,omitempty" json:"unit"`
  178. }