| | |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline" style="width:20%;margin-top: 20px"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <label class="layui-form-label"><span data-i18n="work_no">工 作 号:</span></label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:20%;margin-top: 20px"> |
| | | <label class="layui-form-label">工作时间:</label> |
| | | <label class="layui-form-label"><span data-i18n="work_time">工作时间:</span></label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioTime" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | |
| | | <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 type="text/javascript" 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; |
| | | function getCol() { |
| | | let cols = [ |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',width:160} |
| | | {field: 'wrkNo', align: 'center',title: I18n.t('work_no')} |
| | | ,{field: 'ioTime$', align: 'center',title: I18n.t('work_time'),width:160} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | // Use getDetlCols() to ensure fresh I18n values |
| | | cols.push.apply(cols, getDetlCols()); |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | table = layui.table; |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#wrkNo').val(parent.wrkNo); |
| | | $('#ioTime').val(top.dateToStr(parent.ioTime, true)); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlLogByMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetlLogByMast/list/auth', |
| | | where: {wrk_no: parent.wrkNo,ioTime: top.dateToStr(parent.ioTime, true)}, |
| | | 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+"/"; |
| | | } |
| | | pageCur=curr; |
| | | 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'; |
| | | |
| | | function initTable() { |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | table = layui.table; |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#wrkNo').val(parent.wrkNo); |
| | | $('#ioTime').val(top.dateToStr(parent.ioTime, true)); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlLogByMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetlLogByMast/list/auth', |
| | | where: {wrk_no: parent.wrkNo,ioTime: top.dateToStr(parent.ioTime, true)}, |
| | | 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+"/"; |
| | | } |
| | | pageCur=curr; |
| | | 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'; |
| | | } |
| | | }); |
| | | if (typeof I18n !== 'undefined') { |
| | | I18n.updatePage(); |
| | | I18n.updateLayuiPagination(); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | if (typeof I18n !== 'undefined' && I18n.isReady()) { |
| | | initTable(); |
| | | } else { |
| | | $(document).on('i18n:ready', function() { |
| | | initTable(); |
| | | }); |
| | | } |
| | | |
| | | $(document).on('i18n:languageChanged', function() { |
| | | initTable(); |
| | | }); |
| | | </script> |
| | | <script src="../../static/js/translate.js"></script> |
| | | <script> |
| | | translate.selectLanguageTag.show = false; //不出现的select的选择语言 |
| | | translate.service.use('client.edge'); //设置翻译服务 |
| | | translate.listener.start(); //开启页面元素动态监控,js改变的内容也会被翻译,参考文档: http://translate.zvo.cn/4067.html |
| | | translate.execute(); |
| | | </script> |
| | | </html> |
| | | |