| | |
| | | <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="" id="button_Edit" class="layui-btn" 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); |
| | | $('#button_Edit').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | }); |
| | | }); |
| | | |
| | | //ç¼è¾ |
| | | function set_EditFromGrid(linterid) { |
| | | |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | } |
| | | //ç¼è¾å 载表头 |
| | | function set_EditForm(linterid) { |
| | | //æ¥è¯¢æ£éªæ¹æ¡åæ¯å¦åå¨ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "GetGy_UserMaterDetail", |
| | | type: "GET", |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | | success: function (result) { |
| | | |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Gy_UserMater[0]; |
| | | $("#HItemID").val(data.HItemID);//代ç ID |
| | | $("#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_UserMater.length; i++) { |
| | | arr.push({ |
| | | "HMaterID": result.data.h_v_Gy_UserMater[i].HMaterID, |
| | | "HMaterNumber": result.data.h_v_Gy_UserMater[i].ç©æä»£ç , |
| | | "HMaterName": result.data.h_v_Gy_UserMater[i].ç©æåç§°, |
| | | }); |
| | | |
| | | } |
| | | option.data = arr; |
| | | table.render(option); |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //éåº |
| | | form.on('submit(Exit)', function (data) { |
| | | if (OperationType == 1) { |
| | | Pub_Close(closeType);//ç´æ¥æ°å¢closeTypeå¼ä¸º2ï¼åè¡¨è°æ°å¢closeTypeå¼ä»åè¡¨ä¼ é |
| | | Pub_Close(1);//ç´æ¥æ°å¢closeTypeå¼ä¸º2ï¼åè¡¨è°æ°å¢closeTypeå¼ä»åè¡¨ä¼ é |
| | | } |
| | | else if (OperationType == 3) { |
| | | Pub_Close(closeType); |
| | | Pub_Close(1); |
| | | } |
| | | else { |
| | | Pub_Close(2); |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢æææ¹æ³ |