<!--packageH/newRetail/newRetailInventory/newRetailInventory.wxml-->
<view id="newRetail-inventory">
  <van-sticky>
    <van-search value="{{ searchValue }}" bind:change="onSearchChange" placeholder="请输入商品名称" use-action-slot shape="round" bind:search="getGood">
      <view slot="action" bind:tap="getGood">搜索</view>
    </van-search>
  </van-sticky>
  <view class="group-box">
    <van-checkbox-group value="{{ selectGoods }}" bind:change="selectGoodsCheckbox">
      <van-checkbox name="{{idx}}" disabled="{{good.goods_stock < 1}}" checked-color="#f14e4e"
        wx:for="{{goodsList}}" wx:for-index="idx" wx:for-item="good">
        <view class="good-info">
          <image class="good-img" src="{{good.goods_thumb}}" alt="" />
          <view class="goods-main">
            <view class="good-title">{{ good.goods_title }}</view>
            <view class="goods-sku" wx:if="{{good.option_title}}">规格：{{ good.option_title }}</view>
            <view class="good-other" catchtap>
              <view class="good-num">库存：{{ good.goods_stock }}</view>
              <van-stepper bind:change="onChangeStepper" data-i="{{idx}}" wx:if="{{good.goods_stock > 0}}" max="{{good.goods_stock}}" value="{{good.goods_num}}" integer  button-size="22"
                />
            </view>
          </view>
        </view>
        <view class="Inventory_details-box" catchtap="gotoUrl" data-info="{{good}}">库存明细</view>
      </van-checkbox>
    </van-checkbox-group>
  </view>

  <view class="bottom-btn-box set-pc-style">
    <view class="btn" style="background-color: #ff9500;" catchtap="agentSalePopup">零售</view>
    <view class="btn" catchtap="freeSend">自主提货</view>
  </view>

  <van-popup show="{{ showPrice }}" position="bottom" bind:close="onClose" closeable custom-style="height: 65%">
    <view class="good-price-popup">
      <view class="h2">价格设置</view>
      <view class="good-list">
        <view class="good-list-child" wx:for="{{temArr}}" wx:for-index="i" wx:for-item="g">
          <view class="popup-goods-info">
            <image class="good-img" src="{{g.goods_thumb}}" alt="" />
            <view class="goods-main">
              <view class="good-title">{{ g.goods_title }}</view>
              <view class="goods-sku">x {{ g.goods_num }}</view>
              <input type="number" data-i="{{i}}" bindblur="blurPrice"  placeholder="请输入单价金额" />
            </view>
          </view>
          <view class="popup-del-good" catchtap="delSelectGood" data-i="{{i}}">
            <icon class="iconfont icon-ht_operation_delete"></icon>
          </view>
        </view>
      </view>
      <view class="btn" catchtap="confirmAgentSale">确定</view>
    </view>
  </van-popup>
</view>