|
@ -9,6 +9,10 @@
|
|
|
<link rel="stylesheet" href="${ctx}/static/specialty/layui/css/layui.css">
|
|
|
<link rel="stylesheet" href="${ctx}/static/specialty/css/index.css">
|
|
|
<style>
|
|
|
.layui-layer-blue .layui-layer-title{background-color: #2d9bd2;color: #fff;}
|
|
|
.layui-layer-blue .layui-layer-close1{background-color: #fff;border-radius: 100%;background-image: none;position: relative;width: 20px;height: 20px;margin-top: -4px;}
|
|
|
.layui-layer-blue .layui-layer-close1:after{content: '×';position: absolute;font-size: 20px;top: 0;color: #2d9bd2;width: 20px;left: 4px;}
|
|
|
.layui-layer-blue .layui-layer-content{padding: 30px 50px 50px!important;}
|
|
|
.lay-box-3 .lay{
|
|
|
width: 420px!important;
|
|
|
height: 260px;
|
|
@ -232,7 +236,7 @@
|
|
|
<p>请核对导入数据,若导入项目信息已存在,将会更新项目表中的数据。</p>
|
|
|
<div class="lay-button">
|
|
|
<button onclick="submitFile()">确认</button>
|
|
|
<button>取消</button>
|
|
|
<button class="closePage">取消</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@ -923,11 +927,11 @@
|
|
|
}
|
|
|
// 上传文件
|
|
|
function submitFile(){
|
|
|
debugger
|
|
|
var file = document.getElementById("uploadfile").files[0];
|
|
|
var _formData = new FormData()
|
|
|
_formData.append('file', file)
|
|
|
console.log(_formData)
|
|
|
console.log(_formData);
|
|
|
var index = layer.load(2);
|
|
|
$.ajax({
|
|
|
url: ctx + "/admin/specialist/serviceItem/importData",
|
|
|
method: "POST",
|
|
@ -939,14 +943,42 @@
|
|
|
data: _formData,
|
|
|
success:function (res) {
|
|
|
console.log(res)
|
|
|
layer.close(index);
|
|
|
if (res.status == 200){
|
|
|
layer.alert('操作成功!', {
|
|
|
icon: 1,
|
|
|
layer.confirm('上传成功!', {
|
|
|
title: '提示',
|
|
|
skin: 'layui-layer-blue', //样式类名
|
|
|
anim:4,
|
|
|
btn: ['确定'] //按钮
|
|
|
},function () {
|
|
|
layer.closeAll();
|
|
|
init();
|
|
|
})
|
|
|
});
|
|
|
// layer.alert('操作成功!', {
|
|
|
// icon: 1,
|
|
|
// },function () {
|
|
|
// layer.closeAll();
|
|
|
// init();
|
|
|
// })
|
|
|
}
|
|
|
},
|
|
|
error:function (res) {
|
|
|
layer.close(index);
|
|
|
layer.confirm('上传失败!', {
|
|
|
title: '提示',
|
|
|
skin: 'layui-layer-blue', //样式类名
|
|
|
anim:4,
|
|
|
btn: ['确定'] //按钮
|
|
|
},function () {
|
|
|
layer.closeAll();
|
|
|
init();
|
|
|
});
|
|
|
// layer.alert('上传失败!', {
|
|
|
// icon: 1,
|
|
|
// },function () {
|
|
|
// layer.closeAll();
|
|
|
// init();
|
|
|
// })
|
|
|
}
|
|
|
})
|
|
|
}
|