<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" ms-controller="marketingactivity">
    <tbody>
        <tr>
            <td width="198" height="450" valign="top" id="tdleft">
                <!--leftNav-->
                <div id="left" ms-widget="leftMenu">
                </div>
                <!--End leftNav-->
            </td>
            <td valign="top" id="right" class="addrightbg">
                <div style="margin-bottom: 10px;">
                    <div class="boxtip" id="boxtip">
                        <h1>{{lang.MarketActivity}}</h1>
                        <p>{{lang.MarketActivityDepartment}}</p>
                    </div>
                    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable">
                        <tbody>
                            <tr>
                                <td width="460" class="searchico">
                                    <div class="input-append" style="margin-bottom: 10px;">
                                        <input type="text" class="span4" ms-duplex="keyword" ms-attr-placeholder="lang.SearchKeyWordForActivity">
                                        <button class="add-on ibtsearch" type="button" id="btnsel" ms-click="search" 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>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="seacrhField" class="seacrhField">
                        <tbody>
                            <tr class="quickword">
                                <td width="50%">
                                    <span id="activitytype">{{lang.ActivityType}}</span>
                                    <div style="display: inline;" ms-each-item="activityTypeData">
                                        <a href="javascript:void(0)" ms-if="$index==0" class="selected" ms-click="itemClick" value="0" key="activitytype">{{lang.Unlimited}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" ms-value="item.Id" key="activitytype">{{item.Data}}</a>
                                    </div>
                                </td>
                                <td>
                                    <span id="startdatespan">发起时间</span>
                                    <div id="StartDateItems" style="display: inline;">
                                        <a href="javascript:void(0)" class="selected" ms-click="itemClick" value="0" key="startdatespan">{{lang.Unlimited}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" value="1" key="startdatespan">1{{lang.MonthSpan}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" value="3" key="startdatespan">3{{lang.MonthSpan}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" value="6" key="startdatespan">6{{lang.MonthSpan}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" value="9" key="startdatespan">9{{lang.MonthSpan}}</a>
                                        <a href="javascript:void(0)" ms-click="itemClick" value="12" key="startdatespan">12{{lang.MonthSpan}}</a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="seabox"><span class="first">{{lang.CurrSearchCondition}}</span>
                                    <div style="display: inline;" ms-with="showItem">
                                        <span class="searchItem" ms-if="$val">{{$val}}<i><a href="javascript:void(0)" ms-click="remove"></a></i></span>
                                    </div>
                                    <span class="last" ms-if="has"><a href="javascript:void(0)" ms-click="clear">{{lang.ClearAll}}</a></span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <!--<div class="boxTitlenob">
                    <h2>{{lang.MarketActivityList}}</h2>
                </div>-->
                    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList" id="tableList">
                        <thead>
                            <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                <td colspan="11" bgcolor="#FFFFFF">
                                    <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: rgba(0, 0, 0, 0);">
                                <td width="3%" align="center">
                                    <input type="checkbox" name="checkAll" class="checkAll">
                                </td>
                                <td width="15%" align="center">归属战役
                                </td>
                                <td width="20%" align="center">{{lang.ActivityTheme}}
                                </td>
                                <td width="5%" align="center">{{lang.ActivityType}}
                                </td>
                                <td width="10%" align="center">销售机会数
                                </td>
                                <td width="10%" align="center">合同订单数
                                </td>
                                <td width="10%" align="center">签单额
                                </td>
                                <td width="10%" align="center">{{lang.ConscientiousPerson}}
                                </td>
                                <td width="6%" align="center">{{lang.StartDate}}
                                </td>
                                <td width="6%" align="center">{{lang.EndDate}}
                                </td>
                                <td width="6%" align="center">{{lang.Operate}}
                                </td>
                            </tr>
                        </thead>
                        <tbody ms-each-item="activityList">
                            <tr 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="campaigndoview(item.MarketingCampaign)">{{item.MarketingCampaignDisplay}}</a>
                                </td>
                                <td align="left">
                                    <a href="javascript:void(0)" ms-click="doview(item.Id)" ms-value="item.Id">{{item.ActivityTheme}}</a>
                                </td>
                                <td align="center">{{item.ActivityTypeDisplay}}</td>
                                <td align="center">{{item.SalesOpportunitiesCount}} 
                                </td>
                                <td align="center">{{item.ContractCount}} 
                                </td>
                                <td align="center">{{item.ContractMoney}} 
                                </td>
                                <td align="center"><a href="javascript:void(0);" ms-text="item.ConscientiousPersonDisplay" ms-widget='userCard' ms-data-userid="item.ConscientiousPerson"></a>
                                </td>
                                <td align="center">{{item.StartDate|truncate(10,'')}}
                                </td>
                                <td align="center">{{item.EndDate|truncate(10,'')}}
                                </td>
                                <td align="center">
                                    <a href="javascript:void(0)" class="doview" ms-click="doview(item.Id)" ms-value="item.Id" ms-title="lang.ViewBtn"></a>
                                    <a ms-if="item.EDIT" href="javascript:void(0)" class="doedit" ms-click="doedit(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="dodel" ms-value="item.Id" ms-index="$index" 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="11" ms-widget='paging,upaing,activitypaing'></td>
                            </tr>
                        </tfoot>
                    </table>
                </div>

                <!--新增-->
                <noscript type="avalon/text" id="MarketActivityaddTemplate">
                    <div ms-css-width="tabWidth" class="tabContent2">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
                            <tbody>
                                <tr>
                                    <td width="90">{{lang.ActivityType}}：
                                    </td>
                                    <td width="280">
                                        <select ms-duplex="entity.ActivityType" style="width: 120px;" ms-each-item="activityTypeData">
                                            <option ms-value="item.Id">{{item.Data}}</option>
                                        </select>
                                    </td>
                                    <td width="90">{{lang.BelongToCampaign}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.MarketingCampaignDisplay" readonly="readonly" style="width: 120px;">
                                        <button type="button" class="myfbt" ms-click="selectCampaign">
                                            <i class="customer"></i>
                                        </button>
                                        <div ms-visible="campaignPanel" class="dropdownPanel" style="width: 610px; position: absolute;" ms-mousedown="mousedownstop">
                                            <div>
                                                <div class="boxTitlenob" style="margin-left: 0;">
                                                    <h2>
                                                        <span class="rseachbox">
                                                            <input style="margin-bottom: 0px;" ms-duplex="campaignKey" type="text">
                                                            <button type="button" class="inputbt" ms-click="searchCampaign">
                                                            </button>
                                                        </span>
                                                        <span style="float: right">
                                                            <button type="button" ms-click="closeCampaignPanel">{{lang.Close}}</button></span>
                                                        <span style="float: right">
                                                            <button type="button" ms-click="clearCampaignValue">清空</button></span>
                                                    </h2>
                                                </div>
                                                <div style="height: 200px; overflow: auto; background-color: rgb(255, 255, 255);">
                                                    <table width="100%" align="center" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                                        <thead>
                                                            <tr class="head">
                                                                <td width="20%" align="center">{{lang.CampaignTitle}}</td>
                                                                <td width="8%" align="center">{{lang.CampaignType}}</td>
                                                                <td width="10%" align="center">{{lang.StartDate}}</td>
                                                                <td width="10%" align="center">{{lang.EndDate}}</td>
                                                                <td width="7%" align="center">{{lang.CampaignSponsor}}</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody ms-each-item="campaignList">
                                                            <tr style="background-color: rgb(255, 255, 255); cursor: pointer;" ms-live-click="clickCampaign" ms-attr-key="item.Id" ms-attr-alt="item.CampaignTheme" title="点击选择">
                                                                <td align="center">{{item.CampaignTheme}}
                                                                </td>
                                                                <td align="center">{{item.CampaignTypeDisplay}}
                                                                </td>
                                                                <td align="center">{{item.StartDate | truncate(10,'')}}
                                                                </td>
                                                                <td align="center">{{item.EndDate | truncate(10,'')}}
                                                                </td>
                                                                <td align="center">{{item.CampaignSponsorDisplay}}
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityTheme}}：
                                    </td>
                                    <td colspan="3">
                                        <input type="text" ms-duplex="entity.ActivityTheme" style="width: 490px;"><span class="must">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.DateSpan}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.StartDate" style="width: 90px;" ms-widget="date,stardate,startdateOpts" readonly="readonly">
                                        <span style="margin-left: -15px;">至</span>
                                        <input type="text" ms-duplex="entity.EndDate" style="width: 90px;" ms-widget="date,enddate,enddateOpts" readonly="readonly">
                                        <span class="must" style="margin: -15px;">*</span>
                                    </td>
                                    <td>{{lang.ConscientiousPerson}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.ConscientiousPersonDisplay" readonly="readonly" style="width: 120px;" />
                                        <input type="hidden" ms-duplex="entity.ConscientiousDepartment" />
                                        <button type="button" class="myfbt" ms-click="selectConscientiousPerson()"><i class="iadduser"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityAddress}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.ActivityAddress" style="width: 220px;">
                                    </td>
                                    <td>{{lang.CostBudget}}：
                                    </td>
                                    <td>
                                        <div class="input-append">
                                            <input type="text" ms-duplex="entity.CostBudget" style="width: 95px;">
                                            <span class="add-on">{{lang.Yuan}}</span>
                                        </div>
                                        <span class="must">*</span>
                                    </td>

                                </tr>
                                <tr>
                                    <td>{{lang.ExpectedTarget}}：
                                    </td>
                                    <td colspan="3">
                                        <textarea rows="2" cols="10" id="ExpectedTarget" style="width: 400px;"></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.IsSalesPromotion}}：
                                    </td>
                                    <td colspan="3">
                                        <label>
                                            <input style="margin-left: 5px;" type="radio" ms-duplex-text="entity.IsSalesPromotion" name="SalesPromotion" value="false">{{lang.No}}</label>
                                        &nbsp;&nbsp;
                  <label>
                      <input type="radio" ms-duplex-text="entity.IsSalesPromotion" value="true" name="SalesPromotion">{{lang.Yes}}</label>
                                    </td>
                                </tr>
                                <tr ms-if="entity.IsSalesPromotion=='true'">
                                    <td>&nbsp;
                                    </td>
                                    <td colspan="3">
                                        <table>
                                            <tr>
                                                <td width="80">满足金额：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.MinMoney" style="width: 80px; display: inline-block;">
                                                        <span class="add-on">{{lang.Yuan}}</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.DiscountType}}：</td>
                                                <td>
                                                    <label>
                                                        <input type="radio" ms-duplex-text="entity.DiscountType" value="优惠金额">{{lang.PreferentialAmount}}</label>
                                                    <label>
                                                        <input style="margin-left: 5px;" type="radio" ms-duplex-text="entity.DiscountType" value="折扣率">{{lang.DiscountRate}}</label>
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='优惠金额'">
                                                <td>优惠金额：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.PreferentialAmount" style="width: 80px; display: inline-block;">
                                                        <span class="add-on">{{lang.Yuan}}</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='折扣率'">
                                                <td>折扣率：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.DiscountRate" style="width: 80px;">
                                                        <span class="add-on">%</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td>
                                                    <span class="tipico" style="padding-left: 20px; color: rgb(153, 153, 153);">订单金额满足<b>（{{entity.MinMoney?entity.MinMoney:"?"}}）</b>元时，按
                                        （{{entity.DiscountType}}
                                        <span ms-if="entity.DiscountType=='优惠金额'"><b>{{entity.PreferentialAmount?entity.PreferentialAmount:"?"}}</b>元</span>
                                                        <span ms-if="entity.DiscountType=='折扣率'"><b>{{entity.DiscountRate?entity.DiscountRate:"?"}}%</b></span>
                                                        ）进行优惠促销。
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.CustomerTarget}}：
                                                </td>
                                                <td>
                                                    <label ms-repeat="cTypes">
                                                        <input type="checkbox" ms-duplex="entity.CustomerTypeTarget" ms-value="$key" />{{$val}}</label>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>录入人：
                                    </td>
                                    <td>{{entity.AddBy.FullName}} 
                                    </td>
                                    <td>录入时间</td>
                                    <td>{{entity.AddTime}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </noscript>
                <!--编辑-->
                <noscript type="avalon/text" id="MarketActivityeditTemplate">
                    <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>
                            <li ms-class-1="hover:tab=='tab3'" ms-class-2="normal:tab!='tab3'" val="tab3" ms-click="tabChange">获得合同订单</li>
                            <li ms-class-1="hover:tab=='tab4'" ms-class-2="normal:tab!='tab4'" val="tab4" ms-click="tabChange">活动总结</li>
                        </ul>
                    </div>
                    <div id="tab1" ms-visible="tab=='tab1'" class="tabContent2">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
                            <tbody>
                                <tr>
                                    <td width="80">{{lang.ActivityType}}：
                                    </td>
                                    <td width="280">
                                        <select ms-duplex="entity.ActivityType" style="width: 120px;" ms-each-item="activityTypeData">
                                            <option ms-value="item.Id">{{item.Data}}</option>
                                        </select>
                                    </td>
                                    <td width="90">{{lang.BelongToCampaign}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.MarketingCampaignDisplay" readonly="readonly" style="width: 120px;">
                                        <button type="button" class="myfbt" ms-click="selectCampaign">
                                            <i class="customer"></i>
                                        </button>
                                        <div ms-visible="campaignPanel" class="dropdownPanel" style="width: 610px; position: absolute;" ms-mousedown="mousedownstop">
                                            <div>
                                                <div class="boxTitlenob" style="margin-left: 0;">
                                                    <h2>
                                                        <span class="rseachbox">
                                                            <input style="margin-bottom: 0px;" ms-duplex="campaignKey" type="text">
                                                            <button type="button" class="inputbt" ms-click="searchCampaign">
                                                            </button>
                                                        </span>
                                                        <span style="float: right">
                                                            <button type="button" ms-click="closeCampaignPanel">{{lang.Close}}</button></span>
                                                        <span style="float: right">
                                                            <button type="button" ms-click="clearCampaignValue">清空</button></span>
                                                    </h2>
                                                </div>
                                                <div style="height: 200px; overflow: auto; background-color: rgb(255, 255, 255);">
                                                    <table width="100%" align="center" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                                        <thead>
                                                            <tr class="head">
                                                                <td width="20%" align="center">{{lang.CampaignTitle}}</td>
                                                                <td width="8%" align="center">{{lang.CampaignType}}</td>
                                                                <td width="10%" align="center">{{lang.StartDate}}</td>
                                                                <td width="10%" align="center">{{lang.EndDate}}</td>
                                                                <td width="7%" align="center">{{lang.CampaignSponsor}}</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody ms-each-item="campaignList">
                                                            <tr style="background-color: rgb(255, 255, 255); cursor: pointer;" ms-live-click="clickCampaign" ms-attr-key="item.Id" ms-attr-alt="item.CampaignTheme" title="点击选择">
                                                                <td align="center">{{item.CampaignTheme}}
                                                                </td>
                                                                <td align="center">{{item.CampaignTypeDisplay}}
                                                                </td>
                                                                <td align="center">{{item.StartDate | truncate(10,'')}}
                                                                </td>
                                                                <td align="center">{{item.EndDate | truncate(10,'')}}
                                                                </td>
                                                                <td align="center">{{item.CampaignSponsorDisplay}}
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityTheme}}：
                                    </td>
                                    <td colspan="3">
                                        <input type="text" ms-duplex="entity.ActivityTheme" style="width: 490px;"><span class="must">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.DateSpan}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.StartDate" style="width: 90px;" ms-widget="date,stardate,startdateOpts" readonly="readonly">
                                        <span style="margin-left: -15px;">至</span>
                                        <input type="text" ms-duplex="entity.EndDate" style="width: 90px;" ms-widget="date,enddate,enddateOpts" readonly="readonly">
                                        <span class="must" style="margin: -15px;">*</span>
                                    </td>
                                    <td>{{lang.ConscientiousPerson}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.ConscientiousPersonDisplay" readonly="readonly" style="width: 120px;" />
                                        <input type="hidden" ms-duplex="entity.ConscientiousDepartment" />
                                        <button type="button" class="myfbt" ms-click="selectConscientiousPerson()"><i class="iadduser"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityAddress}}：
                                    </td>
                                    <td>
                                        <input type="text" ms-duplex="entity.ActivityAddress" style="width: 220px;">
                                    </td>
                                    <td>{{lang.CostBudget}}：
                                    </td>
                                    <td>
                                        <div class="input-append">
                                            <input type="text" ms-duplex="entity.CostBudget" style="width: 95px;">
                                            <span class="add-on">{{lang.Yuan}}</span>
                                        </div>
                                        <span class="must">*</span>
                                    </td>

                                </tr>
                                <tr>
                                    <td>{{lang.ExpectedTarget}}：
                                    </td>
                                    <td colspan="3">
                                        <textarea rows="2" cols="10" id="ExpectedTarget" style="width: 400px;"></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.IsSalesPromotion}}：
                                    </td>
                                    <td colspan="3">
                                        <label>
                                            <input style="margin-left: 5px;" type="radio" ms-duplex-text="entity.IsSalesPromotion" name="SalesPromotion" value="false">{{lang.No}}</label>
                                        &nbsp;&nbsp;
                  <label>
                      <input type="radio" ms-duplex-text="entity.IsSalesPromotion" value="true" name="SalesPromotion">{{lang.Yes}}</label>
                                    </td>
                                </tr>
                                <tr ms-if="entity.IsSalesPromotion=='true'">
                                    <td>&nbsp;
                                    </td>
                                    <td colspan="3">
                                        <table>
                                            <tr>
                                                <td width="80">满足金额：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.MinMoney" style="width: 80px; display: inline-block;">
                                                        <span class="add-on">{{lang.Yuan}}</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.DiscountType}}：</td>
                                                <td>
                                                    <label>
                                                        <input type="radio" ms-duplex-text="entity.DiscountType" value="优惠金额">{{lang.PreferentialAmount}}</label>
                                                    <label>
                                                        <input style="margin-left: 5px;" type="radio" ms-duplex-text="entity.DiscountType" value="折扣率">{{lang.DiscountRate}}</label>
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='优惠金额'">
                                                <td>优惠金额：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.PreferentialAmount" style="width: 80px; display: inline-block;">
                                                        <span class="add-on">{{lang.Yuan}}</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='折扣率'">
                                                <td>折扣率：</td>
                                                <td>
                                                    <div class="input-append">
                                                        <input type="text" class="discountinput" ms-duplex="entity.DiscountRate" style="width: 80px;">
                                                        <span class="add-on">%</span>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td>
                                                    <span class="tipico" style="padding-left: 20px; color: rgb(153, 153, 153);">订单金额满足<b>（{{entity.MinMoney?entity.MinMoney:"?"}}）</b>元时，按
                                        （{{entity.DiscountType}}
                                        <span ms-if="entity.DiscountType=='优惠金额'"><b>{{entity.PreferentialAmount?entity.PreferentialAmount:"?"}}</b>元</span>
                                                        <span ms-if="entity.DiscountType=='折扣率'"><b>{{entity.DiscountRate?entity.DiscountRate:"?"}}%</b></span>
                                                        ）进行优惠促销。
                                                    </span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.CustomerTarget}}：
                                                </td>
                                                <td>
                                                    <label ms-repeat="cTypes">
                                                        <input type="checkbox" ms-duplex="entity.CustomerTypeTarget" ms-value="$key" />{{$val}}</label>

                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>录入人：
                                    </td>
                                    <td>{{entity.AddBy.FullName}} 
                                    </td>
                                    <td>录入时间</td>
                                    <td>{{entity.AddTime}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab2" ms-visible="tab=='tab2'" class="tabContent2 min200">
                        <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="15%" align="center">跟单人</td>
                                    <td align="center">发现日期</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="salesList">
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-click="customerdoview(item.Customer)">{{item.CustomerDisplay|truncate(15,'..0')}} </a>
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0)" ms-click="salesOpportunitiesdoview(item.Id)">{{item.Title}}</a>
                                    </td>
                                    <td align="center">{{item.StateDisplay}}
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-text="item.OpportunitiesFollowDisplay" ms-widget='userCard' ms-data-userid="item.OpportunitiesFollow"></a>
                                    </td>
                                    <td align="center">{{item.DiscoverDate | truncate(10,'')}}
                                    </td>
                                </tr>
                                <tr ms-if="salesList.length==0">
                                    <td colspan="5" class="noListData">{{lang.NoListData}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab3" ms-visible="tab=='tab3'" class="tabContent2 min200">
                        <table border="0" cellspacing="1" cellpadding="0" class="tableList" align="center">
                            <thead>
                                <tr class="minhead" align="center">
                                    <td width="30%" align="center">客户</td>
                                    <td width="30%" align="center">合同名称</td>
                                    <td width="10%" align="center">金额</td>
                                    <td width="15%" align="center">签约人</td>
                                    <td width="15%" align="center">签约时间</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="contractList">
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-click="customerdoview(item.Customer)">{{item.CustomerDisplay|truncate(15,'..0')}} </a>
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0)" ms-click="contractdoview(item.Id)">{{item.ContractName}}</a>
                                    </td>
                                    <td align="center">{{item.Amount}}
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-text="item.MySignPersionDisplay" ms-widget='userCard' ms-data-userid="item.MySignPersion"></a>
                                    </td>
                                    <td align="center">{{item.DiscoverDate | truncate(10,'')}}
                                    </td>
                                </tr>
                                <tr ms-if="contractList.length==0">
                                    <td colspan="5" class="noListData">{{lang.NoListData}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab4" ms-visible="tab=='tab4'" class="tabContent2 min200">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
                            <tbody>
                                <tr>
                                    <td>
                                        <textarea rows="2" cols="10" id="ActivitySummary"></textarea>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                </noscript>
                <!--查看-->
                <noscript type="avalon/text" id="MarketActivityviewTemplate">
                    <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>
                            <li ms-class-1="hover:tab=='tab3'" ms-class-2="normal:tab!='tab3'" val="tab3" ms-click="tabChange">获得合同订单</li>
                            <li ms-class-1="hover:tab=='tab4'" ms-class-2="normal:tab!='tab4'" val="tab4" ms-click="tabChange">活动总结</li>
                        </ul>
                    </div>
                    <div id="tab1" ms-visible="tab=='tab1'" class="tabContent2">
                        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                            <tbody>
                                <tr>
                                    <td width="90">{{lang.ActivityType}}：
                                    </td>
                                    <td width="280">
                                        <span ms-repeat-item="activityTypeData" ms-if-loop="entity.ActivityType==item.Id">{{item.Data}}</span>
                                    </td>
                                    <td width="90">{{lang.BelongToCampaign}}：
                                    </td>
                                    <td>{{entity.MarketingCampaignDisplay}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityTheme}}：
                                    </td>
                                    <td colspan="3">{{entity.ActivityTheme}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.DateSpan}}：
                                    </td>
                                    <td>
                                        <span ms-if="entity.StartDate">{{entity.StartDate|truncate(10,'')}}至{{entity.EndDate|truncate(10,'')}}</span>
                                    </td>
                                    <td>{{lang.ConscientiousPerson}}：
                                    </td>
                                    <td>{{entity.ConscientiousPersonDisplay}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.ActivityAddress}}：
                                    </td>
                                    <td>{{entity.ActivityAddress}}
                                    </td>
                                    <td>{{lang.CostBudget}}：
                                    </td>
                                    <td>
                                        <span ms-if="entity.CostBudget">{{entity.CostBudget}}({{lang.Yuan}})</span>
                                    </td>

                                </tr>
                                <tr>
                                    <td>{{lang.ExpectedTarget}}：
                                    </td>
                                    <td colspan="3">{{entity.ExpectedTarget?entity.ExpectedTarget|html:""}}
                                    </td>
                                </tr>
                                <tr>
                                    <td>{{lang.IsSalesPromotion}}：
                                    </td>
                                    <td colspan="3">{{entity.IsSalesPromotion}}
                                    </td>
                                </tr>
                                <tr ms-if="entity.IsSalesPromotion=='是'">
                                    <td>&nbsp;
                                    </td>
                                    <td colspan="3">
                                        <table>
                                            <tr>
                                                <td width="80">满足金额：</td>
                                                <td>{{entity.MinMoney}}({{lang.Yuan}})
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.DiscountType}}：</td>
                                                <td>{{entity.DiscountType}}
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='优惠金额'">
                                                <td>优惠金额：</td>
                                                <td>{{entity.PreferentialAmount}}({{lang.Yuan}})
                                                </td>
                                            </tr>
                                            <tr ms-if="entity.DiscountType=='折扣率'">
                                                <td>折扣率：</td>
                                                <td>{{entity.DiscountRate}}%
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.CustomerTarget}}：
                                                </td>
                                                <td>{{entity.CustomerTypeTargetDisplay}}
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>录入人：
                                    </td>
                                    <td>{{entity.AddBy.FullName}}
                                    </td>
                                    <td>录入时间：
                                    </td>
                                    <td>{{entity.AddTime}}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab2" ms-visible="tab=='tab2'" class="tabContent2 min200">
                        <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="15%" align="center">跟单人</td>
                                    <td width="15%" align="center">发现日期</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="salesList">
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-click="customerdoview(item.Customer)">{{item.CustomerDisplay|truncate(15,'..0')}} </a>
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0)" ms-click="salesOpportunitiesdoview(item.Id)">{{item.Title}}</a>
                                    </td>
                                    <td align="center">{{item.StateDisplay}}
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-text="item.OpportunitiesFollowDisplay" ms-widget='userCard' ms-data-userid="item.OpportunitiesFollow"></a>
                                    </td>
                                    <td align="center">{{item.DiscoverDate | truncate(10,'')}}
                                    </td>
                                </tr>
                                <tr ms-if="salesList.length==0">
                                    <td colspan="5" class="noListData">{{lang.NoListData}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab3" ms-visible="tab=='tab3'" class="tabContent2 min200">
                        <table border="0" cellspacing="1" cellpadding="0" class="tableList" align="center">
                            <thead>
                                <tr class="minhead" align="center">
                                    <td width="30%" align="center">客户</td>
                                    <td width="30%" align="center">合同名称</td>
                                    <td width="10%" align="center">金额</td>
                                    <td width="15%" align="center">签约人</td>
                                    <td width="15%" align="center">签约时间</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="contractList">
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-click="customerdoview(item.Customer)">{{item.CustomerDisplay|truncate(15,'..0')}} </a>
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0)" ms-click="contractdoview(item.Id)">{{item.ContractName}}</a>
                                    </td>
                                    <td align="center">{{item.Amount}}
                                    </td>
                                    <td align="center">
                                        <a href="javascript:void(0);" ms-text="item.MySignPersionDisplay" ms-widget='userCard' ms-data-userid="item.MySignPersion"></a>
                                    </td>
                                    <td align="center">{{item.DiscoverDate | truncate(10,'')}}
                                    </td>
                                </tr>
                                <tr ms-if="contractList.length==0">
                                    <td colspan="5" class="noListData">{{lang.NoListData}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div id="tab4" ms-visible="tab=='tab4'"class="tabContent2 min200">
                        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                            <tbody>
                                <tr>
                                    <td>{{entity.ActivitySummary?entity.ActivitySummary|html:""}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </noscript>
            </td>
        </tr>
    </tbody>
</table>

