bill.go 4.6 KB

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