|
|
@@ -71,6 +71,8 @@ class EmployeeService extends Service
|
|
|
$model->p_title = $data['p_title'] ?? "";
|
|
|
$model->state = $data['state'] ?? 0;
|
|
|
$model->is_admin = $data['is_admin'] ?? 0;
|
|
|
+ $model->entrust_type = $data['entrust_type'] ?? 0;
|
|
|
+ $model->man_type = $data['man_type'] ?? 0;
|
|
|
if($model->is_admin && $data['password'] !== '******') {
|
|
|
$model->password = Hash::make($data['password']);
|
|
|
$model->p_version = $model->p_version + 1;
|
|
|
@@ -153,6 +155,8 @@ class EmployeeService extends Service
|
|
|
$model->crt_id = $user['id'];
|
|
|
$model->is_admin = $data['is_admin'] ?? 0;
|
|
|
$model->account = $data['account'] ?? "";
|
|
|
+ $model->entrust_type = $data['entrust_type'] ?? 0;
|
|
|
+ $model->man_type = $data['man_type'] ?? 0;
|
|
|
if($model->is_admin) $model->password = Hash::make($data['password']);
|
|
|
$model->top_depart_id = $data['top_depart_id'];
|
|
|
$model->save();
|
|
|
@@ -307,6 +311,8 @@ class EmployeeService extends Service
|
|
|
$item['is_admin_title'] = Employee::IS_ADMIN_TITLE[$item['is_admin']] ?? "";
|
|
|
$item['state_title'] = Employee::State_Type[$item['state']] ?? "";
|
|
|
$item['sex_title'] = Employee::SEX_TYPE[$item['sex']] ?? "";
|
|
|
+ $item['man_type_title'] = Employee::Man_Type[$item['man_type']] ?? "";
|
|
|
+ $item['entrust_type_title'] = Employee::WT_Type[$item['entrust_type']] ?? "";
|
|
|
$item['education_title'] = Employee::Education[$item['education']] ?? "";
|
|
|
$item['crt_time'] = !empty($item['crt_time']) ? date("Y-m-d", $item['crt_time']) : "";
|
|
|
if (isset($ergs['search_for_month_work'])) {
|
|
|
@@ -564,6 +570,10 @@ class EmployeeService extends Service
|
|
|
if(mb_strlen($data['password']) < 6) return [false, '密码长度不得小于6位长度'];
|
|
|
if(empty($data['role'])) return [false, '角色不能为空'];
|
|
|
}
|
|
|
+ if(empty($data['man_type'])) return [false,'人员类别不能为空'];
|
|
|
+ if(! isset(Employee::Man_Type[$data['man_type']])) return [false,'人员类别不存在'];
|
|
|
+// if(empty($data['entrust_type'])) return [false,'委托方式不能为空'];
|
|
|
+// if(! isset(Employee::WT_Type[$data['entrust_type']])) return [false,'委托方式不存在'];
|
|
|
$data['top_depart_id'] = $user['top_depart_id'];
|
|
|
|
|
|
if(! empty($data['work_range'])){
|