From 24e3b2ff80aef47982603eb565892b77b8ac0899 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 29 六月 2020 16:32:47 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pda/stockOut.html |   87 ++++++++++++++++++++++++++++++-------------
 1 files changed, 60 insertions(+), 27 deletions(-)

diff --git a/src/main/webapp/views/pda/stockOut.html b/src/main/webapp/views/pda/stockOut.html
index 0936581..14937cf 100644
--- a/src/main/webapp/views/pda/stockOut.html
+++ b/src/main/webapp/views/pda/stockOut.html
@@ -110,7 +110,7 @@
 <header>
     <div class="layui-input-inline">
         <label class="layui-form-label">搴撲綅</label>
-        <input class="layui-input" type="text" id="locNo" autocomplete="off">
+        <input class="layui-input" type="text" id="locNo" onkeyup="findLocDetl(this)" autocomplete="off">
     </div>
     <div class="layui-input-inline">
         <label class="layui-form-label">鐗╂枡</label>
@@ -135,11 +135,44 @@
 </footer>
 </body>
 <script>
+
     window.onload = function(){
         document.getElementById("locNo").focus();
         getOutBound();
     }
 
+    /**
+     * 鏍规嵁搴撲綅鍙锋煡鎵惧簱瀛樻槑缁�
+     */
+    function findLocDetl(el){
+        if (isEmpty(el.value)) {
+            return;
+        }
+        $.ajax({
+            url: baseUrl + "/mobile/locDetl",
+            headers: {'token': localStorage.getItem('token')},
+            data: {
+                locNo: el.value
+            },
+            method: 'POST',
+            success: function (res) {
+                if (res.code === 200) {
+                    if (res.data != null) {
+                        locDetlData = res.data;
+                        tableIns.reload({data: locDetlData});
+                    }
+                } else if (res.code === 403) {
+                    top.location.href = baseUrl + "/pda";
+                } else {
+                    locDetlData = [];
+                    tableIns.reload({data: locDetlData});
+                }
+            }
+        })
+    }
+
+    var locDetlData = [];
+    var tableIns;
     layui.use(['table','laydate', 'form'], function() {
         var table = layui.table;
         var $ = layui.jquery;
@@ -153,37 +186,37 @@
             cellMinWidth: 50,
             cols: [[
                 {type: 'checkbox', fixed: 'left', width:30},
-                {fixed: 'left', align: 'center', field: 'count', title: '閲�', style:'color: blue', width:30},
-                {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜'},
-                {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'}
+                {field: 'count', align: 'center', title: '閲�', style:'color: blue', width:30},
+                {field: 'matNo', align: 'center', title: '缂栫爜'},
+                {field: 'matName', align: 'center', title: '鍚嶇О'},
+                {field: 'locNo', align: 'center', title: '搴撲綅'}
             ]],
             done: function (res, curr, count) {
             }
         });
-
-        // 鑾峰彇鍑哄簱鍙�
-        function getOutBound(){
-            $.ajax({
-                url: baseUrl+"/available/take/site",
-                headers: {'token': localStorage.getItem('token')},
-                method: 'POST',
-                async: false,
-                success: function (res) {
-                    if (res.code === 200){
-                        var tpl = $("#outSitesTemplate").html();
-                        var template = Handlebars.compile(tpl);
-                        var html = template(res);
-                        $('#site-list').append(html);
-                    } else if (res.code === 403){
-                        top.location.href = baseUrl+"/";
-                    }else {
-                        layer.msg(res.msg)
-                    }
-                }
-            })
-        }
-
     });
+
+    // 鑾峰彇鍑哄簱鍙�
+    function getOutBound(){
+        $.ajax({
+            url: baseUrl+"/available/take/site",
+            headers: {'token': localStorage.getItem('token')},
+            method: 'POST',
+            async: false,
+            success: function (res) {
+                if (res.code === 200){
+                    var tpl = $("#outSitesTemplate").html();
+                    var template = Handlebars.compile(tpl);
+                    var html = template(res);
+                    $('#site-list').append(html);
+                } else if (res.code === 403){
+                    top.location.href = baseUrl+"/";
+                }else {
+                    layer.msg(res.msg)
+                }
+            }
+        })
+    }
 </script>
 <script type="text/template" id="outSitesTemplate">
     {{#each data}}

--
Gitblit v1.9.1