<page-container hasHeight="true">
  <view a:if="{{loading}}" class="page-loading-container">
    <e-loading />
  </view>
  <view a:else class="place-order-container">
    <view class="place-order-content">
      <view class="row-card">
        <view class="scenic-spot-title">
          {{ticketInfo.scenicName}}
        </view>
        <select-date
          onTapDate="onTapDate"
          onChange="onDateChange"
          selectedDate="{{selectedDate}}"
          threeDayList="{{ threeDayList }}"
          disableDays="{{ disableDates }}"
          calendarTags="{{ calendarTags }}"
          onOpenCalendar="onOpenCalendar"
          selectedIndex="{{ selectedDateIndex }}"
        />
        <select-time
          totalStock="{{maxBuyNum}}"
          times="{{timeInterval}}"
          onChange="onTimeIntervalChange"
          a:if="{{selectedDateIndex > -1}}"
          selectedIndex="{{timeIntervalIndex}}"
        />
        <view class="line-top-box">
          <item-row title={{ticketInfo.productName}} flex="true">
            <text class="price-num" a:if="{{singlePrice > 0 && ticketNum > 0}}">
              ￥{{(singlePrice * ticketNum).toFixed(2)}}
            </text>
          </item-row>
          <view class="range-container">
            <view class="label-left">
<!--              <view class="labels">-->
<!--                随时可退 无需取票 平均1分钟出票-->
<!--              </view>-->
              <buy-information
                onGetPurchaseInfo="getPurchaseInfo"
              >
                <view class="tag-color">
                  购买须知 <am-icon type="right" size="10" />
                </view>
              </buy-information>
            </view>
            <adc-stepper
              async
              height="44rpx"
              inpWidth="60rpx"
              btnWidth="44rpx"
              borderColor="#e5e5e5"
              activeColor="#1677FF"
              disableInput="{{true}}"
              onCountHandle="onCountHandle"
              disabled="{{!maxBuyNum}}"
              max="{{maxBuyNum >= 0 ? ('' + maxBuyNum): 99999999999}}"
              value="{{ticketNum <= 0 ? ('' + ticketNum): ticketNum}}"
            />
          </view>
        </view>
      </view>
      <view class="row-card">
        <item-row title="游客信息" flex="true" flexStart="true">
          <view class="add-info-msg">
            已添加<text class="red-color"> {{touristList.length}} </text>位游客信息
          </view>
        </item-row>
        <view class="line-top-box tourist-info">
          <tourist-list onChange="onTouristChange" title="{{ticketInfo.productName}}" />
        </view>
      </view>
      <view class="page-footer">
        <view class="total-price">
          总额:
          <text class="price-num">
            ￥{{ (ticketNum > 0 && singlePrice > 0) ? (singlePrice * ticketNum).toFixed(2) : 0}}
          </text>
        </view>
        <view onTap="onSubmit" data-value="{{ticketNum <=0}}" class="pay-button{{ticketNum <=0 ? ' disabled': ''}}">立即支付</view>
      </view>
    </view>
  </view>
</page-container>
