From a52aa2bd6f5d346735a059b63c573120d4f11af7 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 21 二月 2025 14:47:28 +0800
Subject: [PATCH] 齐套报表优化

---
 WebTM/views/车间管理/报表分析/Sc_WorkShopProcessWIPSumReport.html |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_WorkShopProcessWIPSumReport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_WorkShopProcessWIPSumReport.html"
index b0ede26..acd8fdf 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_WorkShopProcessWIPSumReport.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_WorkShopProcessWIPSumReport.html"
@@ -100,7 +100,7 @@
                                             </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">
@@ -182,7 +182,7 @@
                                             <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;">
@@ -205,6 +205,7 @@
                                 <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>
@@ -234,6 +235,7 @@
             //鏌ヨ鏉′欢
             var sWhere = "";
             var option = [];
+            var ins = "";
             var HModName = "Sc_WorkShopProcessWIPSumReport";
             //#endregion
 
@@ -258,6 +260,22 @@
                     //闅愯棌鍒楄缃�
                     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;
                           
                 };
@@ -297,7 +315,7 @@
                 //鍔犺浇鏁版嵁鍒扮綉鏍�
                 get_FastQuery();
                 //DisPlay_HideColumn();
-                ColFilter();
+/*                ColFilter();*/
             }
 
             //鍒濆鍖栬〃鏍�
@@ -307,7 +325,9 @@
                     , toolbar: '#toolbarDemo'
                     , cellMinWidth: 120
                     , totalRow: true
-                    , limit: Number.MAX_VALUE // 鏁版嵁琛ㄦ牸榛樿鍏ㄩ儴鏄剧ず
+                    , limit: 50 // 鏁版嵁琛ㄦ牸榛樿鍏ㄩ儴鏄剧ず
+                    , limits:[50,200,500,1000]
+                    , page: true
                     , height: 'full-70'
                 };
             }
@@ -349,7 +369,7 @@
                             }
                             option.cols = [col];
                             option.data = data1.data;
-                            table.render(option);
+                            ins = table.render(option);
                             layer.close(wait);
                         } else {
                             layer.close(wait);
@@ -679,7 +699,6 @@
                     }
                 })
             }
-
 
             //#endregion
         });

--
Gitblit v1.9.1