bill.go 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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 string `bson:"price,omitempty" json:"price"`
  17. Price2 string `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. 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. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  51. //纸张类采购
  52. Paper []*PaperBill `bson:"papers,omitempty" json:"papers"`
  53. // 工序管理
  54. Process *ProcessBill `bson:"process,omitempty" json:"process"`
  55. // 序号
  56. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  57. Remark string `bson:"remark,omitempty" json:"remark"`
  58. }
  59. // 工艺生产数据
  60. type ProduceBillData struct {
  61. //名字
  62. Name string `bson:"name,omitempty" json:"name"`
  63. //规格(质量要求)
  64. Norm string `bson:"norm,omitempty" json:"norm"`
  65. //单价 数量
  66. Price float64 `bson:"price,omitempty" json:"price"`
  67. Price2 float64 `bson:"price2,omitempty" json:"price2"`
  68. //数量
  69. Count int `bson:"count,omitempty" json:"count"`
  70. //备注
  71. Remark string `bson:"remark,omitempty" json:"remark"`
  72. //纸张
  73. Paper string `bson:"paper,omitempty" json:"paper"`
  74. //来纸尺寸
  75. PaperSize string `bson:"paperSize,omitempty" json:"paperSize"`
  76. //印刷尺寸
  77. PrintSize string `bson:"printSize,omitempty" json:"printSize"`
  78. //交货时间
  79. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  80. // todo
  81. // 单位成品数
  82. BatchSize int `bson:"batchSize,omitempty" json:"batchSize"`
  83. // 确认收货数量
  84. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  85. // 结算数量
  86. SetCount int `bson:"setCount,omitempty" json:"setCount"`
  87. // 结算金额
  88. SetAmount float64 `bson:"setAmount,omitempty" json:"setAmount"`
  89. }
  90. type ProduceBill struct {
  91. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  92. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  93. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  94. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  95. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  96. UserName string `bson:"userName,omitempty" json:"userName"`
  97. // 类别
  98. Type string `bson:"type,omitempty" json:"type"`
  99. // 进行中 created 已完成 complete 已弃用 deprecated
  100. Status string `bson:"status,omitempty" json:"status"`
  101. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  102. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  103. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  104. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  105. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  106. //确认收货数量
  107. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  108. //供应商
  109. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  110. //送货地址
  111. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  112. //商品名字
  113. ProductName string `bson:"productName,omitempty" json:"productName"`
  114. //纸张类采购
  115. Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"`
  116. // 序号
  117. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  118. }