<view>
  <!-- <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: 200px;" />
        <view class="iconfont icon-qingchu1" wx:if="{{inputVal.length > 0}}" bindtap="clearInput"></view>
        <view class="search" bindtap="searchKey">搜索</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" catchtap="searchKey">搜索</view>
      </view>
      <label class="weui-search-bar__label" bindtap="showInput">
          <i class="weui-icon-search"></i>
          <span class="weui-search-bar__text">搜索工作</span>
      </label>
    </form>
  </view> -->
</view>
<!-- <view class="topMenu" wx:if="{{currIndex != 3}}">
  <view class="onMune {{currIndex == '0' ? 'active' : ''}}" data-id="0" bindtap="changeMenu">
    <view class="pr dib">
      全部
      <view class="menuBorder"></view>
    </view>
  </view>
  <view class="onMune {{currIndex == '1' ? 'active' : ''}}" data-id="1" bindtap="changeMenu">
    <view class="pr dib">
      待确认
      <view class="menuBorder"></view>
    </view>
  </view>
  <view class="onMune {{currIndex == '2' ? 'active' : ''}}" data-id="2" bindtap="changeMenu">
    <view class="pr dib">
      已确认
      <view class="menuBorder"></view>
    </view>
  </view>
</view> -->
<!-- top: -1000px; left: -1000px; -->
<canvas type="2d" style="position: absolute;left:-2000px; width: 425px; height: 350px; background: #fff;" id="canvasId"></canvas>
<scroll-view class="container {{currIndex == '1' ? 'total' : 'nottotal'}}" scroll-y enable-back-to-top="true" refresher-enabled bindrefresherrefresh="onScrollRefresh" refresher-triggered="{{isTrigger}}">
  <!-- bindscrolltolower="onScrollToLower"  -->
  <view class="" wx:if="{{recordList.length != 0}}"  hover-class="none" hover-stop-propagation="false">
    <view class="oelps c3 fw500 p16" style="">{{factoryBill.title || '-'}}</view>
    <!-- <view class="oelps c3 m010 br_8 display-flex" wx:if="{{isAgency}}" style="background:#f5f5f5;padding:10px 12px;justify-content:space-between">{{billInfo.agencyName || '-'}}
       <button open-type="share" class="m0" style="padding:0;font-weight:100;width:20px;background-color:#f5f5f5" bindtap="copyText">
        <i class="iconfont icon-zhuanfa1 f20" style="color: #333;font-size: 16px"></i>
      </button>
    </view> -->
  </view>

  <view class="totalPriceInfoContainer" wx:if="{{recordList.length != 0}}">
    <view class="totalPriceInfo">
      <!-- <button wx:if="{{currIndex == '1' || currIndex == '0'}}" open-type="share" class="sharebtn share" style="padding:0;font-weight:100" bindtap="copyText">
        <i class="iconfont icon-zhuanfa1 f20" style="color: #333;font-size: 16px"></i>
      </button> -->
      <view class="c6">
        税后金额（元）
        <view class="f28 ysd-base-f40 fw500">
          {{(factoryBill.totalSalaryStr)}}
          <text wx:if="{{!factoryBill.isInt}}">{{'.' + factoryBill.totalSalaryDot}}</text>
        </view>
      </view>
      <view class="fsa c6">
        <view class="taxPrecent">
          税点 (%)
          <view class="c3 f18 fw500">{{factoryBill.taxRate || '-'}}</view>
        </view>
        <view class="beforePrice c6">
          税前金额 (元)
          <view class="c3 f18 fw500">
            {{(factoryBill.totalServicePriceStr )}}
            <text wx:if="{{!factoryBill.isInt}}">{{'.' + factoryBill.totalServicePriceDot}}</text>
          </view>
        </view>
      </view>
      <!-- <view class="fsa f13 c6 footer">
      </view> -->
    </view>
  </view>
  <view class>
    <!-- 不是待确认时候显示的列表 -->
    <block wx:if="{{recordList != null && recordList.length > 0 && currIndex != 1}}">
      <view class="billList mt20" hover-class="none" hover-stop-propagation="false">
        <view class="display-flex bgf fsa " hover-class="hcb" style="{{idx == 0 ? 'border-top:1px solid #eee;' : ''}} 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.id}}" data-name="{{item.companyName}}" bindtap="goDetail">
          <view class>
            <view class="pb4 fw500" style>{{item.userName || '-'}}</view>
            <view class="f14 c6">{{item.workInfo + ' | ' + "服务费" + ((item.settlePrice == '' && item.settleUnit == '') ? '-' : ((item.settlePrice || '-') + (item.settleUnit || '-'))) }}</view>
            <!-- <view class="f14 c6">
              {{(item.finished || '-') + ' | ' + "服务费"}}
              <block wx:if="{{settlePrice == '' && settleUnit == ''}}">
                <text>-</text>
              </block>
              <block wx:else>
                <text>{{settlePrice ? settlePrice : '-'}}</text>
                <text>{{settleUnit ? settleUnit : '-'}}</text>
              </block>
            </view>-->
          </view>
          <view class="tar display-flex">
            <view class="vsb">
              <view class="f16 pb4 ysd-base-f40 fw500">
                {{(item.salaryDot)}}元
                <!-- <text wx:if="{{!item.isInt}}">{{ '.' + item.salaryDot}}</text> -->
              </view>
              <view class=" {{item.status == 20 ? 'cccc' : 'c3'}}">{{item.statusStr || '-'}}</view>
            </view>
            <icon class="iconfont icon-gengduo1 c9 ml4" type size="28" color></icon>
          </view>
        </view> 
       
      </view>
      <view wx:if="{{!hasMoreData && !isLoading}}" class="f12 c9 tc p20">
        暂无更多数据</view>
      <view wx:else class="f12 c9 tc p20">上滑加载更多</view>
    </block>
    <!-- 待核对时候显示的列表 -->
    <block wx:if="{{currIndex == 1}}">
      <view class="billList mt20" hover-class="none" hover-stop-propagation="false">
        <view class="display-flex bgf fsa " hover-class="hcb" style="{{idx == 0 ? 'border-top:1px solid #eee;' : ''}}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.id}}" data-name="{{item.companyName}}" bindtap="goDetail">
          <view class="fsa">
            <view class wx:if="{{item.status == 10}}">
              <radio-group bindchange="radioChange" class="fr radiogroup">
                <radio class="biggerSize2" value="{{item.id}}" data-id="{{item.id}}" catchtap="stopEvent" color="#1890ff" checked="{{item.checked}}" style="transform:scale(.8);margin-right:4px;"></radio>
              </radio-group>
            </view>
            <view class>
              <view class="pb4 fw500" style>{{item.userName || '-'}}</view>
              <view class="f14 c6 oelps" style='max-width:210px'>{{item.workInfo + ' | ' + "服务费" + ((item.settlePrice == '' && item.settleUnit == '') ? '-' : ((item.settlePrice || '-') + (item.settleUnit || '-')))}}</view>
            </view>
          </view>
          <view class="tar display-flex">
            <view class="vsb">
              <view class="f16 pb4 ysd-base-f40 fw500">
                {{item.salaryDot}}元
                <!-- <text wx:if="{{!item.isInt}}">{{'.' + item.salaryDot}}</text> -->
              </view>
              <view class=" {{item.status == 20 ? 'cccc' : 'c3'}}">{{item.statusStr || '-'}}</view>
            </view>
            <icon class="iconfont icon-gengduo1 c9 ml4" type size="28" color></icon>
          </view>
        </view> 
        <!-- 站位的盒子 -->
        <view class="" style='height:200px'  hover-class="none" hover-stop-propagation="false">
        </view>
      </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>
<!-- 待确认的整体选择区域 -->
<view class="footerBox bt1" wx:if="{{currIndex == 1}}">
  <view class="display-flex" style='line-height:24px'>
    <radio-group bindchange="radioChange" class="fr radiogroup">
      <radio class="biggerSize2" value="{{1}}" catchtap="totalChange" color="#1890ff" checked="{{isChecked}}" style="transform:scale(.8);margin-right:4px;"></radio>
    </radio-group>
    <view class selectable="false" space="false" decode="false">全选</view>
    <view class="ml24 f18" selectable="false" space="false" decode="false">
      合计：
      <text class="ysd-base-f40" selectable="false" space="false" decode="false" style="font-weight:601;font-size:18px;line-height:16px">{{selectTotalSalary + '元'}}</text>
    </view>
  </view>
  <view aria-role="button" class="weui-btn weui-btn_primary" bindtap="confirmBill">核对无误</view>
</view>
<view aria-role="dialog" aria-modal="true">
  <view class="weui-mask weui-transition {{dialog ? 'weui-transition_show' : ''}}" bindtap="closeDrawer" aria-role="button" aria-label="关闭"></view>
  <view class="weui-half-screen-dialog weui-half-screen-dialog_large weui-transition {{dialog ? 'weui-transition_show' : ''}}">
    <view class="weui-half-screen-dialog__hd por">
      <view class="weui-half-screen-dialog__hd__side" bindtap="closeDrawer">
        <view aria-role="button" class="weui-icon-btn">
          关闭
          <i class="weui-icon-close-thin"></i>
        </view>
      </view>
      <view class="weui-half-screen-dialog__hd__main">
        <strong class="weui-half-screen-dialog__title f18">{{billInfo.title}}</strong>
      </view>
    </view>
    <view class="weui-half-screen-dialog__bd">
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">姓名</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.userName || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">身份证</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.idCard || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">企业</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.storeName || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">报名时间</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.applyTimeStr || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">入职时间</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.entryTimeStr || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">离职时间</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.leaveTimeStr || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">是否达标</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.finished || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">出勤时间</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.workDays || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">利润单价</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.settlePrice || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">结算单位</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.settleUnit || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">服务费</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.servicePrice || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">税点</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.taxRate || '-'}}</view>
      </view>
         <view class="weui-cell" wx:for="{{currentDetail.customize}}" wx:for-item="item" wx:for-index="idx" wx:key="idx">
        <view class="weui-cell__hd">
          <label class="weui-label c6">{{item.title}}</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail[item.dataIndex] || '-'}}</view>
      </view>
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">应结费用</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.salary}}</view>
      </view>
   
      <view class="weui-cell">
        <view class="weui-cell__hd">
          <label class="weui-label c6">备注</label>
        </view>
        <view class="weui-cell__bd tr c3">{{currentDetail.remarks || '-'}}</view>
      </view>
    </view>
    <view class="weui-half-screen-dialog__ft bt1 pt12">
      <view class="weui-half-screen-dialog__btn-area" wx:if="{{currentDetail.status == 10}}">
        <view wx:if="{{currentDetail.status == 10}}" aria-role="button" class="normalBtn loginOut" bindtap="confirmBillDetail">核对无误</view>
        <view wx:else aria-role="button" class="normalBtn loginOut" style='background-color:#ccc'>该账单已核对</view>
      </view>
    </view>
  </view>
</view>
