<view class="coupon_management">
  <view class="section release-goods">
    <view class="release-a">
      <icon class="iconfont icon-block" style="color:#f15353;" color="#f15353" size="48rpx"></icon>
    </view>
    <text class="span">优惠券数量：{{coupon_length}}</text>
    <view class="release-b" wx:if="{{is_publish}}">
      <!-- CommodityCouponEdit{id:'abc'} -->
      <view data-id="abc" catchtap="goToCouponEdit">发布优惠券</view>
    </view>
  </view>
  <!-- <mt-loadmore :top-method="loadTop" ref="coupon_loadmore" id="olis" > -->
  <view class="coupon_list" wx:if="{{!isShowNoTest}}">
    <view class="coupon_box" wx:for="{{coupon}}" wx:key="index">
      <view class="coupon_left">
        <view class="left_item" wx:if="{{item.coupon_method===1}}">
          <view class="left_a type_a p">{{item.deduct}}</view>
          <view class="left_b p" style="text-align:center;">满{{item.enough}}立减</view>
        </view>
        <view class="left_item left_type" wx:if="{{item.coupon_method===2}}">
          <view class="left_a p">
            {{item.discount}}
            <text class="span">折</text>
          </view>
          <view class="left_b p" style="text-align:center;">满{{item.enough}}立享</view>
        </view>
      </view>
      <view class="coupon_right">
        <view class="right_info ul">
          <view class="info_a li">{{item.name}}</view>
          <view class="info_b li">已使用：{{item.usetotal}}</view>
          <view class="info_c li">
            <text class="span">已发出：{{item.gettotal}}</text>
            <text class="span">剩余数量：{{item.lasttotal}}</text>
            <icon class="iconfont icon-more" data-index="{{index}}" catchtap="moreEvent"></icon>
          </view>
        </view>
      </view>
      <view class="more" wx:if="{{item.edit_active}}">
        <view class="ul">
          <view class="li" data-id="{{item.id}}" catchtap="Toedit">
            <icon class="iconfont icon-edit" custom color="#fff" size="36rpx"></icon>
            <text class="span">编辑</text>
          </view>
          <view class="li" data-index="{{index}}" catchtap="commodityDelete">
            <icon class="iconfont icon-delete" custom color="#fff" size="36rpx"></icon>
            <text class="span">删除</text>
          </view>
          <view class="li" data-id="{{item.id}}" catchtap="provide">
            <icon class="iconfont icon-grant" custom color="#fff" size="36rpx"></icon>
            <text class="span">发放</text>
          </view>
        </view>
        <view class="icon">
          <icon class="iconfont icon-down" custom size="1.5rem"></icon>
        </view>
      </view>
    </view>
  </view>
  <!-- </mt-loadmore> -->
  <view wx:if="{{isShowNoTest}}" class="isShowNoTest h2">暂无数据</view>
  <van-popup show="{{ show }}" position="center" overlay bind:click-overlay="onCloseShow" custom-style="width:636rpx;height:256rpx;background-color:#fafafa;">
    <view style="text-align: left;padding: 15px 20px 5px;">
      <view style="    font-weight: 400;color: #444;word-break: break-all;font-size:15px;">提示</view>
    </view>
    <view style="    text-align: left;padding: 0 20px;font-size: 14px;color: #888;line-height: 20px;word-break: break-all;">
      此操作将永久删除该优惠券, 是否继续?
    </view>
    <view style="position: relative; line-height: 40px; margin-top: 14px;display: flex;">
      <button style="position: relative;padding: 0 2px;color: #353535;" catchtap="confimCancel">
        取消
      </button>
      <button style="position: relative; padding: 0 2px;color: #0bb20c;" catchtap="confimCanfim">
        确认
      </button>
    </view>
  </van-popup>
</view>
<shopfoot></shopfoot>