all-appointment.wxml 3.2 KB
<!--pages/my/all-appointment/all-appointment.wxml-->
<view class="content {{orderList.length === 0?'change-content':''}}">
    <!--tab-->
    <view class="tab-box">
        <view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}"
              class="{{currentTab == index?'change-color':''}}">{{item}}
        </view>
    </view>

    <!--暂无订单-->
    <view class="no-data-box" wx:if="{{orderList.length === 0}}">
        <text>暂无订单</text>
    </view>

    <!--预约列表-->
    <view class="list-box">
        <view class="order-box" bindtap="goDetail" wx:for="{{orderList}}" wx:key="index" data-index="{{index}}">

            <view class="head">
                <text class="number">预约单号:{{item.reservation_sn}}</text>
                <text class="appointment-state" wx:if="{{item.status === 1}}" style="color: #FC5B63;">待确认</text>
                <text class="appointment-state" wx:if="{{item.status === 2}}">已预约</text>
                <text class="appointment-state" wx:if="{{item.status === 3}}" style="color: #464646;">已取消</text>
                <text class="appointment-state" wx:if="{{item.status === 4}}" style="color: #C3C3C3;">已结束</text>
            </view>

            <view class="section">
                <image src="../../../images/red_line.png" wx:if="{{item.status === 1}}" class="blue-line"></image>
                <image src="../../../images/blue_line.png" wx:if="{{item.status === 2}}" class="blue-line"></image>
                <image src="../../../images/deep_grey_line.png" wx:if="{{item.status === 3}}"
                       class="blue-line"></image>
                <image src="../../../images/grey_line.png" wx:if="{{item.status === 4}}" class="blue-line"></image>

                <view class="right-box">
                    <view class="right-top-box">
                        <view class="iconfont icon-dingwei"></view>
                        <view class="address">{{item.address}}</view>
                    </view>

                    <view class="right-bottom-box">
                        <view class="iconfont icon-shangwutubiao"></view>
                        <view class="date-box">
                            <view class="date">预约日期:{{item.time}}</view>
                            <!--<form bindsubmit="clickCancel" bindreset="formReset" report-submit="true">-->
                                <view class="not_confirm" wx:if="{{item.status === 1}}">
                                    <view class="go-cancel" data-index="{{index}}" bindtap="clickCancel">取消</view>
                                    <view class="go-confirm" data-index="{{index}}" bindtap="clickConfirm">去确认</view>
                                </view>
                            <!--</form>-->
                            <view class="cancel" wx:if="{{item.status === 2}}">取消</view>
                            <view class="iconfont icon-quxiao" wx:if="{{item.status === 3}}"></view>
                            <view class="iconfont icon-jieshu" wx:if="{{item.status === 4}}"></view>
                        </view>
                    </view>
                </view>
            </view>


        </view>
    </view>
</view>