|
@@ -109,7 +109,22 @@ class TalentAllowance extends AdminController {
|
|
|
$process = $this->request["process"];
|
|
|
$obj = TalentAllowanceApi::getInfoById($id);
|
|
|
$this->translateToChinese($obj);
|
|
|
- return view("info", ["row" => $obj, "process" => $process]);
|
|
|
+ if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
|
|
|
+ $need_choose_post_type = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_post_type");
|
|
|
+ $need_choose_institution = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_institution");
|
|
|
+ if ($need_choose_post_type[$obj["enterpriseId"]]) {
|
|
|
+ $postTypes = DictApi::findChildDictByCode("PostType");
|
|
|
+ foreach ($postTypes as $key => $pt) {
|
|
|
+ if (!in_array($pt["code"], $need_choose_post_type[$obj["enterpriseId"]])) {
|
|
|
+ unset($postTypes[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (in_array($obj["enterpriseId"], $need_choose_institution)) {
|
|
|
+ $institutions = DictApi::findChildDictByCode("Institution");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return view("info", ["row" => $obj, "process" => $process, "postTypes" => $postTypes, "institutions" => $institutions]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -121,7 +136,22 @@ class TalentAllowance extends AdminController {
|
|
|
$process = $this->request["process"];
|
|
|
$obj = TalentAllowanceApi::getInfoById($id);
|
|
|
$this->translateToChinese($obj);
|
|
|
- return view("select", ["row" => $obj, "process" => $process]);
|
|
|
+ if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
|
|
|
+ $need_choose_post_type = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_post_type");
|
|
|
+ $need_choose_institution = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_institution");
|
|
|
+ if ($need_choose_post_type[$obj["enterpriseId"]]) {
|
|
|
+ $postTypes = DictApi::findChildDictByCode("PostType");
|
|
|
+ foreach ($postTypes as $key => $pt) {
|
|
|
+ if (!in_array($pt["code"], $need_choose_post_type[$obj["enterpriseId"]])) {
|
|
|
+ unset($postTypes[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (in_array($obj["enterpriseId"], $need_choose_institution)) {
|
|
|
+ $institutions = DictApi::findChildDictByCode("Institution");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return view("select", ["row" => $obj, "process" => $process, "postTypes" => $postTypes, "institutions" => $institutions]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -626,7 +656,22 @@ class TalentAllowance extends AdminController {
|
|
|
$process = $this->request["process"];
|
|
|
$obj = TalentAllowanceApi::getInfoById($id);
|
|
|
$this->translateToChinese($obj);
|
|
|
- return view("public_check", ["row" => $obj, "process" => $process]);
|
|
|
+ if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
|
|
|
+ $need_choose_post_type = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_post_type");
|
|
|
+ $need_choose_institution = getJsonConfig("../sys_config.json", "talent_allowance_need_choose_institution");
|
|
|
+ if ($need_choose_post_type[$obj["enterpriseId"]]) {
|
|
|
+ $postTypes = DictApi::findChildDictByCode("PostType");
|
|
|
+ foreach ($postTypes as $key => $pt) {
|
|
|
+ if (!in_array($pt["code"], $need_choose_post_type[$obj["enterpriseId"]])) {
|
|
|
+ unset($postTypes[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (in_array($obj["enterpriseId"], $need_choose_institution)) {
|
|
|
+ $institutions = DictApi::findChildDictByCode("Institution");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return view("public_check", ["row" => $obj, "process" => $process, "postTypes" => $postTypes, "institutions" => $institutions]);
|
|
|
}
|
|
|
|
|
|
/**
|