<div ms-controller="PlanningController">
 <!--人资规划-->
    <table border="0" align="center" cellpadding="0" cellspacing="0" id="mian">
        <tbody>
            <tr>
                <td width="198" height="450" valign="top" id="tdleft"> 
                    <div id="left" ms-widget="leftMenu,planmenu"></div>
                </td>
                <td valign="top" id="right"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="seacrhTable" id="seacrhTable" style="margin-top:10px;">
                         <tbody>
                            <tr>
                                <td width="440" class="searchico">
                                    <div class="input-append" style="margin-bottom: 0px;">
                                        <input type="text" class="span4" placeholder="请输入标题快速检索" ms-duplex="keyword">
                                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="search">搜索</button>
                                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="clear">显示全部</button>
                                    </div>
                                </td>
                                <td class="fgray">
                                <span style="float: left;">历史搜索：</span>
                                <div class="hotlist">
                                    <span class="bindSearchHistory" ms-each-item="history">
                                        <a href="javascript:void(0)" ms-value="item" ms-click="historyClick">{{item}}&nbsp;&nbsp;</a>
                                    </span>
                                </div>
                            </td>
                            </tr>
                        </tbody>
                        </table>  
                        <table cellspacing="1" cellpadding="0" width="100%" border="0" class="tableList" id="tableList" style="margin-top:10px;"> 
                            <thead>
                                <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                    <td colspan="8" bgcolor="#FFFFFF">
                                        <a href="javascript:void(0);" class="doadd" ms-if="ADD" ms-click="doadd">新增</a>
                                        <a href="javascript:void(0);" class="doalldel" ms-if="DELETE" ms-click="doalldel">批量删除</a>
                                    </td>
                                </tr>
                                <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                                    <td bgcolor="#FFFFFF" align="center">
                                        <input type="checkbox" class="checkAll">
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center">规划标题
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center">目标
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center">类别
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center">起止日期
                                    </td> 
                                    <td bgcolor="#FFFFFF" align="center">录入人
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center">录入时间
                                    </td>
                                    <td bgcolor="#FFFFFF" align="center" width="6%">操作
                                    </td>
                                </tr>
                            </thead>
                            <tbody ms-each-item="planList">
                                <tr  ms-hover='hover'>
                                    <td align="center">
                                        <input type="checkbox" name="checkbox" ms-value="{{item.Id}}">
                                    </td>
                                    <td align="left">
                                        <a href="javascript:void(0);" ms-value="item.Id" ms-click="doview">{{item.Title}}</a>
                                    </td>
                                    <td align="left">{{item.Target}}
                                    </td>
                                    <td align="center">{{item.CategoryDisplay}}
                                    </td>
                                    <td align="center">{{item.StartDate|truncate(10,'')}}&nbsp;至&nbsp;{{item.EndDate|truncate(10,'')}}
                                    </td>
                                    <td align="center">
                                        <a  href="javascript:void(0)"  ms-value="item.AddBy.Id" ms-widget='userCard' ms-data-userid="item.AddBy.Id">{{item.AddBy.FullName}}</a>
                                    </td>
                                    <td align="center">{{item.AddTime}}
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0);" class="doview" title="详细" ms-value="item.Id" ms-click="doview"></a>
                                        <a href="javascript:void(0);" class="doedit" title="编辑" ms-value="item.Id" ms-click="doedit" ms-if="item.EDIT"></a>
                                        <a href="javascript:void(0);" title="非常抱歉，您没有编辑的权限" class="noedit" ms-if="!item.EDIT"></a>
                                        <a href="javascript:void(0);" class="dodel" title="删除" ms-value="item.Id" ms-attr-index="$index" ms-click="dodel" ms-if="item.DELETE"></a>
                                        <a href="javascript:void(0);" title="非常抱歉，您没有删除的权限" class="nodelete" ms-if="!item.DELETE"></a>
                                    </td>
                                </tr>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <td colspan="8" ms-widget='paging,upaing,userpaing'></td>
                                </tr>
                            </tfoot>
                        </table> 
                </td>
            </tr>
        </tbody>
    </table>

    <noscript id="formTemplate"> 
        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="commontable">
                 <tr>
                    <th style="width: 70px;">规划标题：</th>
                    <td style="width:320px">
                        <input type="text" ms-duplex="entityPlan.Title" />
                        <span class="must">*</span>
                    </td>
                    <th style="width: 70px;">目&nbsp;&nbsp;&nbsp;&nbsp;标：</th>
                    <td style="width:250px">
                        <input type="text" ms-duplex="entityPlan.Target" />
                        <span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <th>分&nbsp;&nbsp;&nbsp;&nbsp;类：</th>
                    <td>
                        <select ms-each-item="category" ms-duplex="entityPlan.CategoryId">
                            <option ms-value="item.Id">{{item.Data}}</option>
                        </select>
                    </td>
                    <th>起止日期：</th>
                    <td>
                        <input type="text" ms-duplex="entityPlan.StartDate" ms-widget='date,birthday,birthdayOpts' style="width: 80px;"  readonly="readonly"/>
                       <label style="margin-left:-12px; margin-right:8px;">至</label><input type="text" ms-duplex="entityPlan.EndDate" style="width: 80px;" ms-widget='date,birthday,birthdayOpts2' readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    <th>整体规划：</th>
                    <td colspan="3" style="height:150px;">
                        <textarea id="WholePlanningContent"></textarea>
                    </td>
                </tr>
                <tr>
                    <th>业务规划：</th>
                    <td colspan="3" style="height:150px;">
                        <textarea id="BusinessPlanningContent"></textarea>
                    </td>
                </tr>
                <tr>
                    <th>规划附件：</th>
                    <td colspan="3">
                        <input type="text" style="width: 320px;" ms-duplex="entityPlan.Attachment" readonly="readonly" />
                        <button class="myfbt" type="button" ms-click="open"><i class="customer"></i></button>
                    </td>
                </tr> 
        </table> 
    </noscript>

    <noscript id="viewTemplate">
       <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                            <tbody>
                                <tr>
                                    <td style="width: 70px;">规划标题：</td>
                                    <td style="width: 280px;">{{entityPlan.Title}}
                                    </td>
                                    <td style="width: 70px;">目标：</td>
                                    <td style="width: 280px;">{{entityPlan.Target}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>分类：</td>
                                    <td>{{entityPlan.CategoryDisplay}}
                                    </td>
                                    <td>起止日期：</td>
                                    <td>{{entityPlan.StartDate|truncate(10,'')}}
                            至 {{entityPlan.EndDate|truncate(10,'')}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>整体规划：</td>
                                    <td colspan="3" style="height: 150px">{{entityPlan.WholePlanningContent|html}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>业务规划：</td>
                                    <td colspan="3" style="height: 150px">{{entityPlan.BusinessPlanningContent|html}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>规划附件：</td>
                                    <td colspan="3">
                                        <a target="_blank" ms-if="entityPlan.Attachment" ms-href="entityPlan.Attachment">查看附件</a>
                                        <span ms-if="!entityPlan.Attachment">暂无附件</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        
   </noscript>
</div>
