From 28df4f39e3e7fbc6f315341e2acf8b8fe36e5a96 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 15 六月 2020 09:36:42 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pakStore/pakStore.js |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js
index a4cc266..584dbf7 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(),
@@ -129,7 +154,7 @@
                     layer.closeAll();
                     layer.msg(res.msg);
                     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