user["type"]) { case CommonConst::ENTERPRISE_JC: $tpl = "indexIC"; break; } return view($tpl, ['type' => $this->user["type"]]); } public function list() { $res = EnterpriseLaApi::getList($this->request); return json($res); } /** * 申请 */ public function apply(\think\Request $request) { $type = $this->user["type"]; $param = $request->param(); $id = isset($param["id"]) ? $param["id"] : 0; $info = TalentAllowanceApi::getInfoById($id); $ep = EnterpriseApi::getOne($this->user["uid"]); if (!chkEnterpriseFull($ep)) return; /* if ($info && !in_array($info["checkState"], [LaState::LA_SAVE, LaState::LA_FIRST_REJECT])) { return view("", ["row" => $info, "enterprise" => $ep, "hand" => "select"]); } */ if ($request->isPost()) { return $this->save($info, $request); } $hand = $info ? "update" : "add"; $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::LIVINGALLOWANCE, $this->user["type"])["batch"]; return view("", ["year" => $batch, "row" => $info, "enterprise" => $ep, "hand" => $hand]); } public function detail(\think\Request $request) { $param = $request->param(); $id = $param["id"]; $info = CommonLaApi::getInfoById($id); $ep = EnterpriseApi::getOne($this->user["uid"]); if (!chkEnterpriseFull($ep)) return; return view("apply", ["row" => $info, "enterprise" => $ep, "hand" => "select"]); } }