From e1749547c76a5d8bae94e47d38d4d75b481610c1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 09 九月 2021 10:51:15 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/check/check.js |   32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/static/js/check/check.js b/src/main/webapp/static/js/check/check.js
index c340769..e3b2efb 100644
--- a/src/main/webapp/static/js/check/check.js
+++ b/src/main/webapp/static/js/check/check.js
@@ -32,11 +32,11 @@
             ,{field: 'docNum', align: 'center',title: '鍗曟嵁缂栧彿', hide: true}
             ,{field: 'oriQty', align: 'center',title: '璐﹂潰鏁伴噺 (鍘�)', style: 'font-weight: bolder'}
             ,{field: 'cekQty', align: 'center',title: '瀹炵洏鏁伴噺 (鐜�)', style: 'font-weight: bolder'}
-            ,{field: 'diffQty', align: 'center',title: '宸��', style: 'font-weight: bolder; color: blue'}
+            ,{field: 'diffQty', align: 'center',title: '宸��', style: 'font-weight: bolder;', templet: '#diffQtyTpl',}
             ,{field: 'settle$', align: 'center',title: '鐩堜簭', templet: '#checkTpl', width: 100}
-            ,{field: 'status$', align: 'center',title: '鐘舵��', templet: '#statusTpl', width: 110}
             ,{field: 'createTime$', align: 'center',title: '鐩樼偣鏃堕棿'}
             ,{field: 'createBy$', align: 'center',title: '鐩樼偣浜哄憳'}
+            ,{field: 'status$', align: 'center',title: '鐘舵��', templet: '#statusTpl', width: 110}
             ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
             ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
             ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
@@ -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