index.wxml 5.21 KB
<scroll-view scroll-y class="coupon-layout" refresher-enabled bindrefresherrefresh="refresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-triggered="{{refresherrefreshFlag}}">
  <view class="coupon-box">
    <block wx:if="{{couponFlag}}">
      <block wx:if="{{couponList.length}}">
        <swiper class="coupon-swiper" bindchange="couponChange">
          <block wx:for="{{couponList}}" wx:key="index">
            <swiper-item>
              <view class="coupon">
                <view class="coupon-info">
                  <view class="coupon-type">{{item.couponInfo.couponTypeName}}</view>
                  <view class="coupon-text">
                    <view class="coupon-title text-hide">{{item.couponName}}</view>
                    <view class="num text-hide">剩余<text class="val">{{item.num}}</text>张</view>
                  </view>
                  <view class="coupon-add {{item.num == 0 ? 'disabled':''}}" bindtap="jump" data-url="createCoupon" data-item="{{item}}">
                    <view class="coupon-add-btn">发放</view>
                  </view>
                </view>
                <view class="coupon-bottom">
                  <view class="coupon-time">
                    有效期:永久
                  </view>
                </view>
                <glsx-image src="store-assistant/boutiqueCoupon/coupon.png" class="coupon-bg"></glsx-image>
              </view>
            </swiper-item>
          </block>
        </swiper>
        <view class="dots" wx:if="{{couponList.length > 1}}">
          <block wx:for="{{couponList}}" wx:key="index">
            <view class="dot {{couponIndex == index ? 'active':''}}"></view>
          </block>
        </view>
      </block>
      <block wx:else>
        <view class="coupon-nothing">
          暂无礼券
        </view>
      </block>
    </block>
  </view>

  <view class="data-board-box">
      <view class="title">数据看板</view>
      <view class="order_box">
          <block wx:for="{{orderBoardData}}" wx:key="index">
              <view class="order_item">
                  <view class="order_title">{{item.title}}</view>
                  <view class="order_count">{{item.unit}}{{item.count}}</view>
                    <glsx-image class="icon" webp src="store-assistant/order/{{item.icon}}.png"></glsx-image>
              </view>
          </block>
      </view>
  </view>

  <view class="coupon-list">
    <view class="tab">
      <view class="item {{usedFlag == 'N'}}" bindtap="changeTab">
        待核销({{totalN}})
      </view>
      <view class="item {{usedFlag == 'Y'}}" data-type bindtap="changeTab">
        已核销({{totalY}})
      </view>
      <view class="tab-btn" bindtap="changeMyself">
        <view class="icon" hidden="{{myself}}"></view>
        <view class="icon {{!myself}}" hidden="{{!myself}}">
          <glsx-image class="img" src="store-assistant/boutiqueCoupon/checkbox.png"></glsx-image>
        </view>
        仅看自己
      </view>
    </view>
    <block wx:if="{{useCouponFlag}}">
      <block wx:if="{{useCouponList.length}}">
        <view class="list-box">
          <block wx:for="{{useCouponList}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
            <block wx:for="{{i}}" wx:key="index">
              <view class="item" bindtap="jump" data-url="couponDetail" data-item="{{item}}">
                <view class="item-top">
                  <view class="item-top-customer">
                    <view class="item-top-customer-icon sprite-icon icon-customer-icon">
                      <glsx-image src="store-assistant/boutiqueCoupon/customer-icon.png"></glsx-image>
                    </view>
                    <view class="item-top-customer-text text-hide">{{item.customerName}}</view>
                  </view>
                  <view class="item-top-time">{{item.time}}</view>
                </view>
                <view class="item-center">
                  <view class="item-center-title">
                    {{item.couponName}}
                  </view>
                  <view class="item-center-person {{usedFlag}}">
                    <view class="item-center-person-label">推荐人</view>
                    <view class="item-center-person-value text-hide">{{item.merchantName}}-{{item.employeeName}}</view>
                  </view>
                  <block wx:if="{{usedFlag == 'N'}}">
                    <view class="item-center-person">
                      <view class="item-center-person-label">预约状态/时间</view>
                      <view class="item-center-person-value {{item.appointmentStatus != 1?'have':'nothing'}}">{{item.appointmentTime}}</view>
                    </view>
                  </block>
                </view>
                <view wx:if="{{usedFlag === 'Y'}}" class="item-coupon-icon">
                  <glsx-image src="store-assistant/boutiqueCoupon/coupon-{{item.upgradeFlag === 'Y'?'sucess':'fail'}}.png"></glsx-image>
                </view>
              </view>
            </block>
          </block>
          <block wx:if="{{nothing}}">
            <view class="nothing-text">到底了~</view>
          </block>
        </view>
      </block>
      <block wx:else>
        <view class="nothing-text">暂无数据</view>
      </block>
    </block>
  </view>
</scroll-view>