all(); $corp = Corp::where(['abbr' => $request->basic_data['corp_abbr']])->first(); $param['corp_abbr'] = $corp->id; // $param['corp_abbr'] = $request->basic_data['corp_abbr']; $result = (new CustomerService())->list($param); return $this->success($this->page($result)); } catch (\Throwable $e) { return $this->error($e->getMessage().$e->getFile().$e->getLine().$e->getTraceAsString()); } } /** * 客户导出 * @param Request $request * @return \support\Response */ public function export(Request $request) { try { $param = $request->all(); $corp = Corp::where(['abbr' => $request->basic_data['corp_abbr']])->first(); $param['corp_abbr'] = $corp->id; // $param['corp_abbr'] = $request->basic_data['corp_abbr']; $result = (new CustomerService())->export($param); return $this->success($this->page($result)); } catch (\Throwable $e) { return $this->error($e->getMessage().$e->getFile().$e->getLine().$e->getTraceAsString()); } } /** * 客户列表 * @param Request $request * @return \support\Response */ public function audit(Request $request) { try { $param = $request->all(); if (empty($param['id'])) { return $this->error('ID'.trans('not_null')); } if (in_array($param['scene'],['delete','report'])) { return $this->error('scene 不合法'); } $result = (new CustomerService())->audit($param); return $this->success($result); } catch (\Throwable $e) { return $this->error($e->getMessage().$e->getFile().$e->getLine().$e->getTraceAsString()); } } }