<!--packageF/storeManagement/components/baseInfo_popup/stock_type_pop/stock_type_pop.wxml-->


<van-popup show="{{show}}" position="bottom" bind:click-overlay="showPopup" >
  <view class="wrapper">
    <view class="header">
      <van-nav-bar
        title="减库存方式"
        bind:click-left="onClickLeft"
      >
      <text slot="left" style="color:#838383;" bindtap="showPopup">取消</text>
      <text slot="right" style="color:#f15353;" bindtap="confirmType">确认</text>
      </van-nav-bar>
    </view>

    <view>
      <van-radio-group value="{{radio}}" style="text-align:left" bindchange="changeType">
          <van-cell-group>
            <van-cell clickable data-name="{{0}}" bind:click="onClick" border="{{false}}">
              <view slot="title">
                <view class="title">拍下减少库存</view>
                <view class="description">买家拍下商品即减少库存，存在恶拍风险</view>
              </view>
              <view slot="right-icon" style="display: flex;align-items: center;">
                <van-radio name="{{0}}" use-icon-slot>
                  <i class="iconfont icon-all_select_active {{radio==0 ? 'active' : ''}}"></i>
                </van-radio>
              </view>
            </van-cell>
            <van-cell clickable data-name="{{1}}" bind:click="onClick" border="{{false}}">
              <view slot="title">
                <view class="title">付款减库存</view>
                <view class="description">买家拍下并完成付款减少库存，存在超卖风险</view>
              </view>
              <view slot="right-icon" style="display: flex;align-items: center;">
                <van-radio name="{{1}}" use-icon-slot>
                  <i class="iconfont icon-all_select_active {{radio==1 ? 'active' : ''}}"></i>
                </van-radio>
              </view>
            </van-cell>
            <van-cell clickable data-name="{{2}}" bind:click="onClick" border="{{false}}">
              <view slot="title">
                <view class="title">永不减库存</view>
                <view class="description">无论拍下或付款成功，商品永远不会扣除库存数量</view>
              </view>
              <view slot="right-icon" style="display: flex;align-items: center;">
                <van-radio name="{{2}}" use-icon-slot>
                  <i class="iconfont icon-all_select_active {{radio==2 ? 'active' : ''}}"></i>
                </van-radio>
              </view>
            </van-cell>
          </van-cell-group>
        </van-radio-group>
    </view>



  </view>
</van-popup>