<!--components/fulltime/fulltime.wxml-->
<wxs src="../../pages/tools.wxs" module="globalTools" ></wxs>
<wxs src="./position.wxs" module="Tools" />
<view class='box-body'>
    <view class='box-item' style="margin-bottom:{{margin}}rpx" wx:for="{{list}}" wx:key="hpPositionId" bindtap='action' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="none">
      <view class='box-item-info'>
        <view class='one'>
          <view class='left'>
            <view wx:if='{{item.positionCategory === 3&&show_img}}' class="gaoxin">
              <image src="/images/happyjob/gaoxin.png" class="gaoxin-image"></image>
            </view>
            <view wx:if='{{item.positionCategory === 4&&show_img}}' class="pintuan">
              <image src="/images/happyjob/pingong.png" class="pintuan-image"></image>
            </view>
            <text>{{item.positionName}}</text>
          </view>
          <view class='salary'>
            <block wx:if='{{item.positionCategory === 5 || item.positionCategory === 1 || item.positionCategory === 9}}'>
            {{item.salary}}
            </block>
            <block wx:else>
              {{item.totalSalary?item.totalSalary:item.basicSalary}}
            </block>
          </view>
        </view>
        <view class='four'>
          <block wx:if="{{item.positionCategory === 1 || item.positionCategory === 9}}">
             <view class="parttime" wx:if='{{item.workDay}}'>
              <block wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="index" wx:for-item="tag">
                <block wx:if="{{index == 0}}">
                  {{globalTools.formatDate(tag)}} 至
                </block>
                <block wx:if="{{index == (globalTools.splitStr1(item.workDay,',').length-1)}}">
                  {{globalTools.formatDate(tag)}}
                </block>
              </block>
              <text class="parttime-text"> (共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
             </view>
             <view wx:else></view>
          </block>
          <block wx:elif="{{item.positionCategory === 5}}">
             <view class="parttime">
              <text> {{globalTools.formatDate(item.publishTime)}} 至 {{globalTools.formatDate(item.endTime)}}</text>
             </view>
          </block>
          <view class='commpany' wx:else>{{item.hpCompany.companyName}}</view>
          <view class='area'>
            <text class='area-name'><text>{{Tools.formatTime(item.createDate || item.updateDate)}}</text></text>
          </view>
        </view>
        <view class="address">
          <text wx:if='{{item.positionCategory === 5 || item.positionCategory === 1 || item.positionCategory === 9}}'>{{(item.isPublishNationwide || item.publishNationwide)?'全国':item.hpPositionAddressList[0].adname}}</text>
          <text wx:else>{{item.hpPositionAddressList.length?item.hpPositionAddressList[0].adname:'全国'}}</text>
        </view>
        <view class='three'>
          <block wx:if="{{item.positionCategory == 3 || item.positionCategory == 4}}">
            <view class='fan' wx:if="{{item.reward}}">
              <text>入职最高奖励 {{item.reward}}元</text>
              <text wx:if='{{item.platformAllowance}}'>，额外奖励{{item.platformAllowance}}元</text>
            </view>
            <view class='fan' wx:elif="{{item.platformAllowance}}">
              <text>入职最高奖励 {{item.platformAllowance}}元</text>
            </view>
            <view wx:else>
            </view>
          </block>
          <block wx:else>
            <view class='fan' wx:if="{{item.reward}}">
              <text>入职最高奖励 {{item.reward}}元</text>
            </view>
            <view wx:else>
            </view>
          </block>
        </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':''}}" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
            <image class="arrow-image" src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
            <image class="arrow-image" src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
          </view>
        </view>
        <view class='five' wx:if='{{item.positionCategory === 4}}'>
            <view class="pt-member">已有
              <text class="number">{{item.startGroupNumber}}</text> 位伙伴加入了该拼工
            </view>
            <!-- <view class="endtime">距离结束还有：{{globalTools.formateDay(item.groupEndTime)}}</view> -->
            <view class="endtime">
              <text>距离结束还有：</text>
              <i-count-down target='{{item.groupEndTime}}' number-calss='time' DIY='{{true}}' show-day='{{true}}' format='{{myFormat}}'/>
            </view>
          </view>
      </view>
    </view>
  </view>
  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>