From bfd1b6b4a11ec3d6a24daefdc9bcc04ff3fa7155 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 29 六月 2020 15:53:43 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pda/stockOut.html |   79 +++++++++++++++++++++++++++------------
 1 files changed, 55 insertions(+), 24 deletions(-)

diff --git a/src/main/webapp/views/pda/stockOut.html b/src/main/webapp/views/pda/stockOut.html
index 0936581..4795bb0 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,9 +135,63 @@
 </footer>
 </body>
 <script>
+
     window.onload = function(){
         document.getElementById("locNo").focus();
         getOutBound();
+    }
+
+    /**
+     * 鏍规嵁搴撲綅鍙锋煡鎵惧簱瀛樻槑缁�
+     */
+    function findLocDetl(el){
+        if (isEmpty(el.value)) {
+            return;
+        }
+        $.ajax({
+            url: baseUrl + "/matCode/auth",
+            headers: {'token': localStorage.getItem('token')},
+            data: {
+                id: el.value
+            },
+            method: 'POST',
+            success: function (res) {
+                if (res.code === 200) {
+                    if (res.data != null) {
+                        $('#matName').val(res.data.matName);
+                        $('#str1').val(res.data.str1);
+                        $('#str2').val(res.data.str2);
+                        countDom.focus().val(initMatCount)
+                    }
+                } else if (res.code === 403) {
+                    top.location.href = baseUrl + "/pda";
+                } else {
+                    alert(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)
+                }
+            }
+        })
     }
 
     layui.use(['table','laydate', 'form'], function() {
@@ -160,29 +214,6 @@
             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)
-                    }
-                }
-            })
-        }
-
     });
 </script>
 <script type="text/template" id="outSitesTemplate">

--
Gitblit v1.9.1