Resend.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2020/12/10
  6. * Time: 17:16
  7. */
  8. namespace app\backend\modules\refund\services\button;
  9. use app\frontend\modules\refund\models\RefundApply;
  10. class Resend extends RefundButtonBase
  11. {
  12. public function getApi()
  13. {
  14. return 'refund.vue-operation.resend';
  15. }
  16. public function getName()
  17. {
  18. $name = '确认发货';
  19. return $name;
  20. }
  21. public function getValue()
  22. {
  23. return 5;
  24. }
  25. public function enable()
  26. {
  27. return (RefundApply::WAIT_CHECK < $this->refund->status && $this->refund->status < RefundApply::WAIT_RESEND_GOODS) &&
  28. $this->refund->status != RefundApply::WAIT_RESEND_GOODS;
  29. }
  30. public function getType()
  31. {
  32. return self::TYPE_PRIMARY;
  33. }
  34. public function getDesc()
  35. {
  36. if ($this->refund->status < RefundApply::WAIT_RECEIVE_RETURN_GOODS) {
  37. return '无需客户寄回商品,商家直接发换货商品';
  38. }
  39. return '';
  40. }
  41. }