| | |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | // #region å
¨å±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | //#endregion |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | ,{ field: 'hmainid', title: '忮ID', hide: true } |
| | | , { 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: 'HEquipID', title: 'HEquipID', width: 200, hide: true } |
| | | , { field: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: '设å¤è§æ ¼', title: '设å¤è§æ ¼', width: 200 } |
| | | , { field: '设å¤åå·', title: '设å¤åå·', width: 200 } |
| | | , { field: 'HRepairID', title: 'HRepairID', width: 200, hide: true } |
| | | , { field: '维修项ç®ä»£ç ', title: '维修项ç®ä»£ç ', width: 200 } |
| | | , { field: '维修项ç®', title: '维修项ç®', width: 160 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: '维修人代ç ', title: '维修人代ç ', width: 200 } |
| | | , { field: '维修人', title: '维修人', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 115 } |
| | | , { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 115 } |
| | | , { field: 'è´è´£äºº', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'ç»´ä¿®å¼å§æ¥æ', title: 'ç»´ä¿®å¼å§æ¥æ', width: 160, templet: "<div>{{d.ç»´ä¿®å¼å§æ¥æ ==null ?'':layui.util.toDateString(d.ç»´ä¿®å¼å§æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>"} |
| | | , { field: 'ç»´ä¿®ç»ææ¥æ', title: 'ç»´ä¿®ç»ææ¥æ', width: 160, templet: "<div>{{d.ç»´ä¿®ç»ææ¥æ ==null ?'':layui.util.toDateString(d.ç»´ä¿®ç»ææ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ç»´ä¿®å
容', title: 'ç»´ä¿®å
容', width: 200 } |
| | | , { field: 'æ¶é´åä½', title: 'æ¶é´åä½', width: 200 } |
| | | , { field: '计å维修工æ¶', title: '计å维修工æ¶', width: 200 } |
| | | , { field: 'å®é
维修工æ¶', title: 'å®é
维修工æ¶', width: 200 } |
| | | , { field: 'ç»´ä¿®è¦æ±', title: 'ç»´ä¿®è¦æ±', width: 200 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HRepairID1', title: 'HRepairID1', width: 115, hide: true } |
| | | , { field: '表ä½ç»´ä¿®é¡¹ç®ä»£ç ', title: '表ä½ç»´ä¿®é¡¹ç®ä»£ç ', width: 200 } |
| | | , { field: '表ä½ç»´ä¿®é¡¹ç®', title: '表ä½ç»´ä¿®é¡¹ç®', width: 200 } |
| | | , { field: '表ä½ç»´ä¿®è¦æ±', title: '表ä½ç»´ä¿®è¦æ±', width: 200 } |
| | | , { field: 'HManagerID1', title: 'HManagerID1', width: 115, hide: true } |
| | | , { field: '表ä½è´è´£äººä»£ç ', title: '表ä½è´è´£äººä»£ç ', width: 200 } |
| | | , { field: '表ä½è´è´£äºº', title: '表ä½è´è´£äºº', width: 200 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'HBillType', title: 'HBillType', width: 200, hide: true } |
| | | ]] |
| | | }; |
| | | |
| | | var index = layer.load(0); |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch (obj.event) { |
| | | case 'btn-Add': |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤ç»´ä¿®å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_Add_EqpMaintenanceBillList.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | //æ°å¢ |
| | | case 'btn-Add': set_AddNew(); |
| | | break; |
| | | case 'btn-Edit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾è®¾å¤ç»´ä¿®å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_Add_EqpMaintenanceBillList.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | case 'btn-Edit': set_ShowBill(); |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpRepairWorkBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | //å é¤ |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | // æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | // éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | //#endregion |
| | | |
| | | //#region å½å页é¢å è½½æææ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { 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: 'HEquipID', title: 'HEquipID', width: 200, hide: true } |
| | | , { field: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: '设å¤è§æ ¼', title: '设å¤è§æ ¼', width: 200 } |
| | | , { field: '设å¤åå·', title: '设å¤åå·', width: 200 } |
| | | , { field: 'HRepairID', title: 'HRepairID', width: 200, hide: true } |
| | | , { field: '维修项ç®ä»£ç ', title: '维修项ç®ä»£ç ', width: 200 } |
| | | , { field: '维修项ç®', title: '维修项ç®', width: 160 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: '维修人代ç ', title: '维修人代ç ', width: 200 } |
| | | , { field: '维修人', title: '维修人', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 115 } |
| | | , { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 115 } |
| | | , { field: 'è´è´£äºº', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'ç»´ä¿®å¼å§æ¥æ', title: 'ç»´ä¿®å¼å§æ¥æ', width: 160, templet: "<div>{{d.ç»´ä¿®å¼å§æ¥æ ==null ?'':layui.util.toDateString(d.ç»´ä¿®å¼å§æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ç»´ä¿®ç»ææ¥æ', title: 'ç»´ä¿®ç»ææ¥æ', width: 160, templet: "<div>{{d.ç»´ä¿®ç»ææ¥æ ==null ?'':layui.util.toDateString(d.ç»´ä¿®ç»ææ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ç»´ä¿®å
容', title: 'ç»´ä¿®å
容', width: 200 } |
| | | , { field: 'æ¶é´åä½', title: 'æ¶é´åä½', width: 200 } |
| | | , { field: '计å维修工æ¶', title: '计å维修工æ¶', width: 200 } |
| | | , { field: 'å®é
维修工æ¶', title: 'å®é
维修工æ¶', width: 200 } |
| | | , { field: 'ç»´ä¿®è¦æ±', title: 'ç»´ä¿®è¦æ±', width: 200 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HRepairID1', title: 'HRepairID1', width: 115, hide: true } |
| | | , { field: '表ä½ç»´ä¿®é¡¹ç®ä»£ç ', title: '表ä½ç»´ä¿®é¡¹ç®ä»£ç ', width: 200 } |
| | | , { field: '表ä½ç»´ä¿®é¡¹ç®', title: '表ä½ç»´ä¿®é¡¹ç®', width: 200 } |
| | | , { field: '表ä½ç»´ä¿®è¦æ±', title: '表ä½ç»´ä¿®è¦æ±', width: 200 } |
| | | , { field: 'HManagerID1', title: 'HManagerID1', width: 115, hide: true } |
| | | , { field: '表ä½è´è´£äººä»£ç ', title: '表ä½è´è´£äººä»£ç ', width: 200 } |
| | | , { field: '表ä½è´è´£äºº', title: '表ä½è´è´£äºº', width: 200 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'HBillType', title: 'HBillType', width: 200, hide: true } |
| | | ]] |
| | | }; |
| | | } |
| | | |
| | | //æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(0); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() |
| | | { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤ç»´ä¿®å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_Add_EqpMaintenanceBillList.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | function set_ShowBill() |
| | | { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾è®¾å¤ç»´ä¿®å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_Add_EqpMaintenanceBillList.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpRepairWorkBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HDate1 + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#btnSearch").click(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HDate1 + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | //$("#HBillType").val("");//åæ®ç±»å |
| | | //$("#HBillNo").val("");//åæ®å· |
| | | //$("#HSourceBillNo").val("");//æºåå· |
| | | //$("#HCreateBy").val("");//å¶å人 |
| | | //$("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | //$("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | }); |
| | | } |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | //éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#btnSearch").click(); |
| | | } |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //laydate.render({ |
| | | // elem: '#HDate' |