<view class="flex b tb ac" wx:if="{{calendar}}">
  <view class="calendar b tb">
    <!-- 头部操作栏 -->
    <view wx:if="{{!calendarConfig.hideHeadOnWeekMode}}" class="handle {{calendarConfig.theme}}_handle-color fs28 b lr ac pc">
      <view class="prev fs36" wx:if="{{calendarConfig.showHandlerOnWeekMode || !calendarConfig.weekMode}}">
        <text class="prev-handle iconfont icon-doubleleft" bindtap="chooseDate" data-type="prev_year"></text>
        <text class="prev-handle iconfont icon-left" bindtap="chooseDate" data-type="prev_month"></text>
      </view>
      <view class="flex date-in-handle b lr cc" bindtap="doubleClickToToday">
        {{calendar.curYear || "--"}} 年 {{calendar.curMonth || "--"}} 月
      </view>
      <view class="next fs36" wx:if="{{calendarConfig.showHandlerOnWeekMode || !calendarConfig.weekMode}}">
        <text class="next-handle iconfont icon-right" bindtap="chooseDate" data-type="next_month"></text>
        <text class="next-handle iconfont icon-doubleright" bindtap="chooseDate" data-type="next_year"></text>
      </view>
    </view>

    <!-- 星期栏 -->
    <view class="weeks b lr ac {{calendarConfig.theme}}_week-color">
      <view class="week fs28" wx:for="{{calendar.weeksCh}}" wx:key="index" data-idx="{{index}}">
        {{item}}
      </view>
    </view>

    <!-- 日历面板主体 -->
    <view class="b lr wrap"
      bindtouchstart="calendarTouchstart"
      catchtouchmove="calendarTouchmove"
      catchtouchend="calendarTouchend">

      <!-- 上月日期格子 -->
      <view
        class="grid other-month b ac pc"
        wx:for="{{calendar.empytGrids}}"
        wx:key="index"
        data-idx="{{index}}">
        <view class="date-wrap b cc">
          <view class="date">
            {{item.day}}
          </view>
        </view>
      </view>

      <!-- 本月日期格子 -->
      <view
        wx:for="{{days}}"
        wx:key="index"
        data-idx="{{index}}"
        data-date="{{item}}"
        bindtap="tapDayItem"
        class="grid current-month{{item.lunar.isToday ? ' today' : ''}}{{item.choosed ? ' dim choosed' : ''}} b ac pc">
        <view class="date-wrap b cc {{(item.week === 0 || item.week === 6) ? calendarConfig.theme + '_weekend-color' : ''}}">
          <view class="date b ac pc">
            {{calendarConfig.markToday && item.lunar.isToday ? calendarConfig.markToday : item.day}}
          </view>
           <!-- 小圆点，根据状态显示不同颜色 -->
            <view class="dot dot-{{item.type}}"></view>
        </view>
      </view>

      <!-- 下月日期格子 -->
      <view
        class="grid other-month b ac pc"
        wx:for="{{calendar.lastEmptyGrids}}"
        wx:key="index"
        data-idx="{{index}}">
        <view class="date-wrap b cc">
          <view class="date">
            {{item.day}}  
          </view>
        </view>
      </view>
      

<view style="width:100%;margin-top: 36rpx;">
 <t-divider />
  <view class="calendar-footer" wx:if="{{!isFutureDate}}">
  <view class="status-box" wx:for="{{noClockIn}}" wx:if="{{!isFutureDate}}">
    <view class="status-row" >
      <text class="status-label unpunch">未打卡：</text>
      <text class="status-content unpunch">{{item.conditioningProgramName}}</text>
    </view>
     <button class="patch-btn" bindtap="onPatchCard" data-id="{{item.id}}" >补卡</button>
    </view>

    <view class="status-row" wx:for="{{clockIn}}" wx:if="{{!isFutureDate}}">
      <text class="status-label punch">已打卡：</text>
      <text class="status-content punch">{{item.conditioningProgramName}}</text>
    </view>
  </view>
</view>




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