Apply.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Created by Administrator.
  4. * User: 向往那片天空
  5. * Date: 2022\5\21 0021
  6. * Time: 15:08
  7. * 格言: 抓住中心,宁精勿杂,宁专勿多
  8. * QQ/微信: 250023777
  9. * 描述: 无
  10. */
  11. namespace app\admin\controller\enterprise;
  12. use app\admin\controller\AuthController;
  13. use crmeb\services\UtilService;
  14. use crmeb\services\{JsonService as Json, JsonService, UtilService as Util};
  15. use crmeb\traits\CurdControllerTrait;
  16. class Apply extends AuthController
  17. {
  18. use CurdControllerTrait;
  19. public function index()
  20. {
  21. return $this->fetch();
  22. }
  23. public function get_apply_list()
  24. {
  25. $where = UtilService::getMore([
  26. ['page', 1],
  27. ['limit', 20],
  28. ['audit_status', -1],
  29. ['apply_user_name', ''],
  30. ['mer_id', ''],
  31. ]);
  32. // return JsonService::fail('找不到记录',$where);
  33. return app('ApplyLogic')->getPageList($where);
  34. }
  35. public function auditPage($id)
  36. {
  37. $this->assign('id', $id);
  38. return $this->fetch('audit');
  39. }
  40. public function audit()
  41. {
  42. $data = Util::postMore([
  43. ['id', 0],
  44. ['audit_status', 0],
  45. ['text', '']
  46. ]);
  47. if (empty($data['id'])) {
  48. return JsonService::fail('id不能为空');
  49. }
  50. if (empty($data['audit_status'])) {
  51. return JsonService::fail('请选择操作');
  52. }
  53. return app('ApplyLogic')->audit($data);
  54. }
  55. public function isDel($id)
  56. {
  57. return app('ApplyLogic')->delById($id);
  58. }
  59. }