Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
| | |
| | | //var WEBURL = "http://101.37.171.70/API/"; //å
¬å¸æå¡å¨ |
| | | //var WEBURL = "http://localhost:8080/API/"; //颿忬å°é
ç½® |
| | | //var WEBURL = "http://localhost:8082/lubao"; //颿忬å°é
ç½® |
| | | //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //æ¨é²æ¬å°é
ç½® |
| | | var WEBURL = "http://localhost:8082/LuBaoAPI/"; //æ¨é²æ¬å°é
ç½® |
| | | //var WEBURL = "http://10.1.4.154/API/"; //æ±ä¸°å®¢æ· |
| | | //var WEBURL = "http://10.1.4.155/API/"; //æ±ä¸°å®¢æ·NEW |
| | | var WEBURL = "http://47.96.97.237/API/"; //æºäºæå¡å¨ |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print"><i class="layui-icon layui-icon-circle"></i>é¢è§</button> |
| | | |
| | | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell"><i class="layui-icon layui-icon-ok"></i>ä¿åå宽</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>é»è®¤å宽</button> |
| | | |
| | | </div> |
| | | </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({ |
| | |
| | | , 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: 90 |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | ,limit: 10 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160, totalRowText: 'å计', templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160 } |
| | | , { 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: 115 } |
| | | , { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°', width: 200 } |
| | | , { field: 'æè¦', title: 'æè¦', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { 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 } |
| | | ]] |
| | | , limit: 10 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | //ç¶åæå¼åä¸å»td[data-field="itemNo" å®ä¹å¨åªä¸ªååæ¾ç¤º |
| | |
| | | |
| | | // })) |
| | | //}) |
| | | |
| | | |
| | | } |
| | | }; |
| | | var index = layer.load(0); |
| | |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | 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: true, |
| | | 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 }); |
| | | } |
| | | }); |
| | | 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: true, |
| | | 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 }); |
| | | } |
| | | }); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | 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> |