SalesOrder.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace App\Model;
  3. class SalesOrder extends UseScopeBaseModel
  4. {
  5. protected $table = "sales_order"; //指定表
  6. const CREATED_AT = 'crt_time';
  7. const UPDATED_AT = 'upd_time';
  8. protected $dateFormat = 'U';
  9. const range_function = 'salesOrderRange';
  10. const Order_type_one = 1;//安装件
  11. const Order_type_two = 2;//快递件
  12. public static $order_type = [
  13. self::Order_type_one => '安装件',
  14. self::Order_type_two => '快递件',
  15. ];
  16. const Model_type_one = 1; // 线下订单合同
  17. const Model_type_two = 2; // 分社订货合同
  18. const Model_type_three = 3; // 二手车精品加装合同
  19. const Model_type_four = 4; // 线上订单合同
  20. public static $model_type = [
  21. self::Model_type_one,
  22. self::Model_type_two,
  23. self::Model_type_three,
  24. self::Model_type_four,
  25. ];
  26. public static $model_type_title = [
  27. self::Model_type_one => '线下订单合同',
  28. self::Model_type_two => '分社订货合同',
  29. self::Model_type_three => '二手车精品加装合同',
  30. self::Model_type_four => '线上订单合同',
  31. ];
  32. //安装件
  33. const State_zero = 0;//未确认
  34. const State_one = 1;//待确认
  35. const State_two = 2;//已确认
  36. const State_three = 3;//已派销售
  37. const State_four = 4;//已派总设或分社
  38. const State_five = 5;//已下施工单
  39. const State_six = 6;//退换货
  40. const State_seven = 7;//完结 公司
  41. const State_eight = 8;//完结 客户
  42. public static $state = [
  43. self::State_zero => '未确认',
  44. self::State_one => '待确认',
  45. self::State_two => '已确认',
  46. self::State_three => '已派销售',
  47. self::State_four => '已派总设或分社',
  48. self::State_five => '已下施工单',
  49. self::State_six => '退换货',
  50. self::State_seven => '公司完结',
  51. self::State_eight => '客户完结',
  52. ];
  53. //快递件
  54. const State2_zero = 0;//未发货
  55. const State2_one = 1;//已发货
  56. public static $state2 = [
  57. self::State2_zero => '未发货',
  58. self::State2_one => '已发货',
  59. ];
  60. //发货状态
  61. const invoice_zero = 0;//未发货
  62. const invoice_one = 1;//已发货
  63. public static $invoice_state = [
  64. self::invoice_zero => '未发货',
  65. self::invoice_one => '已发货',
  66. ];
  67. public static $prefix = [
  68. self::Model_type_one => 'T9XX.',
  69. self::Model_type_two => 'T9SO.',
  70. self::Model_type_three => 'T9XX.',
  71. self::Model_type_four => 'T9XS.'
  72. ];
  73. }