<!-- c:\Users\Holy-Knight-IX\Desktop\Working Space\4.TikTok-MiniPro\ttb\pages\appointDetail\appointDetail.ttml -->
<view>
    <view class="card">
        <view class="item">券码：{{ detail.couponOrderId }}</view>
        <view class="item">商品名称：{{ detail.couponTitle }}</view>
        <view class="item">店铺名称：{{ detail.reservationMerchantName }}</view>
        <view class="item">服务预约时间：{{ detail.appointTime }}<span
                tt:if="{{ detail.status == 0 || detail.status == 5 || detail.status == '-1' }}" class="edit"
                bindtap="setDate">修改</span></view>
        <view class="item">服务预约地址：<text class="lineHeight">{{ detail.userAddress }}</text></view>
        <view class="item">服务详细地址：<text class="lineHeight">{{ detail.detailedAddress }}</text><span
                tt:if="{{ detail.status == 0 || detail.status == 5 || detail.status == '-1' }}" class="edit"
                bindtap="setAddress">修改</span></view>
        <view class="item">用户手机号码：{{ detail.userPhone }}</view>
        <view class="item">备注：{{ detail.describeStr }}</view>
    </view>

    <view tt:if="{{ isSetTime }}">
        <view class="datePickerFlex">
            <picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}"
                bindchange='chooseDate'>选择服务日期：</picker>
            <picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}"
                bindchange='chooseDate' class="address">
                {{ pickedDate }}</picker>
        </view>

        <view class="datePickerFlex">
            <picker mode="time" disabled="{{ !isShowBtns }}" bindchange='chooseTime'>预计上门时间：</picker>
            <picker mode="time" disabled="{{ !isShowBtns }}" bindchange='chooseStartTime' class="address">{{
                pickedStartTime
                }}</picker>
            -
            <picker mode="time" start="{{ pickedStartTime }}" disabled="{{ !isShowBtns }}" bindchange='chooseEndTime'
                class="address">{{ pickedEndTime }}
            </picker>
        </view>
    </view>

    <view tt:if="{{ isSetAddress }}">
        <textarea class="detailedAddress" placeholder="请输入服务详细地址" bindinput="settingAddress"
            value="{{ detail.detailedAddress }}"></textarea>
    </view>

    <view class="{{ (isSetTime || isSetAddress) ? 'btns' : 'btns active' }}">
        <block tt:if="{{ detail.status != 8 }}">
            <button tt:if="{{ isSetTime }}" class="confirm" bindtap="confirmDate">确定预约时间</button>

            <button tt:if="{{ isSetAddress }}" class="confirm" bindtap="confirmAddress">确定详细地址</button>

            <button tt:if="{{ detail.status == 0 }}" class="confirm" bindtap="confirm">确认预约</button>

            <button tt:if="{{ detail.status == 5 }}" class="confirm" bindtap="cancel">取消确认</button>
        </block>
    </view>
</view>