| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | layui.use(['table','laydate', 'form','upload','layer'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | var upload = layui.upload; |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locMast', |
| | |
| | | ,{field: 'row1', align: 'center',title: '排', sort:true} |
| | | ,{field: 'bay1', align: 'center',title: '列', sort:true} |
| | | ,{field: 'lev1', align: 'center',title: '层', sort:true} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码', sort:true} |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' disabled table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | upload.render({ |
| | | elem: '#uploadExcel', // 绑定元素 |
| | | url: baseUrl+'/importCrnErr', // 上传接口,替换为你的后端接口 |
| | | headers:{'token': localStorage.getItem('token')}, |
| | | accept: 'file', // 允许上传的文件类型 |
| | | exts: 'xls|xlsx', // 允许上传的文件后缀 |
| | | done: function(res){ |
| | | // 上传完毕回调 |
| | | if(res.code === 200){ |
| | | layer.msg(res.msg); |
| | | console.log('文件数据:', res.data); |
| | | } else { |
| | | layer.msg(res.msg || '上传失败'); |
| | | } |
| | | }, |
| | | error: function(){ |
| | | // 请求异常回调 |
| | | layer.msg('上传失败,请重试'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | |
| | | barcode: $('#barcode').val(), |
| | | PdcType: $('#PdcType').val(), |
| | | ctnNo: $('#ctnNo').val(), |
| | | containerCode:$('#containerCode').val(), |
| | | containerTypeCode:$('#containerTypeCode').val(), |
| | | emptyContainer:$('#emptyContainer').val(), |
| | | |
| | | }; |
| | | $.ajax({ |