<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" ms-controller="CarInsure">
    <tbody>
        <tr>
            <!--leftNav-->
            <td width="198" height="450" valign="top" id="tdleft">
                <div id="left">
                    <h2>物品资产
                    </h2>
                    <ul> 
                        <li><b></b><a  href="#/Office/GoodsAssets/" class="wdgk_ico">我的概况</a></li>
                        <li><b></b><a  ms-click ="onSubNav('goods')" href="javascript:void(0);" class="ypgl_ico">用品管理</a></li>
                        <div ms-visible="showSubNav == 'goods'" class="subbox">
                            <ul>
                                <li><a href="#/Office/GoodsList">物品维护</a></li>
                                <li><a href="#/Office/GoodsInventory">库存盘点</a></li>
                                <li><a href="#/Office/GoodsPurchase">采购历史</a></li>
                                <li><a href="#/Office/GoodsStorage">采购入库</a></li>
                                <li><a href="#/Office/GoodsUses">领用历史</a></li>
                                <li><a href="#/Office/GoodsMyUses">我的领用</a></li>
                            </ul>
                        </div> 
                        <li><b></b><a  ms-click ="onSubNav('books')" href="javascript:void(0);" class="tsgl_ico">图书管理</a></li>
                        <div ms-visible="showSubNav == 'books'" class="subbox">
                            <ul>
                                <li><a href="#/Office/BooksBorrow">借阅管理</a></li>
                                <li><a href="#/Office/BooksReturn/0/" >归还管理</a></li>
                                <li><a href="#/Office/Books/" >书籍管理</a></li>
                            </ul>
                        </div> 
                        <li><b></b><a ms-click ="onSubNav('cars')" href="javascript:void(0);" class="clgl_ico">车辆管理</a></li>
                        <div ms-visible="showSubNav == 'cars'" class="subbox">
                            <ul>
                                <li><a href="#/Office/CarApply">用车申请</a></li>
                                <li><a href="#/Office/CarAppoint">派车管理</a></li>
                                <li><a href="#/Office/CarUsesInfo">车辆使用信息</a></li>
                                <li><a href="#/Office/CarUseSearch">用车查询</a></li>
                                <li><a href="#/Office/CarInsure">车辆保险</a></li>
                                <li><a href="#/Office/CarService">车辆维修保养</a></li>
                                <li><a href="#/Office/Car">车辆档案</a></li>
                            </ul>
                        </div>
                        <li class="last"><b></b><a  ms-click ="onSubNav('assets')" href="javascript:void(0);" class="zcgl_ico">资产管理</a></li> 
                        <div ms-visible="showSubNav == 'assets'" class="subbox">
                            <ul>
                                <li><a href="#/Office/FixedAssetsMy">我的资产</a></li>
                                <li><a href="#/Office/FixedAssets" >资产登记</a></li>
                                <li><a href="#/Office/FixedAssetsUses" >资产领用</a></li>
                                <li><a href="#/Office/FixedAssetsReturn" >资产归还</a></li>
                                <li><a href="#/Office/FixedAssetsRepairs" >资产报修</a></li>
                                <li><a href="#/Office/FixedAssetsRepairsConfirm" >维修确认</a></li>
                                <li><a href="#/Office/FixedAssetsScrap" >资产报废</a></li>
                                <li><a href="#/Office/FixedAssetsReport" >资产报表</a></li>
                                <li><a href="#/Office/FixedAssetsSet" >后台设置</a></li>
                            </ul>
                        </div>
                    </ul>
                </div>
                <!--End leftNav-->
            </td>
            <td valign="top" id="right" class="addrightbg">
                <div class="boxtip" id="boxtip">
                    <h1>车辆保险</h1>
                    <p> 车辆保险</p>
                    <a href="javascript:history.go(-1)" class="btn_back"></a>
                </div> 
                 <table width="100%">
                     <tbody>
                         <tr>
                             <td valign="top">
                                 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="seacrhTable">
                                     <tbody>
                                         <tr>
                                             <td>
                                                 <div class="input-prepend">
                                                     <span class="add-on">按车辆查询</span>
                                                     <select  class="q100" ms-duplex="queryinfo.carid">
                                                         <option value="">显示全部</option>
                                                         <option ms-repeat-r="carList" ms-value="r.Id" ms-text="r.CarNo"></option>
                                                     </select>
                                                 </div>
                                             </td>
                                         </tr>
                                     </tbody>
                                 </table>
                <div class="boxTitlenob">
                    <h2>保险列表<span ms-if="loading" class="loading">&nbsp;</span></h2>
                </div>
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" id="tableList">
                    <thead>
                        <tr class="dobtn" style="background-color: rgb(255, 255, 255);">
                            <td colspan="8">
                                <a ms-if="ADD"  href="javascript:void(0)" class="doadd" ms-click="showAdd" >新增保险</a> 
                            </td>
                        </tr>
                        <tr class="head" style="background-color: rgb(250, 250, 250);">
                            <td width="3%" align="center">
                                 <input type="checkbox" ms-duplex-radio="checkall">
                            </td>
                            <td width="10%" align="center">车牌号码
                            </td>
                            <td width="20%" align="center">投保日期
                            </td>
                            <td width="10%" align="center">结束时间
                            </td>
                            <td width="10%" align="center">保费(元)
                            </td>
                            <td width="10%" align="center">经办人
                            </td>
                            <td width="10%" align="center">保险公司
                            </td>
                            <td width="10%" align="center">操作
                            </td>
                        </tr>
                    </thead>
                    <tbody> 
                        <tr ms-repeat-item="list" style="background-color: rgb(255, 255, 255);">
                            <td align="center">
                                 <input type="checkbox" ms-duplex-radio="item.checked">
                             </td>
                            <td align="left"><a href="javascript:void(0)" ms-click="showView(item)">{{item.Car.CarNo}}</a>
                            </td>
                            <td align="left">
                                {{item.InsureStartDate|truncate(10,'')}}
                            </td>
                            <td align="left">
                                {{item.InsureEndDate|truncate(10,'')}}
                            </td>
                            <td align="left">
                                {{item.InsureMoney}}
                            </td>
                            <td align="center">
                                {{item.InsureBy}}
                            </td>
                            <td align="center">
                                {{item.InsureCompany}}
                            </td>
                            <td align="center">
                                <a href="javascript:void(0)" class="doview" ms-click="showView(item)" ms-value="item.Id" ms-title="lang.ViewBtn"></a>
                                <a ms-if="item.EDIT" href="javascript:void(0)" class="doedit" ms-click="showEdit(item)" ms-value="item.Id" ms-title="lang.EditBtn"></a>
                                <a ms-if="!item.EDIT" href="javascript:void(0)" class="noedit"  ms-title="lang.EditBtn"></a>
                            </td>
                        </tr> 
                    </tbody>
                    <tfoot>
                        <tr>
                           <td colspan="8" ms-widget='paging,listPage,listOpts'>
                           </td>
                        </tr>
                    </tfoot>
                </table> 
                             </td>
                         </tr>
                     </tbody>

                 </table>
            </td>
        </tr>
    </tbody>
</table>

<!--新增-->
<noscript type="text/avalon" id="CarInsureformTemplate">
    <div>
        <ul class="tabWarp">
            <li ms-class-1="hover:tab=='tab1'" ms-class-2="normal:tab!='tab1'" val="tab1" ms-click="tabChange">保险信息</li>
            <li ms-class-1="hover:tab=='tab2'" ms-class-2="normal:tab!='tab2'" val="tab2" ms-click="tabChange">查看历史明细</li>
        </ul>
    </div>
    <div id="tab1" ms-visible="tab=='tab1'" ms-css-width="tabWidth" class="min200 tabContent2">
        <table cellspacing="0" cellpadding="0" border="0" class="commontable shortSelect">
            <tbody>
                <tr>
                    <th style="width:80px;">车牌号码：</th>
                    <td>
                        <select ms-duplex="entity.Car.Id">
                            <option ms-repeat-r="carList" ms-value="r.Id" ms-text="r.CarNo"></option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>险种：</th>
                    <td>
                        <label ms-repeat-r="insures">
                        <input ms-value="r.Id" type="checkbox" ms-duplex="entity.Insure"  />{{r.Data}}</label>
                    </td>
                </tr>
                <tr>
                    <th>经办人：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.InsureBy"  />
                    </td>
                </tr>
                <tr>
                    <th>投保公司：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.InsureCompany"  />
                    </td>
                </tr>
                <tr>
                    <th>保险电话：</th>
                    <td>
                         <input type="text" ms-duplex="entity.InsureTel" />
                    </td>
                </tr>
                <tr>
                    <th>保费：</th>
                    <td>
                        <div class="input-append">
                            <input type="text" ms-duplex="entity.InsureMoney" style="width:180px;"  />
                            <span class="add-on">元</span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>投保日期：</th>
                    <td>
                        <input type="text" style="width:90px;" ms-duplex="entity.InsureStartDate" ms-widget='date,date2,dateOpts2' readonly="readonly" />
                        -
                        <input type="text" style="width:90px;" ms-duplex="entity.InsureEndDate" ms-widget='date,date3,dateOpts3' readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>到期提醒：</th>
                    <td>
                         <input type="checkbox" ms-duplex-radio="entity.InsureWarn" />
                    </td>
                </tr>
                <tr ms-if="entity.InsureWarn">
                    <th>&nbsp;</th>
                    <td>
                        保险到期前 
                        <input type="text" style="width:90px;" ms-duplex="entity.InsureWarnDay" />
                        天给管理员发送
                    </td>
                </tr>
                <tr ms-if="entity.InsureWarn">
                    <th>&nbsp;</th>
                    <td>
                        <label ms-repeat-r="insureWarnWays"> 
                        <input type="checkbox" ms-value="r" ms-duplex="entity.InsureWarnWay" />{{r}}</label>
                    </td>
                </tr>
             </tbody>
        </table>
    </div>
    <div id="tab2" ms-visible="tab=='tab2'" ms-css-width="tabWidth" class="min200 tabContent2">
        <table border="0" cellspacing="1" cellpadding="0" class="tableList" align="center">
            <thead>
                <tr class="minhead" align="center">
                    <td width="25%" align="center">投保公司</td>
                    <td width="25%" align="center">保费</td>
                    <td width="20%" align="center">经办人</td>
                    <td width="30%" align="center">险种列表</td>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="historyList">
                    <td align="center">
                        {{item.InsureCompany}}
                        
                    </td>
                    <td align="center">
                        {{item.InsureMoney}}
                        
                    </td>
                    <td align="center">
                        {{item.InsureData}}
                        
                    </td>
                    <td align="center">
                        <a href="javascript:void(0)" ms-click="showInsure(item)">点击查看</a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</noscript>

<!--查看-->
<noscript type="text/avalon" id="CarInsureviewTemplate">
    <div>
        <ul class="tabWarp">
            <li ms-class-1="hover:tab=='tab1'" ms-class-2="normal:tab!='tab1'" val="tab1" ms-click="tabChange">保险信息</li>
            <li ms-class-1="hover:tab=='tab2'" ms-class-2="normal:tab!='tab2'" val="tab2" ms-click="tabChange">查看历史明细</li>
        </ul>
    </div>
    
    <div id="tab1" ms-visible="tab=='tab1'" ms-css-width="tabWidth" class="min200 tabContent2">
        <table cellspacing="1" cellpadding="0" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td style="width:80px;">车牌号码：</td>
                    <td> 
                        {{entity.Car.CarNo}}
                    </td>
                </tr>
                <tr>
                    <td>险种：</td>
                    <td>
                        <label ms-repeat-r="insures">
                        <input ms-value="r.Id" type="checkbox" ms-duplex="entity.Insure" disabled="disabled"  />{{r.Data}}</label>
                    </td>
                </tr>
                <tr>
                    <td>经办人：</td>
                    <td> 
                        {{entity.InsureBy}}
                    </td>
                </tr>
                <tr>
                    <td>投保公司：</td>
                    <td> 
                        {{entity.InsureCompany}}
                    </td>
                </tr>
                <tr>
                    <td>保险电话：</td>
                    <td>
                        {{entity.InsureTel}}
                    </td>
                </tr>
                <tr>
                    <td>保费：</td>
                    <td>
                        <span ms-if="entity.InsureMoney">{{entity.InsureMoney}}元</span>
                    </td>
                </tr>
                <tr>
                    <td>投保日期：</td>
                    <td>
                        <span ms-if="entity.InsureStartDate">{{entity.InsureStartDate|truncate(10,"")}}至{{entity.InsureEndDate|truncate(10,"")}}</span>
                    </td>
                </tr>
                <tr>
                    <td>到期提醒：</td>
                    <td>
                         <input type="checkbox" ms-duplex-radio="entity.InsureWarn" disabled="disabled" />
                    </td>
                </tr>
                <tr ms-if="entity.InsureWarn">
                    <td>&nbsp;</td>
                    <td>
                        <p>保险到期前【{{entity.InsureWarnDay}}】天给管理员发送</p>
                        <p>
                            <label ms-repeat-r="insureWarnWays"> 
                        <input type="checkbox" ms-value="r" ms-duplex="entity.InsureWarnWay" disabled="disabled" />{{r}}</label>
                        </p>
                    </td>
                </tr>
             </tbody>
        </table>
    </div>
    <div id="tab2" ms-visible="tab=='tab2'" ms-css-width="tabWidth" class="min200 tabContent2">
        <table border="0" cellspacing="1" cellpadding="0" class="tableList" align="center">
            <thead>
                <tr class="minhead" align="center">
                    <td width="25%" align="center">投保公司</td>
                    <td width="25%" align="center">保费</td>
                    <td width="20%" align="center">经办人</td>
                    <td width="30%" align="center">险种列表</td>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="historyList">
                    <td align="center">
                        {{item.InsureCompany}}
                        
                    </td>
                    <td align="center">
                        {{item.InsureMoney}}
                        
                    </td>
                    <td align="center">
                        {{item.InsureBy}}
                        
                    </td>
                    <td align="center">
                        {{item.InsureData}}
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</noscript>
<style type="text/css">
    .tabtable tr th {height:30px;}
    .tabtable tr td {height:30px;}
    .min200 {min-height: 200px; _height: 200px;}
</style>