Pass.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2020/12/14
  6. * Time: 18:09
  7. */
  8. namespace app\backend\modules\refund\services\steps;
  9. use app\common\models\refund\RefundApply;
  10. use app\common\services\steps\BaseStepFactory;
  11. class Pass extends BaseStepFactory
  12. {
  13. public function getTitle()
  14. {
  15. if ($this->finishStatus()) {
  16. return '售后审核通过';
  17. }
  18. return '待审核';
  19. }
  20. public function getDescription()
  21. {
  22. if ($this->finishStatus() && !is_null($this->model->operate_time)) {
  23. return $this->model->operate_time->toDateTimeString();
  24. }
  25. return '';
  26. }
  27. public function getStatus()
  28. {
  29. if ($this->finishStatus()) {
  30. return 'finish';
  31. } elseif ($this->processStatus()) {
  32. return 'process';
  33. } elseif ($this->waitStatus()) {
  34. return 'wait';
  35. }
  36. return 'error';
  37. }
  38. public function isShow()
  39. {
  40. return $this->model->status == RefundApply::WAIT_CHECK || !is_null($this->model->operate_time);
  41. }
  42. public function waitStatus()
  43. {
  44. return true;
  45. }
  46. public function processStatus()
  47. {
  48. return $this->model->status == RefundApply::WAIT_CHECK;
  49. }
  50. public function finishStatus()
  51. {
  52. return !is_null($this->model->operate_time);
  53. }
  54. public function sort()
  55. {
  56. return 10;
  57. }
  58. }