<!--<div class="lg-nav">-->
<!--<label class="btn-mgl-5">根据分类查看</label>-->
<!--<div class="btn-group btn-group-sm btn-mgl-5">-->

<!--<button type="button" class="btn btn-default">默认分类</button>-->
<!--<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">-->
<!--<i class="caret"></i>-->
<!--</button>-->
<!--<ul class="dropdown-menu">-->
<!--<li><a href="#">默认分类</a></li>-->
<!--<li><a href="#">德国客户</a></li>-->
<!--<li><a href="#">欧洲客户</a></li>-->
<!--<li><a href="#">美国客户</a></li>-->
<!--<li><a href="#">非洲客户</a></li>-->
<!--</ul>-->
<!--</div>-->
<!--<div class="input-group input-group-sm lg-input-group lg-input-group-right btn-mgr-10">-->
<!--<input type="text" class="form-control" placeholder="查询邮件...">-->
<!--<span class="input-group-btn">-->
<!--<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>-->
<!--</span>-->
<!--</div>-->
<!--&lt;!&ndash; /input-group &ndash;&gt;-->
<!--</div>-->
<div class="lg-nav">
  <div class="btn-group form-group-sm btn-mgl-10">
    <select id="mailusertype" class="form-control lg-w-120"  mail-user-type>
      <option value="0">全部客户</option>
      <option value="5">泛群发</option>
      <option value="4" ng-if="showCusType==1">准营销</option>
      <option value="4" ng-if="showCusType==0">精盘活</option>
    </select>
  </div>
  <div class="btn-group form-group-sm btn-mgl-10 note" style="text-align: center;">
		<span>
		</span>
	</div>
</div>
<div class="lg-con">
  <div class="lg-wrap" scroller-all="165">
    <div  class="list-wrap">

      <table class="table table-hover">
        <thead>
        <tr>
          <th><label allcheck="0" class="checkall"></label></th>
          <th>邮件主题</th>
          <th>客户类型</th>
          <th>发送时间</th>
          <th>投递次数</th>
          <th>收件人数</th>
          <th>打开数</th>
          <!-- <th>点读数</th>
          <th>退订数</th>
          <th>回复数</th> -->
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="listitem in listitems">
          <td width="60"><label datafilecheck="0" class="lg-checkbox"></label></td>
          <td width="25%">
	          <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 250px;">
	          <a href="javascript:;" ng-href="#/es/success/sendmailinfo/{{listitem.send_mail_id}}/0" title="{{listitem.subject}}">{{getsubject(listitem.subject)}}</a>
	          </div>
          </td>
          <td>
	          <label ng-if="listitem.isold==0 || listitem.isold==5 || listitem.isold==6" class="label label-warning">泛群发</label>
	          <label ng-if="listitem.isold==1" class="label label-success">准营销{{getiscrm(listitem.iscrm)}}</label>
	          <label ng-if="listitem.isold==2 || listitem.isold==3 || listitem.isold==4" class="label label-success">精盘活 {{getiscrm(listitem.iscrm)}}</label>
          </td>
          <td>{{listitem.plans_send_time!=null?listitem.plans_send_time:listitem.create_time}}</td>
          <td>{{listitem.sendci}} <span lgclick="/es/success/sendnum/{{listitem.send_mail_id}}" class="lg-pointer"><i  class="fa fa-eye"></i></span></td>
          <td>
            <div ng-if="listitem.isold!=0 && listitem.isold!=5 && listitem.isold!=6" style="position: relative">
              {{listitem.send_num}}
            </div>
            <div ng-if="listitem.isarrange==0&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)" class="lgpopover" data-title="未整理"  data-content="(点击<i class='fa fa-user color-blue' ></i>图标进行整理)" style="position: relative">
              {{listitem.send_num}} <i class="fa fa-user color-blue lg-pointer" cid="{{listitem.send_mail_id}}" txtpath="{{listitem.txtaddresspath}}" success-clean></i> <span class="showspinner{{listitem.send_mail_id}}"></span>
            </div>
            <div ng-if="listitem.isarrange==1&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)" class="lgpopover" data-title="已整理"  data-content="整理前 <span class='color-green'>{{listitem.send_num}}</span> 个,整理后 <span class='color-red'>{{listitem.membernum}}</span> 个" style="position: relative">
              {{listitem.send_num}} <i class="fa fa-user color-green"></i>
            </div>
          </td>
        	<td ng-if="listitem.open_nums == -1"><i class="fa fa-spinner fa-spin"></i></td>
        	<td ng-if="listitem.open_nums == 0 ">{{listitem.open_nums}}</td>
         <td ng-if="listitem.open_nums != 0 && listitem.open_nums != -1">
         <span style="color: #337ab7;cursor:pointer;" ng-click="openDetail(listitem.mail_uid,listitem.sendci,listitem.send_mail_id)">{{listitem.open_nums}}</span></td>
       <!--  <td>{{listitem.reading_tol}}</td>
       		<td>{{listitem.un_person}}</td>
          <td>{{listitem.reply_mail_count}}</td> -->
          <td>
            <div class="dropdown">
              <button id="dLabel1" class="btn btn-default btn-sm" data-toggle="dropdown" aria-haspopup="true"
                      aria-expanded="false">设置 <i class="caret"></i></button>
              <ul class="dropdown-menu animated swing dropdown-menu-right" aria-labelledby="dLabel1">
                <li ng-show="listitem.isarrange==0&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)?true:false">
                <a href="javascript:;" ng-click="againsend(listitem.send_mail_id,listitem.sendci,listitem.create_time)">
                <i class="fa fa-envelope-o"></i> 再发一次</a></li>
                <li ng-show="listitem.isarrange==0&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)?true:false" role="separator" class="divider"></li>
                <li ng-show="listitem.isarrange==0&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)?true:false">
                <a href="javascript:;" cid="{{listitem.send_mail_id}}" success-clean><i class="fa fa-trash-o"></i> 整理设置</a></li>
                <li ng-show="listitem.isarrange==0&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)?true:false" class="divider"></li>
                <li ng-show="listitem.isarrange==1&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)&&listitem.isaddaddress==0?true:false"><a href="javascript:;" mid="{{listitem.send_mail_id}}" txtpath="{{listitem.txtaddresspath}}" membernum="{{listitem.membernum}}" saveaddress><i class="fa fa-users"></i> 加入地址库</a></li>
                <li ng-show="listitem.isarrange==1&&(listitem.isold==0 || listitem.isold==5 || listitem.isold==6)&&listitem.isaddaddress==0?true:false" role="separator" class="divider"></li>
                <li ng-show="listitem.isarrange==0?true:false"><a href="javascript:;" ng-click="exportmail(listitem.send_mail_id,2)"><i class="fa fa-download"></i> 导出地址 </a></li>
                <li ng-show="listitem.isarrange==1?true:false"><a href="javascript:;" ng-click="exportmail(listitem.send_mail_id,1)"><i class="fa fa-download"></i> 导出未读地址 </a></li>
                <li role="separator" class="divider"></li>
                <li><a href="javascript:;" ng-click="delemail(listitem.send_mail_id)"><i class="fa fa-trash-o"></i> 删除</a></li>
              </ul>
            </div>
            <!--button class="btn btn-warning btn-sm"><i class="fa fa-envelope-o"></i> 再次发送</button-->
          </td>
        </tr>
        </tbody>
      </table>
      <div style="line-height: 60px; text-align: center" ng-show="listitems.length==0">暂无数据</div>
    </div>
  </div>
  <!-- START 分页-->
  <div class="panel panel-default">
    <div>
      <!-- START row-->
      <div class="row">
        <div class="col-lg-7 col-lg-offset-5 col-sm-10 col-sm-offset-2">
          <pagination total-items="TotalItems" ng-model="CurrentPage" max-size="maxSize" boundary-links="true" rotate="false" num-pages="numPages" class="pagination-sm" ng-click="pageChanged()"></pagination>
        </div>
      </div>
      <!-- END row-->
    </div>
  </div>
  <!-- END 分页-->
</div>

<div id="dialog-successread" title="查看点读" style="display: none;">
  <button class="btn btn-info btn-xs"><i class="fa fa-download"></i> 导出点读</button>
  <table class="table table-hover">
    <thead>
    <tr>
      <th>邮件地址</th>
      <th>点读时间</th>
      <th>点读总数</th>
      <th>点读地区</th>
      <th>点读IP</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="lp in listtypes">
      <td>info@21gmail.com</td>
      <td>
        2015-10-29 11:11:11
      </td>
      <td>15</td>
      <td>广东深圳</td>
      <td width="120">
        125.96.43.122
      </td>
    </tr>

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

<div id="dialog-saveaddress" title="加入地址库" style="display: none;">
  <div class="panel-body lg-mail">
    <table class="table lg-table-border-bottom table-mtb-0">
      <tbody>
      <tr>
        <td>
          <div class="input-group">
            <select class="form-control" id="sendselect" style="width: 200px;">
              <option value="0">默认分组</option>
              <option ng-repeat="fentype in typeitems" value="{{fentype.folder_id}}">
                {{fentype.folder_name}}
              </option>
            </select> <button class="btn btn-info btn-mgl-10" sendaddtype><i class="fa fa-plus"></i></button>
          </div>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
</div>


<div id="dialog-successclean" title="整理地址" style="display: none;">
  <div class="panel-body lg-mail">
    <table class="table lg-table-border-bottom table-mtb-0">
      <tbody>
      <tr>
        <td><button class="btn btn-info" cleannow>立即整理</button></td>
      </tr>
      <tr>
        <td>发送3次后自动整理 <label datasinglecheck="0" class="lg-checkbox-n"></label></td>
      </tr>
      </tbody>
    </table>
  </div>
</div>

<div id="dialog-successcleantip" title="提示信息" style="display: none;">
  <div class="panel-body lg-mail">
    <p>
      整理后将自动删除 <span class="color-red">未点读、未回复、未退订</span> 的所有邮件地址<br>请确认是否启用整理?
    </p>
  </div>
</div>

<div id="dialog-successcleantiplast" title="询问" style="display: none;">
  <div class="panel-body lg-mail">
    <p>
      是否将点读地址立即加到地址库持续营销?
    </p>
  </div>
</div>

<div id="dialog-sendaddtype" title="添加分组" style="display: none">
  <div class="panel-body">
    <input type="text" class="form-control" id="sendaddrtypename" placeholder="分组名">
  </div>
</div>
<div id="dialog-senddelete" title="提示信息" style="display: none;">
    <div class="panel-body comfirm-delete">
    	<span>该记录删除后将无法恢复,请确认是否删除?</span>
    </div>
</div>
<div id="dialog-detailInfo" title="详细信息" style="display: none;overflow: hidden;">
    <div class="btn btn-group btn-group-xs">
        <button class="btn btn-info btn-xs btn-mgr-10 active" ng-click="checkinfo(1,$event)">阅读总数({{openNums.read_all}})</button>
        <button class="btn btn-info btn-xs btn-mgr-10" ng-click="checkinfo(2,$event)">阅读人数({{openNums.read_person}})</button>
        <button class="btn btn-info btn-xs btn-mgr-10" ng-click="checkinfo(3,$event)">退订人数({{openNums.unsub_person}})</button>
        <button class="btn btn-info btn-xs btn-mgr-10" ng-click="checkinfo(4,$event)">回复人数({{openNums.replay_person}})</button>
        <button class="btn btn-info btn-xs btn-mgr-10" ng-click="checkinfo(5,$event)">打开链接({{openNums.open_url}})</button>
        <button class="btn btn-info btn-xs btn-mgr-10" ng-click="checkinfo(6,$event)">链接总数({{openNums.open_url_all}})</button>
    </div>
    <!-- 阅读总数格式 -->
    <table class="table table-hover" ng-show="showtype == 1" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
    		 <th width="180px">邮件地址</th>
             <th width="100px">时间</th>
             <th width="135px">地区</th>
             <th width="110px">IP</th>
             <th width="120px">设备</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 140px;"
	             title="{{detaillist.yxy_reading_email}}">{{detaillist.yxy_reading_email}}</td>
	            <td width="100" title="{{detaillist.time}}">{{detaillist.date}}</td>
	            <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.address}}">
	             <span style="color: #337ab7;cursor:pointer;" ng-click="verifyip(1,detaillist.id,detaillist.ip,$index)">{{detaillist.address}}</span>
	             </td>
	            <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.ip}}">{{detaillist.ip}}</td>
	             <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.useragent}}">{{detaillist.useragent}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td></td>
		    	<td></td>
		    	<td>暂无数据</td>
		    	<td></td>
		    	<td></td>
	    	</tr>
    	</tbody>
    </table>
     <!-- 阅读人数格式 -->
    <table class="table table-hover" ng-show="showtype == 2" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
    		 <th width="550px">邮件地址</th>
             <th width="100px">阅读次数</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 350px;"
	             title="{{detaillist.yxy_reading_email}}">{{detaillist.yxy_reading_email}}</td>
	             <td>{{detaillist.read_num}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td style="text-align: center;padding-left: 60px;">暂无数据</td>
		    	<td></td>
	    	</tr>
    	</tbody>
    </table>
    <!-- 退订人数格式 -->
    <table class="table table-hover" ng-show="showtype == 3" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
             <th width="180px">邮件地址</th>
             <th width="100px">时间</th>
             <th width="135px">地区</th>
             <th width="110px">IP</th>
             <th width="120px">设备</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 140px;"
	             title="{{detaillist.unsubscribe_email}}">{{detaillist.unsubscribe_email}}</td>
	            <td width="100" title="{{detaillist.time}}">{{detaillist.date}}</td>
	            <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.address}}">
	             <span style="color: #337ab7;cursor:pointer;" ng-click="verifyip(2,detaillist.id,detaillist.ip,$index)">{{detaillist.address}}</span></td>
	            <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.ip}}">{{detaillist.ip}}</td>
	             <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100px;"
	             title="{{detaillist.useragent}}">{{detaillist.useragent}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td></td>
		    	<td></td>
		    	<td>暂无数据</td>
	             <td></td>
	             <td></td>
	    	</tr>
    	</tbody>
    </table>
    <!-- 回复人数格式 -->
    <table class="table table-hover" ng-show="showtype == 4" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
    		 <th width="250px">邮件地址</th>
             <th width="100px">时间</th>
             <th width="165px">地区</th>
             <th width="130px">IP</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td width="200" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 250px;"
	             title="{{detaillist.replyemail}}">{{detaillist.replyemail}}</td>
	            <td width="100" title="{{detaillist.time}}">{{detaillist.date}}</td>
	            <td width="160" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 150px;"
	             title="{{detaillist.address}}">
	             <span style="color: #337ab7;cursor:pointer;" ng-click="verifyip(3,detaillist.id,detaillist.ip,$index)">{{detaillist.address}}</span></td>
	            <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 120px;"
	             title="{{detaillist.ip}}">{{detaillist.ip}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td></td>
		    	<td>暂无数据</td>
	             <td></td>
	             <td></td>
	    	</tr>
    	</tbody>
    </table>
    <!--打开链接格式 -->
    <table class="table table-hover" ng-show="showtype == 5" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
    		 <th width="220px">邮件地址</th>
             <th width="340px">链接信息</th>
             <th width="80px">打开次数</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td width="220" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 220px;"
	             title="{{detaillist.email}}">{{detaillist.email}}</td>
	            <td width="250" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 250px;"
	             title="{{detaillist.link}}">
	             <a href="{{detaillist.link}}" target="_Blank" style="color:#337ab7;text-decoration:none;">{{detaillist.link}}</a>
	             </td>
	            <td>{{detaillist.open_num}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td></td>
		    	<td style="padding-left: 60px;">暂无数据</td>
	             <td></td>
	    	</tr>
    	</tbody>
    </table>
     <!--链接总数格式 -->
    <table class="table table-hover" ng-show="showtype == 6" style="display: inline-block;height: 300px;overflow-y: auto;">
    	<thead>
    		<tr>
    		 <th width="140px">邮件地址</th>
             <th width="160px">链接信息</th>
             <th width="100px">时间</th>
             <th width="100px">地区</th>
             <th width="80px">IP</th>
             <th width="90px">设备</th>
    		</tr>
    	</thead>
    	<tbody>
	    	<tr ng-repeat="detaillist in detailLists">
		    	<td width="140" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 140px;"
	             title="{{detaillist.link_email}}">{{detaillist.link_email}}</td>
	            <td width="160" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 160px;"
	             title="{{detaillist.link_url}}">
	             <a href="{{detaillist.link_url}}" target="_Blank" style="color:#337ab7;text-decoration:none;">{{detaillist.link_url}}</a>
	            </td>
	            <td width="100" title="{{detaillist.time}}">{{detaillist.date}}</td>
	             <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 90px;"
	             title="{{detaillist.address}}">
	             <span style="color: #337ab7;cursor:pointer;" ng-click="verifyip(4,detaillist.id,detaillist.ip,$index)">{{detaillist.address}}</span></td>
	             <td width="80" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 80px;"
	             title="{{detaillist.ip}}">{{detaillist.ip}}</td>
	             <td width="90" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 90px;"
	             title="{{detaillist.useragent}}">{{detaillist.useragent}}</td>
	    	</tr>
	    	<tr ng-show="detailLists.length==0">
		    	<td></td><td></td><td>暂无数据</td>
	             <td></td>
	             <td></td>
	             <td></td>
	    	</tr>
    	</tbody>
    </table>
   
</div>