|
@@ -46,9 +46,10 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function statusInstitutionApply()
|
|
|
{
|
|
|
- $id_arr = input('id_arr/a');
|
|
|
- $status = input('status', 1);
|
|
|
- HumanInstitutionApplyModel::update(['status' => $status], ['id' => $id_arr]);
|
|
|
+ $id_arr = input('id_arr/a');
|
|
|
+ $status = input('status', 1);
|
|
|
+ $comment = input('comment', '');
|
|
|
+ HumanInstitutionApplyModel::update(['status' => $status, 'comment' => $comment], ['id' => $id_arr]);
|
|
|
ajax_return();
|
|
|
}
|
|
|
|
|
@@ -71,7 +72,7 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function exportInstitutionApply()
|
|
|
{
|
|
|
- $map = $this->dealInInput(['id'],$this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name'])));
|
|
|
+ $map = $this->dealInInput(['id'], $this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name'])));
|
|
|
$list = HumanInstitutionApplyModel::where($map)
|
|
|
->order(['status' => 'asc'])
|
|
|
->append(['status_text', 'is_arrive_text'])
|
|
@@ -90,7 +91,35 @@ class Human extends AdminBaseController
|
|
|
['url', '公司网址'],
|
|
|
['is_arrive_text', '签到'],
|
|
|
];
|
|
|
- export_exl("机构报名表", $xlsCell, $list, ['join_mobile','wechat']);
|
|
|
+ export_exl("机构报名表", $xlsCell, $list, ['join_mobile', 'wechat']);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function institutionToEnterprise()
|
|
|
+ {
|
|
|
+ $id = input('id/d', 0);
|
|
|
+ empty($id) && ajax_return(1, '请选择机构');
|
|
|
+
|
|
|
+ $info = HumanInstitutionApplyModel::find($id);
|
|
|
+ empty($info) && ajax_return(1, '请机构不存在');
|
|
|
+
|
|
|
+ HumanEnterpriseApplyModel::create([
|
|
|
+ 'open_id' => $info['open_id'],
|
|
|
+ 'name' => $info['name'],
|
|
|
+ 'join' => $info['join'],
|
|
|
+ 'join_mobile' => $info['join_mobile'],
|
|
|
+ 'wechat' => $info['wechat'],
|
|
|
+ 'cooperate' => $info['cooperate'],
|
|
|
+ 'suggestion' => $info['suggestion'],
|
|
|
+ 'status' => $info['status'],
|
|
|
+ 'describe' => $info['describe'],
|
|
|
+ 'url' => $info['url'],
|
|
|
+ 'images' => $info['images'],
|
|
|
+ 'is_arrive' => $info['is_arrive'],
|
|
|
+ 'comment' => $info['comment'],
|
|
|
+ ]);
|
|
|
+ $info->delete();
|
|
|
+
|
|
|
+ ajax_return();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -124,10 +153,10 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function statusEnterpriseApply()
|
|
|
{
|
|
|
- $id_arr = input('id_arr/a');
|
|
|
- $status = input('status', 1);
|
|
|
+ $id_arr = input('id_arr/a');
|
|
|
+ $status = input('status', 1);
|
|
|
$comment = input('comment', '');
|
|
|
- HumanEnterpriseApplyModel::update(['status' => $status,'comment'=>$comment], ['id' => $id_arr]);
|
|
|
+ HumanEnterpriseApplyModel::update(['status' => $status, 'comment' => $comment], ['id' => $id_arr]);
|
|
|
ajax_return();
|
|
|
}
|
|
|
|
|
@@ -150,7 +179,7 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function exportEnterpriseApply()
|
|
|
{
|
|
|
- $map = $this->dealInInput(['id'],$this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name'])));
|
|
|
+ $map = $this->dealInInput(['id'], $this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name'])));
|
|
|
$list = HumanEnterpriseApplyModel::where($map)
|
|
|
->order(['status' => 'asc'])
|
|
|
->append(['status_text', 'is_arrive_text'])
|
|
@@ -173,7 +202,7 @@ class Human extends AdminBaseController
|
|
|
['url', '公司网址'],
|
|
|
['is_arrive_text', '签到'],
|
|
|
];
|
|
|
- export_exl("企业报名表", $xlsCell, $list, ['join_mobile','wechat']);
|
|
|
+ export_exl("企业报名表", $xlsCell, $list, ['join_mobile', 'wechat']);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -303,6 +332,34 @@ class Human extends AdminBaseController
|
|
|
ajax_return(0);
|
|
|
}
|
|
|
|
|
|
+ public function enterpriseToInstitution()
|
|
|
+ {
|
|
|
+ $id = input('id/d', 0);
|
|
|
+ empty($id) && ajax_return(1, '请选择企业');
|
|
|
+
|
|
|
+ $info = HumanEnterpriseApplyModel::find($id);
|
|
|
+ empty($info) && ajax_return(1, '请企业不存在');
|
|
|
+
|
|
|
+ HumanInstitutionApplyModel::create([
|
|
|
+ 'open_id' => $info['open_id'],
|
|
|
+ 'name' => $info['name'],
|
|
|
+ 'join' => $info['join'],
|
|
|
+ 'join_mobile' => $info['join_mobile'],
|
|
|
+ 'wechat' => $info['wechat'],
|
|
|
+ 'cooperate' => $info['cooperate'],
|
|
|
+ 'suggestion' => $info['suggestion'],
|
|
|
+ 'status' => $info['status'],
|
|
|
+ 'describe' => $info['describe'],
|
|
|
+ 'url' => $info['url'],
|
|
|
+ 'images' => $info['images'],
|
|
|
+ 'is_arrive' => $info['is_arrive'],
|
|
|
+ 'comment' => $info['comment'],
|
|
|
+ ]);
|
|
|
+ $info->delete();
|
|
|
+
|
|
|
+ ajax_return();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 企业列表
|
|
|
*/
|