From 7786552f47c9fbc3d233321e5484ef33da116e6a Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期六, 13 三月 2021 10:38:33 +0800
Subject: [PATCH] 1.0.3 pda关联组托-隐藏物料名称,改为显示生成单号

---
 src/main/webapp/views/pda/combPro.html |   48 ++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/views/pda/combPro.html b/src/main/webapp/views/pda/combPro.html
index 1c120d8..0792161 100644
--- a/src/main/webapp/views/pda/combPro.html
+++ b/src/main/webapp/views/pda/combPro.html
@@ -98,6 +98,24 @@
     <button id="remove" onclick="remove()">绉婚櫎</button>
     <button id="confirm" onclick="confirm()">淇濆瓨</button>
 </div>
+
+<!-- 鏄剧ず鐢熸垚鍗曞彿寮圭獥 -->
+<div id="warehouseModal" style="display: none; text-align: center; padding-top: 10px">
+    <div class="form-item">
+        <span>鐗╂枡</span>
+        <input id="matNo2" type="text" disabled="disabled" style="width: 70%">
+    </div>
+    <div class="form-item">
+        <span>鍚嶇О</span>
+        <input id="matName2" type="text" disabled="disabled" style="width: 70%">
+    </div>
+    <div class="form-item">
+        <span>鐢熸垚鍗曞彿</span>
+        <input id="warehouse" type="text" disabled="disabled" style="width: 60%;height: 24.8px; color: blue">
+    </div>
+    <button onclick="closeWarehouse()" style="margin-top: 8px">鍏抽棴</button>
+</div>
+
 </body>
 <script>
     window.onload = function(){document.getElementById("code").focus();}
@@ -116,8 +134,9 @@
             cellMinWidth: 50,
             cols: [[
                 {fixed: 'left', align: 'center', field: 'count', title: '鏁伴噺', event: 'modify', style:'cursor: pointer;color: blue', width:50},
-                {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜'},
-                {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'}
+                {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜', event: 'warehouse', style: 'cursor: pointer;color: blue'},
+                {field: 'warehouse', align: 'center', title: '鐢熸垚鍗曞彿'}
+//                {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'}
             ]],
             done: function (res, curr, count) {
             }
@@ -143,10 +162,30 @@
                         }
                     });
                     break;
+                case 'warehouse':
+                    layer.open({
+                        type: 1,
+                        offset: '20px',
+                        title: '鐢熸垚鍗曞彿鏄庣粏',
+                        shadeClose: true,
+                        area: ['80%', '180px'],
+                        content: $("#warehouseModal"),
+                        success: function (layero, index) {
+                            $('#matNo2').val(data.matNo);
+                            $('#matName2').val(data.matName);
+                            $('#warehouse').val(data.warehouse);
+                        }
+                    });
+                    break;
             }
         });
 
     });
+
+    /* 鍏抽棴鐢熸垚鍗曞彿鏄庣粏 */
+    function closeWarehouse() {
+        layer.closeAll();
+    }
 
     function findCode(el) {
         if (el.value.length === 7) {
@@ -160,7 +199,7 @@
         for (var i=0;i<data.length;i++) {
             var toPush = true;
             for (var j=0;j<matData.length;j++){
-                if (data[i].matNo === matData[j].matNo) {
+                if (data[i].matNo === matData[j].matNo && data[i].warehouse === matData[j].warehouse) {
                     matData[j].count = Number(matData[j].count) + Number(data[i].count);
                     toPush  = false;
                 }
@@ -181,7 +220,8 @@
         if (isEmpty(el.value)) {
             return;
         }
-        var billNo = el.value.split(",")[0].split("=")[1];
+//        var billNo = el.value.split(",")[0].split("=")[1];
+        var billNo = el.value;
         if (isEmpty(billNo)) {
             return;
         }

--
Gitblit v1.9.1