Cash.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace app\shop\controller\supplier;
  3. use app\shop\controller\Controller;
  4. use app\shop\model\supplier\Cash as SupplierCashModel;
  5. /**
  6. * 供应商提现控制器
  7. */
  8. class Cash extends Controller
  9. {
  10. /**
  11. * 提现列表
  12. */
  13. public function index()
  14. {
  15. $model = new SupplierCashModel;
  16. $list = $model->getList($this->postData());
  17. return $this->renderSuccess('', compact('list'));
  18. }
  19. /**
  20. * 提现审核
  21. */
  22. public function submit($id)
  23. {
  24. $model = SupplierCashModel::detail($id);
  25. if ($model->submit($this->postData())) {
  26. return $this->renderSuccess('操作成功');
  27. }
  28. return $this->renderError($model->getError() ?: '操作失败');
  29. }
  30. /**
  31. * 确认打款
  32. */
  33. public function money($id)
  34. {
  35. $model = SupplierCashModel::detail($id);
  36. if ($model->money()) {
  37. return $this->renderSuccess('操作成功');
  38. }
  39. return $this->renderError($model->getError() ?: '操作失败');
  40. }
  41. }