正在显示
2 个修改的文件
包含
11 行增加
和
5 行删除
@@ -128,11 +128,10 @@ class Role extends BaseController | @@ -128,11 +128,10 @@ class Role extends BaseController | ||
128 | public function generateNumber(Request $request){ | 128 | public function generateNumber(Request $request){ |
129 | $data = $request->get(); | 129 | $data = $request->get(); |
130 | $rule_name= Db::table('sos_user_rule')->where('mechanismId',$data['id'])->find(); | 130 | $rule_name= Db::table('sos_user_rule')->where('mechanismId',$data['id'])->find(); |
131 | - $rule_num= Db::table('sos_user_role')->find(); | 131 | + $rule_num= Db::table('sos_user_role')->order('id desc')->find(); |
132 | 132 | ||
133 | - $rule_number=$rule_name['rule'].$rule_num['personalNumber']; | 133 | + $rule_number['num']=$rule_name['rule'].(substr($rule_num['personalNumber'], 2, 7)+1); |
134 | 134 | ||
135 | - return $rule_number; | ||
136 | echo json_encode($rule_number); | 135 | echo json_encode($rule_number); |
137 | } | 136 | } |
138 | 137 |
@@ -120,7 +120,14 @@ | @@ -120,7 +120,14 @@ | ||
120 | var url = '/products/role/getDepartment?id='+rec.id; | 120 | var url = '/products/role/getDepartment?id='+rec.id; |
121 | $('#cc2').combobox('reload', url); | 121 | $('#cc2').combobox('reload', url); |
122 | var url1 = '/products/role/generateNumber?id='+rec.id; | 122 | var url1 = '/products/role/generateNumber?id='+rec.id; |
123 | - $('#personalNumber').textbox('reload', url1); | 123 | + $.ajax({ |
124 | + url:url1, | ||
125 | + success:function(e){ | ||
126 | + var arr = JSON.parse(e); | ||
127 | + | ||
128 | + $('#personalNumber').textbox('setValue',arr.num); | ||
129 | + } | ||
130 | + }) | ||
124 | }"> | 131 | }"> |
125 | 132 | ||
126 | </td> | 133 | </td> |
@@ -131,7 +138,7 @@ | @@ -131,7 +138,7 @@ | ||
131 | </tr> | 138 | </tr> |
132 | <tr> | 139 | <tr> |
133 | <td>个人编号:</td> | 140 | <td>个人编号:</td> |
134 | - <td><input class="easyui-textbox" type="text" name="personalNumber" id="personalNumber" data-options="valueField:'id',textField:'departmentName'"/></td> | 141 | + <td><input class="easyui-textbox" type="text" name="personalNumber" id="personalNumber" disabled/></td> |
135 | </tr> | 142 | </tr> |
136 | <tr> | 143 | <tr> |
137 | <td>入职时间:</td> | 144 | <td>入职时间:</td> |
-
请 注册 或 登录 后发表评论