<!-- 顶部信息 -->
<van-sticky scroll-top="0">
  <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="输入要素名称/备注"> </van-search>
</van-sticky>



<!-- 内容列表 -->
<view style="width: 100%;">
  <view wx:for="{{tableData}}" wx:key="index" class="main-class">
    <van-swipe-cell right-width="{{ 65 }}">
      <view data-index="{{index}}" class="main-foot" style="border-radius:15rpx;">
        <view class="table-content">
          <view class="table-content-row">
            <view style="display: flex;">
              <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
                <van-icon name="{{item.arrow_1 ? 'arrow-down':'arrow'}}" color="#1B365D" />
              </view>


              <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{index}}">
                {{item.name}}
              </view>


              <view style="width: 10%;text-align: right;" bind:tap="toChecked">
                <van-checkbox value="{{item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
              </view>

            </view>

          </view>

          <view class="table-row" wx:if="{{item.arrow_1}}">
            <view wx:for="{{item.arrow_1_list}}" wx:for-index="arrow_1_index" wx:for-item="arrow_1_item" class="table-content-row" style="width:100%;margin-left: 20rpx;">
              <view style="display: flex;">
                <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
                  <van-icon name="{{arrow_1_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
                </view>
                <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_1_index}}">
                  {{arrow_1_item.name}}
                </view>
                <view style="width: 10%;text-align: right;" bind:tap="toChecked">
                  <van-checkbox value="{{arrow_1_item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
                </view>
              </view>

              <view class="table-row" style="width: 100%;" wx:if="{{arrow_1_item.arrow_2}}">
                <view wx:for="{{arrow_1_item.arrow_2_list}}" wx:for-index="arrow_2_index" wx:for-item="arrow_2_item" class="table-content-row" style="width:100%;padding-left:10px;padding-right: 2rpx;">
                  <view style="display: flex;">
                    <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
                      <van-icon name="{{arrow_2_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
                    </view>
                    <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_2_index}}">
                      {{arrow_2_item.name}}
                    </view>
                    <view style="width: 10%;text-align: right;" bind:tap="toChecked">
                      <van-checkbox value="{{arrow_2_item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
                    </view>
                  </view>
                </view>
              </view>
            </view>
          </view>



        </view>
      </view>
      <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>
    </van-swipe-cell>

  </view>
  <!-- 保留高度 -->
  <view style="height: 220rpx;"></view>
</view>


<!-- 弹窗 新建-->
<van-popup show="{{showPopup}}" position="bottom" bind:close="onClosePopup" custom-class="function-pop-class">

  <view style="background-color:#F8F9FD;color:#1B365D;font-size: 17px;font-weight: 600;display: flex;justify-content: left;align-items: center;padding: 40rpx;">
    <view>商品种类</view>
  </view>

  <van-field input-width="200rpx" disabled="{{true}}" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ 'ZL00001' }}" input-align="right" label="种类编码" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  </van-field>



  <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '浴室柜' }}" input-align="right" label="种类名称" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  </van-field>

  <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="product-types" maxlength="25" type="text" value="{{ showPopupItem.name }}" label="父级" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
  </van-field>


  <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}">
  </van-field>


  <view style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
    <view style="width:48%">
      <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="onClosePopup" type="default">取消
      </van-button>
    </view>
    <view style="width: 4%;"></view>
    <view style="width:48%;">
      <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">保存
      </van-button>
    </view>
  </view>
</van-popup>


<!-- 底部加号 -->
<!-- <view style="position: fixed;bottom: 230rpx;right: 30rpx;">
  <view bind:tap="toAdd" style="background: #CAA977;border-radius: 50%;display: flex;justify-content: center;align-items: center;padding:20rpx;box-shadow: 0px 17px 22px 0px #1B365D33;">
    <van-icon name="plus" color="#FFFFFF" size="60rpx" />
  </view>
</view> -->






<!-- 底部信息 -->
<dk-save-bottom flagTypeName="product-file-add-select" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />