DetailController.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/6/22
  6. * Time: 上午11:22
  7. */
  8. namespace app\backend\modules\remittanceAudit\controllers;
  9. use app\common\components\BaseController;
  10. use app\common\exceptions\AppException;
  11. use app\common\modules\payType\remittance\models\process\RemittanceAuditProcess;
  12. class DetailController extends BaseController
  13. {
  14. protected $process;
  15. /**
  16. * DetailController constructor.
  17. * @throws AppException
  18. */
  19. public function preAction()
  20. {
  21. parent::preAction();
  22. $processId = request()->input('id');
  23. $this->process = RemittanceAuditProcess::uniacid()->detail()->find($processId);
  24. if(!isset($this->process)){
  25. if(!isset($this->process)){
  26. throw new AppException("未找到id为{$processId}的审核进程记录");
  27. }
  28. }
  29. $this->process['remittanceRecord']['report_url'] = yz_tomedia($this->process['remittanceRecord']['report_url']);
  30. }
  31. /**
  32. * @return string
  33. * @throws \Throwable
  34. */
  35. public function index()
  36. {
  37. return view('remittanceAudit.detail', [
  38. 'remittanceAudit' => json_encode($this->process)
  39. ])->render();
  40. }
  41. }