From 8e943b7104561c3b14cf223016698709c5ade4b5 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期二, 03 二月 2026 15:37:26 +0800
Subject: [PATCH] #pda料箱组托和换码

---
 src/main/webapp/views/report/locDetl.html |   95 ++++++++++++++++++++++++++++++++++-------------
 1 files changed, 68 insertions(+), 27 deletions(-)

diff --git a/src/main/webapp/views/report/locDetl.html b/src/main/webapp/views/report/locDetl.html
index 01019b3..b12f862 100644
--- a/src/main/webapp/views/report/locDetl.html
+++ b/src/main/webapp/views/report/locDetl.html
@@ -16,10 +16,10 @@
     </style>
 </head>
 <body>
-<div class="layui-inline"  style="width:31%;margin-top: 20px">
-    <label class="layui-form-label">搴� 浣� 鍙凤細</label>
+<div class="layui-inline"  style="width:100%;margin-top: 20px">
+    <label class="layui-form-label" style="margin-left: 20px" for="locNo" data-i18n="location_no">搴� 浣� 鍙凤細</label>
     <div class="layui-input-inline">
-        <input id="locNo" class="layui-input" type="text" disabled="disabled">
+        <input id="locNo" class="layui-input" type="text" style="margin-left: 20px" disabled="disabled">
     </div>
 </div>
 <table class="layui-hide" id="locDetlByMap" lay-filter="locDetlByMap"></table>
@@ -28,42 +28,49 @@
 <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script src="../../static/js/i18n/i18n-helper.js"></script>
 <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
-<script type="text/javascript">
-    var pageCur;
-    layui.use(['table','laydate', 'form'], function() {
-        table = layui.table;
-        var $ = layui.jquery;
+<script>
+    layui.use(['table', 'form'], function () {
+        var table = layui.table;
         var form = layui.form;
+        var $ = layui.jquery;
+        var locNo = parent.locNo;
+        $('#locNo').val(locNo);
 
-        $('#locNo').val(parent.locNo);
+        // Define getDetlCols locally since it's not exported from locMast.js
+        function getDetlCols() {
+            var i18n = (typeof I18n !== 'undefined' && I18n.isReady());
+            return [[
+                {field: 'locNo$', align: 'center',title: i18n ? I18n.t('location_no') : '搴撲綅鍙�'}
+                ,{field: 'matnr', align: 'center',title: i18n ? I18n.t('material') : '鐗╂枡'}
+                ,{field: 'lgnum', align: 'center',title: i18n ? I18n.t('warehouse_no') : '浠撳簱鍙�'}
+                ,{field: 'tbnum', align: 'center',title: i18n ? I18n.t('transfer_req_no') : '鎼繍鍑瘉'}
+                ,{field: 'zmatid', align: 'center',title: i18n ? I18n.t('material_label_id') : '鐗╂枡鏍囩ID'}
+                ,{field: 'maktx', align: 'center',title: i18n ? I18n.t('material_desc') : '鐗╂枡鎻忚堪'}
+                ,{field: 'werks', align: 'center',title: i18n ? I18n.t('factory') : '宸ュ巶'}
+                ,{field: 'anfme', align: 'center',title: i18n ? I18n.t('quantity') : '鏁伴噺'}
+                ,{field: 'altme', align: 'center',title: i18n ? I18n.t('unit') : '鍗曚綅'}
+                ,{field: 'zpallet', align: 'center',title: i18n ? I18n.t('pallet_barcode') : '鎵樼洏鏉$爜'}
+                ,{field: 'bname', align: 'center',title: i18n ? I18n.t('user_id') : '鐢ㄦ埛ID'}
+            ]];
+        }
 
         // 鏁版嵁娓叉煋
-        tableIns = table.render({
+        var tableIns = table.render({
             elem: '#locDetlByMap',
             headers: {token: localStorage.getItem('token')},
             url: baseUrl+'/locDetl/list/auth',
             page: true,
             limit: 5,
             skin: 'line',
-            where: {loc_no: parent.locNo},
+            where: {loc_no: locNo},
             even: true,
             cellMinWidth: 50,
-            cols: [[
-                // {type: 'checkbox'}
-                {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
-                ,{field: 'matnr', align: 'center',title: '鐗╂枡'}
-                ,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�'}
-                ,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
-                // ,{field: 'tbpos', align: 'center',title: '琛岄」鐩�'}
-                ,{field: 'zmatid', align: 'center',title: '鐗╂枡鏍囩ID'}
-                ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
-                ,{field: 'werks', align: 'center',title: '宸ュ巶'}
-                ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-                ,{field: 'altme', align: 'center',title: '鍗曚綅'}
-                ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
-                ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
-            ]],
+            cols: getDetlCols(),
+            text: {
+                none: (typeof I18n !== 'undefined' && I18n.isReady()) ? I18n.t('no_data') : '鏃犳暟鎹�'
+            },
             request: {
                 pageName: 'curr',
                 pageSize: 'limit'
@@ -81,7 +88,7 @@
             },
             done: function(res, curr, count) {
                 if (res.code === 403) {
-                    top.location.href = "/";
+                    top.location.href = baseUrl+"/";
                 }
                 pageCur=curr;
                 form.on('checkbox(tableCheckbox)', function (data) {
@@ -92,9 +99,43 @@
                         res.data[_index][data.value] = 'N';
                     }
                 });
+                
+                if (typeof I18n !== 'undefined') {
+                    I18n.updateLayuiPagination();
+                }
             }
         });
+
+        // Listen for language changes
+        $(document).on('i18n:languageChanged', function() {
+            tableIns.reload({
+                cols: getDetlCols(),
+                text: {
+                    none: I18n.t('no_data')
+                },
+                done: function(res, curr, count) {
+                     if (typeof I18n !== 'undefined') {
+                        setTimeout(function() {
+                            I18n.updateLayuiPagination();
+                        }, 50);
+                    }
+                }
+            });
+        });
+        
+        // Initial translation check
+        if (!(typeof I18n !== 'undefined' && I18n.isReady())) {
+             $(document).on('i18n:ready', function() {
+                 tableIns.reload({
+                    cols: getDetlCols(),
+                    text: {
+                        none: I18n.t('no_data')
+                    }
+                 });
+             });
+        }
     });
 </script>
+
 </html>
 

--
Gitblit v1.9.1