OrderGoodsEnum.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace app\common\Enum;
  3. class OrderGoodsEnum
  4. {
  5. // 发货状态
  6. const DELIVERY_STATUS_REFUSE = -1; // 已拒收
  7. const DELIVERY_STATUS_NOSEND = 0; // 未发货
  8. const DELIVERY_STATUS_SENDED = 1; // 已发货
  9. const DELIVERY_STATUS_GETED = 2; // 已收货
  10. const INSPECT_STATUS_NO = 0; // 未验货
  11. const INSPECT_STATUS_PASS = 1; // 验货通过
  12. const INSPECT_STATUS_FAIL = 2; // 验货不通过
  13. // 售后状态
  14. const AFTERSALE_STATUS_REFUSE = -1; // 拒绝
  15. const AFTERSALE_STATUS_NOAFTER = 0; // 未申请
  16. const AFTERSALE_STATUS_ING = 1; // 申请售后
  17. const AFTERSALE_STATUS_COMPLETED = 2; // 售后完成
  18. // 退款状态
  19. const REFUND_STATUS_NOREFUND = 0; // 退款状态 未申请
  20. const REFUND_STATUS_AGREE = 1; // 已同意
  21. const REFUND_STATUS_COMPLETED = 2; // 退款完成
  22. // 评价状态
  23. const COMMENT_STATUS_NO = 0; // 待评价
  24. const COMMENT_STATUS_OK = 1; // 已评价
  25. public static function getDeliveryStatusLabel($status)
  26. {
  27. return [
  28. self::DELIVERY_STATUS_REFUSE => '已拒收',
  29. self::DELIVERY_STATUS_NOSEND => '待发货',
  30. self::DELIVERY_STATUS_SENDED => '待收货',
  31. self::DELIVERY_STATUS_GETED => '已收货'
  32. ];
  33. }
  34. public static function getInspectStatusLabel($status)
  35. {
  36. return [
  37. self::INSPECT_STATUS_NO => '未验货',
  38. self::INSPECT_STATUS_PASS => '验货通过',
  39. self::INSPECT_STATUS_FAIL => '验货不通过'
  40. ];
  41. }
  42. public static function getAfterSaleStatusLabel($status)
  43. {
  44. return [
  45. self::AFTERSALE_STATUS_REFUSE => '拒绝',
  46. self::AFTERSALE_STATUS_NOAFTER => '未申请',
  47. self::AFTERSALE_STATUS_ING => '申请售后',
  48. self::AFTERSALE_STATUS_COMPLETED => '售后完成'
  49. ];
  50. }
  51. public static function getRefundStatusLabel($status)
  52. {
  53. return [
  54. self::REFUND_STATUS_NOREFUND => '未申请',
  55. self::REFUND_STATUS_AGREE => '已同意',
  56. self::REFUND_STATUS_COMPLETED => '退款完成'
  57. ];
  58. }
  59. public static function getCommentStatusLabel($status)
  60. {
  61. return [
  62. self::COMMENT_STATUS_NO => '待评价',
  63. self::COMMENT_STATUS_OK => '已评价'
  64. ];
  65. }
  66. }