| | |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | {field: 'wrkNo', align: 'center',title: '工作号',sort: true} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, hide:true} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机', hide:true} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站', hide:true} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站', hide:true} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位', hide:true} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位', hide:true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide:true} |
| | | ,{field: 'updMk', align: 'center',title: '异常标记'} |
| | | ,{field: 'errorTime$', align: 'center',title: '异常记录时间'} |
| | | ,{field: 'errorMemo', align: 'center',title: '异常内容'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | ]], |
| | | cols: getCols(), |
| | | text: { |
| | | none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据' |
| | | }, |
| | | |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | I18n.updatePage(); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | |
| | | function getCols() { |
| | | return [[ |
| | | // {type: 'checkbox'} |
| | | {field: 'wrkNo', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('work_no') : '工作号',sort: true} |
| | | ,{field: 'ioTime$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('work_time') : '工作时间',sort: true, hide:true} |
| | | ,{field: 'wrkSts$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('work_status') : '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('io_type') : '任务类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('crane') : '堆垛机', hide:true} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('source_station') : '源站', hide:true} |
| | | ,{field: 'staNo$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('target_station') : '目标站', hide:true} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('source_location') : '源库位', hide:true} |
| | | ,{field: 'locNo$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('target_location') : '目标库位', hide:true} |
| | | ,{field: 'barcode', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('barcode') : '条码', hide:true} |
| | | ,{field: 'updMk', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('exception_mark') : '异常标记'} |
| | | ,{field: 'errorTime$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('error_record_time') : '异常记录时间'} |
| | | ,{field: 'errorMemo', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('err_content') : '异常内容'} |
| | | ,{field: 'modiUser$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('update_by') : '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('update_time') : '修改时间', hide:true} |
| | | ]]; |
| | | } |
| | | |
| | | function getDetlCols() { |
| | | return [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('work_no') : '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('work_time') : '工作时间'} |
| | | ,{field: 'matnr', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('mat_code') : '商品编码'} |
| | | ,{field: 'lgnum', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('warehouse_no') : '仓库号'} |
| | | ,{field: 'tbnum', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('transfer_req_no') : '转储请求编号'} |
| | | ,{field: 'tbpos', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('line_item') : '行项目'} |
| | | ,{field: 'zmatid', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('material_label_id') : '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('material_desc') : '物料描述'} |
| | | ,{field: 'werks', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('factory') : '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('quantity') : '数量'} |
| | | ,{field: 'altme', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('unit') : '单位'} |
| | | ,{field: 'zpallet', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('pallet_code') : '托盘码'} |
| | | ,{field: 'bname', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('user_id') : '用户ID'} |
| | | ,{field: 'memo', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('remark') : '备注'} |
| | | ,{fixed: 'right', title: typeof I18n !== 'undefined' ? I18n.t('operation') : '操作', align: 'center', toolbar: '#operate', minWidth:200} |
| | | ]]; |
| | | } |
| | | |
| | | $(document).on('i18n:languageChanged', function () { |
| | | I18n.updatePage(); |
| | | initLayDate(true); |
| | | tableIns.reload({ |
| | | cols: getCols(), |
| | | text: { |
| | | none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据' |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | if(window.tableIns1) { |
| | | tableIns1.reload({ |
| | | cols: getDetlCols(), |
| | | text: { |
| | | none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据' |
| | | }, |
| | | 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'; |
| | | } |
| | | }); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | I18n.updatePage(); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | layer.confirm(typeof I18n !== 'undefined' ? I18n.t('confirm_export') : '确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作档明细', |
| | | title: typeof I18n !== 'undefined' ? I18n.t('work_order_detail') : '工作档明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime' |
| | | function initLayDate(isUpdate) { |
| | | var lang = (typeof I18n !== 'undefined' && I18n.getLanguage().indexOf('en') > -1) ? 'en' : 'cn'; |
| | | var dateFields = [ |
| | | {elem: '#ymd\\$', type: 'datetime'}, |
| | | {elem: '#wrkDate\\$', type: 'datetime'}, |
| | | {elem: '#ioTime\\$', type: 'datetime'}, |
| | | {elem: '#crnStrTime\\$', type: 'datetime'}, |
| | | {elem: '#crnEndTime\\$', type: 'datetime'}, |
| | | {elem: '#plcStrTime\\$', type: 'datetime'}, |
| | | {elem: '#crnPosTime\\$', type: 'datetime'}, |
| | | {elem: '#refIotime\\$', type: 'datetime'}, |
| | | {elem: '#modiTime\\$', type: 'datetime'}, |
| | | {elem: '#appeTime\\$', type: 'datetime'}, |
| | | {elem: '#errorTime\\$', type: 'datetime'}, |
| | | {elem: '#logErrTime\\$', type: 'datetime'}, |
| | | {elem: '.layui-laydate-range', type: 'datetime', range: true} |
| | | ]; |
| | | |
| | | $.each(dateFields, function(i, item) { |
| | | if (isUpdate) { |
| | | var $input = $(item.elem); |
| | | if ($input.length > 0) { |
| | | $input.each(function() { |
| | | var $this = $(this); |
| | | // 克隆元素以移除所有绑定的事件和数据 |
| | | var $clone = $this.clone(); |
| | | // 移除 lay-key 属性 |
| | | $clone.removeAttr('lay-key'); |
| | | // 替换原有元素 |
| | | $this.replaceWith($clone); |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime' |
| | | } |
| | | } |
| | | |
| | | var options = { |
| | | elem: item.elem, |
| | | type: item.type, |
| | | lang: lang |
| | | }; |
| | | if (item.range) { |
| | | options.range = true; |
| | | } |
| | | layDate.render(options); |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | } |
| | | initLayDate(false); |
| | | |
| | | var pageCur; |
| | | function locDetl(param){ |
| | |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', 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'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:50} |
| | | ]], |
| | | cols: getDetlCols(), |
| | | text: { |
| | | none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据' |
| | | }, |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | I18n.updatePage(); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | } |
| | |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | text: { |
| | | none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据' |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | setTimeout(function(){ I18n.updateLayuiPagination(); }, 300); |
| | | } |
| | | }); |
| | | } |