<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" ms-controller="AdvertisingList">
    <tbody>
        <tr>
            <!--leftNav-->
            <td width="198" height="450" valign="top" id="tdleft">
                <div id="left" ms-widget="leftMenu,advertisingMenu">
                </div>
                <!--End leftNav-->
            </td>
            <td valign="top" id="right" class="addrightbg">
                <div class="boxtip" id="boxtip">
                    <h1 ms-html='lang.Advertising'></h1>
                    <p ms-html='lang.AdvertisingDsc'></p>
                    <a href="javascript:history.go(-1)" class="btn_back"></a>
                </div>
                <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' ms-attr-placeholder="lang.SearchKeyPlaceHolder" 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">
                    <tbody>
                        <tr class="bindQuick">
                            <td width="50%"><span>媒体分类</span>
                                <div style="display: inline;" ms-each-f='mediaType.items'>
                                    <a href="javascript:void(0)" ms-live-click='setCondition($index,mediaType.items,"mediaType")' ms-class-selected="f.curr" ms-html='f.label' data-key='mediaType'></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 class="boxTitlenob">
                    <h2 ms-html="lang.AdvertisingList"></h2>
                </div>-->
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" id="tableList">
                    <thead>
                        <tr class="dobtn">
                            <td colspan="10">
                                <a ms-if="ADD" href="javascript:void(0);" class="doadd" ms-html='lang.AddBtn' ms-click="showAdd"></a>
                                <a href="javascript:void(0)" ms-click="doRemoveAll" class="doalldel" ms-if="DELETE" ms-html='lang.BtachDelBtn'></a>
                            </td>
                        </tr>
                        <tr class="head">
                            <td width="3%" align="center">
                                <input type="checkbox" class='checkAll'>
                            </td>
                            <td ms-html="'主题'" width="22%" align="center"></td>
                            <td ms-html="'媒体分类'" width="6%" align="center"></td>
                            <td ms-html="'投放媒体'" width="9%" align="center"></td>
                            <td ms-html="'投放量'" width="5%" align="center"></td>
                            <td ms-html="'录入人'" width="6%" align="center"></td>
                            <td ms-html="'录入时间'" width="6%" align="center"></td>
                            <td ms-html='lang.Opts' width="8%" align="center"></td>
                        </tr>
                    </thead>
                    <tbody ms-each-c='list'>
                        <tr ms-hover='hover'>
                            <td align="center">
                                <input type="checkbox" name="checkbox" ms-value="c.Id" />
                            </td>
                            <td><a href="javascript:void(0);" ms-click="showView">{{c.Theme}}</a></td>
                            <td align="center">{{c.MediaTypeData}}</td>
                            <td align="center">{{c.MediaIdData}}</td>
                            <td align="center">{{c.CommitmentOf}} {{c.CountUnitData}}</td>
                            <td align="center">{{c.AddBy.FullName}}</td>
                            <td align="center">{{c.AddTime}}</td>
                            <td align="center">
                                <a href="javascript:void(0);" class="doview" title="查看" ms-click="showView"></a>
                                <a ms-if='c.EDIT' ms-click="showEdit" class="doedit" title="编辑" data-permission="EDIT"></a>
                                <a ms-if='!c.EDIT' href='javascript:void(0)' class='noedit' ms-title='lang.NotEdit'></a>
                                <a ms-if='c.DELETE' href="javascript:void(0)" class="dodel" title="删除" data-permission="DELETE" ms-live-click="doRemove"></a>
                                <a ms-if='!c.DELETE' href='javascript:void(0)' class='nodel' ms-title='lang.NotDelete'></a>
                            </td>
                        </tr>
                    </tbody>
                    <tbody>
                        <tr style="background-color: rgb(255, 255, 255);">
                            <td colspan="8" ms-widget='paging,listPage,listOpts'></td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
<noscript type="text/avalon" id="dmedias">
    <div>
        <div class="boxTitlenob">
            <h2 ms-html="'媒体列表'"></h2>
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" id="table1">
            <thead>
                <tr class="head">
                    <td width="3%" align="center">选择
                    </td>
                    <td ms-html="'助记简称'" width="22%" align="center"></td>
                    <td ms-html="'媒体名称'" width="6%" align="center"></td>
                    <td ms-html="'媒体分类'" width="9%" align="center"></td>
                </tr>
            </thead>
            <tbody ms-each-c='medias'>
                <tr ms-hover='hover'>
                    <td align="center">
                        <input type="radio" ms-duplex-text='mediaSelect' value="{{$index}}" />
                    </td>
                    <td>{{c.ShotName}}</td>
                    <td>{{c.Name}}</td>
                    <td align="center">{{c.CategoryIdData}}</td>
                </tr>
            </tbody>
            <tbody>
                <tr style="background-color: rgb(255, 255, 255);">
                    <td colspan="4">&nbsp;</td>
                </tr>
            </tbody>
        </table>
    </div>
</noscript>
<!--新增-->
<noscript type="text/avalon" id="AdvertisingformTemplate">
    <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'" class="tabContent">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="commontable shortSelect">
            <tbody>
                <tr>
                    <th style="width: 70px;">主题名称：</th>
                    <td style="">
                        <input type="text" ms-duplex="entity.Theme" style="width: 200px;" />
                        <span class="must">*</span>
                    </td>
                    <th style="width: 90px;">媒体分类：</th>
                    <td>
                        <input style="width: 150px;" type="text" ms-duplex="entity.MediaTypeData" readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th style="height: 38px;">投放媒体：</th>
                    <td>
                        <input type="text" ms-duplex="entity.MediaIdData" style="width: 123px;" />
                        <button class="myfbt" type="button" ms-click='selectMedias()'>
                            <i class="customer"></i>
                        </button>
                    </td>
                    <th>对应联系人：</th>
                    <td style="height: 38px;">
                        <input style="width: 150px;" type="text" ms-duplex="entity.ContactIdData" readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>目标地域：</th>
                    <td>
                        <textarea rows="2" cols="20" style="height: 40px; width: 200px;" ms-duplex="entity.TargetSite"></textarea>
                        <span class="helptip"><a href="javascript:void(0)" data-toggle="tooltip" data-placement="top" title="例：地域不限，五象周边。">&nbsp;&nbsp; </a></span>
                    </td>
                    <th>目标受众：</th>
                    <td>
                        <textarea rows="2" cols="20" style="height: 40px; width: 150px;" ms-duplex="entity.TargetAudience"></textarea>
                        <span class="helptip"><a href="javascript:void(0)" data-toggle="tooltip" data-placement="top" title="例：公司，企业高管，中年人，青少年。">&nbsp;&nbsp; </a></span>
                    </td>
                </tr>
                <tr>
                    <th>投放时间：</th>
                    <td colspan="3">
                        <input type="text" style="width: 90px;" ms-duplex="entity.StartDate" ms-widget='date,birthday,birthdayOpts' readonly="readonly" />至&nbsp;&nbsp;<input type="text" style="width: 90px;" ms-duplex="entity.EndDate" ms-widget='date,birthday,birthdayOpts2' readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <th>规格尺寸：</th>
                    <td style="">
                        <input type="text" ms-duplex="entity.Specfifcations" style="width: 200px;" />
                    </td>
                    <th>版面位置：</th>
                    <td>
                        <input type="text" ms-duplex="entity.LayoutPosition" style="width: 150px;" />
                    </td>
                </tr>
                <tr>
                    <th>投放量：</th>
                    <td style="">
                        <input type="text" ms-duplex="entity.CommitmentOf" style="width: 90px;" />
                        <select ms-duplex-text="entity.CountUnit">
                            <option ms-repeat-r="countUnit" ms-value="r.Id" ms-text="r.Data"></option>
                        </select>
                        <span class="helptip"><a href="javascript:void(0)" data-toggle="tooltip" data-placement="top" title="例：10 （天/期）">&nbsp;&nbsp; </a></span>
                    </td>
                    <th>广告金额：</th>
                    <td>
                        <div class="input-append">
                            <input type="text" ms-duplex="entity.Amount" style="width: 125px;" />
                            <span class="add-on">元</span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>补充说明：</th>
                    <td colspan="3">
                        <textarea rows="2" cols="20" style="height: 40px; width: 500px;" ms-duplex="entity.Description"></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'" class="tabContent">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="commontable shortSelect">
            <tbody>
                <tr>
                    <th style="width: 70px; height: 35px;">广告内容：</th>
                    <td style="" colspan="3">
                        <textarea rows="2" cols="20" style="height: 80px; width: 535px;" ms-duplex="entity.AdvertisingContent"></textarea>
                    </td>
                </tr>
                <tr>
                    <th style="width: 70px; height: 35px;">附件：</th>
                    <td style="" colspan="3">
                        <input style="width: 450px; vertical-align: baseline;" type="text" ms-duplex="entity.AdAnnex" readonly="readonly" />
                        <input class="mybt" style="vertical-align: top;" type="button" ms-click="uploadFiles" ms-value="'上传文件'" />
                    </td>
                </tr>
                <tr ms-if="entity.AdAnnex != ''">
                    <td style="text-align: center;" colspan="4" align="center">
                        <img ms-if="previewPath != ''" ms-src="previewPath" style="height: 90px;" />
                        <span ms-if="previewPath == '' && entity.AdAnnex!=''" class="tipContent">该类型文件无法预览</span>
                    </td>
                </tr>
                <tr>
                    <th style="width: 70px; height: 35px;">广告目的和预期效果：</th>
                    <td style="" colspan="3">
                        <textarea rows="2" cols="20" style="height: 80px; width: 535px;" ms-duplex="entity.ObjectiveEffect"></textarea>
                    </td>
                </tr>

            </tbody>
        </table>
    </div>
</noscript>

<!--查看-->
<noscript type="text/avalon" id="AdvertisingviewTemplate">
    <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'" class="tabContent">
        <table cellspacing="1" cellpadding="0" width="100%" align="center" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td width="80">主题名称：
                    </td>
                    <td width="250">{{entity.Theme}}
                    </td>
                    <td width="80">投放媒体：
                    </td>
                    <td width="250">{{entity.MediaIdData}}
                    </td>
                </tr>
                <tr>
                    <td>媒体分类：
                    </td>
                    <td>{{entity.MediaTypeData}}
                    </td>
                    <td>联系人：
                    </td>
                    <td>{{entity.ContactIdData}}
                    </td>
                </tr>
                <tr>
                    <td>目标地域：
                    </td>
                    <td colspan="3">{{entity.TargetSite}}
                    </td>
                </tr>
                <tr>
                    <td>目标受众：
                    </td>
                    <td>{{entity.TargetAudience}}
                    </td>
                    <td>投放时间：
                    </td>
                    <td>{{entity.StartDate}}至{{entity.EndDate}}
                    </td>
                </tr>
                <tr>
                    <td>版面位置：
                    </td>
                    <td>{{entity.LayoutPosition}}
                    </td>
                    <td>规格尺寸：
                    </td>
                    <td>{{entity.Specfifcations}}
                    </td>
                </tr>
                <tr>
                    <td>广告金额：
                    </td>
                    <td>{{entity.Amount}}
                    </td>
                    <td>投放数量：
                    </td>
                    <td>{{entity.CommitmentOf}}({{entity.CountUnitData}})
                    </td>
                </tr>
                <tr>
                    <td>补充说明：
                    </td>
                    <td colspan="3" style="height: 80px;">{{entity.Description|html}}
                    </td>
                </tr>
                <tr>
                    <td>录&nbsp;入&nbsp;人：
                    </td>
                    <td>{{entity.AddBy.FullName}}
                    </td>
                    <td>录入时间：
                    </td>
                    <td>{{entity.AddTime}}
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="tab2" ms-visible="tab=='tab2'" class="tabContent">
        <table cellspacing="1" cellpadding="0" width="100%" align="center" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td width="70">广告内容：
                    </td>
                    <td style="height: 100px;">{{entity.AdvertisingContent|html}}
                    </td>
                </tr>
                <tr>
                    <td>广告附件：
                    </td>
                    <td>
                        <a ms-if="entity.AdAnnex !=''" ms-href="entity.AdAnnex" target="_blank">点击查看</a>
                        <span ms-if="entity.AdAnnex ==''">无附件</span>
                    </td>
                </tr>
                <tr>
                    <td>广告目的和预期效果：
                    </td>
                    <td style="height: 100px;">{{entity.ObjectiveEffect|html}}
                    </td>
                </tr>

            </tbody>
        </table>
    </div>
</noscript>
