From 0ac8fe78532fa2decaeed4a9e3b6715ccc271e90 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期二, 13 七月 2021 08:58:06 +0800
Subject: [PATCH] 1.出库作业支持捡料出库

---
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |    7 +++
 src/main/webapp/views/pakStore/locDetlQuery.html            |   82 ++++++++++-------------------------------
 src/main/webapp/static/js/pakStore/stockOut.js              |    3 +
 3 files changed, 29 insertions(+), 63 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 823b26f..d3b1639 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -285,6 +285,13 @@
             }
             // 鐢熸垚宸ヤ綔妗f槑缁�
             for (LocDetlDto detlDto : dto.getLocDetlDtos()) {
+                // 濡傛灉涓烘崱鏂欏嚭搴撻渶瑕佸垽鏂墭鐩樼爜鏄惁涓虹┖
+                if (ioType == 103) {
+                    String zpallet = detlDto.getLocDetl().getZpallet();
+                    if (Cools.isEmpty(zpallet)) {
+                        throw new CoolException("鎷f枡鍑哄簱蹇呴』鍚湁鎵樼洏鐮�");
+                    }
+                }
                 // 鍑哄簱鏃讹紝鏁伴噺涓�0鐨勭洿鎺ュ拷鐣�
                 if (detlDto.getCount() == null || detlDto.getCount() <= 0.0D) {
                     continue;
diff --git a/src/main/webapp/static/js/pakStore/stockOut.js b/src/main/webapp/static/js/pakStore/stockOut.js
index 5946e13..6e2b767 100644
--- a/src/main/webapp/static/js/pakStore/stockOut.js
+++ b/src/main/webapp/static/js/pakStore/stockOut.js
@@ -3,7 +3,7 @@
 function getCol() {
     var cols = [
         // {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
-        {field: 'anfme', align: 'center',title: '鏁伴噺'}
+        {field: 'anfme', align: 'center',title: '鏁伴噺', edit: 'text', style: 'color: blue;font-weight: bold'}
         ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
     ];
     arrRemove(detlCols,  'field', 'anfme');
@@ -106,6 +106,7 @@
                         if (count > locDetlData[i]["anfme"]) {
                             layer.msg("涓嶈兘瓒呰繃鍘熸暟閲�");
                         } else {
+                            locDetlData[i]["anfme"] = count;
                             locDetlData[i]["count"] = count;
                         }
                         break;
diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index cb0979e..d6a2c61 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -51,39 +51,18 @@
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="matnr" placeholder="鐗╂枡鍙�"  autocomplete="off">
+                <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿"  autocomplete="off">
             </div>
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鍚嶇О" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="type" placeholder="鐗╂枡绫诲埆" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="lgnum" placeholder="瑙勬牸" autocomplete="off">
+                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
             </div>
         </div>
         <!-- 鏃ユ湡鑼冨洿 -->
-        <div class="layui-inline" style="width: 300px;">
+        <div class="layui-inline" style="width: 300px">
             <div class="layui-input-inline">
                 <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
-            </div>
-        </div>
-        <br />
-        <div class="layui-inline" style="margin-left: 30px">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="supplier" placeholder="閫氱煡鍗曞彿" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="mnemonic" placeholder="鐢熶骇鍗曞彿" autocomplete="off">
             </div>
         </div>
         <!-- 寰呮坊鍔� -->
@@ -162,8 +141,14 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                $('.layui-form-checkbox').css("pointer-events", "none");
-                $('td[data-field="0').css("cursor", "pointer")
+                form.on('checkbox(tableCheckbox)', function (data) {
+                    var _index = $(data.elem).attr('table-index')||0;
+                    if(data.elem.checked){
+                        res.data[_index][data.value] = 'Y';
+                    }else{
+                        res.data[_index][data.value] = 'N';
+                    }
+                });
             }
         });
 
@@ -177,26 +162,6 @@
                         layer.msg("璇烽�夋嫨鏁版嵁");
                         return;
                     }
-                    var locNos = [];
-                    data.forEach(function(elem) {
-                        locNos.push(elem.locNo);
-                    });
-                    $.ajax({
-                        url: baseUrl+"/locDetl/auth",
-                        headers: {'token': localStorage.getItem('token')},
-                        data: {locNos:locNos},
-                        method: 'POST',
-                        async: false,
-                        success: function (res) {
-                            if (res.code === 200) {
-                                data = res.data;
-                            } else if (res.code === 403) {
-                                top.location.href = baseUrl + "/";
-                            } else {
-                                layer.msg(res.msg)
-                            }
-                        }
-                    })
                     parent.addTableData(data);
                     break;
             }
@@ -222,20 +187,6 @@
         });
     })
 
-    var b = true;
-    $(function(){
-        $(document.body).on('click','td[data-field="0"]',function(){
-            var locNo = $(this).next().children("div").html();
-            if (b) {
-                b = false;
-                $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click();
-                setTimeout(function () {
-                    b = true;
-                }, 200)
-            }
-        });
-    })
-
     function tableReload(child) {
         var searchData = {};
         $.each($('#search-box [name]').serializeArray(), function() {
@@ -251,8 +202,15 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                $('.layui-form-checkbox').css("pointer-events", "none");
-                $('td[data-field="0').css("cursor", "pointer")
+                if (res.data.length === 0 && count !== 0) {
+                    locDetlTableIns.reload({
+                        where: searchData,
+                        page: {
+                            curr: pageCurr-1
+                        }
+                    });
+                    pageCurr -= 1;
+                }
             }
         });
     }

--
Gitblit v1.9.1