<!--pages/fuli/index.wxml-->
<wxs src="../tools.wxs" module="globalTools" />
<wxs src="./index.wxs" module="Tools" />
<!-- 顶部筛选 -->
<view class='head'>
  <view class='map' hover-class="none">
    <!-- <view class='location'>
      <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
    </view> -->
    <text class='cityname'>{{cityName}}</text>
    <image src='/images/happyjob/up.png'></image>
  </view>
  <view class='salay' bindtap='doSalay'>
    <text class="salayname">结算方式</text>
    <view class='arrow1'>
      <block wx:if="{{selectId == 0}}">
        <image src='/images/happyjob/down.png'></image>
      </block>
      <block wx:else>
        <image src='/images/happyjob/up.png'></image>
      </block>
    </view>
  </view>
</view>

<!-- 结算方式弹出框 -->
<block wx:if="{{selectId == 0}}">
  <view class='settlementMethod scrolled'>
    <block wx:for="{{settlementMethod}}" wx:key="index" wx:for-item="settle">
      <view class="settleme {{settleme==index?'active':''}}" bindtap='settlemethod' data-settle='{{settle.index}}' data-tt='{{index}}'>
        <text>{{settle.name}}</text>
      </view>
    </block>
  </view>
</block>

<!-- 列表 -->
<block wx:if="{{list.length !=0 }}">
  <view class='box-body'>
    <view class='box-item' wx:for="{{list}}" wx:key="hpPositionId" bindtap='toDetail' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="none">
      <!-- <view class='box-item-info'>
        <view class='one'>
          <view class='left'>
            {{item.positionName}}
          </view>
          <view class='salary'>
            {{item.salary}}
          </view>
        </view>
        <view class='two'>
          <view class='limit'>
            <view>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            </view>
            <text> {{globalTools.subStr(item.publishTime)}} ~ {{globalTools.subStr(item.endTime)}}</text>
          </view>
          <view class='time'>{{item.settlementMethod}}</view>
        </view>
        <view class='three'>
          <view class='area'>
            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
            <block wx:if="{{item.activityWide}}">
              <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class" style="margin-left:10rpx;">
                {{tag}}
              </i-tag>
            </block>
          </view>
          <view class='time'>
            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            <text>{{globalTools.subStr(item.updateDate)}}</text>
          </view>
        </view>
      </view> -->
      <view class='box-item-info'>
        <view class='one'>
          <view class='left'>
            {{item.positionName}}
          </view>
          <view class='salary'>
            {{item.salary}}
          </view>
        </view>
        <view class='two'>
          <view class='limit'>
            <!-- <view>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            </view> -->
            <!-- <text> {{globalTools.subStr(item.publishTime)}} ~ {{globalTools.subStr(item.endTime)}}</text> -->
            <text> {{Tools.formatDate(item.publishTime)}} 至 {{Tools.formatDate(item.endTime)}}</text>
          </view>
          <view class='time'>{{Tools.formatTime(item.updateDate)}}</view>
        </view>
        <view class="address">
          <text>{{item.hpPositionAddressList[0].adname}}</text>
        </view>
        <view class='two {{item.up?"down":""}}'>
          <view class='limit_1'>
            <block wx:if="{{item.settlementMethod}}">
              <i-tag i-class="tag-class">
                {{item.settlementMethod}}
              </i-tag>
            </block>
            <block wx:if="{{item.specialWelfare}}">
              <i-tag wx:for="{{globalTools.splitStr1(item.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                {{tag}}
              </i-tag>
            </block>
            <block wx:if="{{item.accommodation}}">
              <i-tag i-class="tag-class">
                {{item.accommodation}}
              </i-tag>
            </block>
            <block wx:if="{{item.socialSecurity}}">
              <i-tag i-class="tag-class">
                {{item.socialSecurity}}
              </i-tag>
            </block>
            <block wx:if="{{item.workDinner}}">
              <i-tag i-class="tag-class">
                {{item.workDinner}}
              </i-tag>
            </block>
            <block wx:if="{{item.regularBus}}">
              <i-tag i-class="tag-class">
                {{item.regularBus}}
              </i-tag>
            </block>
          </view>
          <view class="arrow {{item.up?'down':''}}" data-index='{{index}}' catchtap="doArrow" wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
            <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
            <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
          </view>
        </view>
        <view class='three'>
          <!-- <view class='area'>
            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
            <block wx:if="{{item.activityWide}}">
              <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
                {{tag}}
              </i-tag>
            </block>
          </view> -->
          <!-- <view class='time'>
            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            <text>{{globalTools.subStr(item.updateDate)}}</text>
          </view> -->
        </view>
      </view>
    </view>
  </view>
  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>
</block>
<block wx:else>
  <view class='no_data'>
    <image src="{{imgServerUrl}}/images/happyjob/no_data.png" class="white" />
    <view class='no_text'>暂时还没有福利工作 看看其他的吧</view>
  </view>
</block>