jsk
This commit is contained in:
parent
415d7a93a2
commit
8a84f9055f
|
|
@ -17,7 +17,7 @@ body{
|
||||||
.content>form>div:nth-child(n + 3){
|
.content>form>div:nth-child(n + 3){
|
||||||
border: 1px solid #E9E9E9;
|
border: 1px solid #E9E9E9;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 20%;
|
height: 25%;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
}
|
}
|
||||||
.content button{
|
.content button{
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,15 @@ layui.use(['element','layer','transfer', 'form', 'upload','laydate','tree'], fun
|
||||||
});
|
});
|
||||||
form.verify({
|
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}))$/,'身份证号码不正确']
|
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) {
|
success : function(result) {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
layer.close(loadingMsg);
|
layer.close(loadingMsg);
|
||||||
if (result.code == 200) {
|
if (result.msg == '录入成功') {
|
||||||
parent.document.getElementById('powerNum').innerText = result.data.powerNum;
|
layer.alert(result.msg,{icon:1});
|
||||||
|
reloading();
|
||||||
parent.layer.alert(result.msg,{icon:1});
|
|
||||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||||
parent.layer.close(index); //再执行关闭
|
parent.layer.close(index); //再执行关闭
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
layer.alert(result.msg,{icon:2});
|
layer.alert(result.msg,{icon:2});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(XMLHttpRequest, textStatus, errorThrown,result) {
|
error : function(XMLHttpRequest, textStatus, errorThrown,result) {
|
||||||
top.layer.close(loadingMsg);
|
layer.close(loadingMsg);
|
||||||
if(XMLHttpRequest.status === 401){
|
if(XMLHttpRequest.status === 401){
|
||||||
localStorage.removeItem("token");
|
localStorage.removeItem("token");
|
||||||
layer.msg('用户登录过期,请重新登录',{icon:5,time:2000},function(){
|
layer.msg('用户登录过期,请重新登录',{icon:5,time:2000},function(){
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ function getView(){
|
||||||
if(!flag){
|
if(!flag){
|
||||||
//照片不存在,显示上传照片按钮
|
//照片不存在,显示上传照片按钮
|
||||||
if("1"==viewList2[i].state){
|
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>`
|
html += `<div style="color:#cccccc">上传图片</div>`
|
||||||
}else{
|
}else{
|
||||||
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
|
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