From 632bde0f32999a2b319b706e23d90bc1b5dd8cc2 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 21 四月 2026 17:22:56 +0800
Subject: [PATCH] 1.新增拍照功能

---
 src/main/webapp/views/pakStore/locDetlQuery.html |   77 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 74 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index 35b9f09..d0e280f 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -64,14 +64,33 @@
         </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="SKU"  autocomplete="off">
             </div>
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
+                <input class="layui-input" type="text" name="boxType3" placeholder="閲囪喘鍗曞彿"  autocomplete="off">
             </div>
         </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <input class="layui-input" type="text" name="standby2" placeholder="UPC" autocomplete="off">
+            </div>
+        </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <input class="layui-input" type="text" name="standby1" placeholder="PO" autocomplete="off">
+            </div>
+        </div>
+<!--        <div class="layui-inline">-->
+<!--            <div class="layui-input-inline">-->
+<!--                <select name="frozen" class="layui-input" type="text" autocomplete="off">-->
+<!--                    <option value="">鍐荤粨鍚�</option>-->
+<!--                    <option value="0">鏈喕缁�</option>-->
+<!--                    <option value="1">宸插喕缁�</option>-->
+<!--                </select>-->
+<!--            </div>-->
+<!--        </div>-->
         <!-- 鏃ユ湡鑼冨洿 -->
         <div class="layui-inline" style="width: 300px">
             <div class="layui-input-inline">
@@ -94,6 +113,9 @@
 <div class="layui-form">
     <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
 </div>
+<script type="text/html" id="operate">
+    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="viewPhoto">鏌ョ湅鐓х墖</a>
+</script>
 
 <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>
@@ -112,7 +134,8 @@
         ];
         cols.push.apply(cols, detlCols);
         cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
-            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:110})
         return cols;
     }
 
@@ -172,11 +195,59 @@
                         layer.msg("璇烽�夋嫨鏁版嵁");
                         return;
                     }
+
+                    if (data.some(obj => obj.frozen === 1)) {
+                        layer.msg("鍐荤粨鐨勫簱瀛樹笉鍏佽鍑哄簱锛�");
+                        return;
+                    }
+
+                    let 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;
             }
         });
 
+        table.on('tool(stockOut)', function(obj){
+            if (obj.event !== 'viewPhoto') {
+                return;
+            }
+            $.ajax({
+                url: baseUrl + "/photo/loc/auth",
+                headers: {'token': localStorage.getItem('token')},
+                data: {locNo: obj.data.locNo},
+                method: 'GET',
+                success: function (res) {
+                    if (res.code === 200) {
+                        showPhotoViewer(layer, res.data);
+                    } else if (res.code === 403) {
+                        top.location.href = baseUrl + "/";
+                    } else {
+                        layer.msg(res.msg);
+                    }
+                }
+            });
+        });
+
         // 鎼滅储鏍忔悳绱簨浠�
         form.on('submit(search)', function (data) {
             tableReload();

--
Gitblit v1.9.1