| | |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <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/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç¶æ</label> |
| | | <div class="layui-input-block"> |
| | | <select name="Status" lay-filter="Status" style="width:190px;"> |
| | | <select name="HStatus" lay-filter="HStatus" style="width:190px;"> |
| | | <option value="-1" selected="selected">å
¨é¨</option> |
| | | <option value="0">æªå®¡æ ¸</option> |
| | | <option value="1">å·²å®¡æ ¸</option> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate" style="width:190px;"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1" style="width:190px;"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¨é¨ä¿¡æ¯</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="Dept" id="Dept" style="width:190px;"> |
| | | <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <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-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> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <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> |
| | | |
| | | var DataList; |
| | | var Name = "MouldScrapInHouseCellWidth"; |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | //å
¬ç¨åé |
| | | var sWhere = ""; |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', width: 200, hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200, totalRowText: 'å计', templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 200 } |
| | | , { field: 'è´è´£äººåç§°', title: 'è´è´£äººåç§°', width: 200 } |
| | | , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 200 } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 200 } |
| | | , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true } |
| | | , { field: 'éªæ¶å代ç ', title: 'éªæ¶å代ç ', width: 200 } |
| | | , { field: 'éªæ¶ååç§°', title: 'éªæ¶ååç§°', width: 200 } |
| | | , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true } |
| | | , { field: 'ä¿ç®¡å代ç ', title: 'ä¿ç®¡å代ç ', width: 200 } |
| | | , { field: 'ä¿ç®¡ååç§°', title: 'ä¿ç®¡ååç§°', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', 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: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true } |
| | | , { field: '模å
·ä»£ç ', title: '模å
·ä»£ç ', width: 200 } |
| | | , { field: '模å
·åç§°', title: '模å
·åç§°', width: 200 } |
| | | , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 200 } |
| | | , { field: 'è¾
å©å±æ§åç§°', title: 'è¾
å©å±æ§åç§°', width: 200 } |
| | | , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true } |
| | | , { field: 'è¾
å©è®¡éåä½ä»£ç ', title: 'è¾
å©è®¡éåä½ä»£ç ', width: 200 } |
| | | , { field: 'è¾
å©è®¡éåä½åç§°', title: 'è¾
å©è®¡éåä½åç§°', width: 200 } |
| | | , { field: 'æ¢ç®ç', title: 'æ¢ç®ç', width: 200 } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', width: 200 } |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', width: 200, totalRow: true } |
| | | , { field: 'åä»·', title: 'åä»·', width: 200 } |
| | | , { field: 'éé¢', title: 'éé¢', width: 200 } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 200 } |
| | | , { field: '使ç¨å¯¿å½', title: '使ç¨å¯¿å½', width: 200 } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 200 } |
| | | , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true } |
| | | , { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', width: 200 } |
| | | , { field: 'æ¶æä»åºåç§°', title: 'æ¶æä»åºåç§°', width: 200 } |
| | | , { field: 'HSPID', title: 'HSPID', 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 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: 'å
³èæ°é', 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 } |
| | | ]; |
| | | |
| | | var newColumns = []; |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else |
| | | { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | //ç¶åæå¼åä¸å»td[data-field="itemNo" å®ä¹å¨åªä¸ªååæ¾ç¤º |
| | | var countQty = 0; |
| | | for (var i = 0; i < DataList.length; i++) { |
| | | countQty += parseFloat(DataList[i].宿¶æ°é); |
| | | } |
| | | this.elem.next().find('.layui-table-total td[data-field="宿¶æ°é"] .layui-table-cell').text(countQty); |
| | | } |
| | | }; |
| | | var index = layer.load(0); |
| | | var option = []; |
| | | var DataList; |
| | | var Name = "MouldScrapInHouseCellWidth"; |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | 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: '../模治å
·ä»åºç®¡ç/Sc_Add_MouldScrapInBillList.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: '../模治å
·ä»åºç®¡ç/Sc_Add_MouldScrapInBillList.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() + "Sc_MouldScrapInHouseBill/DeltetMouldScrapInHouseBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | 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; |
| | | |
| | | case 'btn-Audit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldScrapInHouseBill/MouldScrapInHouseAudit", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | //å®¡æ ¸æé® |
| | | case 'btn-Audit':set_CheckBill(); |
| | | break; |
| | | |
| | | case 'btn-DeAudit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldScrapInHouseBill/MouldScrapInHouseAudit", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | //åå®¡æ ¸æé® |
| | | case 'btn-DeAudit':set_AbandonCheck(); |
| | | break; |
| | | case 'btn-Print': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + InterID); |
| | | //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | //é¢è§æé® |
| | | case 'btn-Print':get_PrintReport(); |
| | | break; |
| | | case 'btn-Cell': //ä¿åå宽 |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) |
| | | { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width(); |
| | | if (colName != "" && colName != null) |
| | | { |
| | | arr.push(colWidth == -1 ? 200 : colWidth); |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | SearchLoad(sWhere, table, option); |
| | | //ä¿åå宽æé® |
| | | case 'btn-Cell': set_SaveGridColWidth(); |
| | | break; |
| | | case 'btn-RefreshCell': //é»è®¤å宽 |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(200); //é»è®¤å®½åº¦200 |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | SearchLoad(sWhere, table, option); |
| | | //é»è®¤å宽æé® |
| | | case 'btn-RefreshCell': set_DefaultGridColWidth(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapInHouseBill/GetMouldScrapInHouseBill', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | get_Display(sWhere); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $('#Status').find("option[value='-1']").attr("selected", true); |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val(""); |
| | | $("#Dept").val(""); |
| | | $("#Part").val(""); |
| | | $("#btnSearch").click(); |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | SearchLoad(sWhere, table, option); |
| | | |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var HStatus = $("select[name='HStatus']").val();//ç¶æ |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | var HDept = $("#HDept").val(); //é¨é¨ä¿¡æ¯ |
| | | if (HStatus) { |
| | | switch (HStatus) { |
| | | case '-1': //å
¨é¨ |
| | | sWhere += ""; |
| | | break; |
| | | case '0': //æªå®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº=''"; |
| | | break; |
| | | case '1': //å·²å®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº<>''"; |
| | | break; |
| | | case '2': //å·²å
³é |
| | | sWhere += " and å
³é人<>''"; |
| | | default: |
| | | |
| | | } |
| | | } |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HDept) { |
| | | sWhere += " and é¨é¨åç§° like '%" + HDept + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //è·åå宽 |
| | | function getColumnsWidth() { |
| | | var result = []; |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | //è·åå宽 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList', |
| | | async: false, |
| | | type: "Get", |
| | | dataType: "json", |
| | | data: { "colNum": colNum, "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.code == 1) { |
| | | result = data1.data; |
| | | } |
| | | else if (data1.code == -1) { |
| | | |
| | | } |
| | | else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapInBill/get_Display', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾åæ® |
| | | 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: '../模治å
·ä»åºç®¡ç/Sc_Add_MouldScrapInBillList.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | get_FastQuery(table, option); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldScrapInBill/set_CheckBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "CurUserName": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(table, option); |
| | | }); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | |
| | | //åå®¡æ ¸ |
| | | function set_AbandonCheck() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldScrapInBill/set_AbandonCheck", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "CurUserName": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | 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(); |
| | | layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + InterID); |
| | | //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢æ¨¡æ²»å
·æ¥åºå
¥åºå', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../模治å
·ä»åºç®¡ç/Sc_Add_MouldScrapInBillList.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | get_FastQuery(table, option); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å é¤ |
| | | 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) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_MouldScrapInBill/set_DeleteBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | 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 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å¤å¶åæ® |
| | | function set_CopyBill() { |
| | | |
| | | } |
| | | |
| | | //å
³éåæ® |
| | | function set_CloseBill() { |
| | | |
| | | } |
| | | |
| | | //åå
³éåæ® |
| | | function set_CancelCloseBill() { |
| | | |
| | | } |
| | | |
| | | //ä½åºåæ® |
| | | function set_CancelltionBill() { |
| | | |
| | | } |
| | | |
| | | //åä½åº |
| | | function set_AbandonCancelltion() { |
| | | |
| | | } |
| | | |
| | | //èæè·åéä¸è¡ï¼ä½æ¯æ æ³è·åéä¸è¡æ°æ® |
| | | //table.on('row(mainTable)', function (obj) { |
| | | // 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'); |
| | | // } else { |
| | | // obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked'); |
| | | // } |
| | | // layui.each(table.cache.userTable, function (i, l) { |
| | | // if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | // l.LAY_CHECKED = flag; |
| | | // } |
| | | // }); |
| | | //}); |
| | | /** */ |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { field: 'hmainid', title: '忮ID', width: 200, hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 200 } |
| | | , { field: 'è´è´£äººåç§°', title: 'è´è´£äººåç§°', width: 200 } |
| | | , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 200 } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 200 } |
| | | , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true } |
| | | , { field: 'éªæ¶å代ç ', title: 'éªæ¶å代ç ', width: 200 } |
| | | , { field: 'éªæ¶ååç§°', title: 'éªæ¶ååç§°', width: 200 } |
| | | , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true } |
| | | , { field: 'ä¿ç®¡å代ç ', title: 'ä¿ç®¡å代ç ', width: 200 } |
| | | , { field: 'ä¿ç®¡ååç§°', title: 'ä¿ç®¡ååç§°', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', 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: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true } |
| | | , { field: '模å
·ä»£ç ', title: '模å
·ä»£ç ', width: 200 } |
| | | , { field: '模å
·åç§°', title: '模å
·åç§°', width: 200 } |
| | | , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 200 } |
| | | , { field: 'è¾
å©å±æ§åç§°', title: 'è¾
å©å±æ§åç§°', width: 200 } |
| | | , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true } |
| | | , { field: 'è¾
å©è®¡éåä½ä»£ç ', title: 'è¾
å©è®¡éåä½ä»£ç ', width: 200 } |
| | | , { field: 'è¾
å©è®¡éåä½åç§°', title: 'è¾
å©è®¡éåä½åç§°', width: 200 } |
| | | , { field: 'æ¢ç®ç', title: 'æ¢ç®ç', width: 200 } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', width: 200 } |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', width: 200, totalRow: true } |
| | | , { field: 'åä»·', title: 'åä»·', width: 200 } |
| | | , { field: 'éé¢', title: 'éé¢', width: 200, totalRow: true } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 200 } |
| | | , { field: '使ç¨å¯¿å½', title: '使ç¨å¯¿å½', width: 200 } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 200 } |
| | | , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true } |
| | | , { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', width: 200 } |
| | | , { field: 'æ¶æä»åºåç§°', title: 'æ¶æä»åºåç§°', width: 200 } |
| | | , { field: 'HSPID', title: 'HSPID', 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 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: 'å
³èæ°é', 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 } |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | //设置å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $('#HStatus').find("option[value='-1']").attr("selected", true); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#HDept").val(""); |
| | | } |
| | | |
| | | //ä¿åå宽 |
| | | function set_SaveGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(colWidth == -1 ? 200 : colWidth); |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | |
| | | //é»è®¤å宽 |
| | | function set_DefaultGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(200); //é»è®¤å®½åº¦200 |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | function SearchLoad(sWhere,table,option) { |
| | | var Status = $("select[name='Status']").val();//ç¶æ |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | var Dept = $("#Dept").val(); //é¨é¨ä¿¡æ¯ |
| | | var Part = $("#Part").val(); //ç©æä¿¡æ¯ |
| | | if (Status) { |
| | | switch (Status) { |
| | | case '-1': //å
¨é¨ |
| | | sWhere += ""; |
| | | break; |
| | | case '0': //æªå®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº=''"; |
| | | break; |
| | | case '1': //å·²å®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº<>''"; |
| | | break; |
| | | case '2': //å·²å
³é |
| | | sWhere += " and å
³é人<>''"; |
| | | default: |
| | | |
| | | } |
| | | } |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HDate1 + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (Dept) { |
| | | sWhere += " and é¨é¨åç§° like '%" + Dept + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapInHouseBill/GetMouldScrapInHouseBill', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | 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 = ""; |
| | | } |
| | | |
| | | function getColumnsWidth() { |
| | | var result = []; |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | //è·åå宽 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList', |
| | | async: false, |
| | | type: "Get", |
| | | dataType: "json", |
| | | data: { "colNum": colNum, "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.code == 1) { |
| | | result = data1.data; |
| | | } |
| | | else if (data1.code == -1) |
| | | { |
| | | |
| | | } |
| | | else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | return result; |
| | | } |
| | | </script> |
| | | |
| | | </body> |