<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="car_detail.aspx.cs" Inherits="Car.Car.car_detail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../javascript/jquery-1.9.1.min.js"></script>
 
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" />

    <script src="../bootstrap/js/bootstrap.min.js"></script>
 
    <script src="../javascript/laydate/laydate.js"></script>
    <link href="../javascript/combox/bootstrap-combobox.css" rel="stylesheet" />
    <script src="../javascript/combox/bootstrap-combobox.js"></script>

    <script src="../javascript/jquery.cookie.js"></script>
 


<style>

@media print{
      

.noprint{

   display:none

}

}
 
  #avtor {
         height:85px
        }
        *{font-family:微软雅黑,Verdana, Geneva, sans-serif;padding:0px;margin:0px;list-style-type:none;}
html{
	font-family: sans-serif;
}
 
 
table {
  border-spacing: 0;
  border-collapse: collapse;
}
    a.remove , a.remove:visited{
     color:#ff0000;
    }
.table td{text-align:center;padding:5px}
textarea{ overflow:auto}
a:link,a:visited{ color:#4495ef;TEXT-DECORATION:none;}
a:hover{TEXT-DECORATION:underline;color:#1389D3;}
img{ border:none}
h1{ font-size:18px}
select,textarea,button,a{ font-size:14px;resize: none;outline:none}
.touch{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;}

a.zhu:link,a.zhu:visited{color:#1389D3;}

a.hui:link,a.hui:visited{color:#888888;}
a.hui1:link,a.hui1:visited{color:#cccccc;}
.zhu{color:#1389D3;}
.red{color:#ff0000;}
.hui{color:#888888;}

a.red:link,a.red:visited{color:#ff0000;}

a.blue:link,a.blue:visited{color:blue;}
a.blue:hover{color:red;}

.icons{ height:16px; width:16px; vertical-align:middle}
a.white:link,a.white:visited{color:white;}

.padding10{padding:10px;}

.blank1{ height:1px; overflow:hidden; border-bottom:1px #dddddd solid}
.blank10{ height:10px; overflow:hidden;width:100%}
.blank5{ height:5px; overflow:hidden;width:100%}
.blank15{ height:15px;overflow:hidden;width:100%}
.blank20{ height:20px;overflow:hidden;width:100%}
.blank25{ height:25px;overflow:hidden;width:100%}
.blank30{ height:30px;  overflow:hidden;width:100%}
.blank40{ height:40px;  overflow:hidden;width:100%}

.leftjg10{ width:10px; overflow:hidden; height:10px;float:left}
.leftjg15{ width:15px; overflow:hidden; height:15px;float:left}
.leftjg20{ width:20px; overflow:hidden; height:20px;float:left}

.alert{ padding:3px 10px;border-radius:0px; text-align:center; }
.alert_msg{ background-color:#fbe3cf;border:0px #f6a15d solid; color:#f86f00}
.alert_success{ background-color:#e3f6d1;border:0px #78b146 solid;color:green}
.alert_wait{ background-color:#f8f8f8;border:0px #cccccc solid;color:#555555}


.webhred:link,.webhred:visited,.webhred{color:#ffffff; background-color:#aa0000; padding:4px 8px; border:none; cursor:pointer}
.webhred:hover{box-shadow:0px 0px 5px rgba(0,0,0,0.3);opacity:0.9}

.face{width:24px;height:24px;border-radius:50%}

.hborder{ border:1px #ededed solid}
.title{height:40px;line-height:40px;overflow:hidden;font-size:18px;text-align:left;border-bottom:1px #cccccc solid;color:#55555;font-weight:bold; background-color:#1389D3}
.title li{height:40px;line-height:40px;float:left; }
.title li.more{text-align:right;float:right;font-size:12px;font-weight:100}
.titleh{ background-color:#dddddd; color:#333333}

.box{box-shadow:0px 0px 5px rgba(0,0,0,0.3); border:1px #1389D3 solid; }


a.webbtn:link,a.webbtn:visited,.webbtn{color:#ffffff;opacity:0.8; background-color:#1389D3; padding:5px 10px; border:none; cursor:pointer;font-size:14px}
.webbtn:disabled{background-color:#aaaaaa; color:#eeeeee}
.webbtn:hover{box-shadow:0px 0px 5px rgba(0,0,0,0.3);opacity:1}
.radius5{border-radius:5px;}

.stitle{padding:5px;border-bottom:1px #dddddd solid;font-size:14px;}
.ydullist{display:inline-block;width:100%;}
.ydullist li{float:left;width:10%;text-align:center;padding:5px 0px;font-size:12px;display:block;line-height:25px;padding-top:10px}
.ydullist li:active{ background-color:#eeeeee}
.ydullist li img,.faces{height:30px;width:30px;border-radius:15px}
.ydullist li span{font-size:12px;color:#888888;}

.faces{margin-right:10px}
.ptitle{ text-align:center;font-size:20px;padding-top:15px;padding-bottom:10px}
.tabled2 td{padding:5px;border:1px #e5e5e5 solid;text-align:center}
td.tdys1{border:1px #e5e5e5 solid;text-align:center;padding:0px 5px}
.createtable{width:90%}
.menulls{position:absolute;left:1px;top:10px}
.menullss{position:absolute;left:1px;top:32px; background-color:white; border:1px #cccccc solid;border-bottom:0px;display:none}
.menullss li{padding:5px 10px;border-bottom:1px #dddddd solid;cursor:pointer}
.menullss li:hover{ background-color:#f1f1f1}
.pcont{line-height:27px;}
.pcont p{text-indent:24pt;margin:10px 0px}
.status{position: absolute;right:20px;top:10px;display:}

.ke-zeroborder{border-spacing: 0;border-collapse: collapse;}
.ys0{border:1px #888888 solid}
.ys1{padding:5px 5px; border:1px #888888 solid;color:#555555;}
.ys2{padding:5px 5px; border:1px #888888 solid;}
.datesss{background:url(mode/icons/date.png) no-repeat right;cursor:pointer;width:50%}
.inputs{width:95%}
.statustext{position: absolute;right:40px;top:10px;width:80px;height:80px;overflow:hidden; border:3px red solid;border-radius:50%;font-size:20px;text-align:center;line-height:80px;color:red;transform:rotate(-45deg);-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);filter:progid:DXImagetransform.Microsoft.Matrix(M11=0.707,M12=-0.707,M21=0.707,M22=0.707,SizingMethod='auto expand');}
.tableblack .ys0,.tableblack .ys1,.tableblack .ys2{border:1px #000000 solid;color:#000000;}

.btn-danger{background-color:#d9534f;}

 
    .listtable th {
     background-color:#eeeeee; 
     text-align:center;
      border:solid 1px #ccc; 
      padding:3px; 
    }

      .listtable td {
      padding:3px;
      border:1px #cccccc solid;
      border:solid 1px #ccc; 
       text-align:center;
    }
</style>


     
    
    
</head>
<body style="background:white">
    <form id="form1" runat="server">
    
    

 

        
 
<div align="center"  >
<div style="width:900px;position:relative" align="left">
		 
     


	 
		<div id="div_detail">
	<div class="ptitle">车辆信息</div>	
	

    <asp:Panel runat="server" ID="pnl_contents">

	<div class="padding10 pcont" align="left">
	<strong>基本信息</strong>
        
      <table width="100%" bordercolor="#000000" border="0" class="ke-zeroborder">
          <tbody>
          <tr>
              <td height="34" width="15%" align="right" class="ys1">车辆品牌</td>
              <td class="ys2" width="35%"><asp:Label ID="lbl_carname" runat="server"    ></asp:Label></td>
             
               <td height="34" width="15%" align="right" class="ys1">车票号</td>
              <td class="ys2" width="35%"><asp:Label ID="carnum" runat="server"    ></asp:Label></td>
             
          </tr>
          
        


           <tr>
                   <td class="ys1" align="right">座位数</td>
              <td class="ys2"> <asp:label ID="lbl_num"   runat="server">
           </asp:label>

              </td>
              <td height="34" align="right" class="ys1">颜色</td>
            <td class="ys2"><asp:label ID="lbl_color"   runat="server" ></asp:label></td>
           

          </tr>




          
           <tr>
                <td class="ys1" align="right">默认司机</td>
              <td class="ys2">   <asp:label ID="lbl_dusername"   runat="server"> </asp:label> </td>
              <td height="34" align="right" class="ys1">状态</td>
            <td class="ys2">  <asp:label ID="lbl_status"   runat="server"> </asp:label> </td>
           
          </tr>



              
          
           <tr>
                <td class="ys1" align="right">备注</td>
              <td class="ys2" colspan="3">   <asp:label ID="note"   runat="server"> </asp:label> </td>
              
           
          </tr>

               



          </tbody>

      </table>
        
         
    
    	</div>
 


          

</asp:Panel>





     
  <br /><br />

      <div class="padding10 pcont" align="left">
	    <strong>交险记录</strong>
        <a href="###" onclick="showmore(this)" data-div="more1" style="float:right;">新增<span class="caret"></span> </a>


            <div style="margin-top:10px;display:none" id="more1">


 <table class="table">
     <tr>
         <th width="120px">
             保险类型
         </th>
         <td width="330">

                    <select id="insure" class=" form-control combobox">
  <option></option>
<asp:Literal runat="server" ID="lt_options"></asp:Literal>
</select>


         </td>
          
         <th width="120px">
             投保金额
         </th>
         <td width="330px">
             <asp:TextBox runat="server" ID="txt_money" CssClass="form-control"></asp:TextBox>
         </td>
         </tr>

     <tr>
         <th>
             开始日期
         </th>
         <td>
 <asp:TextBox runat="server" ID="txt_begintime" onclick="laydate()" CssClass="form-control"></asp:TextBox>
         </td>
         <th>
             结束日期
         </th>
         <td>
              <asp:TextBox runat="server" ID="txt_endtime" onclick="laydate()"  CssClass="form-control"></asp:TextBox>
         </td>
         </tr>



     <tr>
          <th>
           保险公司名称
         </th>
         <td colspan="3" style="text-align:left"  >
              <asp:TextBox runat="server"  ID="txt_insurename" style=" width:500px; display:inline-block" CssClass="form-control"></asp:TextBox>
          
             

             <asp:Button runat="server" ID="btn_add"   Text="添加" CssClass="btn btn-primary  " OnClick="btn_add_Click" 
                     />
         </td>
     </tr>

 </table>

</div>

                
    <asp:Repeater runat="server" ID="rpt_insure" EnableViewState="false">
                    <HeaderTemplate>
                        
        <div class="ys0">

                    <table width="100%" class="listtable" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse:collapse;" >
                <tr>
                    <th width="150px">保险类型</th>
                    <th width="90px">投保金额</th>
                    <th width="100px">开始日期</th>                   
                    <th width="120">截止日期</th>
                    <th>单位名称</th>
                     <th width="90px">建立者</th>
                    <th width="60px">状/删</th>
                </tr>

                    </HeaderTemplate>

                    <ItemTemplate>


                          <tr>
                  
                     <td  ><%#Eval("insuretype") %></td>
                     <td  ><%#Eval("money") %></td>
                     <td  ><%# CarHelper.FormatDt(Eval("begintime")) %></td>
                     <td  ><%# CarHelper.FormatDt(Eval("endtime")) %></td>
                     <td><%#Eval("insurename") %></td>
                                <td><%#Eval("username") %></td>
                     <td  >

                             <%# insureState(Eval("endtime")) %> / 

                         <a href="###"  data-type="insure" data-id='<%#Eval("id") %>' class="remove">删</a>

                     </td>

                </tr>

                    </ItemTemplate>
               
                    <FooterTemplate>
                          </table>
                        </div>
                    </FooterTemplate>
                    
                     </asp:Repeater>

            

</div>
  
                











            <!--  汽车年检 -->
            
                <br /><br />
                
            <div class="padding10 pcont" align="left">
	<strong>年检记录</strong>
       <a href="###" onclick="showmore(this)" data-div="more2" style="float:right;">新增<span class="caret"></span> </a>


                  <div style="margin-top:10px;display:none" id="more2">

                       

                      <table class="table">
     <tr>
         <th width="120px">
             年检人
         </th>
         <td width="330">

              <asp:TextBox runat="server" ID="txt_njusername" CssClass="form-control"></asp:TextBox>

         </td>
          
         <th width="120px">
             费用
         </th>
         <td width="330px">
             <asp:TextBox runat="server" ID="txt_money2" CssClass="form-control"></asp:TextBox>
         </td>
         </tr>

     <tr>
         <th>
            年检日期
         </th>
         <td>
 <asp:TextBox runat="server" ID="txt_njdate" onclick="laydate()" CssClass="form-control"></asp:TextBox>
         </td>
         <th>
           年检有效期
         </th>
         <td>
              <asp:TextBox runat="server" ID="txt_expiredate" onclick="laydate()"  CssClass="form-control"></asp:TextBox>
         </td>
         </tr>



     <tr>
          <th>
           备注
         </th>
         <td colspan="3" style="text-align:left"  >
              <asp:TextBox runat="server"  ID="txt_note" style=" width:500px; display:inline-block" CssClass="form-control"></asp:TextBox>
          
             

             <asp:Button runat="server" ID="btn_add2"   Text="添加" CssClass="btn btn-primary  " 
                  onclick="btn_add2_Click"
               
                     />
         </td>
     </tr>

 </table>

                      </div>








             
    <asp:Repeater runat="server" ID="rpt_nj" EnableViewState="false">
                    <HeaderTemplate>
                        
        <div class="ys0">

                    <table width="100%" class="listtable" border="0" cellspacing="0" cellpadding="0" align="center" style="border-collapse:collapse;" >
                <tr>
                    <th width="150px">年检人</th>
                        <th width="80px">费用</th>
                    <th width="120px">检测日期</th>
                    <th width="130px">年检有效期</th>                   
                    <th width="200">备注</th> 
                     <th width="90px">建立者</th>
                    <th width="60px">状/删</th>
                </tr>

                    </HeaderTemplate>

                    <ItemTemplate>


                          <tr>
                  
                     <td  ><%#Eval("njusername") %></td>
                     <td  ><%#Eval("money") %></td>
                     <td  ><%# CarHelper.FormatDt(Eval("njdate")) %></td>
                     <td  ><%# CarHelper.FormatDt(Eval("expiredate")) %></td>
                     <td><%#Eval("note") %></td>
                                <td><%#Eval("username") %></td>
                     <td  >

                             <%# insureState(Eval("expiredate")) %> / 

                         <a href="###" data-id='<%#Eval("id") %>' data-type="nj" class="remove">删</a>

                     </td>

                </tr>

                    </ItemTemplate>
               
                    <FooterTemplate>
                          </table>
                        </div>
                    </FooterTemplate>
                    
                     </asp:Repeater>

              
    












               
            </div>
      
            
            
            
            
            
            
            
            
            


            
            
         


<script type="text/javascript">





    function showmore(o) {
        
        var _div = $(o).data("div");
        $("#" + _div).toggle();
      
        var key = $("#" + _div).css("display");
         Cookies.set("display"+_div, key, { expires: 30 });
    }


    if (Cookies.get("displaymore1") == undefined || Cookies.get("displaymore1") == "none") {
        $("#more1").hide();
    }
    else {
        $("#more1").show();
    }

    if (Cookies.get("displaymore2") == undefined || Cookies.get("displaymore2") == "none") {
        $("#more2").hide();
    }
    else {
        $("#more2").show();
    }




    $(document).ready(function () {
         $('.combobox').combobox({ appendId: "sel" });
    });
 
</script>

   
            
            
            
            
            
            
            
               
</div>














 
 
    </div>

</div>
 


        <script>
         
          




            $(document).ready(
                
                function()
                {
                    $(".remove").click(
                        
                        function()
                        { 
                            var isdel = confirm("确定删除吗");
                            if (isdel)
                            { 
                                var _id = $(this).data("id");
                                var _type = $(this).data("type");
                                $.get("ajax/car_insure_nj.aspx?id=" + _id + "&type=" + _type);
                                $(this).parent().parent().remove();
                            }
                        
                        }
                        
                        
                        
                        
                        );
                
                
                }
                
                
                
                );



              
        </script>
    
    </form>
</body>
</html>