<!-- 前台导入wxmlUtil.wxs -->
<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
<van-sticky scroll-top="0">
  <!-- 查询条件 -->
  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['accountName'])}}">
  </dk-dropdown-menu>
</van-sticky>
 
<!-- 暂无数据 -->
<van-empty wx:if="{{tableData.length<=0}}" description="暂无数据" />

<!-- 列表区 -->
<view wx:for="{{tableData}}" wx:for-item="item" wx:for-index="index" data-item="{{item}}"   wx:key="index" class="main-class">
  <view class="main-foot-2" style="position: relative;">
    <view class="corner-view" style="padding:20rpx">
      <view style="display: flex;">
        <view class="corner-view-text font" style="width: 70%;font-size: 15px;">{{item.macName}}</view>
        
        <view style="width: 20%;margin-right: 5vw;display: flex;  color: #CAA977;"> 
            <view class="sign-class">¥</view>
            <view>{{wxmlUtil.toThousandCents(item.balance ? item.balance : 0)}}</view>
          </view>
        <view wx:if="{{item.children}}" style="width: 10%;text-align: right;" data-index="{{index}}" data-item="{{item}}" catch:tap="collapseAndExpand">

          <van-icon wx:if="{{ !item.checked }}" color="#bdb7b7" name="arrow-down" />
          <van-icon wx:else color="#bdb7b7" name="arrow" /> 
        </view>
      </view>
    </view>

    <view style="background-color: white;">
    <view  wx:if="{{!item.checked}}" wx:for="{{item.children}}"wx:for-item="item_"  data-item="{{item_}}" catchtap="toDetail" > 
      <view   wx:for-index="index_" wx:key="index_" style="display: flex;padding:10rpx"> 
        <view style="display: flex; font-size: 13px;width: 100%;margin:2vw">
          <view style="flex: 1;">{{item_.macName}}</view>
          <view style="margin-right: 5vw;display: flex;  color: #CAA977;"> 
            <view class="sign-class">¥</view>
            <view>{{wxmlUtil.toThousandCents(item_.balance ? item_.balance : 0)}}</view>
          </view>
        </view>  
      </view>  
      </view>
    </view>
  </view>
</view>
<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}</van-divider>
<view style="height: 200rpx;"></view>


<!--  保存 -->
<view class="bottom-class">
  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="toAdd" type="default">新建
  </van-button>
</view>

<!-- 新建按钮 -->
<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="open" bind:change = "cke_change"></dk-save-button>
 