RefundStatusEnum.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace addons\TinyShop\common\enums;
  3. use common\enums\BaseEnum;
  4. /**
  5. * 退换货状态
  6. *
  7. * Class RefundStatusEnum
  8. * @package addons\TinyShop\common\enums
  9. * @author jianyan74 <751393839@qq.com>
  10. */
  11. class RefundStatusEnum extends BaseEnum
  12. {
  13. const APPLY = 10;
  14. const SALES_RETURN = 20;
  15. const AFFIRM_SALES_RETURN = 30;
  16. const AFFIRM_RETURN_MONEY = 40;
  17. const CONSENT = 50;
  18. const NO_PASS_ALWAYS = -10;
  19. const CANCEL = -20;
  20. const NO_PASS = -30;
  21. // 换货
  22. const AFFIRM_SHIPMENTS = 41;
  23. const SHIPMENTS = 42;
  24. const MEMBER_AFFIRM = 43;
  25. /**
  26. * @return array
  27. */
  28. public static function getMap(): array
  29. {
  30. return [
  31. self::APPLY => '买家退款申请', // 发起了退款申请,等待卖家处理
  32. self::SALES_RETURN => '等待买家退货', // 卖家已同意退款申请,等待买家退货
  33. self::AFFIRM_SALES_RETURN => '等待卖家确认收货', // 买家已退货,等待卖家确认收货
  34. self::AFFIRM_RETURN_MONEY => '等待卖家确认退款',
  35. self::CONSENT => '卖家同意退款',
  36. self::NO_PASS_ALWAYS => '退款已拒绝', // 不允许再次申请
  37. self::CANCEL => '退款已关闭',
  38. self::NO_PASS => '退款申请不通过',
  39. // 换货
  40. self::AFFIRM_SHIPMENTS => '等待卖家发货',
  41. self::SHIPMENTS => '等待买家收到商品',
  42. self::MEMBER_AFFIRM => '换货完成', // 等待买家确认收货
  43. ];
  44. }
  45. /**
  46. * 再退款(售后)状态
  47. *
  48. * @return array
  49. */
  50. public static function refund()
  51. {
  52. return [
  53. self::APPLY,
  54. self::SALES_RETURN,
  55. self::AFFIRM_SALES_RETURN,
  56. self::AFFIRM_RETURN_MONEY,
  57. self::AFFIRM_SHIPMENTS, // 换货
  58. self::SHIPMENTS, // 换货
  59. ];
  60. }
  61. /**
  62. * 可发货状态
  63. *
  64. * @return array
  65. */
  66. public static function deliver()
  67. {
  68. return [
  69. 0,
  70. self::NO_PASS_ALWAYS,
  71. self::CANCEL,
  72. self::NO_PASS,
  73. self::MEMBER_AFFIRM,
  74. ];
  75. }
  76. /**
  77. * 可评价状态
  78. */
  79. public static function evaluate()
  80. {
  81. return [
  82. self::NO_PASS_ALWAYS,
  83. self::CANCEL,
  84. self::MEMBER_AFFIRM,
  85. 0
  86. ];
  87. }
  88. }
粤ICP备19079148号