<view>
    <view class="input">
        <input type="number" placeholder="手机号查询" bindinput="handleInput" value="{{Phone}}" />
        <button type="default" size="default" bindtap="getList">
            搜索
        </button>
    </view>

    <view class="nav">
        <view class="{{ currentID == 1 ? 'currentItem' : 'item' }}" bindtap="setNav" data-id="1">
            <text>类型</text>
            <image mode="widthFix" src="../../assets/images/arrow.png"></image>
        </view>
        <view class="{{ currentID == 2 ? 'currentItem' : 'item' }}" bindtap="setNav" data-id="2">
            <text>日期</text>
            <image mode="widthFix" src="../../assets/images/arrow.png">
            </image>
        </view>
    </view>

    <view class="{{ currentID == 1 ? 'type active' : 'type' }}">
        <view class="item" bindtap="setType" data-type="X">全部</view>
        <view class="item" bindtap="setType" data-type="Y">待确认</view>
        <view class="item" bindtap="setType" data-type="-1">未预约</view>
        <view class="item" bindtap="setType" data-type="5">已确认</view>
        <view class="item" bindtap="setType" data-type="8">已完成</view>
    </view>

    <view tt:if="{{ currentID == 2 }}" class="pickedTime">
        <picker class="picker" mode="date" bindchange="setStartTime">{{ startTime }}</picker> 至 <picker class="picker"
            mode="date" bindchange="setEndTime">{{ endTime }}</picker>
        <button class="search" type="primary" bindtap="search">查询</button>
    </view>

    <view class="{{ currentID != 1 ? 'list active' : 'list' }}">
        <view tt:if="{{ list.length > 0 }}" class="item" tt:for="{{ list }}">
            <view class="head">
                <view>券码：{{ item.couponOrderId }}</view>
                <view tt:if="{{ item.status == 0 }}" class="notice noAppoint">待确认</view>
                <view tt:if="{{ item.status == 1 }}" class="notice noAppoint">已取消</view>
                <view tt:if="{{ item.status == 3 }}" class="notice refund">已退款</view>
                <view tt:if="{{ item.status == 5 }}" class="notice confirm">已确认</view>
                <view tt:if="{{ item.status == '-1' }}" class="notice confirm">未预约</view>
                <view tt:if="{{ item.status == 8 }}" class="notice complete">已完成</view>
                <view tt:if="{{ item.status == 9 }}" class="notice complete">已评价</view>
            </view>
            <view class="body">
                <view class="items">商品名称：{{ item.couponTitle }}</view>
                <view class="items">店铺名称：{{ item.reservationMerchantName }}</view>
                <view class="items">用户手机号码：{{ item.userPhone }}</view>
                <view class="items">服务预约时间：<text tt:if="{{ item.appointTime == '暂无' }}">暂无</text></view>
                <view tt:if="{{ item.appointTime != '暂无' }}" class="items">{{ item.appointTime }}</view>
            </view>
            <view class="footer">
                <button type="primary" bindtap="goDetail" data-id="{{ item.id }}">详情</button>
                <button tt:if="{{item.status==-1||item.status==0||item.status==5||item.status==7}}" type="primary"
                    bindtap="goVerification" data-id="{{ item.id }}"
                    data-shop="{{ item.reservationMerchantName }}">核销</button>
            </view>
        </view>
        <view tt:if="{{ list.length == 0 }}" class="itemXX">
            暂无记录
        </view>
    </view>
</view>