main
kgdxpr 1 year ago
parent 1be8001b43
commit b6b3b5fe58

@ -37,13 +37,20 @@
选择文件
</button>
</div>
<div class="layui-form-item">
<blockquote class="layui-elem-quote" style="color: red;">
<div class="layui-form-item" id="info">
<blockquote class="layui-elem-quote" style="color: #1e9fff;">
温馨提示:导入学生需要严格按照导入模板编辑学生信息,<a style="text-decoration:underline;cursor: pointer;"
id="downTemplate">请点此下载</a>
</blockquote>
</div>
<div class="layui-form-item" id="error" style="display: none">
<blockquote class="layui-elem-quote" style="color: #ff5722;border-left: 5px solid #ff5722;">
错误Excel中的数据不正确请下载修改后重新上传<a style="text-decoration:underline;cursor: pointer;"
id="downError">请点此下载</a>
</blockquote>
</div>
</div>
</div>
@ -67,12 +74,17 @@
var $ = layui.jquery;
var upload = layui.upload;
var errorUUID = "";
var bureauId = GetQueryString("bureau_id");
$("#downTemplate").click(function () {
window.location.href = '/QingLong/student/getImportTemplate?school_id='+bureauId;
});
$("#downError").click(function () {
window.location.href = '/QingLong/student/downloadErrorXls?uuidString=' + errorUUID;
});
upload.render({
elem: '#selectFile',
url: '/QingLong/student/UploadToImportStudent',
@ -88,6 +100,7 @@
done: function (res) {
if (res.success) {
layer.closeAll('loading');
$("#error").hide();
layer.msg("上传成功!", {
icon: 1,
time: 1300
@ -97,10 +110,13 @@
});
} else {
layer.closeAll('loading');
layer.msg(res.message, {
icon: 2,
time: 2000
});
// layer.msg(res.message, {
// icon: 2,
// time: 2000
// });
errorUUID = res.uuid;
$("#error").show();
$("#info").hide();
}
}
});

Loading…
Cancel
Save