<wxs src="../../common.wxs" module="tools" />
<!-- <view class="navigatorBar" hover-class="none" style="padding-top:{{statusBarHeight + ((navigationBarHeight - menuButtonHeight) / 2)}}px;padding-bottom:8px" hover-stop-propagation="false">
  <view class="tabs_box fsa" hover-class="none" hover-stop-propagation="false">
    <view class="iconfont icon-xiangzuo poa fw500 f18" bindtap="goBack" style="top:{{statusBarHeight + ((navigationBarHeight - menuButtonHeight) / 2)}}px;left:12px;line-height:25px" hover-class="none" hover-stop-propagation="false"></view>
    <view class="tabs display-flex" style="text-align:center;margin-top:{{}}">
      <view class="tarbar {{toped == '-1'?'active':''}}" style bindtap="choosenTop" data-id="-1">
        <view class="tarbarText f16">全部</view>
      </view>
      <view class="tarbar ml6 {{toped == '1'?'active':''}}" style bindtap="choosenTop" data-id="1">
        <view class="tarbarText f16">属于我</view>
      </view>
      <view class="tarbar ml6 {{toped == '0'?'active':''}}" bindtap="choosenTop" data-id="0">
        <view class="tarbarText f16">服务过</view>
      </view>
    </view>
  </view>
</view> -->
<view bindtap="closeChoose">
  <view class="weui-search-bar weui-search-bar_focusing" id="searchBar" style="line-height: 1;background-color: #fff;">
    <form class="weui-search-bar__form flex-1">
      <view class="weui-search-bar__box" catchtap="goSearch" style="background-color: #f5f5f5;border-radius: 17px;">
        <i class="iconfont icon-sousuo11"></i>
        <!-- <input type="text" class="weui-search-bar__input" placeholder-style="color:#999;" placeholder="搜索姓名" value="{{inputVal}}" focus="{{inputShowed}}" bindinput="inputTyping" bindconfirm="searchKey" confirm-type="search" style="width: 140px;" />
        <view class="iconfont icon-qingchu1" wx:if="{{inputVal.length > 0}}" bindtap="clearInput"></view>-->
        <view class="weui-search-bar__input {{!chaShowed ? 'c9' : 'c3'}}" style="width: 160px;">{{inputVal}}</view>
        <view class="iconfont icon-qingchu1" wx:if="{{chaShowed}}" catchtap="clearInput"></view>
        <view class="search" bindtap="searchKey">搜索</view>
      </view>
    </form>
    <view class="ml10 f14 pr" catchtap="openChoose">
      <view style="width: 36px;height:36px;background: #f5f5f5;border-radius: 2px;text-align: center;line-height: 36px;color:#999;" hover-class="hcb">
        <i class="iconfont icon-shijian dib" style="font-size: 20px;" wx:if="{{chooseActive == 1}}"></i>
        <i class="iconfont icon-youjindaoyuan dib" wx:if="{{chooseActive == 2}}"></i>
        <i class="iconfont icon-youyuandaojin dib" wx:if="{{chooseActive == 3}}"></i>
      </view>
      <!-- <i class="iconfont icon-zhankai f12" wx:if="{{!isOpen}}"></i>
      <i class="iconfont icon-shouqi f12" wx:if="{{isOpen}}"></i>-->
      <view class="boxS" wx:if="{{isOpen}}">
        <view class="f15 {{chooseActive == 1 ? 'active':''}}" data-text="最近维护" data-id="1" bindtap="changeOpenMenu" style="border-bottom: 1px solid #eee;">
          <i class="iconfont icon-shijian"></i>
          最近维护
        </view>
        <view class="f15 {{chooseActive == 2 ? 'active':''}}" data-text="由近到远" data-id="2" bindtap="changeOpenMenu" style="border-bottom: 1px solid #eee;">
          <i class="iconfont icon-youjindaoyuan pr4"></i>
          由近到远
        </view>
        <view class="f15 {{chooseActive == 3 ? 'active':''}}" data-text="由远到近" data-id="3" bindtap="changeOpenMenu">
          <i class="iconfont icon-youyuandaojin pr4"></i>
          由远到近
        </view>
      </view>
    </view>
  </view>
  <view class="topMenu">
    <view class="onMune {{currIndex == '0' ? 'active' : ''}}" data-id="0" bindtap="changeMenu">
      <view class="pr dib">
        全部老乡
        <!-- <view class="top-circle"></view> -->
        <view class="menuBorder"></view>
      </view>
    </view>
    <view class="onMune {{currIndex == '40' ? 'active' : ''}}" data-id="40" bindtap="changeMenu">
      <view class="pr dib">
        当前在职
        <!-- <view class="top-circle"></view> -->
        <view class="menuBorder"></view>
      </view>
    </view>
    <!-- <view class="onMune {{currIndex == '48' ? 'active' : ''}}" data-id="48" bindtap="changeMenu">
      <view class="pr dib">
        准备离职
        <view class="menuBorder"></view>
      </view>
    </view> -->
    <view class="onMune {{currIndex == '50' ? 'active' : ''}}" data-id="50" bindtap="changeMenu">
      <view class="pr dib">
        最近离职
        <view class="menuBorder"></view>
      </view>
    </view>
  </view>
  <scroll-view class="container" scroll-y enable-back-to-top="true" refresher-enabled bindscrolltolower="onScrollToLower" bindrefresherrefresh="onScrollRefresh" refresher-triggered="{{isTrigger}}" style="height:calc(100vh - 105px)">
    <view>
      <!-- <view class="weui-search-bar mb10">
      <form class="weui-search-bar__form flex-1">
            <view class="weui-search-bar__box">
                <i class="iconfont icon-sousuo11"></i>
                <input type="text" class="weui-search-bar__input f15" placeholder-style="color:#999;" placeholder="搜索姓名、手机号"
                    value="{{inputVal}}" focus="{{inputShowed}}" bindinput="inputTyping" bindconfirm="searchKey" />
                <span class="iconfont icon-qingchu1 dib" wx:if="{{inputVal.length > 0}}" catchtap="clearInput"></span>
            </view>
        </form>
      </view>-->
      <block wx:if="{{recordList != null && recordList.length > 0}}">
        <!-- <view class="display-flex bgf" hover-class="hcb" style="border-bottom:1px solid #eee;padding:16px 12px;" wx:for="{{recordList}}" wx:for-item="item" wx:for-index="idx" data-id="{{item.id}}"> -->
        <!-- bindtap="goDetail" -->
        <view class="display-flex bgf" hover-class="hcb" style="border-bottom:1px solid #eee;padding:16px 12px;" wx:for="{{recordList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx" data-id="{{item.userId}}" bindtap="goDetail" data-binded="{{item.binded}}" wx:if="{{(currIndex == 2 && ((!searchKeyFlag && item.leaveDays <= 30) || searchKeyFlag)) || currIndex != 2 }}">
          <view class="v-center">
            <view class="v-center phoneOut pr" catchtap="makePhone" hover-stop-propagation wx:if="{{item.tel}}" hover-class="thover" data-phone="{{item.tel}}">
              <icon class="iconfont icon-shouji" style="font-size: 22px;color: #1890ff;"></icon>
            </view>
            <view class="v-center phoneOut pr" hover-stop-propagation wx:else style="background-color: #f5f5f5;">
              <icon class="iconfont icon-shouji" style="font-size: 22px;color: #999;"></icon>
            </view>
          </view>
          <view class="flex-1">
            <!-- <text class="c065" bindtap="makePhone" data-phone="{{item.tel}}">{{item.tel}}</text> -->
            <view class="f14 fsa">
              <view class="mr8 f16 fwb fss">
                <view class='oelps' style='max-width:200px' selectable="false" space="false" decode="false">{{item.userName == '' || item.userName == null ?'暂无姓名':item.userName }}/{{item.sex == 1?'男':'女'}}{{item.age ?'/'+item.age :''}}{{item.nation ?'/'+item.nation :''}}</view>
                <!-- <text class="my_townsman" wx:if="{{item.binded == 1}}" selectable="false" space="false" decode="false">我的</text> -->
              </view>
              <text class="c045 fr">{{tools.timeago(item.updateTime)}}</text>
            </view>
            <view class="display-flex">
              <view class="c065 f14 flex-1" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
                {{item.storeJobName == '' || item.storeJobName == null ? '-' :item.storeJobName }}
                <!-- <rich-text nodes="{{item.userServeRecordDespLatest == null ? '暂无记录' : item.userServeRecordDespLatest}}" class="c065 f14"></rich-text> -->
              </view>
              <view class="tr f14 c3" wx:if="{{item.status == 40}}">在职</view>
              <view class="tr f14 c3" wx:if="{{item.status == 50}}">离职</view>
              <view class="tr f14 c3" wx:if="{{item.status != 40 && item.status != 50}}">报名</view>
            </view>
          </view>
        </view>
        <view wx:if="{{!hasMoreData && !isLoading}}" class="f12 c9 tc p20">暂无更多数据</view>
        <view wx:else class="f12 c9 tc p20">上滑加载更多</view>
        <!-- <view wx:if="{{isLoading}}" class="f12 c9 tc p20">加载中...</view>
        <view wx:if="{{hasMoreData}}" bindtap="loadMoreData" class="loadMore" hover-class="hcb">点击加载更多</view>-->
      </block>
      <block wx:if="{{(recordList == null || recordList.length == 0) && !isLoading}}">
        <view style="margin-top:128rpx;">
          <view class="center">
            <icon class="t-icon cccc t-icon-zanwu" style="width:86px;height:86px;margin-bottom:20px;margin-top:30px"></icon>
            <view class="f16 cccc">暂无记录</view>
          </view>
        </view>
      </block>
    </view>
  </scroll-view>
  <scroll-view class="fadeIn" wx:if="{{phoneDialog}}" style="position: relative;z-index: 999;">
    <view class="weui-mask"></view>
    <view class="weui-dialog p020" style="box-sizing:border-box;">
      <view class="weui-dialog__hd">
        <strong class="weui-dialog__title">{{phone}}</strong>
      </view>
      <view class="display-flex pb20" style="padding-top:20px;">
        <view class="flex-1 lflex v-center" bindtap="close" hover-class="thover">取消</view>
        <view class="rflex">
          <button class type="primary" bindtap="makePhoneCall" hover-class="thover">呼叫</button>
        </view>
      </view>
    </view>
  </scroll-view>
</view>
