正在显示
2 个修改的文件
包含
5 行增加
和
1 行删除
| @@ -362,6 +362,10 @@ class User extends ManystoreBase | @@ -362,6 +362,10 @@ class User extends ManystoreBase | ||
| 362 | unset($params['password'] ); | 362 | unset($params['password'] ); |
| 363 | } | 363 | } |
| 364 | unset($params['confirem_password'] ); | 364 | unset($params['confirem_password'] ); |
| 365 | + $exist = Db::name('user')->where(['student_no' => $params['student_no']])->where('id','neq',$row['id'])->find(); | ||
| 366 | + if($exist) { | ||
| 367 | + $this->error(__('该学号已被使用')); | ||
| 368 | + } | ||
| 365 | $result = false; | 369 | $result = false; |
| 366 | Db::startTrans(); | 370 | Db::startTrans(); |
| 367 | try { | 371 | try { |
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | <div class="form-group"> | 9 | <div class="form-group"> |
| 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Student_no')}:</label> | 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Student_no')}:</label> |
| 11 | <div class="col-xs-12 col-sm-8"> | 11 | <div class="col-xs-12 col-sm-8"> |
| 12 | - <input id="c-student_no" class="form-control" readonly name="row[student_no]" type="text" value="{$row.student_no|htmlentities}"> | 12 | + <input id="c-student_no" class="form-control" name="row[student_no]" type="text" value="{$row.student_no|htmlentities}"> |
| 13 | </div> | 13 | </div> |
| 14 | </div> | 14 | </div> |
| 15 | 15 |
-
请 注册 或 登录 后发表评论