作者 niuyongqing

管理员模块

... ... @@ -128,11 +128,10 @@ class Role extends BaseController
public function generateNumber(Request $request){
$data = $request->get();
$rule_name= Db::table('sos_user_rule')->where('mechanismId',$data['id'])->find();
$rule_num= Db::table('sos_user_role')->find();
$rule_num= Db::table('sos_user_role')->order('id desc')->find();
$rule_number=$rule_name['rule'].$rule_num['personalNumber'];
$rule_number['num']=$rule_name['rule'].(substr($rule_num['personalNumber'], 2, 7)+1);
return $rule_number;
echo json_encode($rule_number);
}
... ...
... ... @@ -120,7 +120,14 @@
var url = '/products/role/getDepartment?id='+rec.id;
$('#cc2').combobox('reload', url);
var url1 = '/products/role/generateNumber?id='+rec.id;
$('#personalNumber').textbox('reload', url1);
$.ajax({
url:url1,
success:function(e){
var arr = JSON.parse(e);
$('#personalNumber').textbox('setValue',arr.num);
}
})
}">
</td>
... ... @@ -131,7 +138,7 @@
</tr>
<tr>
<td>个人编号:</td>
<td><input class="easyui-textbox" type="text" name="personalNumber" id="personalNumber" data-options="valueField:'id',textField:'departmentName'"/></td>
<td><input class="easyui-textbox" type="text" name="personalNumber" id="personalNumber" disabled/></td>
</tr>
<tr>
<td>入职时间:</td>
... ...