From 93ab24dc700d4cd97cd80c727b15957d129aeb75 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 22 六月 2020 16:54:32 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/pakStore/locMove.js | 51 +++++++++++++++++++++++++++++---------------------- 1 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/main/webapp/static/js/pakStore/locMove.js b/src/main/webapp/static/js/pakStore/locMove.js index c611890..3894446 100644 --- a/src/main/webapp/static/js/pakStore/locMove.js +++ b/src/main/webapp/static/js/pakStore/locMove.js @@ -50,6 +50,7 @@ } pageCurr=curr; limit(); + clearSelect(); form.on('checkbox(tableCheckbox)', function (data) { var _index = $(data.elem).attr('table-index')||0; if(data.elem.checked){ @@ -65,25 +66,27 @@ // 鎼滅储搴撲綅鐗╂枡 function getLoc(el) { - tableIns.reload({ - url: baseUrl+'/locDetl/list/auth' - , where: {loc_no: el.value} - , done:function (res) { - limit(); - $("#targetLocNo").empty(); - layui.form.render('select'); - // 鑾峰彇鍚屼竴鍫嗗灈鏈虹殑绌哄簱浣� - http.post(baseUrl + "/group/empty/stock", {sourceLocNo: el.value}, function (res) { - if (res.data != null) { - var tpl = $("#emptyLocStock").html(); - var template = Handlebars.compile(tpl); - var html = template(res); - $('#targetLocNo').append(html); - layui.form.render('select'); - } - }); - } - }); + setTimeout(function () { + tableIns.reload({ + url: baseUrl+'/locDetl/list/auth' + , where: {loc_no: el.value} + , done:function (res) { + limit(); + clearSelect(); + // 鑾峰彇鍚屼竴鍫嗗灈鏈虹殑绌哄簱浣� + http.post(baseUrl + "/group/empty/stock", {sourceLocNo: el.value}, function (res) { + if (res.data != null) { + var tpl = $("#emptyLocStock").html(); + var template = Handlebars.compile(tpl); + var html = template(res); + $('#targetLocNo').append(html); + layui.form.render('select'); + } + }); + } + }); + }, 100) + } @@ -121,15 +124,14 @@ $("#sourceLocNo").val(""); $("#targetLocNo").empty(); layui.form.render('select'); - layer.closeAll(); - layer.msg(res.msg); tableIns.reload({ data: [], url: '', done:function (res) { - limit(); + limit();clearSelect(); } }); + layer.msg(res.msg); } else if (res.code === 403) { top.location.href = baseUrl + "/"; } else { @@ -139,6 +141,11 @@ }) } +function clearSelect() { + $("#targetLocNo").empty(); + layui.form.render('select'); +} + // // 搴撲綅鐘舵�佽幏鍙� // var tips; // function locStatus(el) { -- Gitblit v1.9.1