| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 | <!DOCTYPE html><html>  <head>    <title>湖北智慧水运</title>	    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">    <meta http-equiv="description" content="this is my page">    <meta http-equiv="content-type" content="text/html; charset=UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />    <link>    <link href="../css/base.min.css" rel="stylesheet">     <link rel="stylesheet" type="text/css" href="../css/mui.min.css">     <script type="text/javascript" src="../js/zepto.min.js"></script>     <script type="text/javascript">     $(function(){    	     	     	     	     	   $.ajax({  	         type: 'post',  	         url: '../../txlcontroller/queryById.do',  	         data:{id:getQueryString("id")},  	         dataType: 'json',  	         success: function(data){  	        	 console.log(data.txlEntity)  	        	 var zmid = data.txlEntity.zmid;  	        	 $("#name").val(data.txlEntity.name);  	        	 $("#phone").val(data.txlEntity.tel);  	        	 $("#mobile").val(data.txlEntity.mobile);  	        	 $("#bumen").val(data.txlEntity.orgname);  	        	 $("#email").val(data.txlEntity.email);  	        	 $("#no").val(data.txlEntity.sortno);  	        	 $.ajax({  	  	         type: 'post',  	  	         url: '../../txlcontroller/queryZmtxl.do',  	  	         data:{uid:"402881e44e86c26d014e86c9ae8c0008"},  	  	         dataType: 'json',  	  	         success: function(data){  	  	        	 console.log(data)  	  	        	 var result = "";  	  	        	for(var i=0;i<data.zmList.length;i++){  	  	        		if(data.zmList[i].id==zmid){  	  	        		result+='<option value="'+data.zmList[i].id+'" selected="selected">'+data.zmList[i].name+'</option>';  	  	        		}else{  	  	        		result+='<option value="'+data.zmList[i].id+'">'+data.zmList[i].name+'</option>';  	  	        		}  	  	        	}  	  	        	$("#zuming").html(result);  	  	         }})  	        	   	        	   	         }})    	   $.ajax({	         type: 'post',	         url: '../../txlcontroller/queryZmtxl.do',	         data:{uid:"402881e44e86c26d014e86c9ae8c0008"},	         dataType: 'json',	         success: function(data){	        	 console.log(data)	        	 var result = "";	        	for(var i=0;i<data.zmList.length;i++){	        		result+='<option value="'+data.zmList[i].id+'">'+data.zmList[i].name+'</option>';	        	}	        	$("#zuming").html(result);	         }})	         	         	         	         	              	$("#baocun").on("click",function(){     		var zm = $("#zm").val();     		var content = $("#content").val();     		if(zm.length<1){     			 layer.open({	      			    shade:false,	 					    content: '组名不能为空',	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',	 					    time:1	 					});     			 return;     		}     		     		     		     		  $.ajax({     	         type: 'post',     	         url: '../../txlcontroller/saveEntitytxl.do',     	         data:{uid:"402881e44e86c26d014e86c9ae8c0008",zm:zm,content:content},     	         dataType: 'json',     	         success: function(data){     	        	 layer.open({ 	      			    shade:false, 	 					    content: '添加成功', 	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center', 	 					    time:1 	 					});     	        	$("#zuming").append('<option value="'+data.zmEntity.id+'">'+data.zmEntity.name+'</option>');     	         }})     		$("#div-alert").hide();     		$("#div-alert1").hide();     		$("#zm").val("")     		$("#content").val("");     	})     	     	$("#addtxl").on("click",function(){     		var  zmid = $("#zuming").val();     		var name = $("#name").val();     		var bumen = $("#bumen").val();     		var phone = $("#phone").val();     		var mobile = $("#mobile").val();     		var email = $("#email").val();     		var no = $("#no").val();     		if(zmid.length<1){     			 layer.open({	      			    shade:false,	 					    content: '请选择组名',	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',	 					    time:1	 					});     			 return;     		}     		if(name.length<1){    			 layer.open({	      			    shade:false,	 					    content: '姓名不能为空',	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',	 					    time:1	 					});    			 return;    		}     		if(bumen.length<1){   			 layer.open({	      			    shade:false,	 					    content: '部门不能为空',	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',	 					    time:1	 					});   			 return;   		}     	     		     		 var telValidate = /(0[1-9]{2,3})(^[0-9]{3,4}\-[0-9]{8}$)|(^[0-9]{8}$)|(^[0-9]{3,4}[0-9]{8}$)|(^0{0,1}13[0-9]{9}$)/;				     		 if(phone.length!=""){     			if(!telValidate.test(phone)){        			 layer.open({   	      			    shade:false,   	 					    content: '请输入正确的固定电话',   	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',   	 					    time:1   	 					});   				 return;        		}      		 }     		 var mobileValidate = /^(1[3|5|7|8])[\d]{9}$/;     		 if(mobile.length!=""){      			if(!mobileValidate.test(mobile)){         			 layer.open({    	      			    shade:false,    	 					    content: '请输入正确移动电话',    	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',    	 					    time:1    	 					});    				 return;         		}       		 }	     		var emailValidate = /^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;     		 if(email.length!=""){       			if(!emailValidate.test(email)){          			 layer.open({     	      			    shade:false,     	 					    content: '请输入正确的电子邮箱',     	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',     	 					    time:1     	 					});     				 return;          		}        		 }     		      		 if(no.length<1){     			 layer.open({	      			    shade:false,	 					    content: '排序号不能为空',	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',	 					    time:1	 					});				 return;     		 }     		 if(!parseInt(no)&&no!="0"){         			 layer.open({    	      			    shade:false,    	 					    content: '排序号只能为数字',    	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',    	 					    time:1    	 					});    				 return;     		 }     		      		  $.ajax({      	         type: 'post',      	         url: '../../txlcontroller/savetxl.do',      	         data:{uid:"402881e44e86c26d014e86c9ae8c0008",id:getQueryString("id"),zmid:zmid,name:name,bumen:bumen,mobile:mobile,phone:phone,email:email,no:no},      	         dataType: 'json',      	         success: function(data){      	        	 if(data.resultCode==0){      	        		 layer.open({       	      			    shade:false,       	 					    content: '修改成功',       	 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',       	 					    time:1       	 					});      	        		 setTimeout(function(){		        			 window.history.back();		        		 },500);      	        	 }      	         }})     		      		      		      	     	});     	     	$("#quxiao").on("click",function(){     		$("#div-alert").hide();     		$("#div-alert1").hide();     	})     	     	$("#tianjia").on("click",function(){     		$("#div-alert").show();     		$("#div-alert1").show();     	})     	})     </script>	<style type="text/css">	*{padding: 0px;margin: 0px;}		  .header {	width:100%;	height:45px;	line-height:45px;	padding:0;		color:#eee;	font-size:22px;	text-align:left;	color:white;    background: #2196f3;}#header {	position:fixed; z-index:2;	top:0; left:0;	width:100%;	height:45px;	line-height:45px;	text-align:center;	padding:0;	font-size:22px;	color:white;    background: #2196f3;    color: white;}#header a{    color:white;}body,button,input,div{margin: 0px;padding: 0px}.mui-input-group:after {  position: absolute;  right: 0;  bottom: 0;  left: 0;  height: 0px;  content: '';  background-color: #c8c7cc;  -webkit-transform: scaleY(.5);  transform: scaleY(.5);}.mui-select:before {  position: absolute;  top: 8px;  right: 50px;  font-family: Muiicons;  color: rgba(170,170,170,.6);  content: '\e581';}	</style>  </head>    <body>  	<div id="header"><a>修改联系人</a></div>	<div class="mui-off-canvas-wrap mui-draggable">	<div class="mui-inner-wrap">		<div class="mui-content" style="margin-top:50px;background: white;">			<div class="mui-content-padded">	<form class="mui-input-group">		<div class="mui-input-row mui-select">			<label>组名</label>                    <select id="zuming">                    </select>                               <span class="mui-icon mui-icon-plusempty" id="tianjia" style="position: absolute;background:#2196f3;color: white;right: 5px;margin-top: 7px"></span>		</div>		<div class="mui-input-row">			<label>姓名</label>			<input type="text" id="name" placeholder="请输入姓名">		</div>		<div class="mui-input-row">			<label>部门</label>			<input id="bumen" type="text" placeholder="请输入部门">		</div>		<div class="mui-input-row">			<label>固定电话</label>			<input id="phone" type="text" placeholder="请输入固定电话">		</div>		<div class="mui-input-row">			<label>移动电话</label>			<input id="mobile" type="text" placeholder="请输入移动电话">		</div>		<div class="mui-input-row">			<label >电子邮箱</label>			<input id="email" type="text" placeholder="请输入电子邮箱">		</div>		<div class="mui-input-row">			<label>排序号</label>			<input id="no" type="tel" placeholder="请输入排序号">		</div>		<div class="mui-button-row" style="margin-top: 30px;">			<button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;" id="addtxl">保存 </button>  			<button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;" onclick="history.back()">取消</button>					</div>	</form></div>		</div>		<!-- off-canvas backdrop -->		<div class="mui-off-canvas-backdrop"></div>	</div>					</div>   		<div id="div-alert" style="position: absolute;display:none;top: 20%;left: 10%;z-index: 100;height:260px;border:4px solid #2196f3;border-radius:10px;width: 82%;background:white;">   			   			<form id="jhform">   			<input type="hidden" name="jid" id="jid" value="" />   			<div id="title" style="width:100%;height:30px;text-align: center;background:#2196f3;line-height: 30px;color: white;margin-bottom: 20px;font-size:20px;">新增组名</div>   			<label style="margin-left: 5px">组名: </label><input  id="zm" type="text" style="width: 80%" /><br/>   			<label style="float: left;margin-left: 5px">描述: </label><textarea name="content" id="content" type="text" style="width: 80%"></textarea>			</form>		    <div style="width: 100%;text-align: center;">			<button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;" id="baocun">保存 </button>  			<button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;" id="quxiao">取消</button>			</div>	</div>	<div id="div-alert1" style="position:absolute;display:none;;width:100%;height: 100%;z-index: 50;top:0px;background: black; opacity:0.2; "></div>	  </body></html>
 |