From 9a4530ace0c4305af2d75fc95654a16c6007fd5b Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期三, 07 七月 2021 16:06:15 +0800
Subject: [PATCH] 平仓管理、平仓日入库支持同时查询成品和原材料

---
 src/main/webapp/static/js/locNormal/normalReport.js |   61 ++++++++++++------------------
 1 files changed, 25 insertions(+), 36 deletions(-)

diff --git a/src/main/webapp/static/js/locNormal/normalReport.js b/src/main/webapp/static/js/locNormal/normalReport.js
index fd92248..29136ba 100644
--- a/src/main/webapp/static/js/locNormal/normalReport.js
+++ b/src/main/webapp/static/js/locNormal/normalReport.js
@@ -16,46 +16,10 @@
         , {field: 'mnemonic', align: 'center', title: '鐢熶骇鍗曞彿', width: 140}
         , {field: 'supplier', align: 'center', title: '閫氱煡鍗曞彿', width: 140}
         , {field: 'memo', align: 'center', title: '澶囨敞'}
-
     )
     return cols;
 }
 
-// 鑾峰彇浠撳簱涓嬫媺
-$.ajax({
-    url: baseUrl + "/locArea/queryAll/auth",
-    headers: {'token': localStorage.getItem('token')},
-    // data: top.reObject(data),
-    method: 'POST',
-    success: function (res) {
-        if (res.data && res.data.length > 0) {
-            locArea = res.data;
-        }
-    },
-});
-
-// 搴撳尯涓嬫媺
-// 鑾峰彇浠撳簱涓嬫媺
-$.ajax({
-    url: baseUrl + "/locArea/queryAll/auth",
-    headers: {'token': localStorage.getItem('token')},
-    method: 'POST',
-    success: function (res) {
-        if (res.code === 200) {
-            var html = "";
-            if (res.data && res.data.length > 0) {
-                html += res.data.map(function (item) {
-                    return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
-                });
-            }
-            $('#putSiteSelect').append(html);
-        } else if (res.code === 403) {
-            top.location.href = baseUrl + "/";
-        } else {
-            layer.msg(res.msg)
-        }
-    }
-})
 
 layui.use(['table', 'laydate', 'form', 'upload'], function () {
     var table = layui.table;
@@ -65,6 +29,31 @@
     var form = layui.form;
     var upload = layui.upload;
 
+    // 搴撳尯涓嬫媺
+    // 鑾峰彇浠撳簱涓嬫媺
+    $.ajax({
+        url: baseUrl + "/locArea/query/allArea",
+        headers: {'token': localStorage.getItem('token')},
+        method: 'POST',
+        success: function (res) {
+            if (res.code === 200) {
+                var html = "";
+                if (res.data && res.data.length > 0) {
+                    locArea = res.data;
+                    html += res.data.map(function (item) {
+                        return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
+                    });
+                }
+                $('#putSiteSelect').append(html);
+                layui.form.render('select');
+            } else if (res.code === 403) {
+                top.location.href = baseUrl + "/";
+            } else {
+                layer.msg(res.msg)
+            }
+        }
+    });
+
     // 鏁版嵁娓叉煋
     tableIns = table.render({
         elem: '#locNormal',

--
Gitblit v1.9.1