From eacf0e50b4a7fe138a3788af7f71d894d3be0394 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期二, 16 三月 2021 13:44:49 +0800
Subject: [PATCH] 1.0.3 平仓入库调整-改为用uuid库区编码作为库区主键

---
 src/main/webapp/views/locArea/locArea_detail.html             |   16 ++------
 src/main/java/com/zy/asrs/controller/LocNormalController.java |    2 
 src/main/webapp/static/js/locNormal/locNormal.js              |    4 +-
 src/main/webapp/views/locArea/locArea.html                    |   23 +----------
 src/main/webapp/static/js/locNormal/locNormalIn.js            |    2 
 src/main/webapp/views/locNormal/locNormal.html                |    2 
 src/main/webapp/static/js/locArea/locArea.js                  |   24 ++++++++----
 7 files changed, 28 insertions(+), 45 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocNormalController.java b/src/main/java/com/zy/asrs/controller/LocNormalController.java
index 096887f..6fc012c 100644
--- a/src/main/java/com/zy/asrs/controller/LocNormalController.java
+++ b/src/main/java/com/zy/asrs/controller/LocNormalController.java
@@ -56,7 +56,7 @@
             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
         }
         if (Cools.isEmpty(param.get("state"))) {
-            wrapper.eq("state", "1").or().eq("state", "2");
+            wrapper.in("state", "1,2");
         }
         return R.ok(locNormalService.selectPage(new Page<>(curr, limit), wrapper));
     }
diff --git a/src/main/webapp/static/js/locArea/locArea.js b/src/main/webapp/static/js/locArea/locArea.js
index 9b92260..6004656 100644
--- a/src/main/webapp/static/js/locArea/locArea.js
+++ b/src/main/webapp/static/js/locArea/locArea.js
@@ -19,17 +19,14 @@
         cellMinWidth: 50,
         cols: [[
             {type: 'checkbox'}
-//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
-            ,{field: 'id', align: 'center',title: 'ID'}
             ,{field: 'uuid', align: 'center',title: '搴撳尯缂栧彿'}
             ,{field: 'name', align: 'center',title: '搴撳尯鍚嶇О'}
             ,{field: 'status$', align: 'center',title: '鐘舵��'}
-            ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳',event: 'createBy', style: 'cursor:pointer'}
+            // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳',event: 'createBy', style: 'cursor:pointer', hide: true}
             ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-            ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳',event: 'updateBy', style: 'cursor:pointer'}
+            // ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳',event: 'updateBy', style: 'cursor:pointer', hide: true}
             ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
             ,{field: 'memo', align: 'center',title: '澶囨敞'}
-
             ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
         ]],
         request: {
@@ -305,9 +302,17 @@
     });
 
     function method(name){
-        var index = layer.load(1, {
-            shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙
-        });
+        var uuid = $('#uuid').val();
+        var areaName = $('#name').val();
+        if (uuid === '' || !uuid) {
+            layer.msg('璇疯緭鍏ュ簱鍖虹紪鍙�');
+            return;
+        }
+        if (areaName === '' || !areaName) {
+            layer.msg('璇疯緭鍏ュ簱鍖哄悕绉�');
+            return;
+        }
+
         var data = {
 //            id: $('#id').val(),
             id: $('#id').val(),
@@ -321,6 +326,9 @@
             memo: $('#memo').val(),
 
         };
+        var index = layer.load(1, {
+            shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙
+        });
         $.ajax({
             url: baseUrl+"/locArea/"+name+"/auth",
             headers: {'token': localStorage.getItem('token')},
diff --git a/src/main/webapp/static/js/locNormal/locNormal.js b/src/main/webapp/static/js/locNormal/locNormal.js
index a2cf486..c331026 100644
--- a/src/main/webapp/static/js/locNormal/locNormal.js
+++ b/src/main/webapp/static/js/locNormal/locNormal.js
@@ -43,7 +43,7 @@
             var html = "";
             if (res.data && res.data.length > 0) {
                 html += res.data.map(function (item) {
-                    return "<Option value=" + item.id + ">" + item.name + "</Option>";
+                    return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
                 });
             }
             $('#putSiteSelect').append(html);
@@ -142,7 +142,7 @@
             var records = res.data.records;
             records.map(function (item) {
                 locArea.map(function (d) {
-                    if (d.id == item.warehouse) {
+                    if (d.uuid == item.warehouse) {
                         item.warehouse = d.name;
                     }
                 })
diff --git a/src/main/webapp/static/js/locNormal/locNormalIn.js b/src/main/webapp/static/js/locNormal/locNormalIn.js
index 2d3931f..a6d0d45 100644
--- a/src/main/webapp/static/js/locNormal/locNormalIn.js
+++ b/src/main/webapp/static/js/locNormal/locNormalIn.js
@@ -175,7 +175,7 @@
                     var html = "";
                     if (res.data && res.data.length > 0) {
                         html += res.data.map(function (item) {
-                            return "<Option value=" + item.id + ">" + item.name + "</Option>";
+                            return "<Option value=" + item.uuid + ">" + item.name + "</Option>";
                         });
                     }
                     $('#putSiteSelect').append(html);
diff --git a/src/main/webapp/views/locArea/locArea.html b/src/main/webapp/views/locArea/locArea.html
index 61b2741..e7e1624 100644
--- a/src/main/webapp/views/locArea/locArea.html
+++ b/src/main/webapp/views/locArea/locArea.html
@@ -16,29 +16,12 @@
 <div id="search-box" class="layui-form layui-card-header">
     <div class="layui-inline">
         <div class="layui-input-inline">
-            <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
+            <input class="layui-input" type="text" name="uuid" placeholder="搴撳尯缂栧彿" autocomplete="off">
         </div>
     </div>
     <div class="layui-inline">
-        <div class="layui-input-inline cool-auto-complete">
-            <input id="createBy" class="layui-input" name="create_by" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
-            <input id="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="娣诲姞浜哄憳" onfocus=this.blur()>
-            <div class="cool-auto-complete-window">
-                <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
-                <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
-                </select>
-            </div>
-        </div>
-    </div>
-    <div class="layui-inline">
-        <div class="layui-input-inline cool-auto-complete">
-            <input id="updateBy" class="layui-input" name="update_by" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
-            <input id="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="淇敼浜哄憳" onfocus=this.blur()>
-            <div class="cool-auto-complete-window">
-                <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
-                <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
-                </select>
-            </div>
+        <div class="layui-input-inline">
+            <input class="layui-input" type="text" name="name" placeholder="搴撳尯鍚嶇О" autocomplete="off">
         </div>
     </div>
 
diff --git a/src/main/webapp/views/locArea/locArea_detail.html b/src/main/webapp/views/locArea/locArea_detail.html
index 5b712d2..498d31c 100644
--- a/src/main/webapp/views/locArea/locArea_detail.html
+++ b/src/main/webapp/views/locArea/locArea_detail.html
@@ -15,24 +15,16 @@
 <!-- 璇︽儏 -->
 <div id="data-detail" class="layer_self_wrap">
     <form id="detail" class="layui-form">
-    <!--
-        <div class="layui-inline"  style="display: none">
-            <label class="layui-form-label"><span class="not-null">*</span>缂栥��銆�鍙凤細</label>
+        <div class="layui-inline"  style="width:31%; display: none">
+            <label class="layui-form-label">ID锛�</label>
             <div class="layui-input-inline">
-                <input id="id" class="layui-input" type="text" placeholder="缂栧彿">
-            </div>
-        </div>
-    -->
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label"><span class="not-null">*</span>I銆�銆�D锛�</label>
-            <div class="layui-input-inline">
-                <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'locArea')" lay-verify="number" >
+                <input id="id" class="layui-input" type="text" lay-verify="number" >
             </div>
         </div>
         <div class="layui-inline"  style="width:31%;">
             <label class="layui-form-label">搴撳尯缂栧彿锛�</label>
             <div class="layui-input-inline">
-                <input id="uuid" class="layui-input" type="text">
+                <input id="uuid" class="layui-input" onkeyup="check(this.id, 'locArea')" type="text">
             </div>
         </div>
         <div class="layui-inline"  style="width:31%;">
diff --git a/src/main/webapp/views/locNormal/locNormal.html b/src/main/webapp/views/locNormal/locNormal.html
index fb082b2..ff56feb 100644
--- a/src/main/webapp/views/locNormal/locNormal.html
+++ b/src/main/webapp/views/locNormal/locNormal.html
@@ -161,7 +161,7 @@
     <script type="text/html" id="locArea">
         {{
         locArea.map(function(item){
-        if (d.warehouse == item.id) {
+        if (d.warehouse == item.uuid) {
         return item.name;
         }
         });

--
Gitblit v1.9.1