From 539a56279625242c497b4b4093f2defbb9d80334 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 29 一月 2026 14:05:44 +0800
Subject: [PATCH] #i18n翻译

---
 src/main/webapp/static/js/mat/mat.js |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/static/js/mat/mat.js b/src/main/webapp/static/js/mat/mat.js
index 0908539..10b3180 100644
--- a/src/main/webapp/static/js/mat/mat.js
+++ b/src/main/webapp/static/js/mat/mat.js
@@ -1,19 +1,28 @@
 var pageCurr;
 var printMatCodeNos = [];
 var admin;
+
+// Local translation helper
+function t(key, params) {
+    if (typeof I18n !== 'undefined' && typeof I18n.t === 'function') {
+        return I18n.t(key, params);
+    }
+    return key;
+}
+
 function getCol() {
     var cols = [
         {type: 'checkbox'}
-        ,{field: 'tagId$', align: 'center',title: I18n.t('classification'), templet: '#tagTpl'}
-        ,{field: 'store_max', align: 'center',title: I18n.t('stock_upper_limit')}
-        ,{field: 'store_min', align: 'center',title: I18n.t('stock_lower_limit')}
-        ,{field: 'store_max_date', align: 'center',title: I18n.t('stock_age_upper_limit_days')}
-        ,{field: 'areaId$', align: 'center',title: I18n.t('area'), templet: '#areaTpl'}
+        ,{field: 'tagId$', align: 'center',title: t('classification'), templet: '#tagTpl'}
+        // ,{field: 'store_max', align: 'center',title: t('stock_upper_limit')}
+        // ,{field: 'store_min', align: 'center',title: t('stock_lower_limit')}
+        // ,{field: 'store_max_date', align: 'center',title: t('stock_age_upper_limit_days')}
+        ,{field: 'areaId$', align: 'center',title: t('area'), templet: '#areaTpl'}
 
     ];
     cols.push.apply(cols, getMatCols());
     cols.push(
-        {fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:150}
+        {fixed: 'right', title: t('operation'), align: 'center', toolbar: '#operate', width:150}
     )
     return cols;
 }
@@ -263,6 +272,10 @@
                     success: function(layero, index){
                         layer.iframeAuto(index);
                         printMatCodeNos.push(data.matnr);
+                        if (typeof I18n !== 'undefined' && I18n.updatePage) {
+                            I18n.updatePage($(layero));
+                            form.render();
+                        }
                     },
                     end: function () {
                     }
@@ -291,6 +304,13 @@
                         $(layero).find('#matnr').val(res.data);
                     })
                 }
+                
+                if (typeof I18n !== 'undefined') {
+                    setTimeout(function() {
+                        I18n.updatePage($(layero));
+                    }, 50);
+                }
+
                 // 琛ㄥ崟鎻愪氦浜嬩欢
                 form.on('submit(editSubmit)', function (data) {
                     console.log(data)
@@ -310,7 +330,7 @@
                             layer.close(loadIndex);
                             if (res.code === 200){
                                 layer.close(dIndex);
-                                layer.msg(res.msg, {icon: 1});
+                                layer.msg(t('response.operation_success'), {icon: 1});
                                 $(".layui-laypage-btn")[0].click();
                             } else if (res.code === 403){
                                 top.location.href = baseUrl+"/";

--
Gitblit v1.9.1