PurchaseOrder.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Model;
  3. class PurchaseOrder extends UseScopeBaseModel
  4. {
  5. protected $table = "purchase_order"; //指定表
  6. const CREATED_AT = 'crt_time';
  7. const UPDATED_AT = 'upd_time';
  8. protected $dateFormat = 'U';
  9. const State_minus_one = -1;//驳回
  10. const STATE_ZERO = 0;//未确认
  11. const STATE_ONE = 1;//待确认
  12. const STATE_TWO = 2;//未入库
  13. const STATE_Three = 3;//待入库
  14. const STATE_Four = 4;//已入库
  15. const prefix = 'CG';
  16. public static $name = [
  17. self::State_minus_one => '驳回',
  18. self::STATE_ZERO => '未确认',
  19. self::STATE_ONE => '待确认',
  20. self::STATE_TWO => '已审核',
  21. self::STATE_Three => '已发货',
  22. self::STATE_Four => '已入库',
  23. ];
  24. const Order_type_one = 1;//总社采购
  25. const Order_type_two = 2;//分社外采
  26. const Order_type_three = 3;//分社要货 不要合同
  27. const Order_type_four = 4;//分社订货 要合同
  28. const Order_type_five = 5;
  29. public static $order_type = [
  30. self::Order_type_one => '总社采购',
  31. self::Order_type_two => '分社外采',
  32. self::Order_type_three => '分社要货',
  33. self::Order_type_four => '分社订货',
  34. ];
  35. const range_function = 'purchaseRange';
  36. const is_check_function = 'purchaseCheck';
  37. }