<table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" ms-controller="marketingfeedback">
    <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 class="boxtip" id="boxtip">
                    <h1>{{lang.ProbeFeedback}}</h1>
                    <p>{{lang.ProbeFeedbackDescribe}}</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="460" class="searchico">
                                <div class="input-append" style="margin-bottom: 10px;">
                                    <input type="text" class="span4" ms-duplex="keyword" ms-attr-placeholder="lang.SearchKeyWordForFeedback">
                                    <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 colspan="2">
                                <span id="probetype">{{lang.ProbeType}}</span>
                                <div style="display: inline;" ms-each-item="probeTypeData">
                                    <a href="javascript:void(0)" ms-if="$index==0" class="selected" ms-click="itemClick" value="0" key="campaigntype">{{lang.Unlimited}}</a>
                                    <a href="javascript:void(0)" ms-click="itemClick" ms-value="item.Id" key="probetype">{{item.Data}}</a>
                                </div>
                            </td>
                        </tr>
                        <tr class="quickword">
                            <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.ProbeFeedbackList}}</h2>
                </div>-->
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList" id="tableList" style="margin-bottom: 10px;">
                    <thead>
                        <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                            <td colspan="10" 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" class="checkAll">
                            </td>
                            <td width="25%" align="center">{{lang.Theme}}
                            </td>
                            <td width="8%" align="center">{{lang.ProbeType}}
                            </td>
                             <td width="6%" align="center">{{lang.ProbeFeedbackPerson}}
                            </td>
                            <td width="6%" align="center">{{lang.AddBy}}
                            </td>
                            <!--<td width="15%" align="center">{{lang.ProbeFeedbackDepartment}}
                            </td>-->

                            <td width="15%" align="center">{{lang.BelongToCampaign}}
                            </td>
                            <td width="15%" align="center">{{lang.BelongToActivity}}
                            </td>                           
                            <td width="8%" align="center">{{lang.AddDateTime}}
                            </td>
                            <td width="6%" align="center">{{lang.Operate}}
                            </td>
                        </tr>
                    </thead>
                    <tbody ms-each-item="feedbackList">
                        <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="doview(item.Id)" ms-value="item.Id">{{item.Title}}</a>
                            </td>
                            <td align="center">{{item.ProbeTypeDisplay}}
                            </td>
                            <td align="center">
                                <a href="javascript:void(0);" ms-text="item.ProbeFeedbackPersonDisplay" ms-widget='userCard' ms-data-userid="item.ProbeFeedbackPerson"></a>
                            </td>
                            <td align="center">
                                <a href="javascript:void(0);" ms-text="item.AddBy.FullName" ms-widget='userCard' ms-data-userid="item.AddBy.Id"></a>
                            </td>
                            <!--<td align="center">{{item.ProbeFeedbackDepartmentDisplay}}
                            </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="activitydoview(item.MarketActivity)">{{item.MarketingCampaignDisplay}}</a>
                            </td>                            
                            <td align="center">
                                {{item.AddTime | truncate(10,'')}}
                            </td>
                            <td align="center">
                                <a href="javascript:void(0)" class="doview" ms-value="item.Id" ms-click="doview(item.Id)" ms-title="lang.ViewBtn"></a>
                                <a ms-if="item.EDIT" href="javascript:void(0)" class="doedit" ms-value="item.Id" ms-click="doedit" 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-value="item.Id" ms-attr-index="$index" ms-click="dodel" 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="10" ms-widget='paging,upaing,feedbackpaing'></td>
                        </tr>
                    </tfoot>
                </table>
            </td>
        </tr>
    </tbody>
</table>
<!--新增和编辑-->
<noscript type="text/avalon" id="formTemplate">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
        <tbody>
            <tr>
                <td width="80">{{lang.BelongToCampaign}}：
                </td>
                <td width="350">
                    <input type="hidden" ms-duplex="entity.MarketingCampaign" />
                    <input type="text" ms-duplex="entity.MarketingCampaignDisplay" readonly="readonly">
                    <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>
                <td width="80">{{lang.BelongToActivity}}：
                </td>
                <td>
                    <input type="hidden" ms-duplex="entity.MarketActivity" />
                    <input type="text" ms-duplex="entity.MarketActivityDisplay" readonly="readonly">
                    <button type="button" class="myfbt" ms-click="selectActivity">
                        <i class="customer"></i></button>
                    <div ms-visible="activityPanel" class="dropdownPanel" style="width: 610px; position: absolute; left: 300px;" ms-mousedown="mousedownstop">
                        <div>
                            <div class="boxTitlenob" style="margin-left: 0;">
                                <h2>
                                    <span class="rseachbox">
                                        <input style="margin-bottom: 0px;" ms-duplex="activityKey" type="text">
                                        <button type="button" class="inputbt" ms-click="searchActivity">
                                        </button>
                                    </span>
                                    <span style="float: right">
                                        <button type="button" ms-click="closeActivityPanel">{{lang.Close}}</button></span>
                                    <span style="float: right">
                                        <button type="button" ms-click="clearActivityValue">清空</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.ActivityTheme}}</td>
                                            <td width="8%" align="center">{{lang.ActivityType}}</td>
                                            <td width="15%" align="center">{{lang.ConscientiousPerson}}</td>
                                            <td width="8%" align="center">{{lang.CostBudget}}</td>
                                            <td width="10%" align="center">{{lang.DiscountType}}</td>
                                            <td width="15%" align="center">{{lang.StartDate}}</td>
                                            <td width="15%" align="center">{{lang.EndDate}}</td>
                                        </tr>
                                    </thead>
                                    <tbody ms-each-item="activityList">
                                        <tr style="background-color: rgb(255, 255, 255); cursor: pointer;" ms-live-click="clickActivity" ms-attr-key="item.Id" ms-attr-alt="item.ActivityTheme" title="点击选择">
                                            <td align="center">{{item.ActivityTheme}}
                                            </td>
                                            <td align="center">{{item.ActivityTypeDisplay}}
                                            </td>
                                            <td align="center">{{item.ConscientiousPersonDisplay}}
                                            </td>
                                            <td align="right">{{item.CostBudget}}
                                            </td>
                                            <td align="center">{{item.DiscountType}}
                                            </td>
                                            <td align="center">{{item.StartDate|truncate(10,'')}}
                                            </td>
                                            <td align="center">{{item.EndDate|truncate(10,'')}}
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>

                <td>{{lang.ProbeType}}：
                </td>
                <td>
                    <select ms-duplex="entity.ProbeType" style="width: 100px;" class="valid" ms-each-item="probeTypeData">
                        <option ms-value="item.Id">{{item.Data}}</option>
                    </select>
                </td>
                <td>{{lang.ProbeFeedbackPerson}}：
                </td>
                <td>
                    <input type="hidden" ms-duplex="entity.ProbeFeedbackPerson" />
                    <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay" readonly="readonly" />
                    <input type="hidden" ms-duplex="entity.ProbeFeedbackDepartment" />
                    <button type="button" class="myfbt" ms-click="selectFeedbackPerson()"><i class="iadduser"></i></button>
                </td>

            </tr>
            <tr>
                <td>{{lang.Theme}}：
                </td>
                <td colspan="3">
                    <input type="text" ms-duplex="entity.Title" style="width: 700px;">
                    <span class="must">*</span>
                </td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td>调查描述<br />
                    和结论：
                </td>
                <td colspan="3" style="height: 260px">
                    <textarea rows="5" id="ProbeDescribe"></textarea>
                </td>
            </tr>
            <tr>
                <td>{{lang.ProbeAttachment}}：
                </td>
                <td>
                    <input type="text" ms-duplex="entity.Files" readonly="readonly">
                    <button type="button" class="myfbt" ms-click="uploadFiles">
                        <i class="customer"></i></button>
                </td>
                <td>{{lang.ShareTo}}：
                </td>
                <td>
                    <input type="hidden" ms-duplex="entity.ShareTo" />
                    <input type="text" ms-duplex="entity.ShareToDisplay" readonly="readonly" />
                    <button type="button" class="myfbt" ms-click="selectShareTo()"><i class="iadduser"></i></button>
                </td>
            </tr>
        </tbody>
    </table>
</noscript>
<!--查看-->
<noscript type="text/avalon" id="viewTemplate">
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
        <tbody>
            <tr>
                <td width="100">{{lang.BelongToCampaign}}：
                </td>
                <td width="300">{{entity.MarketingCampaignDisplay}}
                </td>
                <td width="100">{{lang.BelongToActivity}}：
                </td>
                <td width="300">{{entity.MarketActivityDisplay}}
                </td>
            </tr>
            <tr>
                <td width="100">{{lang.ProbeType}}：
                </td>
                <td width="300">{{entity.ProbeTypeDisplay}}
                </td>
                <td width="100">{{lang.ProbeFeedbackPerson}}：
                </td>
                <td width="300">{{entity.ProbeFeedbackPersonDisplay}}
                </td>

            </tr>
            <tr>
                <td width="90">{{lang.Theme}}：
                </td>
                <td colspan="3">{{entity.Title}}
                </td>
            </tr>
            <tr>
                <td width="90">{{lang.ProbeAndVerdict}}：
                </td>
                <td colspan="3" style="height: 80px;">{{entity.ProbeDescribe|html}}
                </td>
            </tr>
            <tr>
                <td width="90">{{lang.ProbeAttachment}}：
                </td>
                <td>{{entity.Files}}
                </td>
                <td width="90">{{lang.ShareTo}}：
                </td>
                <td>{{entity.ShareToDisplay}}
                </td>
            </tr>
            <tr>
                <td>{{lang.AddByDisplay}}
                </td>
                <td>{{entity.AddBy.FullName}}
                </td>
                <td>{{lang.AddTime}}
                </td>
                <td>{{entity.AddTime|truncate(10,'')}}
                </td>
            </tr>
        </tbody>
    </table>
</noscript>
