导入Excel:
html:
<input type="file" onchange="importExcel(this,false,function(data){getJsonData(data)})" class="upload-input" />
<div>
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>被派送人手机号</th>
<th>被派送人姓名</th>
<th>派送时间</th>
<th>面额</th>
<th>使用限制</th>
<th>有效期</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script>
function importExcel(obj,rABS,callback) {
var wb;
if(!obj.files) { return; }
const IMPORTFILE_MAXSIZE = 2*1024;//这里可以自定义控制导入文件大小
var suffix = obj.files[0].name.split(".")[1];
if(suffix != 'xls' && suffix !='xlsx'){
alert('导入的文件格