| | |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="UserName" id="UserName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="UserID" id="UserID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="UserList" style="width:40px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" id="UserList" lay-filter="UserList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | set_EditFromGrid(linterid); |
| | | $('#UserList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | $("#UserID").val(checkStatus.data[0].HNumber); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xt_User/UserPlaylist", |
| | | url: GetWEBURL() + "Gy_UserByUserEdit", |
| | | type: "GET", |
| | | data: { "HUserID": checkStatus.data[0].HNumber }, |
| | | async: false, |
| | | data: { "HID": checkStatus.data[0].HNumber }, |
| | | success: function (data) { |
| | | if (data.data != null && data.data != "") { |
| | | option.data = data.data; |
| | | //option.data = data.data; |
| | | //table.render(option); |
| | | var arr = []; |
| | | for (var i = 0; i < data.data.h_v_Gy_UserByUserRelationList.length; i++) { |
| | | arr.push({ |
| | | "HUserID2": data.data.h_v_Gy_UserByUserRelationList[i].HUserID2, |
| | | "HUserNumber2": data.data.h_v_Gy_UserByUserRelationList[i].å
³èç¨æ·ç¼ç , |
| | | "HUserName2": data.data.h_v_Gy_UserByUserRelationList[i].å
³èç¨æ·åç§°, |
| | | }); |
| | | |
| | | } |
| | | option.data = arr; |
| | | table.render(option); |
| | | } |
| | | else { |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | console.log(checkStatus.data[0]) |
| | | obj.update({ |
| | | HUserID2: checkStatus.data[0].HEmpID, |
| | | HUserID2: checkStatus.data[0].ç¨æ·ç¼ç , |
| | | HUserNumber2: checkStatus.data[0].ç¨æ·ç¼ç , |
| | | HUserName2: checkStatus.data[0].ç¨æ·åç§° |
| | | }); |
| | |
| | | table.render(option); |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | function set_EditFromGrid(linterid) { |
| | | |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | } |
| | | |
| | | //ç¼è¾å 载表头 |
| | | function set_EditForm(linterid) { |
| | | //æ¥è¯¢æ£éªæ¹æ¡åæ¯å¦åå¨ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Gy_UserByUserEdit", |
| | | type: "GET", |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | | success: function (result) { |
| | | |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Gy_UserByUserRelationList[0]; |
| | | $("#UserID").val(data.ç¨æ·ä»£ç );//ç¨æ·ä»£ç |
| | | $("#UserName ").val(data.ç¨æ·);//ç¨æ·åç§° |
| | | |
| | | layui.form.render();//宿¶æ¸²æéä¸åä¸éä¸çæ ·å¼,æå¥½æ·»å è¿å¥è¯ |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | var arr = []; |
| | | for (var i = 0; i < result.data.h_v_Gy_UserByUserRelationList.length; i++) { |
| | | arr.push({ |
| | | "HUserID2": result.data.h_v_Gy_UserByUserRelationList[i].HUserID2, |
| | | "HUserNumber2": result.data.h_v_Gy_UserByUserRelationList[i].å
³èç¨æ·ç¼ç , |
| | | "HUserName2": result.data.h_v_Gy_UserByUserRelationList[i].å
³èç¨æ·åç§°, |
| | | }); |
| | | |
| | | } |
| | | option.data = arr; |
| | | table.render(option); |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine(NewRow) { |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |