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

---
 src/main/webapp/views/pda/stockOut.html |   80 +++++++++++++++++++++++++++++-----------
 1 files changed, 58 insertions(+), 22 deletions(-)

diff --git a/src/main/webapp/views/pda/stockOut.html b/src/main/webapp/views/pda/stockOut.html
index e5ed0be..514b95c 100644
--- a/src/main/webapp/views/pda/stockOut.html
+++ b/src/main/webapp/views/pda/stockOut.html
@@ -35,6 +35,33 @@
         .status-3 {
             color: green;
         }
+        /* 瀹㈡埛 */
+        #custName {
+            padding-left: 2px;
+            line-height: 30px;
+            font-size: 14px;
+        }
+        /* 涓讳綋 */
+        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 +69,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 +81,9 @@
     </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">
+
 </main>
 <!-- 灏鹃儴 -->
 <footer>
@@ -98,15 +114,26 @@
             success: function (res) {
                 if (res.code === 200) {
                     if (res.data != null) {
-                        pakoutData = res.data;
-                        console.log(pakoutData);
+                        pakoutData = res.data.pakouts;
+                        if (pakoutData != null) {
+                            // 澶�
+                            $('#status').html(res.data.wrkSts$);
+                            $('#status').attr("class", "layui-form-label status-" + res.data.wrkSts);
+                            $('#custName').html(res.data.custName);
+                            // 涓�
+                            var tpl = $("#pakoutDetlTpl").html();
+                            var template = Handlebars.compile(tpl);
+                            var html = template(res.data);
+                            $('#pakout-box').append(html);
+                        }
+                        $('#confirm').focus();
                     }
-                    $('#confirm').focus();
+                } else if (res.code === 201) {
                 } else if (res.code === 403) {
                     top.location.href = baseUrl + "/pda";
                 } else {
-                    locDetlData = [];
-                    tableIns.reload({data: locDetlData});
+                    pakoutData = [];
+                    tips(res.msg, true);
                 }
             }
         })
@@ -190,9 +217,18 @@
         }
     }
 </script>
-<script type="text/template" id="takeSiteSelectTemplate">
-    {{#each data}}
-    <option value="{{siteId}}">{{desc}}</option>
+<script type="text/template" id="pakoutDetlTpl">
+    {{#each pakouts}}
+        <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