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_EmployeePieceWorkReport.html | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 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_EmployeePieceWorkReport.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_EmployeePieceWorkReport.html"
index bfde583..80c4ca3 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_EmployeePieceWorkReport.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_EmployeePieceWorkReport.html"
@@ -113,7 +113,7 @@
</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">
@@ -195,7 +195,7 @@
<div class="layui-inline">
<input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
</div>
- </div>
+ </div>-->
</div>
</div>
</div>
@@ -204,6 +204,7 @@
<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>
@@ -232,6 +233,7 @@
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
+ var ins = "";
var HModName = "Sc_EmployeePieceWorkReport";
//#endregion
@@ -252,6 +254,22 @@
//闅愯棌鍒楄缃�
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;
};
});
@@ -290,7 +308,7 @@
//鍔犺浇鏁版嵁鍒扮綉鏍�
get_FastQuery();
//DisPlay_HideColumn();
- ColFilter();
+ /*ColFilter();*/
}
//鍒濆鍖栬〃鏍�
@@ -300,7 +318,9 @@
, toolbar: '#toolbarDemo'
, cellMinWidth: 120
, totalRow: true
- , limit: Number.MAX_VALUE // 鏁版嵁琛ㄦ牸榛樿鍏ㄩ儴鏄剧ず
+ , limit: 50 // 鏁版嵁琛ㄦ牸榛樿鍏ㄩ儴鏄剧ず
+ , limits: [50, 200, 500, 1000]
+ , page: true
, height: 'full-70'
};
}
@@ -342,7 +362,7 @@
}
option.cols = [col];
option.data = data1.data;
- table.render(option);
+ ins = table.render(option);
layer.close(wait);
} else {
layer.close(wait);
--
Gitblit v1.9.1