You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.9 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
<style>
td {
text-align: center;
font-size: 10px;
}
</style>
</head>
<body class="pear-container layui-form">
<blockquote class="layui-elem-quote" style="background-color: #fff;">
● 支持上传 2MB 以内的xls、xlsx格式文件。<br>
● 文件中数据不能超过100行、50列。<br>
● 为快速识别表格字段,请将表头设置背景色,如下所示:<br>
<div style="margin: 20px 0 0 10px">
<table>
<colgroup>
<col>
<col width="50">
<col>
<col width="50">
<col>
<col width="50">
<col>
</colgroup>
<tbody>
<tr>
<td><img src="../imgs/1.jpg"></td>
<td></td>
<td><img src="../imgs/2.jpg"></td>
<td></td>
<td><img src="../imgs/3.jpg"></td>
<td></td>
<td><img src="../imgs/4.jpg"></td>
</tr>
<tr>
<td style="height: 30px;">示例一</td>
<td></td>
<td>示例二</td>
<td></td>
<td>示例三</td>
<td></td>
<td>示例四</td>
</tr>
</tbody>
</table>
</div>
</blockquote>
<div class="layui-upload-drag" style="display: block;height: 150px;" id="upload-excel">
<i class="layui-icon layui-icon-upload"></i>
<div>点击上传,或将文件拖拽到此处</div>
</div>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
layui.use(function () {
var $ = layui.jquery;
var upload = layui.upload;
upload.render({
elem: '#upload-excel',
url: '/QingLong/collect/uoloadTemplate',
exts: 'xlsx',
done: function (res) {
console.log(res);
layer.msg("上传成功!", {
icon: 1,
time: 1500
}, function () {
window.location = "./fields_set.html?job_id=" + res.job_id;
});
}
});
});
</script>
</body>
</html>