From 4e02590562894bf6614bc3066f6689f1b00ea2ce Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 14 八月 2024 16:39:33 +0800
Subject: [PATCH] #

---
 zy-asrs-wms/src/main/webapp/static/js/report/workOut.js |   39 ++++++++++++---------------------------
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/zy-asrs-wms/src/main/webapp/static/js/report/workOut.js b/zy-asrs-wms/src/main/webapp/static/js/report/workOut.js
index d442626..b41df8f 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/report/workOut.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/report/workOut.js
@@ -1,12 +1,10 @@
 var pageCurr;
 function getCol() {
     var cols = [
-        {field: 'ioTime$', align: 'center', title: '鍑哄簱鏃ユ湡', width: 200},
-        {field: 'io_time', align: 'center', title: '鍑哄簱鏃ユ湡', width: 200},
-        {field: 'order_no', align: 'center', title: '鍗曟嵁缂栧彿', width: 200}
-        ,{field: 'loc_no', align: 'center',title: '搴撲綅鍙�'}
-        ,{field: 'crn_str_time', align: 'center',title: '鍫嗗灈鏈哄惎鍔ㄦ椂闂�'}
-        ,{field: 'crn_end_time', align: 'center',title: '鍫嗗灈鏈哄仠姝㈡椂闂�'}
+        {field: 'ioTime$', align: 'center', title: '鍑哄簱鏃ユ湡', width: 200}
+        ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
+        ,{field: 'crnStrTime', align: 'center',title: '鍫嗗灈鏈哄惎鍔ㄦ椂闂�'}
+        ,{field: 'crnEndTime', align: 'center',title: '鍫嗗灈鏈哄仠姝㈡椂闂�'}
     ];
     cols.push.apply(cols, detlCols);
     return cols;
@@ -110,28 +108,15 @@
                         data: JSON.stringify(param),
                         contentType:'application/json;charset=UTF-8',
                         method: 'POST',
-                        xhrFields: {
-                            responseType: "blob" // 璁剧疆鍝嶅簲绫诲瀷涓轰簩杩涘埗鏁版嵁
-                        },
                         success: function (res) {
-                            // 鍒涘缓涓�涓复鏃剁殑涓嬭浇閾炬帴
-                            const url = window.URL.createObjectURL(res);
-                            // 鍒涘缓涓�涓殣钘忕殑 <a> 鍏冪礌骞惰缃笅杞介摼鎺�
-                            const a = document.createElement("a");
-                            a.style.display = "none";
-                            a.href = url;
-                            a.download = "export.xlsx"; // 鎸囧畾涓嬭浇鐨勬枃浠跺悕
-                            document.body.appendChild(a);
-
-                            // 瑙﹀彂鐐瑰嚮浜嬩欢浠ュ紑濮嬩笅杞�
-                            a.click();
-
-                            // 娓呯悊涓存椂璧勬簮
-                            setTimeout(function () {
-                                window.URL.revokeObjectURL(url);
-                                document.body.removeChild(a);
-                                layer.closeAll();
-                            }, 100);
+                            layer.closeAll();
+                            if (res.code === 200) {
+                                table.exportFile(titles,res.data,'xls');
+                            } else if (res.code === 403) {
+                                top.location.href = baseUrl+"/";
+                            } else {
+                                layer.msg(res.msg)
+                            }
                         },
                         fail: function (){
                             layer.msg('瀵煎嚭澶辫触', {icon: 2})

--
Gitblit v1.9.1