| | |
| | | <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 option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , totalRow: true |
| | | ,limit: 10 |
| | | , cols: [[ |
| | | var columns = [ |
| | | { 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: '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: 'ä¿ç®¡å代ç ', 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: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { 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, 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 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> |