From b7e08df5a07b3fa832a46ecc31983e16f2bccc8c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 24 七月 2023 14:56:01 +0800
Subject: [PATCH] # 出库作业,和库存明细管理 排序

---
 src/main/webapp/views/pda/matQuery.html |   89 +++++++++++++++++++++++++++++++-------------
 1 files changed, 63 insertions(+), 26 deletions(-)

diff --git a/src/main/webapp/views/pda/matQuery.html b/src/main/webapp/views/pda/matQuery.html
index 942ec78..fa84166 100644
--- a/src/main/webapp/views/pda/matQuery.html
+++ b/src/main/webapp/views/pda/matQuery.html
@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/>
-    <title>鐗╂枡鎻愬彇</title>
+    <title>浜у搧鎻愬彇</title>
     <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
     <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
     <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
@@ -14,7 +14,7 @@
 
         .form-box {
             padding: 15px 5px 5px 5px;
-            font-size: 12px;
+            font-size: 16px;
             text-align: center;
         }
 
@@ -23,16 +23,16 @@
         }
 
         .form-box span {
-            font-size: 12px;
+            font-size: 16px;
             display: inline-block;
             text-align: right;
-            width: 50px;
+            width: 70px;
         }
         .form-box input {
             width: 120px;
             margin-left: 10px;
             padding-left: 5px;
-            height: 20px;
+            height: 30px;
             border: 1px solid #777777;
             overflow:hidden;
             white-space:nowrap;
@@ -56,19 +56,19 @@
         }
         .number-tool button {
             background-color: #fff;
-            margin-top: 2px;
-            font-size: 13px;
-            height: 18px;
+            margin-top: 3px;
+            font-size: 16px;
+            height: 25px;
             float: left;
-            width: 20px;
+            width: 25px;
             border: 1px solid #777777;
         }
         .number-tool input {
             text-align: center;
-            height: 20px;
+            height: 30px;
             float: left;
             margin: 0 5px;
-            width: 30px;
+            width: 40px;
             padding: 0;
         }
     </style>
@@ -77,20 +77,37 @@
 
 <div class="form-box">
     <div class="form-item">
-        <span>鐗╂枡缂栫爜</span>
+        <span>浜у搧浠e彿</span>
         <input id="matNo" type="text" placeholder="鎵爜 / 杈撳叆" onkeyup="find(this)" autocomplete="off">
     </div>
     <div class="form-item">
-        <span>鐗╂枡鍚嶇О</span>
+        <span>浜у搧鍚嶇О</span>
         <input id="matName" type="text" disabled="disabled">
     </div>
     <div class="form-item">
-        <span>鐗╂枡瑙勬牸</span>
-        <input id="str2" type="text" disabled="disabled">
+        <span>瑙勬牸鍨嬪彿</span>
+        <input id="specs" type="text" disabled="disabled">
+    </div>
+    <div class="form-item">
+        <span>鎵瑰彿</span>
+        <input id="supplier" value="0" type="text">
+    </div>
+    <div class="form-item">
+        <span>鐢熶骇鏃ユ湡</span>
+        <input id="memo" type="text">
+    </div>
+    <div class="form-item">
+        <span>鏉ユ簮</span>
+        <input id="source" type="text">
+    </div>
+
+    <div class="form-item">
+        <span>渚涘簲鍟�</span>
+        <input id="vendor" type="text">
     </div>
     <div class="form-item">
         <span>鍗曚綅</span>
-        <input id="str1" type="text" disabled="disabled">
+        <input id="unit" type="text" disabled="disabled">
     </div>
     <div class="form-item">
         <span style="vertical-align: middle">鏁伴噺</span>
@@ -108,7 +125,7 @@
     var pageCurr;
 
     /**
-     * 鏍规嵁鐗╂枡缂栫爜鏌ヨ鐗╂枡璇︽儏
+     * 鏍规嵁浜у搧浠e彿鏌ヨ浜у搧璇︽儏
      */
     function find(el){
         if (isEmpty(el.value)) {
@@ -125,9 +142,10 @@
                 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)
+                        $('#specs').val(res.data.specs);
+                        $('#unit').val(res.data.unit);
+                        countDom.val(initMatCount);
+                        $('#count').focus().select();
                     }
                 } else if (res.code === 403) {
                     top.location.href = baseUrl + "/pda";
@@ -145,8 +163,17 @@
         var data = {
             matNo: $('#matNo').val(),
             matName: $('#matName').val(),
-            count: countDom.val()
+            count: countDom.val(),
+            supplier: $('#supplier').val(),
+            memo: $('#memo').val(),
+            vendor:$('#vendor').val(),
+            source:$('#source').val(),
+            
         };
+        if(countDom.val()<=0){
+            alert('鏁伴噺蹇呴』澶т簬0');
+            return;
+        }
         parent.addTableData(data);
         parent.layer.close(parent.matCodeLayerIdx);
     }
@@ -155,11 +182,11 @@
     $(document).on('click','#confirm', function () {
     })
 
-    $('body').keydown(function () {
-        if (event.keyCode === 13) {
-            $("#confirm").click();
-        }
-    });
+    // $('body').keydown(function () {
+    //     if (event.keyCode === 13) {
+    //         $("#confirm").click();
+    //     }
+    // });
 
     function add() {
         countDom.val(Number(countDom.val()) + 1);
@@ -171,5 +198,15 @@
         countDom.val(countDom.val() - 1);
     }
 
+
+    document.onkeyup = function (e) {
+        if (window.event)//濡傛灉window.event瀵硅薄瀛樺湪锛屽氨浠ユ浜嬩欢瀵硅薄涓哄噯
+            e = window.event;
+        var key = e.charCode || e.keyCode;
+        if (key === 115) {
+            confirm();
+        }
+    }
+
 </script>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1