更新人事离职
This commit is contained in:
parent
b0a044009b
commit
faafe997a0
|
@ -153,6 +153,9 @@ class UserPersonal extends ApiController
|
|||
public function leave_delete()
|
||||
{
|
||||
$id = get_params("id");
|
||||
if (empty($id)) {
|
||||
$this->apiError("请选择离职人员");
|
||||
}
|
||||
$data['status'] = '-1';
|
||||
$data['id'] = $id;
|
||||
$data['update_time'] = time();
|
||||
|
@ -160,9 +163,9 @@ class UserPersonal extends ApiController
|
|||
$uid = Db::name('PersonalQuit')->where('id', $id)->value('uid');
|
||||
Db::name('Admin')->where('id', $uid)->update(['status' => 1]);
|
||||
add_log('delete', $id);
|
||||
return to_assign(0, "删除成功");
|
||||
$this->apiError("删除成功");
|
||||
} else {
|
||||
return to_assign(1, "删除失败");
|
||||
$this->apiError("删除失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,9 @@ class UserPosition extends ApiController
|
|||
{
|
||||
$this->checkAuth();
|
||||
$id = get_params("id");
|
||||
if (empty($id)) {
|
||||
$this->apiError("请选择岗位");
|
||||
}
|
||||
if ($id == 1) {
|
||||
$this->apiError("超级岗位不能删除");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue