<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>信息绑定</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="/SinoGYS/css/sweetalert.css" type="text/css"></link>
<script type="text/javascript" src="/SinoGYS/js/sweetalert.min.js"></script>
<script src="/SinoGYS/js/jquery-1.7.2.js" type="text/javascript"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/SinoGYS/layer/skin/layer.css"></script>
<script type="text/javascript" src="/SinoGYS/layer/layer.js"></script>
<link rel="stylesheet" href="/SinoGYS/weixincss/weui.min.css">
<link rel="stylesheet" href="/SinoGYS/weixincss/jquery-weui.css">
<link rel="stylesheet" href="/SinoGYS/weixincss/demos.css">
<script src="/SinoGYS/js/jquery-weui.js"></script>

<style>
	body{background-color: #fbf9fe;}
	.page_title{text-align: center;color: #61AE00;margin-top: 5%;}
</style>

</head>

<body>
	<div class="hd">
   		 <h1 class="page_title">加入我们</h1>
	</div>
	
<form >
	<div class="weui_cells weui_cells_form">
        <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">公司名称</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" id="rescueCompanyName" name="rescueCompanyName" type="text" value="" placeholder="请输入公司名称">
            </div>
        </div>
      
	   <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">公司地址</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" id="companyAddress" name="companyAddress" type="text" value="" placeholder="请输入公司地址">
            </div>
        </div>
		 <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">联系人</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" id="userName" name="userName" type="text" value="" placeholder="请输入联系人">
            </div>
        </div>
		 <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">联系方式</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" id="userPhone" name="userPhone" type="tel" value=""  placeholder="请输入联系电话">
            </div>
        </div>
      </div>
      
      
      <div class="weui_cells weui_cells_form">
      	<!-- <div>公司车辆情况（数量）</div> -->
        <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">平板拖车数量</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input style="padding-left: 25%;" class="weui_input" id="tuoche" name="tuoche" type="number" value="0" placeholder="请输入数量">
            </div>
        </div>
      
	   <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">吊车数量</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input style="padding-left: 25%;" class="weui_input" id="diaoche" name="diaoche" type="number" value="0" placeholder="请输入数量">
            </div>
        </div>
		 <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">抢修车数量</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input style="padding-left: 25%;" class="weui_input" id="qiangxiuche" name="qiangxiuche" type="number" value="0" placeholder="请输入数量">
            </div>
        </div>
		 <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">特殊车辆</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input style="padding-left: 25%;" class="weui_input" id="privateChe" name="privateChe" type="number" value="0"  placeholder="请输入数量">
            </div>
        </div>

       <div class="weui_cell">
            <div class="weui_cell_hd"><label class="weui_label">服务范围</label></div>
            <div class="weui_cell_bd weui_cell_primary">
                <input class="weui_input" id="serviceRange" name="serviceRange" type="text" value="" placeholder="请输入您的服务区域">
            </div>
        </div>
      </div>
        
</form>
   	 
   	 
	<div class="weui_btn_area" style="background-color: #61AE00;">
        <a class="weui_btn weui_btn_sino"  id="showTooltips">加入我们</a>
    </div>
    
    
</body>
<script type="text/javascript">
	$("#showTooltips").click(function(){
		var rescueCompanyName=$("#rescueCompanyName").val();
		var companyAddress=$("#companyAddress").val();
		var userName=$("#userName").val();
		var userPhone=$("#userPhone").val();
		var tuoche=$("#tuoche").val();
		var diaoche=$("#diaoche").val();
		var qiangxiuche=$("#qiangxiuche").val();
		var privateChe=$("#privateChe").val();
		var serviceRange=$("#serviceRange").val();
		if(rescueCompanyName==""||companyAddress==""||userName==""||userPhone==""||tuoche==""
		||diaoche==""||qiangxiuche==""||privateChe==""||serviceRange==""){
			alert("请将信息填写完整");
		}else{
			 $.ajax({
				   type: "POST",
				   dataType:"json",
				   url: "/SinoGYS/HistoryOrderAction.do?CMD=sendJoinUsMail",
				   data:$("form").serialize(),
				   success: function(data){
					 //  alert(data);
				  		if(data.flag==true){
				  			alert("您的信息我们已收到，稍后会有负责人与您联系");
				  			wx.closeWindow();
				  		}
				   },
				   error:function(XMLHttpRequest, textStatus, errorThrown){
				   		$.toast("请求出错", "forbidden");
				   }
				});
		}
	});
</script>
</html>