DatePicker.wxml 1.74 KB
<!--components/DatePicker/DatePicker.wxml-->
<block wx:if="{{show}}">
  <view class="fixed-box fixed-date-box" catchtouchmove="noScroll">
    <view class="fixed-bg" bindtap="hide" data-name="showDate"></view>
    <view class="fixed-content">
      <view class="fixed-title text-center">预约时间</view>
      <view class="fixed-body">
        <picker-view class="picker" indicator-class="indicator" bindchange="changeDate" bindpickend="dateDone">
          <picker-view-column>
            <block wx:for="{{days}}" wx:key="index">
              <view class="view">{{item.name}}</view>
            </block>
          </picker-view-column>
        </picker-view>
        <picker-view class="picker" indicator-class="indicator" bindchange="changeTime" bindpickend="timeDone">
          <picker-view-column>
            <block wx:for="{{timeList}}" wx:key="index">
              <view class="view">
                {{item.inviteTime}}
                <block wx:if="{{item.disabled}}">
                  <view class="tips">不可约</view>
                </block>
                <block wx:else>
                  <block wx:if="{{item.maxNum == 0}}">
                    <view class="tips">不可约</view>
                  </block>
                  <block wx:else>
                    <view class="tips" wx:if="{{item.maxNum == item.inviteNum}}">约满</view>
                  </block>
                </block>
              </view>
            </block>
          </picker-view-column>
        </picker-view>
      </view>
      <view class="fixed-footer">
        <view class="fixed-cancel text-center" bindtap="hide" data-name="showDate">取消</view>
        <view class="fixed-confirm text-center" bindtap="confirm">确定</view>
      </view>
    </view>
  </view>
</block>