From 944c35175669e8af1c4dc47ce7921e0134978c6d Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 13 六月 2020 14:42:59 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/pakStore/emptyOut.js | 42 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 41 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/static/js/pakStore/emptyOut.js b/src/main/webapp/static/js/pakStore/emptyOut.js index 6422704..fb1d52f 100644 --- a/src/main/webapp/static/js/pakStore/emptyOut.js +++ b/src/main/webapp/static/js/pakStore/emptyOut.js @@ -6,6 +6,29 @@ var layDate = layui.laydate; var form = layui.form; + // 鑾峰彇鍑哄簱鍙� + function getOutBound(){ + $.ajax({ + url: baseUrl+"/available/take/site", + headers: {'token': localStorage.getItem('token')}, + method: 'POST', + asymc: false, + success: function (res) { + if (res.code === 200){ + var tpl = $("#takeSiteSelectTemplate").html(); + var template = Handlebars.compile(tpl); + var html = template(res); + $('#staNoSelect').append(html); + form.render('select'); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg) + } + } + }) + } + // 鏁版嵁娓叉煋 tableIns = table.render({ elem: '#locMast', @@ -15,6 +38,7 @@ limit: 16, even: true, toolbar: '#toolbar', + defaultToolbar: ['filter'], cellMinWidth: 50, cols: [[ {type: 'checkbox', fixed: 'left'} @@ -55,6 +79,7 @@ top.location.href = baseUrl+"/"; } pageCurr=curr; + getOutBound(); limit(); form.on('checkbox(tableCheckbox)', function (data) { var _index = $(data.elem).attr('table-index')||0; @@ -67,11 +92,25 @@ } }); + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(locMast)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'outbound': + var staNo = $("#staNoSelect").val(); + if (staNo === ""){ + layer.msg("璇烽�夋嫨鍑哄簱鍙�"); + } + break; + } + }); + // 鎼滅储鏍忔悳绱簨浠� form.on('submit(search)', function (data) { pageCurr = 1; $('#detlTable').css("display", 'none'); tableReload(false); + getOutBound(); }); // 鎼滅储鏍忛噸缃簨浠� @@ -80,6 +119,7 @@ clearFormVal($('#search-box')); $('#detlTable').css("display", 'none'); tableReload(false); + getOutBound(); }); }) @@ -111,4 +151,4 @@ limit(child); } }); -} \ No newline at end of file +} -- Gitblit v1.9.1