BatchResend.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Name: 芸众商城系统
  5. * Author: 广州市芸众信息科技有限公司
  6. * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
  7. * Date: 2021/12/27
  8. * Time: 19:09
  9. */
  10. namespace app\backend\modules\refund\services\button;
  11. use app\common\models\refund\RefundApply;
  12. class BatchResend extends RefundButtonBase
  13. {
  14. public function getApi()
  15. {
  16. return 'refund.vue-operation.batch-resend';
  17. }
  18. public function getName()
  19. {
  20. return '分批发货';
  21. }
  22. public function getValue()
  23. {
  24. return 'batch_resend';
  25. }
  26. public function enable()
  27. {
  28. return (RefundApply::WAIT_CHECK < $this->refund->status && $this->refund->status < RefundApply::WAIT_RECEIVE_RESEND_GOODS)
  29. && $this->refund->refundOrderGoods->isNotEmpty();
  30. }
  31. public function getType()
  32. {
  33. return self::TYPE_PRIMARY;
  34. }
  35. public function getDesc()
  36. {
  37. if ($this->refund->status < RefundApply::WAIT_RECEIVE_RETURN_GOODS) {
  38. return '无需客户寄回商品,商家直接发换货商品';
  39. }
  40. return '';
  41. }
  42. }