From e67503fd8cc820ff14fa3398a9a7e072d4964444 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期五, 06 五月 2022 14:25:57 +0800
Subject: [PATCH] 新增导出功能

---
 src/main/webapp/static/js/pakin/pakin.js                             |    5 +++--
 src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java |    1 +
 src/main/resources/application.yml                                   |    2 +-
 src/main/webapp/static/js/pakout/pakout.js                           |   20 ++++++++++----------
 src/main/webapp/views/order/order.html                               |    4 ++--
 src/main/webapp/views/pakin/pakin.html                               |   16 ++++++++++++++--
 6 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
index 290cbac..db257ec 100644
--- a/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
+++ b/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
@@ -359,6 +359,7 @@
         for (Pakout pakout : pakouts) {
             total = pakout.getAnfme() + total;
         }
+
         StoPrintVo vo = new StoPrintVo();
         vo.setDocNum(param.getOrderNo());
         vo.setList(pakouts);
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 676db96..9133fe6 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,7 +14,7 @@
     #    password: xltys1995
     # sql-server
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://192.168.1.56:1433;databasename=htasrs
+    url: jdbc:sqlserver://192.168.4.15:1433;databasename=htasrs
     username: sa
     password: sa@123
   mvc:
diff --git a/src/main/webapp/static/js/pakin/pakin.js b/src/main/webapp/static/js/pakin/pakin.js
index e6adeb6..fafc0e7 100644
--- a/src/main/webapp/static/js/pakin/pakin.js
+++ b/src/main/webapp/static/js/pakin/pakin.js
@@ -17,7 +17,7 @@
         page: true,
         limit: 16,
         limits: [16, 30, 50, 100, 200, 500],
-        toolbar: '#toolbar',
+        toolbar: '#other',
         cellMinWidth: 50,
         cols: [[
             {type: 'checkbox'}
@@ -90,6 +90,7 @@
 
     // 鐩戝惉澶村伐鍏锋爮浜嬩欢
     table.on('toolbar(pakin)', function (obj) {
+        console.log(obj)
         var checkStatus = table.checkStatus(obj.config.id);
         switch(obj.event) {
             case 'addData':
@@ -105,7 +106,7 @@
                });
                del(ids);
                break;
-            case 'exportData':
+            case 'otherExportData':
                 layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
                     var titles=[];
                     var fields=[];
diff --git a/src/main/webapp/static/js/pakout/pakout.js b/src/main/webapp/static/js/pakout/pakout.js
index 76957a9..f401151 100644
--- a/src/main/webapp/static/js/pakout/pakout.js
+++ b/src/main/webapp/static/js/pakout/pakout.js
@@ -114,16 +114,16 @@
                 if (data.length === 0){
                     layer.msg('璇峰嬀閫夋墦鍗拌褰�', {icon: 9});
                 } else {
-                    layer.msg('鏉冮檺涓嶈冻銆佽鑱旂郴绠$悊鍛�', {icon: 3});
-                    // console.log(data);
-                    // layer.confirm(res.msg, {
-                    //         shadeClose: true
-                    //         , btn: ['鎵撳嵃鎷h揣鍗�']
-                    //     }, function() {
-                    //         layer.closeAll();
-                    //         printPakouts(data.number);
-                    //     }
-                    // )
+                    // layer.msg('鏉冮檺涓嶈冻銆佽鑱旂郴绠$悊鍛�', {icon: 3});
+                    console.log(data);
+                    layer.confirm(res.msg, {
+                            shadeClose: true
+                            , btn: ['鎵撳嵃鎷h揣鍗�']
+                        }, function() {
+                            layer.closeAll();
+                            printPakouts(data.number);
+                        }
+                    )
                 }
                 break;
             // 瀵煎嚭
diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html
index 88ddfa6..23b97cb 100644
--- a/src/main/webapp/views/order/order.html
+++ b/src/main/webapp/views/order/order.html
@@ -117,9 +117,9 @@
     {{#if (d.settle == 1){ }}
     <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stockOut" style="font-size: 16px">鎷h揣鍗�</a>
     {{# } }}
-    {{#if (d.settle == 2 || d.settle == 4){ }}
+<!--    {{#if (d.settle == 2 || d.settle == 4){ }}-->
     <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="print" style="font-size: 16px">鎵撳嵃</a>
-    {{# } }}
+<!--    {{# } }}-->
 </script>
 
 <script type="text/html" id="settleTpl">
diff --git a/src/main/webapp/views/pakin/pakin.html b/src/main/webapp/views/pakin/pakin.html
index 5f0227a..1454b28 100644
--- a/src/main/webapp/views/pakin/pakin.html
+++ b/src/main/webapp/views/pakin/pakin.html
@@ -54,12 +54,24 @@
 </div>
 <script type="text/html" id="toolbar">
     <div class="layui-btn-container">
-        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>
-        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>
+<!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>-->
+<!--        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>-->
         <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button>
+
     </div>
 </script>
 
+<script type="text/html" id="other">
+    <div class="layui-btn-container">
+        <!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>-->
+        <!--        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>-->
+        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-other" lay-event="otherExportData">瀵煎嚭</button>
+
+    </div>
+</script>
+
+
+
 <script type="text/html" id="operate">
     <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
     <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a>

--
Gitblit v1.9.1