|
|
|
@ -27,7 +27,8 @@
|
|
|
|
|
<label>上传文档</label>
|
|
|
|
|
<input type="file" name="upfile" id="file_doc" style="width:200px"/>
|
|
|
|
|
<input type="button" onclick="suba({$rule['id']})" style="background: #3E96C9;color:white;border:none;outline: none;width:70px;height:30px;border-radius: 3px;" value="上传" />
|
|
|
|
|
|
|
|
|
|
<span class="notice-text" id="uploadstatus" style="color:red;margin-left:10px;display: none;">上传成功</span>
|
|
|
|
|
<span class="notice-text" id="uploadstatus1" style="color:red;margin-left:10px;display: none;">上传失败</span>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
@ -96,7 +97,15 @@
|
|
|
|
|
processData : false, // 使数据不做处理
|
|
|
|
|
contentType : false, // 不要设置Content-Type请求头
|
|
|
|
|
success:function(res) {
|
|
|
|
|
// console.log(res)
|
|
|
|
|
res = JSON.parse(res)
|
|
|
|
|
if (res.code == 10000) {
|
|
|
|
|
document.getElementById('uploadstatus').style.display = 'block'
|
|
|
|
|
document.getElementById('uploadstatus1').style.display = 'none'
|
|
|
|
|
}else {
|
|
|
|
|
document.getElementById('uploadstatus1').style.display = 'block'
|
|
|
|
|
document.getElementById('uploadstatus').style.display = 'none'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|