<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian">
  <tbody><tr>
   <!--leftNav-->
    <td width="198" height="450" valign="top" id="tdleft">
      <div id="left" ms-widget="leftMenu">
    </div>
    <!--End leftNav-->
    </td>
    <td valign="top" id="right" class="addrightbg">   
    <div class="boxtip" id="boxtip">
    <h1>渠道政策</h1>
    <p>给各级渠道代理经销商的销售政策或促销、考核、激励措施等。</p>
    <a href="#/Market/Channel" class="btn_back"></a>
    </div> 
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable" style=" background:none;">
                    <tbody>
                        <tr>
                            <td width="460" class="searchico">
                                <div class="input-append" style="margin-bottom: 10px;">
                                    <input type="text" class="span4" ms-duplex="keyword" placeholder="请输入渠道政策标题快速检索" ms-enter="doSearch">
                                    <button class="add-on ibtsearch" type="button" id="btnsel" ms-click="doSearch" style="height: 28px; font-size: 12px; padding: 3px 12px;">
                                        {{lang.SearchBtn}}
                                    </button>
                                    <button class="add-on ibtsearch clearall" type="button" ms-click="clear" style="height: 28px; font-size: 12px; padding: 3px 12px;">
                                        {{lang.ShowAllBtn}}</button>
                                </div>
                            </td>
                            <td class="fgray">
                                <span style="float: left;">{{lang.SearchHistory}}</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>
   <!-- <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="doadd">{{lang.AddBtn}}</a>
                    <a ms-if="DELETE" href="javascript:void(0)" class="doalldel" ms-click="doalldel">{{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="30%" align="center">
                    标题
                </td>
                <td width="37%" 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="channelpolicyList"  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)" class="doview" ms-click="doview" ms-value="item.Id">{{item.Title}}</a>
                        </td>
                        <td align="left">
                            {{item.PolicyObjectDisplay}}
                        </td>
                        <td align="center">
                            {{item.AddBy.FullName}}
                        </td>
                        <td align="center">
                            {{item.AddTime}}
                        </td>
                        <td align="center">
                                <a href="javascript:void(0)" class="doview" ms-click="doview" ms-value="item.Id" ms-title="lang.ViewBtn"></a>
                                <a ms-if="item.EDIT" href="javascript:void(0)" class="doedit" ms-click="doedit" 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="dodel" 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 style="background-color: rgb(255, 255, 255); ">
               <td colspan="9" ms-widget='paging,upaing,channelpolicypaing'></td>
            </tr>
        </tfoot>
    </table>
    <!--End Mian-->
    </td>
  </tr>
</tbody></table>

<!--新增或修改--->
<noscript type="text/avalon" id="formTemplatePolicy">
    <table cellspacing="0" cellpadding="0" width="98%" border="0" class="commontable">
            <tbody style=""> 
             <tr style="height:38px;">
                <th height="25" width="80" >
                    区域范围：
                </th>
                <td align="left" colspan="3" style="line-height:29px;">
                    <label style="margin-top:8px;"><input type="radio" ms-duplex-text="entity.PolicyType" value="1">全部区域</label>
                    <label style="margin-top:8px;margin-left:5px;"><input type="radio" ms-duplex-text="entity.PolicyType" value="2">指定区域</label> 
                    <div ms-if="entity.PolicyType+''=='2'" style="display:inline-block;">
                        <input type="hidden" ms-duplex="entity.PolicyObject" />
                        <input type="text" ms-duplex="entity.PolicyObjectDisplay"  readonly="readonly" style="width:336px;" />
                        <button type="button" class="myfbt" ms-widget='dropDownPCategoryTree,setPolicyObjectTreeId,setPolicyObjectTreeOpts'><i class="bm"></i>选择</button>
                   </div>
              </td>
            </tr>
           <tr>
                <th>
                    有效时间：
                </th>
                <td height="25" align="left" width="310"> 
                    <input type="text" ms-duplex="entity.StartDate"  ms-widget="date,begindateid,begindateOpts" style="width:110px;" readonly="readonly"/>至&nbsp;<input type="text" ms-duplex="entity.EndDate" ms-widget="date,enddateid,enddateOpts" style="width:110px;" readonly="readonly"/>
                </td>
               <th width="80">
                   制定部门：
               </th>
               <td>
                    <input type="hidden" ms-duplex="entity.PublishSector" />
                    <input type="text" ms-duplex="entity.PublishSectorDisplay"  readonly="readonly" style="width:120px;" />
                    <button type="button" class="myfbt" ms-widget='dropDownGroupTree,setDepartTreeId,setDepartTreeOpts'><i class="bm"></i></button>
               </td>
            </tr>
            <tr>
                <th >
                    标题：
                </th>
                <td height="25" width="*" align="left" colspan="3">
                    <input ms-duplex="entity.Title" type="text" style="width:97%">
                </td>
            </tr>
            <tr>
                <th  valign="top">
                    政策内容：
                </th>
                <td height="25" width="*" align="left" colspan="3" style="">
                     <textarea id="txtContent" name="txtContent" style="width: 100%; height: 150px;" ms-duplex="entity.Content"></textarea>
                   </td>
            </tr>
            <tr>
                <th>
                    附件：
                </th>
                <td height="25" width="*" align="left" colspan="3">
                    <input type="text" ms-duplex="entity.Affix" readonly="readonly" style="width:280px;" /> 
                    <button type="button" ms-click="uploadFiles" class="myfbt"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th >
                    录入人：
                </th>
                <td height="25"  align="left">
                    <input ms-duplex="entity.AddBy.FullName" type="text"  readonly="readonly"  style="width:100px;">
                </td>
                <th>
                    录入时间：
                </th>
                <td height="25" width="*" align="left">
                    <input ms-duplex="entity.AddTime" type="text"  readonly="readonly"  style="width:120px;">
                </td>
            </tr>
        </tbody></table>
</noscript>

<!--查看-->
<noscript type="text/avalon" id="viewTemplatePolicy">
   <table cellspacing="1" cellpadding="0" width="100%" border="0" class="tablecInfo">
            <tbody style=""> 
             <tr>
                <td height="25" width="60" >
                    区域范围：
                </td>
                <td align="left" width="600" colspan="3" style="line-height:29px;"> 
                    {{entity.PolicyObjectDisplay}}
              </td>
            </tr>
           <tr>
                <td >
                    有效时间：
                </td>
                <td height="25" align="left" width="260"> 
                    {{entity.StartDate}}&nbsp;至&nbsp;{{entity.EndDate}}
                </td>
               <td width="60">
                   制定部门：
               </td>
               <td width="180">
                    {{entity.PublishSectorDisplay}}
               </td>
            </tr>
            <tr>
                <td >
                    标&nbsp;&nbsp;&nbsp;&nbsp;题：
                </td>
                <td height="25" width="*" align="left" colspan="3">
                    {{entity.Title}}
                </td>
            </tr>
            <tr style="">
                <td  valign="top">
                    政策内容：
                </td>
                <td height="25" width="*" align="left" colspan="3" style=" height: 150px;"> 
                 <div style=" height:150px; overflow:auto;">{{entity.Content|html}}</div>
                     </td>
            </tr>
            <tr>
                <td >
                    附&nbsp;&nbsp;&nbsp;&nbsp;件：
                </td>
                <td height="25" width="*" align="left" colspan="3">
                   <a ms-if="entity.Affix" ms-href="entity.Affix" target="_blank">点击下载</a>
                </td>
            </tr>
            <tr>
                <td >
                    录&nbsp;入&nbsp;人：
                </td>
                <td height="25"  align="left">
                    {{entity.AddBy.FullName}}
                </td>
                <td >
                    录入时间：
                </td>
                <td height="25" width="*" align="left">
                    {{entity.AddTime}}
                </td>
            </tr>
        </tbody></table>
</noscript>