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/orderSettle/orderSettle.js |  112 +++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 66 insertions(+), 46 deletions(-)

diff --git a/src/main/webapp/static/js/orderSettle/orderSettle.js b/src/main/webapp/static/js/orderSettle/orderSettle.js
index 5c27b5e..c76c42e 100644
--- a/src/main/webapp/static/js/orderSettle/orderSettle.js
+++ b/src/main/webapp/static/js/orderSettle/orderSettle.js
@@ -10,50 +10,67 @@
     var admin = layui.admin;
 
     // 鏁版嵁娓叉煋
-    tableIns = table.render({
-        elem: '#orderSettle',
-        headers: {token: localStorage.getItem('token')},
-        url: baseUrl+'/orderSettle/list/auth',
-        page: true,
-        limit: 15,
-        limits: [15, 30, 50, 100, 200, 500],
-        toolbar: '#toolbar',
-        cellMinWidth: 50,
-        height: 'full-120',
-        cols: [[
-            {type: 'checkbox'}
-            ,{field: 'orderSettle', align: 'center',title: '璁㈠崟鐘舵��'}
-            ,{field: 'settleName', align: 'center',title: '鐘舵�佹弿杩�'}
-            // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
-            // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-            ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
-            ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
-            ,{field: 'memo', align: 'center',title: '澶囨敞'}
+    function initTable() {
+        tableIns = table.render({
+            elem: '#orderSettle',
+            headers: {token: localStorage.getItem('token')},
+            url: baseUrl+'/orderSettle/list/auth',
+            page: true,
+            limit: 15,
+            limits: [15, 30, 50, 100, 200, 500],
+            toolbar: '#toolbar',
+            cellMinWidth: 50,
+            height: 'full-120',
+            cols: [[
+                {type: 'checkbox'}
+                ,{field: 'orderSettle', align: 'center',title: I18n.t('order_status')}
+                ,{field: 'settleName', align: 'center',title: I18n.t('status_desc')}
+                // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
+                // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
+                ,{field: 'updateBy$', align: 'center',title: I18n.t('update_by')}
+                ,{field: 'updateTime$', align: 'center',title: I18n.t('update_time')}
+                ,{field: 'memo', align: 'center',title: I18n.t('memo')}
 
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}
-        ]],
-        request: {
-            pageName: 'curr',
-            pageSize: 'limit'
-        },
-        parseData: function (res) {
-            return {
-                'code': res.code,
-                'msg': res.msg,
-                'count': res.data.total,
-                'data': res.data.records
+                ,{fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:120}
+            ]],
+            request: {
+                pageName: 'curr',
+                pageSize: 'limit'
+            },
+            parseData: function (res) {
+                return {
+                    'code': res.code,
+                    'msg': res.msg,
+                    'count': res.data.total,
+                    'data': res.data.records
+                }
+            },
+            response: {
+                statusCode: 200
+            },
+            done: function(res, curr, count) {
+                if (res.code === 403) {
+                    top.location.href = baseUrl+"/";
+                }
+                pageCurr=curr;
+                limit();
+                if (typeof I18n !== 'undefined' && I18n.isReady()) {
+                    I18n.updatePage();
+                    I18n.updateLayuiPagination();
+                }
             }
-        },
-        response: {
-            statusCode: 200
-        },
-        done: function(res, curr, count) {
-            if (res.code === 403) {
-                top.location.href = baseUrl+"/";
-            }
-            pageCurr=curr;
-            limit();
-        }
+        });
+    }
+
+    if (typeof I18n !== 'undefined' && I18n.isReady()) {
+        initTable();
+    } else {
+        $(document).on('i18n:ready', initTable);
+    }
+
+    // 鐩戝惉璇█鍒囨崲
+    $(document).on('i18n:languageChanged', function () {
+        initTable();
     });
 
     // 鐩戝惉鎺掑簭浜嬩欢
@@ -79,7 +96,7 @@
                 break;
             case 'deleteData':
                if (checkStatus.length === 0) {
-                   layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+                   layer.msg(I18n.t('please_select_delete_data'), {icon: 2});
                    return;
                }
                del(checkStatus.map(function (d) {
@@ -87,7 +104,7 @@
                }));
                break;
             case 'exportData':
-                admin.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+                admin.confirm(I18n.t('confirm_export_excel'), {shadeClose: true}, function(){
                     var titles=[];
                     var fields=[];
                     obj.config.cols[0].map(function (col) {
@@ -145,9 +162,12 @@
         admin.open({
             type: 1,
             area: '600px',
-            title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
+            title: (mData ? I18n.t('edit') : I18n.t('add')) + I18n.t('order_status'),
             content: $('#editDialog').html(),
             success: function (layero, dIndex) {
+                if (typeof I18n !== 'undefined') {
+                    I18n.updatePage($(layero));
+                }
                 layDateRender(mData);
                 form.val('detail', mData);
                 form.on('submit(editSubmit)', function (data) {
@@ -180,7 +200,7 @@
 
     /* 鍒犻櫎 */
     function del(ids) {
-        layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+        layer.confirm(I18n.t('confirm_delete_selected_data'), {
             skin: 'layui-layer-admin',
             shade: .1
         }, function (i) {

--
Gitblit v1.9.1