<!--pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml-->

<view class="swiper-tab">
  <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">全部</view>
  <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">收藏夹</view>
</view>

<swiper current="{{currentTab}}" class="swiper-box" style='height:{{winHeight-50}}px' duration="300" bindchange="bindChange">
  <!-- 全部 -->
  <swiper-item class="swiper-items1">
    <view class='searchView'>
      <input class='imput_goodsName' bindinput='getGoodsNameBySearchString' type='text' placeholder='请输入存货名称' placeholder-style='color:rgb(202, 202, 202)'></input>
      <view class='storageView' catchtap='storegeBtnClick'>收藏</view>
    </view>
    <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="unCheckedScrollUpper" bindscrolltolower="unCheckedScrollLower">
      <view class='listBackGroundView'>
        <checkbox-group bindchange="checkboxValueChange">
          <block wx:for="{{goodsArray}}" wx:key="item" wx:for-index="idx">
            <template is="customerChoiceTemplate" data="{{item}}" />
          </block>
        </checkbox-group>
      </view>
    </scroll-view>
    <view class='addGoodsName' catchtap='addGoodsName'>添加存货明细</view>
  </swiper-item>

  <!-- 收藏夹 -->
  <swiper-item class="swiper-items2">
    <scroll-view scroll-x="false" scroll-y="true" class='storage-scroll-views' bindscrolltoupper="checkedScrollUpper" bindscrolltolower="CheckedScrollLower">
      <view class='listBackGroundView'>
        <checkbox-group bindchange="storageCheckboxValueChange">
          <block wx:for="{{collectionArray}}" wx:key="item" wx:for-index="idx">
            <template is="customerChoiceTemplate" data="{{item}}" />
          </block>
        </checkbox-group>
      </view>
    </scroll-view>
    <view class='addGoodsName' catchtap='storageAddGoodsNameArrayBack'>添加存货明细</view>
  </swiper-item>
</swiper>

<template name="customerChoiceTemplate">
  <view class='listItem'>
    <view class='itemClass'>{{item.Goods_Name}}</view>
    <checkbox value="{{item.SaleGoods_ID}}" />
  </view>
  <view class='horizontallineView'></view>
</template>