bill.go 8.0 KB

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