<!-- packageH/project_verification/WriteOffRecord/WriteOffRecord.wxml -->
<panel wx:if="{{ pageType!=='used'&&statistics }}">
  <view class="record-statistisc">
    <view class="record-statistisc-item">
      <view class="record-statistisc_counts">{{ statistics.today_count }}</view>
      <view class="record-statistisc_name">今天核销次数</view>
    </view>
    <block wx:if="{{ pageType==='store' }}">
      <navigator class="record-statistisc-item" hover-class="none" url="/packageB/member/Integral_love_cash/Integral_love_cash">
        <view class="record-statistisc_counts">￥{{ statistics.today_income }}</view>
        <view class="record-statistisc_name">今日累计收入</view>
      </navigator>
    </block>
    <view class="record-statistisc-item">
      <view class="record-statistisc_counts">{{ statistics.total_count }}</view>
      <view class="record-statistisc_name">核销总次数</view>
    </view>
    <block wx:if="{{ pageType==='store' }}">
      <navigator class="record-statistisc-item" hover-class="none" url="/packageB/member/Integral_love_cash/Integral_love_cash">
        <view class="record-statistisc_counts">￥{{ statistics.total_income }}</view>
        <view class="record-statistisc_name">累计总收入</view>
      </navigator>
    </block>
  </view>
</panel>
<panel>
  <view class="search-record" hover-class="none" hover-stop-propagation="false">
    <form>
      <view class="search-record-form {{ pageType==='staff'?'search-record-form_full':'' }}">
        <input type="text" placeholder="请输入{{ projectNameLang }}名称" bind:input="inputElChanged" data-name="projectName" value="{{ projectName }}" />
        <input type="text" placeholder="请输入商户名称" wx:if="{{ pageType==='used' }}" bind:input="inputElChanged" data-name="storeName" />
        <input type="text" placeholder="核销员昵称/名字" wx:if="{{ pageType==='store' }}" bind:input="inputElChanged" data-name="staffName" />
        <operation-button block size="mini" bind:tap="searchProjects">搜索</operation-button>
        <view class="select_use_type" bindtap="onSelectType">{{select_use_type_arr[select_use_type_index]}}  <van-icon name="arrow-down" ></van-icon></view>
      </view>
    </form>
    <view class="record-range" hover-class="none" hover-stop-propagation="false">
      <text selectable="false" space="false" decode="false">选择时间区间</text>
      <view class="racord-range_date" hover-class="none" hover-stop-propagation="false">
        <picker mode="date" value="{{ timeRange.start }}" bindchange="dateRangeChanged" data-type="start">
          {{ timeRange.start||'起始时间' }}
        </picker>
        至
        <picker mode="date" value="{{ timeRange.end }}" bindchange="dateRangeChanged" data-type="end">
          {{ timeRange.end||'结束时间' }}
        </picker>
        <text class="iconfont {{ timeRange.start&&timeRange.end?'icon-guanbi':'icon-advertise-next' }}" selectable="false" space="false" decode="false" bind:tap="cleanTime"></text>
      </view>
    </view>
  </view>
</panel>
<block wx:for="{{ projects }}" wx:for-item="projectPage" wx:key="index">
  <block wx:for="{{ projectPage }}" wx:for-item="projectItem" wx:key="id">
    <panel>
      <view class="record-header">
        <view selectable="false" space="false" decode="false">{{ projectItem.created_at }}</view>
        <view selectable="false" space="false" decode="false" wx:if="{{ projectItem.store_name}}">{{ projectItem.store_name }}</view>
      </view>
      <project-lr data="{{ projectItem }}" showTimes />
    </panel>
  </block>
</block>
<van-empty class="project-empty" wx:if="{{ projectCount===0 }}" image="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" description="暂无记录~" />
<shortcut-menu />
<!-- <van-calendar id="calendar" show="{{ displayRecordTimeRangeSelect }}" type="range" color="#ce811d" min-date="{{ calendarMinDate }}" max-date="{{ calendarMaxDate }}" bind:confirm="calendarConfirmSelect" bind:close="displayCaleandar" default-date="{{ [ timeRange.start,timeRange.end ] }}" /> -->
