From e3bb506579f395c5dbca3d9f0e1e10a18170240f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 26 四月 2021 15:01:15 +0800
Subject: [PATCH] Merge branch 'htwms' of https://gitee.com/luxiaotao1123/wms-cloud into htwms

---
 src/main/webapp/static/js/check/check.js |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/static/js/check/check.js b/src/main/webapp/static/js/check/check.js
index 2e106af..e3b2efb 100644
--- a/src/main/webapp/static/js/check/check.js
+++ b/src/main/webapp/static/js/check/check.js
@@ -102,6 +102,34 @@
     table.on('toolbar(check)', function (obj) {
         var checkStatus = table.checkStatus(obj.config.id);
         switch(obj.event) {
+            // 鎵归噺瀹℃牳
+            case 'batchAuditing':
+                var checkIds = checkStatus.data.map(function (d) {
+                    return d.id;
+                });
+                if (checkIds.length === 0) {
+                    layer.msg('璇烽�夋嫨鏁版嵁', {icon: 3});
+                } else {
+                    var index = layer.load(1, {shade: [0.1,'#000']});
+                    $.ajax({
+                        url: baseUrl+"/work/stock/checks/auditing",
+                        headers: {'token': localStorage.getItem('token')},
+                        data: {checkIds: checkIds},
+                        method: 'POST',
+                        success: function (res) {
+                            if (res.code === 200) {
+                                layer.msg(res.msg, {icon: 1})
+                                $(".layui-laypage-btn")[0].click();
+                            } else if (res.code === 403) {
+                                top.location.href = baseUrl+"/";
+                            } else {
+                                layer.msg(res.msg, {icon: 2})
+                            }
+                            layer.close(index);
+                        }
+                    });
+                }
+                break;
             case 'addData':
                 layer.open({
                     type: 2,

--
Gitblit v1.9.1