| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <title>设å¤ä¿å
»è®°å½åå表</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>设å¤ä¿å
»è®°å½åå表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | |
| | | <option value="ZHSJ">䏿¶å½è¿å</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy"> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate"> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button>--> |
| | | <!--<div class="layui-colla-content"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </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-Add"><i class="layui-icon layui-icon-add-1"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-edit"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <!--<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-reload"><i class="layui-icon layui-icon-refresh"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>驳å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详æ
</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>çæéè´§å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button>--> |
| | | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></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> |
| | | </div> |
| | |
| | | <script src="../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , table1 = layui.table |
| | | , table2 = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | //#endregion |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: 'hmainid', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160, hide: true } |
| | | , { 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: 'æè¦', title: 'æè¦', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 200 } |
| | | , { field: 'é
件代ç ', title: 'é
件代ç ', 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: 'hsubid', title: 'hsubid', 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: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, hide: true } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, hide: true } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 115, hide: true } |
| | | , { 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 } |
| | | ]] |
| | | }; |
| | | |
| | | var index = layer.load(0); |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | //#endregion |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | 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: false, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_EquipMaintainBillEdit.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | 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: 'ç¼è¾è®¾å¤ä¿å
»è®°å½å ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_EquipMaintainBillEdit.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | |
| | | set_ShowBill(); |
| | | break; |
| | | //å é¤ |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].hmainid.toString(); |
| | | set_DeleteBill(); |
| | | break; |
| | | //æµè§ |
| | | case 'btn-view': |
| | | get_ViewReport(); |
| | | break; |
| | | //æå° |
| | | case 'btn-print': |
| | | get_PrintReport(); |
| | | break; |
| | | //å·æ° |
| | | case 'get_Refresh': |
| | | set_Refresh(); |
| | | break; |
| | | |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sb_EquipMaintainBill/DeltetEquipMaintainBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": HInterID }, |
| | | 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 'get_Exit': |
| | | Pub_Close(2); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | //ç¹å»ä¸»è¡¨å¸¦åºä»è¡¨æ°æ® |
| | | table.on('row(mainTable)', function (obj) { //注ï¼tool æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | var datas = obj.data; //è·å¾å½åè¡æ°æ® |
| | | var linterid = datas.hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sb_EquipMaintainBill/Sb_EquipMaintainBillListProjectDetaiNew', |
| | | type: "GET", |
| | | data: { "HInterID": linterid }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table1.render(option1); |
| | | option2.data = data1.list[1]; |
| | | table2.render(option2); |
| | | } else { |
| | | layer.alert("è·å失败", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | //form.on('submit(btnReSearch)', function (data) { |
| | | // $("#HBillType").val("");//åæ®ç±»å |
| | | // $("#HBillNo").val("");//åæ®å· |
| | | // $("#HSourceBillNo").val("");//æºåå· |
| | | // $("#HCreateBy").val("");//å¶å人 |
| | | // $("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | // $("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | // $("#btnSearch").click(); |
| | | //}); |
| | | |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | //var HBillType = $("#HBillType").val();//åæ®ç±»å |
| | | //var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | //var HCreateBy = $("#HCreateBy").val();//å¶å人 |
| | | //var BenginHCreateDate = $("#BenginHCreateDate").val();//å¼å§å¶åæ¶é´ |
| | | //var EndHCreateDate = $("#EndHCreateDate").val();//ç»æå¶åæ¶é´ |
| | | //if (HBillNo) { |
| | | // sWhere += " and HBillNo like '%" + HBillNo + "%'"; |
| | | //} |
| | | //if (HCreateBy) { |
| | | // sWhere += " and HCreateBy like '%" + HCreateBy + "%'"; |
| | | //} |
| | | //if (BenginHCreateDate) { |
| | | // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'"; |
| | | //} |
| | | //if (EndHCreateDate) { |
| | | // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'"; |
| | | //} |
| | | var index = layer.load(0); |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | |
| | | //#region æ¤é¡µé¢æææ¹æ³ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼(主表) |
| | | set_InitGrid(); |
| | | //åå§åè¡¨æ ¼(å表1) |
| | | set_InitGrid1(); |
| | | //åå§åè¡¨æ ¼(å表2) |
| | | set_InitGrid2(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | } |
| | | //åå§åä¸»è¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: '400' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: 'hmainid', 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: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200, hide: true } |
| | | , { 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: 'é
件代ç ', title: 'é
件代ç ', 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: 'hsubid', title: 'hsubid', 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, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, hide: true } |
| | | , { 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, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { 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 } |
| | | ]] |
| | | } |
| | | } |
| | | //åå§åè¡¨æ ¼(å表1) |
| | | function set_InitGrid1() { |
| | | var ajaxLoad = layer.load(); |
| | | option1 = { |
| | | elem: '#mainTable1' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '350' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , 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 = []; |
| | | table1.render(option1); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | //åå§åè¡¨æ ¼(å表2) |
| | | function set_InitGrid2() { |
| | | var ajaxLoad = layer.load(); |
| | | option2 = { |
| | | elem: '#mainTable2' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '350' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , 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, hide: true } |
| | | , { field: 'HUnitID', title: 'åä½ID', width: 200, hide: true } |
| | | , { field: 'HUnitNumber', title: 'åä½ä»£ç ', width: 200 } |
| | | , { field: 'HUnitName', title: 'åä½åç§°', width: 200 } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', width: 200, hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', width: 200 } |
| | | , { field: 'HManagerName', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'HQty', title: 'å®é
ç¨é', width: 200 } |
| | | , { field: 'HQtyMust', title: 'æ åç¨é', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', width: 200 } |
| | | ]] |
| | | }; |
| | | option2.data = []; |
| | | table2.render(option2); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]}, |
| | | 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 }); |
| | | layer.alert("æ²¡ææ°æ®è®°å½!", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | var index = layer.load(0); |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤ä¿å
»è®°å½å ', |
| | | closeBtn: false, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_EquipMaintainBillEdit.html?OperationType=1&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | } |
| | | }); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | //ç¼è¾ |
| | | function set_ShowBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾è®¾å¤ä¿å
»è®°å½å ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_EquipMaintainBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , 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 HInterID = data[0].hmainid.toString(); |
| | | |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sb_EquipMaintainBill/DeltetEquipMaintainBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] }, |
| | | 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_ViewReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainBill&OpenTmp=设å¤ä¿å
»è®°å½æ¡ç "); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | //æå° |
| | | function get_PrintReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainBill&OpenTmp=设å¤ä¿å
»è®°å½æ¡ç "); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | //å·æ° |
| | | function set_Refresh() { |
| | | $("#btnSearch").click(); |
| | | } |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | //var HBillType = $("#HBillType").val();//åæ®ç±»å |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HCreateBy = $("#HCreateBy").val();//å¶å人 |
| | | var BenginHCreateDate = $("#BenginHCreateDate").val();//å¼å§å¶åæ¶é´ |
| | | var EndHCreateDate = $("#EndHCreateDate").val();//ç»æå¶åæ¶é´ |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HCreateBy) { |
| | | sWhere += " and å¶å人 like '%" + HCreateBy + "%'"; |
| | | } |
| | | if (BenginHCreateDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + BenginHCreateDate + "'"; |
| | | } |
| | | if (EndHCreateDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + EndHCreateDate + "'"; |
| | | } |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | //$("#HBillType").val("");//åæ®ç±»å |
| | | //$("#HBillNo").val("");//åæ®å· |
| | | //$("#HSourceBillNo").val("");//æºåå· |
| | | //$("#HCreateBy").val("");//å¶å人 |
| | | //$("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | //$("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | }); |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HSourceBillNo").val("");//æºåå· |
| | | $("#HCreateBy").val("");//å¶å人 |
| | | $("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | $("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | sWhere = ""; |
| | | $("#btnSearch").click(); |
| | | } |
| | | |
| | | |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | //#endregion |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |