<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" ms-controller="Books">
    <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" style="margin-bottom:10px;">
                    <h1>书籍管理</h1>
                    <p> 书籍管理描述:书籍管理首先需要定义好书籍分类，鼠标移到书籍分类上会有功能按钮出现。<br />书籍管理列表，
                        可以进行新增书籍，删除书籍，编辑书籍，查看书籍详细信息。 还有辅助查询组合。</p>
                    <a href="javascript:history.go(-1)" class="btn_back"></a>
                </div> 
                 <table width="100%">
                     <tbody>
                         <tr>
                             <td width="278" class="bordergrag" valign="top">
                                 <div class="boxTitlenoneb">
                                     <h2>
                                         <button ms-if="BOOKTYPE" class="btn btn-mini btn-primary" type="button" ms-click="bookTypeAdd">+ 新增</button>
                                         书籍分类
                                     </h2>
                                     <div style="height:500px;  overflow:auto; ">
                                         <ul class='ztree' ms-widget="productCategoryTree,booksTypetree,booksTypetreeOpts"></ul>
                                     </div>
                                 </div>
                             </td>
                             <td width="12">
                                 &nbsp;
                             </td>
                             <td valign="top">
                                 <div class="boxTitle" style="margin-bottom:15px;">
                                     <h2>分类检索</h2>
                                 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="seacrhTable" id="seacrhTable">
                    <tbody>
                        <tr>
                            <td width="440" class="searchico">
                                <div class="input-append" style="margin-bottom: 0px;">
                                    <input type="text" class="span4" ms-duplex='key' placeholder="输入书籍名称、ISBN、书籍编号、作者、出版社等关键字" ms-keypress='toEnter'>
                                    <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click='toSearch' ms-html='lang.SearchBtn'></button>
                                    <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="clearSearchItem" ms-html='lang.ShowAllBtn'></button>
                                </div>
                            </td>
                            <td class="fgray">{{lang.SearchHistory}}
                                <span class="bindSearchHistory" ms-each-h='searchHistory'>
                                    <a href="javascript:void(0)" ms-title='h' ms-live-click="findByHistoryKey">{{h|truncate(10)}}</a>
                                </span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="seacrhField" style="margin-left:5px;">
                    <tbody>
                        <tr class="bindQuick">
                            <td width="50%"><span ms-html="totalMoney.label"></span>
                                <div style="display: inline;">
                                    <a href="javascript:void(0)" ms-repeat-f="totalMoney.items" ms-live-click='setCondition($index,totalMoney.items,"totalMoney")' ms-class-selected="f.curr" ms-html='f.label' data-key='totalMoney'></a>
                                </div>
                            </td>
                            <td><span ms-html="buyCount.label"></span>
                                <div style="display: inline;">
                                    <a href="javascript:void(0)" ms-repeat-t='buyCount.items' ms-live-click='setCondition($index,buyCount.items,"buyCount")' ms-class-selected="t.curr" ms-html='t.label' data-key='buyCount'></a>
                                </div>
                            </td>
                        </tr>
                        <tr class="bindQuick">
                            <td><span ms-html="buyTime.label"></span>
                                <div style="display: inline;">
                                    <a href="javascript:void(0)" ms-repeat-s='buyTime.items' ms-live-click='setCondition($index,buyTime.items,"buyTime")' ms-class-selected="s.curr" ms-html='s.label' data-key='buyTime'></a>
                                </div>
                            </td>
                            <td ><span ms-html="borrowCount.label"></span>
                                <div style="display: inline;">
                                    <a href="javascript:void(0)" ms-repeat-t='borrowCount.items' ms-live-click='setCondition($index,borrowCount.items,"borrowCount")' ms-class-selected="t.curr" ms-html='t.label' data-key='borrowCount'></a>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="seabox">
                                <span class="first" ms-html='lang.CurrSearchCondition'></span>
                                <div style="display: inline;" ms-with='currConditions'>
                                    <span class="searchItem" ms-if='$val'>{{$val}}
                                        <i><a href="javascript:void(0)" ms-click='removeItem'></a></i>
                                    </span>
                                </div>
                                <span class="last" ms-visible='hasCondition' ms-live-click='clearAllItem'><a href="javascript:void(0)" ms-html='lang.ClearAll'></a></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                                     </div>
                <!--<div class="boxTitlenob">
                    <h2>书籍列表</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="9">
                                <a ms-if="ADD"  href="javascript:void(0)" class="doadd" ms-click="showAdd" >{{lang.AddBtn}}</a> 
                                <a ms-if="DELETE" href="javascript:void(0)" class="doalldel" ms-click="doRemoveAll">{{lang.BtachDelBtn}}</a> 
                            </td>
                        </tr>
                        <tr class="head" style="background-color: rgb(250, 250, 250);">
                            <td width="3%" align="center">
                                 <input type="checkbox" class="checkAll">
                            </td>
                            <td width="35%" align="center">书籍名称
                            </td>
                            <td width="10%" align="center">书籍编号
                            </td>
                            <td width="15%" align="center">作者
                            </td>
                            <td width="20%" 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" name="checkbox" ms-value="item.Id">
                             </td>
                            <td align="left">
                                <a href="javascript:void(0)" ms-click="showView(item)" ms-value="item.Id">{{item.Name}}</a>
                            </td>
                            <td align="center">{{item.BookNo}}
                            </td>
                            <td align="left">
                                {{item.Author}}
                            </td>
                            <td align="center">
                                {{item.BookConcern}}
                            </td>
                            <td align="center">
                                {{item.InventoryQuantity}}
                            </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>
                                <a ms-if="item.DELETE" href="javascript:void(0)" class="dodel" ms-click="doRemove(item)" ms-attr-index="$index" ms-value="item.Id" ms-title="lang.DelBtn"></a>
                                <a ms-if="!item.DELETE" href="javascript:void(0)" class="nodel"  ms-title="lang.DelBtn"></a>
                            </td>
                        </tr> 
                    </tbody>
                    <tfoot>
                       <tr>
                           <td colspan="7" ms-widget='paging,listPage,listOpts'>
                           </td>
                        </tr>
                    </tfoot>
                </table> 
                             </td>
                         </tr>
                     </tbody>

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

<!--书籍分类-->
<noscript type="text/avalon" id="BooksTypeformTemplate">
    <table width="320" cellspacing="0" cellpadding="0" border="0" class="commontable">
            <tbody>
                <tr>
                    <th style="width:80px;">分类名称：</th>
                    <td>
                        <input type="text" ms-duplex="typeentity.Name" />
                    </td>
                </tr>
                <tr>
                    <th>上级分类：</th>
                    <td>
                        <input type="text" ms-duplex="typeentity.ParentId.Name" readonly="readonly" style="width:130px;" />
                        <button type="button" class="myfbt" ms-widget="dropDownPCategoryTree,booksTypeparenttree,parentTreeOpts"><i class="customer"></i></button>
                    </td>
                </tr>
                <tr>
                    <th>分类编号：</th>
                    <td>
                        <input type="text" ms-duplex="typeentity.TypeNo" />
                    </td>
                </tr>
                <tr>
                    <th>排序：</th>
                    <td>
                        <input type="text" ms-duplex="typeentity.Sort" />
                    </td>
                </tr>
                </tbody>
        </table>
</noscript>

<!--新增-->
<noscript type="text/avalon" id="BooksformTemplate">
    <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" ms-css-height="tabHeight">
        <table cellspacing="0" cellpadding="0" border="0" class="commontable shortSelect">
            <tbody>
                <tr>
                    <th style="width:70px;">图书分类：</th>
                    <td style="">
                        <input style="width:130px;" type="text" ms-duplex="entity.TypeIdData"  readonly="readonly" />
                        <button type="button" class="myfbt" ms-widget="dropDownPCategoryTree,booksTypeformtree,formTreeOpts"><i class="customer"></i></button>
                        <span class="must">*</span>
                    </td>
                    <th style="width:90px;">图书编号：</th>
                    <td>
                        <input type="text" ms-duplex="entity.BookNo"  />
                    </td>
                </tr>
                <tr>
                    <th>图书名称：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.Name"  />
                    </td>
                    <th>定价：</th>
                    <td>
                        <input type="text" ms-duplex="entity.FixPrice"  />
                    </td>
                </tr>
                <tr>
                    <th>作者：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.Author"  />
                    </td>
                    <th>出版社：</th>
                    <td>
                        <input type="text" ms-duplex="entity.BookConcern"  />
                    </td>
                </tr>
                <tr>
                    <th>标准ISBN：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.ISBN"  />
                    </td>
                    <th>出版日期：</th>
                    <td>
                        <input type="text" style="width:90px;" ms-duplex="entity.PublicationData" ms-widget='date,date1,dateOpts' readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>图书封面：</th>
                    <td colspan="3">
                        <input type="text" style="width:445px;" ms-duplex="entity.PicturePath" readonly="readonly" />
                        <input class="mybt" type="button"  ms-click="uploadFiles" ms-value="'上传文件'"style="vertical-align: top;" />
                    </td>
                </tr>
                <tr>
                    <th>图书简介：</th>
                    <td colspan="3">
                        <textarea rows="2" cols="20" style="height:40px;width:530px;" ms-duplex="entity.Summary"></textarea>
                    </td>
                </tr>
                <tr>
                    <th>录入人：</th>
                    <td> 
                        {{entity.AddBy.FullName}}
                    </td>
                        
                    <th>录入时间：</th>
                    <td>
                        {{entity.AddTime}}
                    </td>
                </tr>
             </tbody>
        </table>
    </div>

    <div id="tab2" ms-visible="tab=='tab2'" ms-css-width="tabWidth" ms-css-height="tabHeight">
        <table cellspacing="0" cellpadding="0" border="0" class="commontable shortSelect">
            <tbody>
                <tr>
                    <th style="width:70px;">购买日期：</th>
                    <td style="">
                        <input type="text" style="width:90px;" ms-duplex="entity.BuyTime" ms-widget='date,date2,dateOpts2' readonly="readonly" />
                    </td>
                    <th style="width:90px;">归属部门：</th>
                    <td>
                        <input style="width:130px;" type="text" ms-duplex="entity.DepatrIDData"  readonly="readonly" />
                        <button type="button" class="myfbt" ms-widget="dropDownGroupTree,depatrtree,depatrTreeOpts"><i class="customer"></i></button>
                    </td>
                </tr>
                <tr>
                    <th>购买单价：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.BuyPrice"  />
                    </td>
                    <th>存放位置：</th>
                    <td>
                        <select ms-duplex-text="entity.StorageId">
                            <option ms-repeat-r="storageDict" ms-value="r.Id" ms-text="r.Data"></option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>购买数量：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.BuyCount"  />
                    </td>
                    <th>库存数量：</th>
                    <td>
                        <input type="text" ms-duplex="entity.InventoryQuantity"  readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>总金额：</th>
                    <td> 
                        <input type="text" ms-duplex="entity.TotalMoney"  readonly="readonly" />
                    </td>
                    <th>被借次数：</th>
                    <td>
                        <input type="text" ms-duplex="entity.BorrowCount"  readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>备注说明：</th>
                    <td colspan="3">
                        <textarea rows="2" cols="20" style="height:40px;width:530px;" ms-duplex="entity.Remark"></textarea>
                    </td>
                </tr>
             </tbody>
        </table>
    </div>
</noscript>

<!--查看-->
<noscript type="text/avalon" id="BooksviewTemplate"> 
      <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="tab3" ms-visible="tab=='tab1'" ms-css-width="tabWidth" ms-css-height="tabHeight">
        <table cellspacing="1" cellpadding="0" width="95%" align="center" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td style="width:70px;">图书分类：</td>
                    <td>
                        {{entity.TypeIdData}}
                    </td>
                    <td style="width:90px;">图书编号：</td>
                    <td>
                        {{entity.BookNo}}
                    </td>
                </tr>
                <tr>
                    <td>图书名称：</td>
                    <td> 
                        {{entity.Name}}
                    </td>
                    <td>定价：</td>
                    <td>
                        {{entity.FixPrice}}
                    </td>
                </tr>
                <tr>
                    <td>作者：</td>
                    <td> 
                        {{entity.Author}}
                    </td>
                    <td>出版社：</td>
                    <td>
                        {{entity.BookConcern}}
                    </td>
                </tr>
                <tr>
                    <td>标准ISBN：</td>
                    <td> 
                        {{entity.ISBN}}
                    </td>
                    <td>出版日期：</td>
                    <td>
                        {{entity.PublicationData}}
                    </td>
                </tr>
                <tr>
                    <td>图书封面：</td>
                    <td colspan="3">
                        <a ms-href="entity.PicturePath" target="_blank"><img ms-if="entity.PicturePath" ms-src="entity.PicturePath" width="100" height="100"></a>
                        <span ms-if="!entity.PicturePath">封面未上传</span>
                    </td>
                </tr>
                <tr>
                    <td>图书简介：</td>
                    <td colspan="3">
                        {{entity.Summary}}
                    </td>
                </tr>
                <tr>
                    <td>录入人：</td>
                    <td> 
                        {{entity.AddBy.FullName}}
                    </td>
                        
                    <td>录入时间：</td>
                    <td>
                        {{entity.AddTime}}
                    </td>
                </tr>
             </tbody>
        </table>
    </div>

    <div id="tab4" ms-visible="tab=='tab2'" ms-css-width="tabWidth" ms-css-height="tabHeight">
        <table cellspacing="1" cellpadding="0" width="95%" align="center" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td style="width:70px;">购买日期：</td>
                    <td style="">
                        {{entity.BuyTime}}
                    </td>
                    <td style="width:90px;">归属部门：</td>
                    <td>
                        {{entity.DepatrIDData}}
                    </td>
                </tr>
                <tr>
                    <td>购买单价：</td>
                    <td> 
                        {{entity.BuyPrice}}
                    </td>
                    <td>存放位置：</td>
                    <td>
                        {{entity.StorageIdData}}
                    </td>
                </tr>
                <tr>
                    <td>购买数量：</td>
                    <td> 
                        {{entity.BuyCount}}
                    </td>
                    <td>库存数量：</td>
                    <td>
                        {{entity.InventoryQuantity}}
                    </td>
                </tr>
                <tr>
                    <td>总金额：</td>
                    <td> 
                        {{entity.TotalMoney}}
                    </td>
                    <td>被借次数：</td>
                    <td>
                        {{entity.BorrowCount}}
                    </td>
                </tr>
                <tr>
                    <td>备注说明：</td>
                    <td colspan="3">
                        {{entity.Remark}}
                    </td>
                </tr>
             </tbody>
        </table>
    </div>
</noscript>