From 8a98cb7e1eeccc063c1759953362398d83d7feb8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 16 六月 2020 08:47:52 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/pakStore/pakStore.js | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js
index a4cc266..4f7129a 100644
--- a/src/main/webapp/static/js/pakStore/pakStore.js
+++ b/src/main/webapp/static/js/pakStore/pakStore.js
@@ -9,6 +9,26 @@
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: [],
@@ -28,14 +48,18 @@
done: function (res, curr, count) {
$('td[data-field=count] div').html(initCountVal);
setMatCodeData(res.data);
+ limit();
}
});
+
+
// 椤甸潰淇敼
table.on('edit(chooseData)', function (obj) {
if (!isNaN(obj.value)) {
updateMatCodeData(obj.data.matNo, Number(obj.value));
tableIns.reload({data: matCodeData,done:function (res) {
+ limit();
// 瑕嗙洊render鏂规硶鐨刣one
}});
} else {
@@ -91,6 +115,7 @@
}
}
tableIns.reload({data: matCodeData,done:function (res) {
+ limit();
// 瑕嗙洊render鏂规硶鐨刣one
}});
break;
@@ -115,7 +140,7 @@
// 琛ㄥ崟 --- 鍚姩鍏ュ簱
form.on('submit(combDo)', function (data) {
$.ajax({
- url: baseUrl+"/full/store/start",
+ url: baseUrl+"/full/store/put/start",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify({
devpNo: $('#putSiteSelect').val(),
@@ -127,9 +152,9 @@
success: function (res) {
if (res.code === 200){
layer.closeAll();
- layer.msg(res.msg);
+ layer.msg("鍏ュ簱鍚姩鎴愬姛锛岀洰鏍囧簱浣嶏細" + res.data);
matCodeData = [];
- tableIns.reload({data: matCodeData,done:function (res) {}});
+ tableIns.reload({data: matCodeData,done:function (res) { limit();}});
} else if (res.code === 403){
top.location.href = baseUrl+"/";
}else {
@@ -143,7 +168,6 @@
// 鎻愬彇鐗╂枡
var matCodeLayerIdx;
function getMat() {
- // tableIns.reload({data: []});
matCodeLayerIdx = layer.open({
type: 2,
title: '鎻愬彇鐗╂枡',
--
Gitblit v1.9.1