From 7ae052d141e69fe9e19392172fc2960134a03232 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 十二月 2025 15:54:52 +0800
Subject: [PATCH] 1.采购入库单列表、直接调拨单列表、其他出库单列表、生产入库列表、销售出库单列表:layui中开发 查看包装明细
---
WebTM/views/质量管理/质量报表/QC_ProdBadReasonStatistics.html | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html"
index 413fe0f..4d00565 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProdBadReasonStatistics.html"
@@ -91,6 +91,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"><i class="layui-icon layui-icon-form"></i>瀵煎嚭</button>
</div>
</script>
</form>
@@ -181,7 +182,7 @@
data_t.push(HBadReason_HXH);
switch ($("#HDeptName").val()) {
case '绾垮寘杞﹂棿':
- HTitle = '姝ヨ繘鐢垫満鐩撮�氱巼瓒嬪娍鍥�';
+ HTitle = '绾垮寘缁曠嚎鐩撮�氱巼瓒嬪娍鍥�';
H_X = ["鍖濋棿涓嶈壇", "鐢甸樆涓嶈壇", "鎶ょ嚎鐩掍笉鑹�"];
data_t.push(HBadReason_ZJ);
@@ -332,6 +333,10 @@
case 'HideColumn':
get_HideColumn();
break;
+ //瀵煎嚭
+ case 'get_export':
+ get_Export();
+ break;
};
});
//閲嶇疆鎸夐挳
@@ -386,6 +391,7 @@
, toolbar: '#toolbarDemo'
, height: 'full-490'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -437,6 +443,7 @@
option.data = data1.data;
table.render(option);
+ ins = table.render(option);
layer.close(wait);
} else {
layer.close(wait);
@@ -471,6 +478,26 @@
get_FastQuery();
}
+ //#region 瀵煎嚭Execel
+ 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().replaceAll(/[\r\n]+/g, '').replaceAll(",","锛�"); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+ }
+ }
+ });
+
+ table.exportFile(ins.config.id, option.data, "xls");
+ }
+ //#endregion
+
+
//闅愯棌鍒楄缃�
function get_HideColumn() {
var colName = "";
--
Gitblit v1.9.1