PurchaseOrder.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 invoice_state_zero = 0;//未发货
  25. const invoice_state_one = 1;//待发货
  26. public static $invoice_name = [
  27. self::invoice_state_zero => '未发货',
  28. self::invoice_state_one => '待发货',
  29. ];
  30. const Order_type_one = 1;//总社采购
  31. const Order_type_two = 2;//分社外采
  32. const Order_type_three = 3;//分社要货 不要合同
  33. const Order_type_four = 4;//分社订货 要合同
  34. const Order_type_five = 5;
  35. public static $order_type = [
  36. self::Order_type_one => '总社采购',
  37. self::Order_type_two => '分社外采',
  38. self::Order_type_three => '分社要货',
  39. self::Order_type_four => '分社订货',
  40. ];
  41. const range_function = 'purchaseRange';
  42. const is_check_function = 'purchaseCheck';
  43. public static $wait_check = [
  44. self::State_minus_one,
  45. self::STATE_ZERO,
  46. self::STATE_ONE,
  47. ];
  48. }