From 35b1b26f1fe16550b4ee2881a26d599456fe59b4 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 22 一月 2026 17:01:11 +0800
Subject: [PATCH] #i18n翻译
---
src/main/webapp/static/js/wrkDetlLog/wrkDetlLog.js | 758 ++++++++++++++++++++++++++++++---------------------------
1 files changed, 397 insertions(+), 361 deletions(-)
diff --git a/src/main/webapp/static/js/wrkDetlLog/wrkDetlLog.js b/src/main/webapp/static/js/wrkDetlLog/wrkDetlLog.js
index cff0da0..9f01368 100644
--- a/src/main/webapp/static/js/wrkDetlLog/wrkDetlLog.js
+++ b/src/main/webapp/static/js/wrkDetlLog/wrkDetlLog.js
@@ -1,398 +1,421 @@
var pageCurr;
function getCol() {
var cols = [
- {field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�'}
- ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿'}
+ {field: 'wrkNo', align: 'center',title: I18n.t('work_no')}
+ ,{field: 'ioTime$', align: 'center',title: I18n.t('work_time')}
];
- cols.push.apply(cols, detlCols);
- cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',hide: true}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿',hide: true}
+ cols.push.apply(cols, getDetlCols());
+ cols.push({field: 'modiUser$', align: 'center',title: I18n.t('modifier'),hide: true}
+ ,{field: 'modiTime$', align: 'center',title: I18n.t('modify_time'),hide: true}
+ ,{fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width: 120}
)
return cols;
}
-layui.use(['table','laydate', 'form'], function(){
- var table = layui.table;
- var $ = layui.jquery;
- var layer = layui.layer;
- var layDate = layui.laydate;
- var form = layui.form;
+function initTable() {
+ layui.use(['table','laydate', 'form'], function(){
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
- // 鏁版嵁娓叉煋
- tableIns = table.render({
- elem: '#wrkDetlLog',
- headers: {token: localStorage.getItem('token')},
- url: baseUrl+'/wrkDetlLogs/list/auth',
- page: true,
- limit: 16,
- limits: [16, 30, 50, 100, 200, 500],
- even: true,
- toolbar: '#toolbar',
- cellMinWidth: 50,
- cols: [getCol()],
- 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();
- 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';
- }
- });
- }
- });
-
- // 鐩戝惉鎺掑簭浜嬩欢
- table.on('sort(locMast)', function (obj) {
- var searchData = {};
- $.each($('#search-box [name]').serializeArray(), function() {
- searchData[this.name] = this.value;
- });
- searchData['orderByField'] = obj.field;
- searchData['orderByType'] = obj.type;
- tableIns.reload({
- where: searchData,
- page: {
- curr: 1
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#wrkDetlLog',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/wrkDetlLogs/list/auth',
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [getCol()],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
},
- done: function (res, curr, count) {
+ 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();
- }
- });
- });
-
- // 鐩戝惉澶村伐鍏锋爮浜嬩欢
- table.on('toolbar(wrkDetlLog)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch(obj.event) {
- case 'addData':
- layer.open({
- type: 2,
- title: '鏂板',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- content: 'wrkDetlLog_detail.html',
- success: function(layero, index){
- layer.getChildFrame('#data-detail-submit-edit', index).hide();
- clearFormVal(layer.getChildFrame('#detail', index));
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ 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';
}
});
- break;
- case 'deleteData':
- var data = checkStatus.data;
- if (data.length === 0){
- layer.msg('璇烽�夋嫨鏁版嵁');
- } else {
- layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+ if (typeof I18n !== 'undefined') {
+ I18n.updatePage($('.layui-table-view'));
+ I18n.updateLayuiPagination();
+ }
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(locMast)', function (obj) {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ searchData['orderByField'] = obj.field;
+ searchData['orderByType'] = obj.type;
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: 1
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ limit();
+ if (typeof I18n !== 'undefined') {
+ I18n.updatePage($('.layui-table-view'));
+ I18n.updateLayuiPagination();
+ }
+ }
+ });
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(wrkDetlLog)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch(obj.event) {
+ case 'addData':
+ layer.open({
+ type: 2,
+ title: I18n.t('add'),
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ content: 'wrkDetlLog_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-edit', index).hide();
+ clearFormVal(layer.getChildFrame('#detail', index));
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ }
+ });
+ break;
+ case 'deleteData':
+ var data = checkStatus.data;
+ if (data.length === 0){
+ layer.msg(I18n.t('please_select_data'));
+ } else {
+ layer.confirm(I18n.t('confirm_delete_prefix')+(data.length===1?I18n.t('this'):data.length)+I18n.t('confirm_delete_suffix'), function(){
+ $.ajax({
+ url: baseUrl+"/wrkDetlLog/delete/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {param: JSON.stringify(data)},
+ method: 'POST',
+ traditional:true,
+ success: function (res) {
+ if (res.code === 200){
+ layer.closeAll();
+ tableReload(false);
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ });
+ }
+ break;
+ case 'exportData':
+ layer.confirm(I18n.t('confirm_export_excel'), {shadeClose: true}, function(){
+ var titles=[];
+ var fields=[];
+ obj.config.cols[0].map(function (col) {
+ if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
+ titles.push(col.title);
+ fields.push(col.field);
+ }
+ });
+ var exportData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ exportData[this.name] = this.value;
+ });
+ var param = {
+ 'wrkDetlLog': exportData,
+ 'fields': fields
+ };
$.ajax({
- url: baseUrl+"/wrkDetlLog/delete/auth",
+ url: baseUrl+"/wrkDetlLog/export/auth",
headers: {'token': localStorage.getItem('token')},
- data: {param: JSON.stringify(data)},
+ data: JSON.stringify(param),
+ dataType:'json',
+ contentType:'application/json;charset=UTF-8',
method: 'POST',
- traditional:true,
success: function (res) {
- if (res.code === 200){
- layer.closeAll();
- tableReload(false);
- } else if (res.code === 403){
+ layer.closeAll();
+ if (res.code === 200) {
+ table.exportFile(titles,res.data,'xls');
+ } else if (res.code === 403) {
top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
}
- })
+ });
});
- }
- break;
- case 'exportData':
- layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
- var titles=[];
- var fields=[];
- obj.config.cols[0].map(function (col) {
- if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
- titles.push(col.title);
- fields.push(col.field);
- }
- });
- var exportData = {};
- $.each($('#search-box [name]').serializeArray(), function() {
- exportData[this.name] = this.value;
- });
- var param = {
- 'wrkDetlLog': exportData,
- 'fields': fields
- };
- $.ajax({
- url: baseUrl+"/wrkDetlLog/export/auth",
- headers: {'token': localStorage.getItem('token')},
- data: JSON.stringify(param),
- dataType:'json',
- contentType:'application/json;charset=UTF-8',
- method: 'POST',
- success: function (res) {
- layer.closeAll();
- if (res.code === 200) {
- table.exportFile(titles,res.data,'xls');
- } else if (res.code === 403) {
- top.location.href = baseUrl+"/";
- } else {
- layer.msg(res.msg)
- }
- }
- });
- });
- break;
- }
- });
-
- // 鐩戝惉琛屽伐鍏蜂簨浠�
- table.on('tool(wrkDetlLog)', function(obj){
- var data = obj.data;
- switch (obj.event) {
- // 璇︽儏
- case 'detail':
- layer.open({
- type: 2,
- title: '璇︽儏',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: true,
- content: 'wrkDetlLog_detail.html',
- success: function(layero, index){
- setFormVal(layer.getChildFrame('#detail', index), data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- }
- });
- break;
- // 缂栬緫
- case 'edit':
- layer.open({
- type: 2,
- title: '淇敼',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- content: 'wrkDetlLog_detail.html',
- success: function(layero, index){
- layer.getChildFrame('#data-detail-submit-save', index).hide();
- setFormVal(layer.getChildFrame('#detail', index), data, false);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
- top.convertDisabled(layer.getChildFrame('', index), true);
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- }
- });
- break;
- case 'modiUser':
- var param = top.reObject(data).modiUser;
- if (param === undefined) {
- layer.msg("鏃犳暟鎹�");
- } else {
- layer.open({
- type: 2,
- title: '淇敼浜哄憳璇︽儏',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: true,
- content: '../user/user_detail.html',
- success: function(layero, index){
- $.ajax({
- url: "baseUrl+/user/"+ param +"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- success: function (res) {
- if (res.code === 200){
- setFormVal(layer.getChildFrame('#detail', index), res.data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
- }
- });
- }
- break;
- case 'appeUser':
- var param = top.reObject(data).appeUser;
- if (param === undefined) {
- layer.msg("鏃犳暟鎹�");
- } else {
- layer.open({
- type: 2,
- title: '鍒涘缓鑰呰鎯�',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: true,
- content: '../user/user_detail.html',
- success: function(layero, index){
- $.ajax({
- url: "baseUrl+/user/"+ param +"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- success: function (res) {
- if (res.code === 200){
- setFormVal(layer.getChildFrame('#detail', index), res.data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
- }
- });
- }
- break;
-
- }
- });
-
- // 鏁版嵁淇濆瓨鍔ㄤ綔
- form.on('submit(save)', function () {
- if (banMsg != null){
- layer.msg(banMsg);
- return;
- }
- method("add");
- });
-
- // 鏁版嵁淇敼鍔ㄤ綔
- form.on('submit(edit)', function () {
- method("update")
- });
-
- function method(name){
- var index = layer.load(1, {
- shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙
- });
- var data = {
-// id: $('#id').val(),
- wrkNo: $('#wrkNo').val(),
- ioTime: top.strToDate($('#ioTime\\$').val()),
- matnr: $('#matnr').val(),
- lgnum: $('#lgnum').val(),
- tbnum: $('#tbnum').val(),
- tbpos: $('#tbpos').val(),
- zmatid: $('#zmatid').val(),
- maktx: $('#maktx').val(),
- werks: $('#werks').val(),
- anfme: $('#anfme').val(),
- altme: $('#altme').val(),
- zpallet: $('#zpallet').val(),
- bname: $('#bname').val(),
- memo: $('#memo').val(),
- modiUser: $('#modiUser').val(),
- modiTime: top.strToDate($('#modiTime\\$').val()),
- appeUser: $('#appeUser').val(),
- appeTime: top.strToDate($('#appeTime\\$').val()),
- nista: $('#nista').val(),
-
- };
- $.ajax({
- url: baseUrl+"/wrkDetlLog/"+name+"/auth",
- headers: {'token': localStorage.getItem('token')},
- data: top.reObject(data),
- method: 'POST',
- success: function (res) {
- if (res.code === 200){
- parent.layer.closeAll();
- parent.$(".layui-laypage-btn")[0].click();
- $("#data-detail :input").each(function () {
- $(this).val("");
- });
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg)
- }
- layer.close(index);
+ break;
}
- })
- }
+ });
- // 澶嶉�夋浜嬩欢
- form.on('checkbox(detailCheckbox)', function (data) {
- var el = data.elem;
- if (el.checked) {
- $(el).val('Y');
- } else {
- $(el).val('N');
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(wrkDetlLog)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ // 璇︽儏
+ case 'detail':
+ layer.open({
+ type: 2,
+ title: I18n.t('detail'),
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: 'wrkDetlLog_detail.html',
+ success: function(layero, index){
+ setFormVal(layer.getChildFrame('#detail', index), data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ // 缂栬緫
+ case 'edit':
+ layer.open({
+ type: 2,
+ title: I18n.t('edit'),
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ content: 'wrkDetlLog_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-save', index).hide();
+ setFormVal(layer.getChildFrame('#detail', index), data, false);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
+ top.convertDisabled(layer.getChildFrame('', index), true);
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ case 'modiUser':
+ var param = top.reObject(data).modiUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: I18n.t('modifier_detail'),
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: "baseUrl+/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+ case 'appeUser':
+ var param = top.reObject(data).appeUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: I18n.t('creator_detail'),
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: "baseUrl+/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+
+ }
+ });
+
+ // 鏁版嵁淇濆瓨鍔ㄤ綔
+ form.on('submit(save)', function () {
+ if (banMsg != null){
+ layer.msg(banMsg);
+ return;
+ }
+ method("add");
+ });
+
+ // 鏁版嵁淇敼鍔ㄤ綔
+ form.on('submit(edit)', function () {
+ method("update")
+ });
+
+ function method(name){
+ var index = layer.load(1, {
+ shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙
+ });
+ var data = {
+// id: $('#id').val(),
+ wrkNo: $('#wrkNo').val(),
+ ioTime: top.strToDate($('#ioTime\\$').val()),
+ matnr: $('#matnr').val(),
+ lgnum: $('#lgnum').val(),
+ tbnum: $('#tbnum').val(),
+ tbpos: $('#tbpos').val(),
+ zmatid: $('#zmatid').val(),
+ maktx: $('#maktx').val(),
+ werks: $('#werks').val(),
+ anfme: $('#anfme').val(),
+ altme: $('#altme').val(),
+ zpallet: $('#zpallet').val(),
+ bname: $('#bname').val(),
+ memo: $('#memo').val(),
+ modiUser: $('#modiUser').val(),
+ modiTime: top.strToDate($('#modiTime\\$').val()),
+ appeUser: $('#appeUser').val(),
+ appeTime: top.strToDate($('#appeTime\\$').val()),
+ nista: $('#nista').val(),
+
+ };
+ $.ajax({
+ url: baseUrl+"/wrkDetlLog/"+name+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: top.reObject(data),
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ parent.layer.closeAll();
+ parent.$(".layui-laypage-btn")[0].click();
+ $("#data-detail :input").each(function () {
+ $(this).val("");
+ });
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ layer.close(index);
+ }
+ })
}
- });
- // 鎼滅储鏍忔悳绱簨浠�
- form.on('submit(search)', function (data) {
- pageCurr = 1;
- tableReload(false);
- });
+ // 澶嶉�夋浜嬩欢
+ form.on('checkbox(detailCheckbox)', function (data) {
+ var el = data.elem;
+ if (el.checked) {
+ $(el).val('Y');
+ } else {
+ $(el).val('N');
+ }
+ });
- // 鎼滅储鏍忛噸缃簨浠�
- form.on('submit(reset)', function (data) {
- pageCurr = 1;
- clearFormVal($('#search-box'));
- tableReload(false);
- });
+ // 鎼滅储鏍忔悳绱簨浠�
+ form.on('submit(search)', function (data) {
+ pageCurr = 1;
+ tableReload(false);
+ });
- // 鏃堕棿閫夋嫨鍣�
- layDate.render({
- elem: '#ioTime\\$',
- type: 'datetime'
- });
- layDate.render({
- elem: '#modiTime\\$',
- type: 'datetime'
- });
- layDate.render({
- elem: '#appeTime\\$',
- type: 'datetime'
- });
- layDate.render({
- elem: '.layui-laydate-range'
- ,type: 'datetime'
- ,range: true
- });
+ // 鎼滅储鏍忛噸缃簨浠�
+ form.on('submit(reset)', function (data) {
+ pageCurr = 1;
+ clearFormVal($('#search-box'));
+ tableReload(false);
+ });
+ // 鏃堕棿閫夋嫨鍣�
+ layDate.render({
+ elem: '#ioTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#modiTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#appeTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
+
+ });
+}
+
+if (typeof I18n !== 'undefined' && I18n.isReady()) {
+ initTable();
+} else {
+ $(document).on('i18n:ready', function() {
+ initTable();
+ });
+}
+
+$(document).on('i18n:languageChanged', function() {
+ initTable();
});
// 鍏抽棴鍔ㄤ綔
@@ -425,6 +448,19 @@
pageCurr -= 1;
}
limit(child);
+ setTimeout(function() {
+ if (typeof I18n !== 'undefined') {
+ if (child) {
+ if (typeof parent.I18n !== 'undefined') {
+ parent.I18n.updatePage(parent.layui.jquery('.layui-table-view'));
+ parent.I18n.updateLayuiPagination();
+ }
+ } else {
+ I18n.updatePage($('.layui-table-view'));
+ I18n.updateLayuiPagination();
+ }
+ }
+ }, 50);
}
});
}
--
Gitblit v1.9.1