cqpCow 1 year ago
parent
commit
62a0f19285
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Service/EmployeeService.php

+ 2 - 2
app/Service/EmployeeService.php

@@ -85,8 +85,8 @@ class EmployeeService extends Service
             $model->entry_time = $data['entry_time'] ?? '';
             $model->state = empty($data['leave_time']) ? Employee::USE : Employee::NOT_USE;
             $model->is_admin = $data['is_admin'];
+            $model->account = $data['number'];
             if($model->is_admin == 1){
-                $model->account = $data['number'];
                 if($data['password'] !== '******'){
                     $model->password   = Hash::make($data['password']);
                 }
@@ -152,8 +152,8 @@ class EmployeeService extends Service
             $model->state = empty($data['leave_time']) ? Employee::USE : Employee::NOT_USE;
             $model->crt_id = $user['id'];
             $model->is_admin = $data['is_admin'];
+            $model->account = $data['number'];
             if($model->is_admin == 1){
-                $model->account = $data['number'];
                 if($data['password'] !== '********'){
                     $model->password = Hash::make($data['password']);
                 }