| | |
| | | var option2; |
| | | var option1; |
| | | var sBillType = "3807"; |
| | | var TabRow = { "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": "0 ", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": "0 ", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | var TabRow1 = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | //#endregion |
| | | |
| | |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event === 'HMaintainNumber') //ä¿å
»é¡¹ç®ä¿¡æ¯ |
| | | if (obj.event === 'HMaintainItemNumber') //ä¿å
»é¡¹ç®ä¿¡æ¯ |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaintainItemID: checkStatus.data[0].HItemID, |
| | | HMaintainNumber: checkStatus.data[0].HNumber, |
| | | HMaintainItemNumber: checkStatus.data[0].HNumber, |
| | | HMaintainItem: checkStatus.data[0].HName, |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HMaintainItemID', title: 'ä¿å
»é¡¹ç®ID', edit: 'text', hide: true } |
| | | , { field: 'HMaintainNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: 'HMaintainNumber' } |
| | | , { field: 'HMaintainItemNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: 'HMaintainItemNumber' } |
| | | , { field: 'HMaintainItem', title: 'ä¿å
»é¡¹ç®', edit: 'text' } |
| | | , { field: 'HMaintainPart', title: 'ä¿å
»é¨ä½', edit: 'text' } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Sc_MouldMaintainBillList[0]; |
| | | var data = result.data.h_v_Sc_MouldMaintain[0]; |
| | | form.val("component-form-group", { |
| | | "HBillNo": data.åæ®å· |
| | | , "HDate": formatDate(data.æ¥æ) |
| | |
| | | , "HPlanNo": data.ä¿å
»è®¡åç¼å· |
| | | , "HPlanInterID": data.ä¿å
»è®¡åå
ç |
| | | , "HMouldID": data.HMouldID |
| | | , "HMouldName": data.äº§åæ¨¡å
· |
| | | |
| | | }); |
| | | |
| | |
| | | data: { "HInterID": linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | option.data = result.list[0]; |
| | | table.render(option); |
| | | option2.data = result.list[1]; |
| | | table.render(option2); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-tab layui-tab-card"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">ä¿å
»é¡¹ä¿¡æ¯</li> |
| | | <li>é
ä»¶ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>é¢è§</button>--> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>çæéè´§å</button>--> |
| | | |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="xuhao1"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | </form> |
| | | </div> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | |
| | | }; |
| | | }); |
| | | |
| | | //ç¹å»ä¸»è¡¨å¸¦åºä»è¡¨æ°æ® |
| | | table.on('row(mainTable)', function (obj) { //注ï¼tool æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | //var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | //obj.tr.find(':checkbox').prop('checked', flag); |
| | | //if (flag) { |
| | | // obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); |
| | | // obj.tr.next().find('.layui-form-checkbox').removeClass('layui-form-checked'); |
| | | //} |
| | | var datas = obj.data; //è·å¾å½åè¡æ°æ® |
| | | var linterid = datas.hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetaiNew', |
| | | type: "GET", |
| | | data: { "HInterID": linterid }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table.render(option1); |
| | | option2.data = data1.list[1]; |
| | | table.render(option2); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#region å½å页é¢å è½½æææ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | //#region å½å页é¢å è½½æææ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼(主表) |
| | | set_InitGrid(); |
| | | //åå§åè¡¨æ ¼(å表) |
| | | set_InitGrid1(); |
| | | //åå§åè¡¨æ ¼(å表) |
| | | set_InitGrid2(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | //åå§åè¡¨æ ¼(主) |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , height: '400' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160 } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160, hide: true } |
| | | , { field: 'ä¿å
»è®¡åç¼å·', title: 'ä¿å
»è®¡åç¼å·', width: 200 } |
| | |
| | | , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true } |
| | | , { field: 'äº§åæ¨¡å
·ä»£ç ', title: 'äº§åæ¨¡å
·ä»£ç ', width: 200 } |
| | | , { field: 'äº§åæ¨¡å
·', title: 'äº§åæ¨¡å
·', width: 200 } |
| | | , { field: 'ä¿å
»å¼å§æ¥æ', title: 'ä¿å
»å¼å§æ¥æ', width: 200 } |
| | | , { field: 'ä¿å
»ç»ææ¥æ', title: 'ä¿å
»ç»ææ¥æ', width: 200 } |
| | | , { field: 'ä¿å
»å¼å§æ¥æ', title: 'ä¿å
»å¼å§æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'ä¿å
»ç»ææ¥æ', title: 'ä¿å
»ç»ææ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'æè¦', title: 'æè¦', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 200 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200 } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'hmaterid', title: 'hmaterid', width: 115, hide: true } |
| | | , { field: 'é
件代ç ', title: 'é
件代ç ', width: 200 } |
| | | , { field: 'é
ä»¶åç§°', title: 'é
ä»¶åç§°', width: 200 } |
| | | , { field: 'hunitid', title: 'hunitid', width: 200, hide: true } |
| | | , { field: 'åä½ä»£ç ', title: 'åä½ä»£ç ', width: 200 } |
| | | , { field: 'åä½åç§°', title: 'åä½åç§°', width: 200 } |
| | | , { field: 'å®é
ç¨é', title: 'å®é
ç¨é', width: 115 } |
| | | , { field: 'æ åç¨é', title: 'æ åç¨é', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 200 } |
| | | , { field: 'è´è´£äºº', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 115, hide: true } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200, hide: true } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 115, hide: true } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 115 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, hide: true } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, hide: true } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 115, hide: true } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 115, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200 } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200, hide: true } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 115, hide: true } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'hbilltype', title: 'hbilltype', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 115, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | ]] |
| | | }; |
| | | table.render(option); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼(å表) |
| | | function set_InitGrid1() |
| | | { |
| | | var ajaxLoad = layer.load(); |
| | | option1 = { |
| | | elem: '#mainTable1' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '350' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | //{ type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HMaintainItemID', title: 'ä¿å
»é¡¹ç®ID', width: 200, hide: true } |
| | | , { field: 'HMaintainItemNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', width: 200} |
| | | , { field: 'HMaintainItem', title: 'ä¿å
»é¡¹ç®', width: 200} |
| | | , { field: 'HMaintainPart', title: 'ä¿å
»é¨ä½', width: 200} |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', width: 200} |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', width: 200, hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', width: 200} |
| | | , { field: 'HManagerName', title: 'è´è´£äºº', width: 200} |
| | | , { field: 'HRemark', title: '夿³¨', width: 200} |
| | | ]] |
| | | }; |
| | | option1.data = []; |
| | | table.render(option1); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼(å表) |
| | | function set_InitGrid2() { |
| | | var ajaxLoad = layer.load(); |
| | | option2 = { |
| | | elem: '#mainTable2' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '350' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | //{ type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao1', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HMaterID', title: 'é
ä»¶ID', width:200, hide: true } |
| | | , { field: 'HMaterNumber', title: 'é
件代ç ', width: 200} |
| | | , { field: 'HMaterName', title: 'é
ä»¶åç§°', width: 200} |
| | | , { field: 'HMaterSpec', title: 'è§æ ¼åå·', width: 200} |
| | | , { field: 'HUnitID', title: 'åä½ID', width: 200, hide: true } |
| | | , { field: 'HUnitNumber', title: 'åä½ä»£ç ', width: 200} |
| | | , { field: 'HUnitName', title: 'åä½åç§°', width: 200} |
| | | , { field: 'HQty', title: 'å®é
ç¨é', width: 200} |
| | | , { field: 'HQtyMust', title: 'æ åç¨é', width: 200 } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', width: 200, hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', width: 200} |
| | | , { field: 'HManagerName', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', width: 200 } |
| | | ]] |
| | | }; |
| | | option2.data = []; |
| | | table.render(option2); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | |
| | | //æ¥è¯¢ |
| | |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sb_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | url: GetWEBURL() + "/Sb_EqpRepairWorkBill/SaveGetEqpRepairWorkBillWebList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | |
| | | |
| | | //#region åå®¡æ ¸æé® |
| | | form.on('submit(set_AbandonCheck)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.layui.admin.events.closeThisTabs(); //å
³éé¡µç¾ |
| | | }); |
| | | //åå®¡æ ¸æ¹æ³ |
| | | set_AbandonCheck(); |
| | | }) |
| | | //#endregion |
| | | |
| | |
| | | "HEmpName": data.HEmpName, |
| | | "HRemark": data.HRemark |
| | | }); |
| | | if (data.æ¯å¦å®¡æ ¸ == "true") { |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//å®¡æ ¸æé®ç¦ç¨ |
| | | $('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false);//åå®¡æ ¸æé®å¯ç¨ |
| | | } else { |
| | | $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//åå®¡æ ¸æé®ç¦ç¨ |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//å®¡æ ¸æé®å¯ç¨ |
| | | } |
| | | PicUpload(); |
| | | layer.close(index); |
| | | } |
| | |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#region ä¿ååæµè§æ¹æ³ |
| | | |
| | | //#region åå®¡æ ¸æ¹æ³ |
| | | function set_AbandonCheck() { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Cj_StationInBill/set_AbandonCheck", |
| | | data: { "HInterID": linterid, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.alert(result.Message, { icon: 6 }); |
| | | $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//åå®¡æ ¸æé®ç¦ç¨ |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//å®¡æ ¸æé®å¯ç¨ |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#region ä¿ååæµè§æ¹æ³ |
| | | |