| | |
| | |  |
| | | |
| | | function GetWEBURL() { |
| | | //var WEBURL = "http://192.168.16.80:8011/"; //åå
¬å®¤æå¡å¨ |
| | | //var WEBURL = "http://localhost:8081/SWEAPI/"; //chæ¬å°*/ |
| | |
| | | <input type="text" class="layui-input" name="HMaterAtt" id="HMaterAtt"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <!--<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </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="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | var HICMOInterID = -1;//æ¥è®¡å订å主å
ç |
| | | var HModName = "JIT_CompleteDetailList"; |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var ins = ""; |
| | | //#endregion |
| | | |
| | | //#region åå§åçé¢ |
| | |
| | | case 'set_HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | //导åºexcel |
| | | case 'get_export': |
| | | get_Export(); |
| | | break; |
| | | }; |
| | | }); |
| | | //#endregion |
| | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | get_FastQuery(); |
| | | |
| | | ColFilter(); |
| | | } |
| | |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | layer.close(ajaxLoad); |
| | | |
| | | DisPlay_HideColumn(); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | function get_Export() { |
| | | var data = option.data; |
| | | data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, ''); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | table.exportFile(ins.config.id, data, "xls"); |
| | | } |
| | | |
| | | |
| | | //éèå设置 |
| | |
| | | } |
| | | } |
| | | table.render(option); |
| | | console.log(option) |
| | | } else { |
| | | table.render(option); |
| | | console.log(option) |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <!--<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-btn-container"> |
| | | <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="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var ins = ""; |
| | | var HModName = "Sc_EmployeePieceWorkReport"; |
| | | //#endregion |
| | | |
| | |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | //导åºexcel |
| | | case 'get_export': |
| | | var data = option.data |
| | | data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '').replaceAll(',', 'ï¼'); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | | break; |
| | | }; |
| | | }); |
| | |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | ColFilter(); |
| | | /*ColFilter();*/ |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , limit: 50 // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , limits: [50, 200, 500, 1000] |
| | | , page: true |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <!--<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | |
| | | <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-Print"><i class="layui-icon layui-icon-return"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var ins = ""; |
| | | var HModName = "Sc_WorkShopProcessWIPSumReport"; |
| | | //#endregion |
| | | |
| | |
| | | //éèå设置 |
| | | case 'btn-Print': |
| | | get_Print(); |
| | | break; |
| | | //导åºexcel |
| | | case 'get_export': |
| | | var data = option.data |
| | | data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '').replaceAll(',', 'ï¼'); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | | break; |
| | | |
| | | }; |
| | |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | ColFilter(); |
| | | /* ColFilter();*/ |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , limit: 50 // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , limits:[50,200,500,1000] |
| | | , page: true |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |