<!--packageF/storeManagement/components/discount/discount.wxml-->


<view class="discount-type">
  <view class="discount-type-item">
    <view class="title">折扣类型：</view>
    <view class="desc">
      <van-checkbox use-icon-slot value="{{level_discount_type}}" data-name="level_discount_type"
        >
        <i class="iconfont icon-all_select_active {{level_discount_type ? 'active' : ''}}"></i>
        <text style="font-size: 24rpx;color: #4a4a4a;">会员等级</text>
      </van-checkbox>
    </view>
  </view>
  <view class="discount-type-item">
    <view class="title">折扣方式：</view>
    <view class="desc">
      <van-radio-group value="{{discount_method}}" data-name="discount_method" bindchange="changeType">
        <view class="desc-wrapper">
          <view class="desc-item">
            <van-radio use-icon-slot name="{{1}}" custom-class="van-radio">
              <i class="iconfont icon-all_select_active {{discount_method==1 ? 'active' : ''}}"></i>
              <text style="font-size: 24rpx;color: #4a4a4a;">折扣</text>
            </van-radio>
          </view>
          <view class="desc-item">
            <van-radio use-icon-slot name="{{2}}">
              <i class="iconfont icon-all_select_active {{discount_method==2 ? 'active' : ''}}"></i>
              <text style="font-size: 24rpx;color: #4a4a4a;">固定金额</text>
            </van-radio>
          </view>
          <view class="desc-item">
            <van-radio use-icon-slot name="{{3}}">
              <i class="iconfont icon-all_select_active {{discount_method==3 ? 'active' : ''}}"></i>
              <text style="font-size: 24rpx;color: #4a4a4a;">成本比例</text>
            </van-radio>
          </view>
        </view>
      </van-radio-group>
    </view>
  </view>
</view>

<view style="height: 20rpx;"></view>

<van-field title-width="240rpx" wx:for="{{levelList}}" type="number" data-index="{{index}}" value="{{item.discount_value}}" bindinput="changeText" placeholder="请输入等级折扣">
  <view class="title" slot="label">{{item.level_name}}</view>
</van-field>