HappinessEnum.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. namespace addons\Happiness\common\enums;
  3. use common\enums\AddonsEnum;
  4. /**
  5. * Class AddonsCouponEnum
  6. * @package addons\Coupon\common\enums
  7. */
  8. class HappinessEnum
  9. {
  10. const ADDONS_NAME = AddonsEnum::ADDONS_NAME_HAPPINESS;
  11. const STORE_GLOBAL_STATISTICS_YESTERDAY = 'happiness_store_global_statistics_yesterday';
  12. const STORE_REAL_PAY_AMOUNTS = 'happiness_store_real_pay_amounts';
  13. const STORE_NOT_SETTLE_AMOUNTS = 'happiness_store_not_settle_amounts';
  14. const STORE_SETTLE_AMOUNTS = 'happiness_store_settle_amounts';
  15. const STORE_PAY_ORDER_NUMBERS = 'happiness_store_pay_order_numbers';
  16. const STORE_PAY_PEOPLE_NUMBERS_SET = 'happiness_store_pay_people_numbers_set';
  17. const STORE_PAY_PEOPLE_NUMBERS = 'happiness_store_pay_people_numbers';
  18. const STORE_WAITING_AUDIT_STORE_NUMBERS = 'happiness_store_waiting_audit_store_numbers';
  19. const NOT_PAY = 0;
  20. const PAY = 1;
  21. const SHIPMENTS = 2;
  22. const SING = 3;
  23. const ACCOMPLISH = 4;
  24. const REPEAL = -4;
  25. const ALL = 999;
  26. // 自提状态
  27. const TAKE = 6;// 待自提
  28. const TAKE_FINISH = 7;// 自提成功
  29. const CHECK_ADOPT=1;//审核通过
  30. const CHECK_WAITING=0;//待审核
  31. const CHECK_FAILED=2;// 审核未通过
  32. const AGENT_PROVINCE=1;//省代
  33. const AGENT_CITY=2;//市代
  34. const AGENT_DISTRICT=3;//区代
  35. const MOVE_NO_AUDIT=0;
  36. const MOVE_AUDIT_SUCCESS=1;
  37. const MOVE_AUDIT_FAILED=2;
  38. public static function getMoveStatusMap(): array
  39. {
  40. return [
  41. self::MOVE_NO_AUDIT => '待调货',
  42. self::MOVE_AUDIT_SUCCESS => '已调货',
  43. self::MOVE_AUDIT_FAILED => '拒绝调货',
  44. ];
  45. }
  46. public static function getMap(): array
  47. {
  48. return [
  49. self::NOT_PAY => '待付款',
  50. self::PAY => '待配送', // 已付款
  51. self::SHIPMENTS => '已发货',
  52. self::SING => '已送达',
  53. self::ACCOMPLISH => '已完成',
  54. self::TAKE => '待自提',
  55. self::TAKE_FINISH => '自提成功',
  56. self::REPEAL => '已关闭',
  57. self::ALL => '全部',
  58. ];
  59. }
  60. public static function setpArrMap($order_status,$shipping_type_text,$shipping_type_fields = '')
  61. {
  62. switch ($order_status) {
  63. case self::REPEAL :
  64. $setpArr = [
  65. [
  66. 'title' => '买家下单',
  67. 'field' => 'created_at',
  68. ],
  69. [
  70. 'title' => '交易关闭',
  71. 'field' => 'close_time',
  72. ],
  73. ];
  74. break;
  75. default :
  76. $setpArr = [
  77. [
  78. 'title' => '买家下单',
  79. 'field' => 'created_at',
  80. ],
  81. [
  82. 'title' => '买家付款',
  83. 'field' => 'pay_time',
  84. ],
  85. [
  86. 'title' => '门店配送',
  87. 'field' => 'sign_time',
  88. ],
  89. [
  90. 'title' => '交易完成',
  91. 'field' => 'finish_time',
  92. ],
  93. ];
  94. }
  95. return $setpArr;
  96. }
  97. }