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 | 63 ++++++++++++++++++++++++++++--- 1 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/js/check/check.js b/src/main/webapp/static/js/check/check.js index 592cd02..e3b2efb 100644 --- a/src/main/webapp/static/js/check/check.js +++ b/src/main/webapp/static/js/check/check.js @@ -32,7 +32,7 @@ ,{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: 'createTime$', align: 'center',title: '鐩樼偣鏃堕棿'} ,{field: 'createBy$', align: 'center',title: '鐩樼偣浜哄憳'} @@ -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, @@ -208,11 +236,30 @@ break; // 瀹℃牳 case 'auditing': - layer.msg('瀹℃牳鎴愬姛', {icon : 1}) - - + layer.confirm(data.nodeUuid +'璐т綅 鐩樼偣瀹℃牳 '+ data.matnr + ' ?', function(){ + var index = layer.load(1, {shade: [0.1,'#000']}); + $.ajax({ + url: baseUrl+"/work/stock/check/auditing", + headers: {'token': localStorage.getItem('token')}, + data: { + checkId: data.id + }, + dataType:'json', + 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; - } }); @@ -311,7 +358,11 @@ elem: '#updateTime\\$', type: 'datetime' }); - + layDate.render({ + elem: '.layui-laydate-range' + ,type: 'datetime' + ,range: true + }); }); -- Gitblit v1.9.1