|  |  | 
 |  |  | 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: '#basCrnError', | 
 |  |  | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     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(basCrnError)', function (obj) { | 
 |  |  |         var searchData = {}; |