<!--pages/welfareMall/writeOff/writeOff.wxml-->
<view class="search">
  <view class="store-bar flex-row">
    <picker class="picker-store" bindchange="bindPickerChange" value="{{index}}" range="{{storeList}}" range-key="{{'storeName'}}">
      <view class="flex-row">
        <view class="store-text">{{storeList[index].storeName}}</view>
        <view class="store-text" style="display: none;">{{storeList[index].storeNo}}</view>
        <image class="store-img" src="../../../images/welfareMall/open.png" />
      </view>
    </picker>
  </view>
  <view class="writeOff-search flex-column">
    <view class="search-bar flex-row">
      <image class="search-img" src="../../../images/welfareMall/search.png" />
      <view class="search-text flex-row">
        <picker mode="date" value="{{startDate}}" bindchange="bindStartDateChange" start="2022-01-01">
          <view class="search-date flex-row">
            <view class="picker" wx:if="{{startDate == null || startDate == ''}}">分账时间起期</view>
            <view class="picker" wx:else>{{startDate}}</view>
          </view>
        </picker>
        至
        <picker mode="date" value="{{endDate}}" bindchange="bindEndDateChange" start="2022-01-01">
          <view class="search-date flex-row">
            <view class="picker" wx:if="{{endDate == null || endDate == ''}}">分账时间止期</view>
            <view class="picker" wx:else>{{endDate}}</view>
          </view>
        </picker>
      </view>
      <view class="search-text-close" catchtap="toCloseDet" wx:if="{{(startDate != null && startDate != '') || (endDate != null && endDate != '')}}">⊗</view>
    </view>
  </view>
</view>
<view class="writeOff-content" wx:for="{{hexiaoList}}" wx:key="index" data-ordersn="{{item.orderSn}}">
  <view class="writeOff-list flex-column">
    <view class="content-head flex-row">
      <view class="flex-row">
        <view class="content-head-date">订单号 {{item.orderSn}}</view>
        <view class="content-head-copy" data-ordersn="{{item.orderSn}}" catchtap="toCopy">复制</view>
      </view>
      <view class="content-head-state">{{item.statusText}}</view>
    </view>
    <view class="content-line line-top"></view>
    <view class="content-middle flex-row">
      <view class="middle-it flex-row">
        <!-- <image class="middle-img" src="{{item.fullCoverImage}}" mode="aspectFit" /> -->
        <image class="middle-img" wx:if="{{item.couponType == 'C'}}" src="https://dy.shpr.top/welfareGo/writeOff-cash-substitute.png" mode="aspectFit" />
        <image class="middle-img" wx:if="{{item.couponType == 'D'}}" src="https://dy.shpr.top/welfareGo/writeOff-discount.png" mode="aspectFit" />
        <view class="middle-text over-ellipsis">{{item.couponTitle}}</view>
      </view>
      <!-- <view class="middle-num flex-column">
        <view class="middle-num-money">￥13.14</view>
        <view class="money-num-count">x1</view>
      </view> -->
    </view>
    <view class="content-line line-lower"></view>
    <view class="content-lower-store flex-row">
      <view class="lower-date">核销门店 {{item.storeNo}}</view>
      <view class="lower-money">￥{{item.formatPayedPrice?item.formatPayedPrice:'0'}}</view>
    </view>
    <view class="content-lower-date flex-row">
      <view class="lower-date">核销时间 {{item.usedTime?item.usedTime: ''}}</view>
    </view>
  </view>
</view>
<view class="no_record flex-column" wx:if="{{noResult}}">
  <view class="no_record_text">暂无数据</view>
</view>
<view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>