From 43a40046a19a5e5c1b443017ce31ece34e1d7460 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 23 四月 2021 14:48:44 +0800
Subject: [PATCH] #批量审核盘点记录

---
 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