From 91f2cd5b0f832091f654cce926585d2f05cad114 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期四, 08 四月 2021 23:22:32 +0800
Subject: [PATCH] Merge branches 'dev' and 'master' of https://gitee.com/luxiaotao1123/xtywms into master

---
 src/main/webapp/views/pda/stockOut.html |   50 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/views/pda/stockOut.html b/src/main/webapp/views/pda/stockOut.html
index 2e59ec2..1b09851 100644
--- a/src/main/webapp/views/pda/stockOut.html
+++ b/src/main/webapp/views/pda/stockOut.html
@@ -24,17 +24,23 @@
 <!-- 澶撮儴 -->
 <header class="layui-form">
     <div class="layui-input-inline">
-        <label class="layui-form-label">搴撲綅</label>
+        <label class="layui-form-label">鍗曞彿</label>
         <div class="layui-input-block">
-            <input class="layui-input" type="number" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off">
+            <input class="layui-input" type="text" id="billNo" onkeyup="findByBillNo(this)" autocomplete="off">
         </div>
-
     </div>
     <div class="layui-input-inline">
         <label class="layui-form-label">鐗╂枡</label>
         <div class="layui-input-block">
             <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off">
         </div>
+    </div>
+    <div class="layui-input-inline">
+        <label class="layui-form-label">搴撲綅</label>
+        <div class="layui-input-block">
+            <input class="layui-input" type="number" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off">
+        </div>
+
     </div>
     <div class="layui-input-inline">
         <label class="layui-form-label">鍑哄簱鍙�</label>
@@ -54,6 +60,7 @@
     <div class="layui-btn-container">
         <button id="reset" type="button" class="layui-btn layui-btn-primary" onclick="reset()">閲嶇疆</button>
         <button id="pakOut" type="button" class="layui-btn layui-btn-normal" onclick="pakOut()" style="margin-left: 20px">鍑哄簱</button>
+        <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" style="margin-left: 20px">杩斿洖</button>
         <span id="tips"></span>
     </div>
 </footer>
@@ -61,7 +68,7 @@
 <script>
 
     window.onload = function(){
-        document.getElementById("locNo").focus();
+        document.getElementById("billNo").focus();
         getOutBound();
     }
 
@@ -86,13 +93,29 @@
         $("#locNo").val("");
         find(null, el.value);
     }
-    function find(locNo, matNo) {
+
+    /**
+     * 鏍规嵁閫氱煡鍗曞彿鏌ユ壘搴撳瓨鏄庣粏
+     * */
+    function findByBillNo(el) {
+        if (isEmpty(el.value)) {
+            return;
+        }
+
+        find(null, null, el.value);
+    }
+
+    function find(locNo, matNo, billNo) {
+        if (billNo.indexOf('=') > -1) {
+            billNo = billNo.split(",")[0].split("=")[1];
+        }
         $.ajax({
             url: baseUrl + "/mobile/locDetl",
             headers: {'token': localStorage.getItem('token')},
             data: {
                 locNo: locNo,
-                matNo: matNo
+                matNo: matNo,
+                supplier: billNo,
             },
             method: 'POST',
             success: function (res) {
@@ -101,7 +124,7 @@
                         locDetlData = res.data;
                         tableIns.reload({data: locDetlData});
                     }
-                    $('#pakOut').focus();
+//                    $('#pakOut').focus();
                 } else if (res.code === 403) {
                     top.location.href = baseUrl + "/pda";
                 } else {
@@ -128,11 +151,11 @@
             limit: 500,
             cellMinWidth: 50,
             cols: [[
-                {type: 'checkbox', fixed: 'left', width:30},
-                {field: 'count', align: 'center', title: '鏁伴噺', event: 'detail', style:'color: blue', width:50},
                 {field: 'matnr', align: 'center', title: '缂栫爜', event: 'detail'},
                 {field: 'maktx', align: 'center', title: '鍚嶇О', event: 'detail'},
-                {field: 'locNo', align: 'center', title: '搴撲綅', event: 'detail'}
+                {field: 'locNo', align: 'center', title: '搴撲綅', event: 'detail'},
+                {field: 'count', align: 'center', title: '鏁伴噺', event: 'detail', style:'color: blue', width:50},
+                {type: 'checkbox', fixed: 'right', width:30},
             ]],
             done: function (res, curr, count) {
             }
@@ -148,7 +171,7 @@
                         type: 2,
                         title: '搴撳瓨鏄庣粏',
                         shade: [0.3,'#000'],
-                        area: ['90%', '70%'],
+                        area: ['90%', '75%'],
                         content: 'locDetlIframe.html',
                         success: function(layero, index){
                             // 璁剧疆寮圭獥鏍峰紡
@@ -252,6 +275,7 @@
     function reset() {
         $("#matNo").val("");
         $("#locNo").val("");
+        $("#billNo").val("");
         locDetlData = [];
         tableIns.reload({data: locDetlData});
         $('#staNoSelect').val("");
@@ -279,6 +303,10 @@
             $("#locNo").focus();
         }
     }
+
+    function back() {
+        parent.backIndex();
+    }
 </script>
 <script type="text/template" id="takeSiteSelectTemplate">
     {{#each data}}

--
Gitblit v1.9.1