jsk
This commit is contained in:
parent
415d7a93a2
commit
8a84f9055f
|
|
@ -17,7 +17,7 @@ body{
|
|||
.content>form>div:nth-child(n + 3){
|
||||
border: 1px solid #E9E9E9;
|
||||
width: 80%;
|
||||
height: 20%;
|
||||
height: 25%;
|
||||
margin-left: 10%;
|
||||
}
|
||||
.content button{
|
||||
|
|
|
|||
|
|
@ -270,7 +270,15 @@ layui.use(['element','layer','transfer', 'form', 'upload','laydate','tree'], fun
|
|||
});
|
||||
form.verify({
|
||||
//数组的两个值分别代表:[正则匹配、匹配不符时的提示文字]
|
||||
tel: [/^1[3-9]\d{9}$/,'手机号格式不正确'],
|
||||
tel: function(value, item){
|
||||
if(value==""){
|
||||
return '手机号不能为空';
|
||||
}
|
||||
var reg = /^1[3-9]\d{9}$/;
|
||||
if(!reg.test(value)){
|
||||
return '手机号格式不正确';
|
||||
}
|
||||
},
|
||||
idNumber:[/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/,'身份证号码不正确']
|
||||
});
|
||||
//取消按钮
|
||||
|
|
|
|||
|
|
@ -59,18 +59,18 @@ function excelUpload() {
|
|||
success : function(result) {
|
||||
console.log(result)
|
||||
layer.close(loadingMsg);
|
||||
if (result.code == 200) {
|
||||
parent.document.getElementById('powerNum').innerText = result.data.powerNum;
|
||||
|
||||
parent.layer.alert(result.msg,{icon:1});
|
||||
if (result.msg == '录入成功') {
|
||||
layer.alert(result.msg,{icon:1});
|
||||
reloading();
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
|
||||
} else {
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
error : function(XMLHttpRequest, textStatus, errorThrown,result) {
|
||||
top.layer.close(loadingMsg);
|
||||
layer.close(loadingMsg);
|
||||
if(XMLHttpRequest.status === 401){
|
||||
localStorage.removeItem("token");
|
||||
layer.msg('用户登录过期,请重新登录',{icon:5,time:2000},function(){
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ function getView(){
|
|||
if(!flag){
|
||||
//照片不存在,显示上传照片按钮
|
||||
if("1"==viewList2[i].state){
|
||||
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList2[i].gtId},1,${viewList2[i].makeType})">`
|
||||
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList2[i].gtId},2,${viewList2[i].makeType})">`
|
||||
html += `<div style="color:#cccccc">上传图片</div>`
|
||||
}else{
|
||||
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
|
||||
|
|
|
|||
Loading…
Reference in New Issue