<!--packageC/o2o/store_add_goods/store_add_goods.wxml-->
<view class="goods-manage">
  <view class="search">
    <view class="left">
      <view class="searchBox">
        <van-field value="{{ keyword }}" placeholder="请输入内容" border="{{ false }}" bind:inp="inpbtn" clearable
                   bind:clear="inpbtnclear"/>
        <view class="img-icon" catchtap='search'>
          <view class="img-icon-btn"></view>
        </view>
      </view>
    </view>
    <view class="right" catchtap="classifyBolbtn">
      <view>
        <icon class="iconfont icon-yjy_index_screening"></icon>
      </view>
    </view>
  </view>

  <view class="goods-list" style="margin: 80rpx 0;">
    <van-checkbox-group value="{{ result }}" bind:change="onChange">
      <view class="goods-list" wx:for="{{commodity_data}}" wx:key="index">
        <van-checkbox checked-color="#f15353" shape="round" wx:key="{{item}}" name="{{item.id}}">
          <view style="display: flex">
            <view class="goods-a">
              <image wx:if="{{store ==='store'}}" src="{{item.thumb}}" mode='widthFix'/>
              <image wx:if="{{store ==='supplier'}}" src="{{item.change_thumb}}" mode='widthFix'/>
            </view>
            <view class="ul goods-b">
              <view class="title-box">
                <view class="li name">
                  {{item.title}}
                </view>
              </view>
              <view class="status-box">
                <view class="li price">
                  <text class="span">{{language['money']}}</text>
                  {{item.price}}
                </view>
                <view class="li status {{item.status===1?'red':'gray'}}" wx:if="{{store==='store'}}">
                  状态:{{item.status === 1 ?'上架':'下架'}}
                </view>
              </view>
            </view>
          </view>

        </van-checkbox>
      </view>
    </van-checkbox-group>
  </view>

  <view class="bottom-btn">
    <view class="red-btn" catchtap="toShowPopup2">导入</view>
  </view>

  <van-popup show="{{ showPopup }}" position="right" custom-style="height: 100%;" close-on-click-overlay="true" bind:close="onClose">
    <view class="search-box">
      <view class="search-title"> 商品状态 </view>
      <view class="choose-box">
        <view class="choose-item {{status==='' ?'red':' '}}" data-status="" catchtap="chooseStatus">全部</view>
        <view class="choose-item {{status==='1' ?'red':' '}}" data-status="1" catchtap="chooseStatus">上架</view>
        <view class="choose-item {{status==='0' ?'red':' '}}" data-status="0" catchtap="chooseStatus">下架</view>
      </view>
    </view>
    <view class="search-box">
      <view class="search-title"> 价格区间 </view>
      <view class="input-box">
        <input class="input-item" type="digit" value="{{min_price}}" placeholder="0.00" bindinput="onSmallInput" />
        <view >
          <icon class="iconfont icon-life-game-sign"></icon>
        </view>
        <input class="input-item" type="digit" value="{{BigInputs}}" placeholder="0.00" bindinput="onInput" />
      </view>
    </view>
    <view class="btn-box">
      <view class="cancel" catchtap="onClose">取消</view>
      <view class="sure" catchtap="search">确认</view>
    </view>
  </van-popup>

  <van-popup show="{{ showPopup2 }}" position="bottom" custom-style="height: 50%;" close-on-click-overlay="true" bind:close="onClose2">
    <block wx:if="{{columns.length>0}}">
      <van-picker show-toolbar
                  title="请选择导入商品分类"
                  bind:cancel="onClose2" confirm-button-text="导入" value-key="name"
                  bind:confirm="onConfirm" columns="{{ columns }}" bind:change="onChange1" />
    </block >
    <block wx:if="{{columns.length<=0}}">
      <view class="noClass">暂无分类</view>
    </block>
  </van-popup>
</view>

