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



<van-popup show="{{isShowPopup}}" 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="{{dispatchData.dispatch_type}}" style="text-align:left" checked-color="#f15353"
        bindchange="changeType">
        <van-cell-group>
          <van-cell clickable data-name="{{1}}" bind:click="onClick" border="{{false}}">
            <view slot="title">
              <view class="title">统一邮费</view>
            </view>
            <view slot="right-icon">
              <van-radio name="{{1}}" use-icon-slot>
                <i class="iconfont icon-all_select_active {{dispatchData.dispatch_type==1 ? 'active' : ''}}"></i>
              </van-radio>
            </view>
          </van-cell>
          <view class="postage-input" wx:if="{{dispatchData.dispatch_type == 1}}">
            <input type="digit" placeholder="0.00" model:value="{{dispatchData.dispatch_price}}" bindinput="changeText" />
            <text>元</text>
          </view>
          <van-cell clickable data-name="{{0}}" bind:click="onClick" border="{{false}}">
            <view slot="title">
              <view class="title">选择运费模板</view>
            </view>
            <view slot="right-icon">
              <van-radio name="{{0}}" use-icon-slot>
                <i class="iconfont icon-all_select_active {{dispatchData.dispatch_type==0 ? 'active' : ''}}"></i>
              </van-radio>
            </view>
          </van-cell>
          <view bindtap="checkDisTemplate">
            <van-cell border="{{false}}" wx:if="{{dispatchData.dispatch_type == 0}}" title="{{templateName}}" is-link></van-cell>
          </view>

        </van-cell-group>
      </van-radio-group>
    </view>


  </view>
</van-popup>


<van-popup show="{{showTemplate}}" round position="bottom">
  <van-picker title="运费设置" show-toolbar columns="{{templates}}" default-index="{{defautlIndex}}" value-key="dispatch_name" bindconfirm="confirmTemplate"
    bindcancel="cancelTemplate"></van-picker>
</van-popup>