From 98de20f08240e3252c93e4896b911095e2928552 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 17 六月 2020 15:35:25 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/pakStore/pakStore.js | 84 +++++++++++++++++++-----------------------
1 files changed, 38 insertions(+), 46 deletions(-)
diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js
index db45c39..ad04f6f 100644
--- a/src/main/webapp/static/js/pakStore/pakStore.js
+++ b/src/main/webapp/static/js/pakStore/pakStore.js
@@ -9,26 +9,6 @@
var layDate = layui.laydate;
var form = layui.form;
- // 鑾峰彇鍙敤鍏ュ簱绔欑偣
- $.ajax({
- url: baseUrl+"/available/put/site",
- headers: {'token': localStorage.getItem('token')},
- method: 'POST',
- success: function (res) {
- if (res.code === 200){
- var tpl = $("#putSiteSelectTemplate").html();
- var template = Handlebars.compile(tpl);
- var html = template(res);
- $('#putSiteSelect').append(html);
- form.render('select');
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
-
tableIns = table.render({
elem: '#chooseData',
data: [],
@@ -49,6 +29,7 @@
$('td[data-field=count] div').html(initCountVal);
setMatCodeData(res.data);
limit();
+ getInBound();
}
});
@@ -79,14 +60,26 @@
return;
}
}
- layer.open({
- type: 1,
- title: '閫夋嫨鍏ュ簱绔�',
- maxmin: true,
- shadeClose: true,
- content: $('#combDiv'),
- success: function (layero, index) {
-
+ $.ajax({
+ url: baseUrl+"/full/store/put/start",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify({
+ devpNo: $('#putSiteSelect').val(),
+ list: matCodeData
+ }),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ layer.msg("鍏ュ簱鍚姩鎴愬姛锛岀洰鏍囧簱浣嶏細" + res.data);
+ matCodeData = [];
+ tableIns.reload({data: matCodeData,done:function (res) { limit(); getInBound();}});
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
}
})
break;
@@ -106,6 +99,7 @@
}
tableIns.reload({data: matCodeData,done:function (res) {
limit();
+ getInBound();
// 瑕嗙洊render鏂规硶鐨刣one
}});
break;
@@ -136,36 +130,34 @@
tableIns.reload({data: matCodeData,done:function (res) {
limit();
+ getInBound();
// 瑕嗙洊render鏂规硶鐨刣one
}});
}
- // 琛ㄥ崟 --- 鍚姩鍏ュ簱
- form.on('submit(combDo)', function (data) {
+ // 鑾峰彇鍙敤鍏ュ簱绔欑偣
+ function getInBound() {
$.ajax({
- url: baseUrl+"/full/store/put/start",
+ url: baseUrl + "/available/put/site",
headers: {'token': localStorage.getItem('token')},
- data: JSON.stringify({
- devpNo: $('#putSiteSelect').val(),
- list: matCodeData
- }),
- contentType:'application/json;charset=UTF-8',
method: 'POST',
- async: false,
success: function (res) {
- if (res.code === 200){
- layer.closeAll();
- layer.msg("鍏ュ簱鍚姩鎴愬姛锛岀洰鏍囧簱浣嶏細" + res.data);
- matCodeData = [];
- tableIns.reload({data: matCodeData,done:function (res) { limit();}});
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
+ if (res.code === 200) {
+ var tpl = $("#putSiteSelectTemplate").html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ $('#putSiteSelect').append(html);
+ form.render('select');
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
layer.msg(res.msg)
}
}
})
- });
+ }
+
+
});
// 鎻愬彇鐗╂枡
--
Gitblit v1.9.1