From 0f311d5bfd59e9c742948d587fefb6fb83c4e181 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 03 三月 2021 11:25:28 +0800
Subject: [PATCH] #

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

diff --git a/src/main/webapp/views/pda/stockOut.html b/src/main/webapp/views/pda/stockOut.html
index e5ed0be..18efddc 100644
--- a/src/main/webapp/views/pda/stockOut.html
+++ b/src/main/webapp/views/pda/stockOut.html
@@ -35,6 +35,28 @@
         .status-3 {
             color: green;
         }
+
+        /* 涓讳綋 */
+        main {
+            border: 1px solid gainsboro;
+            text-align: center;
+            padding-bottom: 15px;
+        }
+        main hr {
+            width: 80%;
+            margin: 5px 0;
+            display: inline-block
+        }
+        .pakout-item {
+            padding: 10px;
+        }
+        .item-header {
+            text-align: left;
+            padding-left: 20px
+        }
+        .item-content {
+            padding: 15px
+        }
     </style>
 </head>
 <body>
@@ -42,7 +64,7 @@
 <header>
     <div class="layui-input-inline">
         <label class="layui-form-label" style="width: 84px">鍗曟嵁缂栧彿</label>
-        <input class="layui-input" type="text" id="docNum" onkeyup="findNum(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
+        <input class="layui-input" type="text" id="docNum" onkeyup="findNum(this)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
     </div>
     <div class="layui-input-inline" style="width: 100%">
         <label class="layui-form-label" style="width: 84px">鐘舵��</label>
@@ -54,20 +76,19 @@
     </div>
 </header>
 
-<hr style="padding: 0 10px; margin: 5px 0">
-
 <!-- 涓讳綋 -->
-<main>
-    <div class="pakout-item">
-        <div class="item-header">
-            <span>1銆�</span>
-            鍏閽诲熬铻轰笣4.8* 80
-        </div>
-        <div class="item-content">
-            <span>10绠�</span>
-            <span>璐т綅锛欰01-1</span>
-        </div>
-    </div>
+<main id="pakout-box">
+<!--    <hr>-->
+<!--    <div class="pakout-item">-->
+<!--        <div class="item-header">-->
+<!--            鍏閽诲熬铻轰笣4.8*-->
+<!--        </div>-->
+<!--        <div class="item-content">-->
+<!--            <div style="float: left">10绠�</div>-->
+<!--            <div style="float: right">璐т綅锛欰01-1</div>-->
+<!--        </div>-->
+<!--    </div>-->
+
 </main>
 <!-- 灏鹃儴 -->
 <footer>
@@ -97,11 +118,17 @@
             method: 'POST',
             success: function (res) {
                 if (res.code === 200) {
-                    if (res.data != null) {
+                    if (res.data != null && res.data.length > 0) {
                         pakoutData = res.data;
-                        console.log(pakoutData);
+                        if (pakoutData != null) {
+                            var tpl = $("#pakoutDetlTpl").html();
+                            var template = Handlebars.compile(tpl);
+                            var html = template(pakoutData);
+                            $('#pakout-box').append(html);
+                        }
+                        console.log(res.data)
+                        $('#confirm').focus();
                     }
-                    $('#confirm').focus();
                 } else if (res.code === 403) {
                     top.location.href = baseUrl + "/pda";
                 } else {
@@ -190,9 +217,18 @@
         }
     }
 </script>
-<script type="text/template" id="takeSiteSelectTemplate">
+<script type="text/template" id="pakoutDetlTpl">
     {{#each data}}
-    <option value="{{siteId}}">{{desc}}</option>
+        <hr>
+        <div class="pakout-item">
+            <div class="item-header">
+                {{maktx}}
+            </div>
+            <div class="item-content">
+                <div style="float: left">{{anfme}}{{unit}}</div>
+                <div style="float: right">璐т綅锛歿{locNo}}</div>
+            </div>
+        </div>
     {{/each}}
 </script>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1