From 43c633b50bc7dca4d78855e57546fe16e2e44562 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 01 七月 2024 17:24:18 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/车间管理/报表分析/Kf_ProdProcessSumReport_DyeColor.html | 37 +++++++++++++++++++++++++++++++++----
1 files changed, 33 insertions(+), 4 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/Kf_ProdProcessSumReport_DyeColor.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/Kf_ProdProcessSumReport_DyeColor.html"
index df31c12..498443b 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/Kf_ProdProcessSumReport_DyeColor.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/Kf_ProdProcessSumReport_DyeColor.html"
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>鐧藉澂鍙戝竷鏄庣粏鎶ヨ〃</title>
+ <title>鏌撳巶姹囨�绘姤琛�</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -143,6 +143,7 @@
<table class="" id="mainTable" lay-filter="mainTable"></table>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
+ <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>
<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="btn-detail"><i class="layui-icon layui-icon-return"></i>鏄庣粏鎶ヨ〃</button>
@@ -177,6 +178,8 @@
var HModName = "ProdProcessSumReport_DyeColor";
var titleData = ["HCusID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ var ins; //鐢ㄤ簬瀵煎嚭excel
//#endregion
//#region 杩涘叆椤甸潰鏃㈠姞杞�
@@ -190,6 +193,10 @@
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
switch (obj.event) {
+ //瀵煎嚭excel
+ case 'get_export':
+ get_Export();
+ break;
//閫�鍑�
case 'btn-exit': Pub_Close(2);
break;
@@ -388,7 +395,7 @@
, cols: [col]
, data: data1.data
};
- table.render(option);
+ ins = table.render(option);
} else {
option = {
elem: '#mainTable'
@@ -413,7 +420,7 @@
, done: function (res) {
}
};
- table.render(option);
+ ins = table.render(option);
}
},
error: function (err) {
@@ -470,7 +477,7 @@
// }
// }
//}
- table.render(option);
+ ins = table.render(option);
//璁$畻鐧藉澂鍙戝竷鍚堣鍏枻鏁�
var sumHMaterOutQty = 0;
@@ -578,6 +585,27 @@
sWhere = "";
}
+ //#region 瀵煎嚭Execel
+ function get_Export() {
+ var ModRightNameCheck = "Kf_ProdProcessSumReport_DyeColor_ExportExcel";
+
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ table.exportFile(ins.config.id, option.data, "xls");
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
//闅愯棌鍒楄缃�
function get_HideColumn() {
@@ -737,6 +765,7 @@
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
+ res = res.replaceAll("'", "''");
return res;
}
//#endregion
--
Gitblit v1.9.1