diff --git a/hxy-web/css/fileImport.css b/hxy-web/css/fileImport.css index 6a6229b..f65259c 100644 --- a/hxy-web/css/fileImport.css +++ b/hxy-web/css/fileImport.css @@ -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{ diff --git a/hxy-web/js/wireManager/staff/staffAdd.js b/hxy-web/js/wireManager/staff/staffAdd.js index e1acf64..9758fd9 100644 --- a/hxy-web/js/wireManager/staff/staffAdd.js +++ b/hxy-web/js/wireManager/staff/staffAdd.js @@ -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}))$/,'身份证号码不正确'] }); //取消按钮 diff --git a/hxy-web/js/wireManager/staff/staffImport.js b/hxy-web/js/wireManager/staff/staffImport.js index 79a85c8..325491c 100644 --- a/hxy-web/js/wireManager/staff/staffImport.js +++ b/hxy-web/js/wireManager/staff/staffImport.js @@ -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(){ diff --git a/hxy-web/js/wireManager/viewResult/viewResultUpdate.js b/hxy-web/js/wireManager/viewResult/viewResultUpdate.js index d8ba1dd..2a33a48 100644 --- a/hxy-web/js/wireManager/viewResult/viewResultUpdate.js +++ b/hxy-web/js/wireManager/viewResult/viewResultUpdate.js @@ -365,7 +365,7 @@ function getView(){ if(!flag){ //照片不存在,显示上传照片按钮 if("1"==viewList2[i].state){ - html += `` + html += `` html += `
上传图片
` }else{ html += ``