<!-- 前台导入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;justify-content: space-between;">
        <view class="corner-view-text font" style="font-size: 15px;">{{item.macName}}</view>

        <view style="display: flex;">
          <!-- <view class="sign-class">¥</view>
          <view>{{wxmlUtil.toThousandCents(item.balance ? item.balance : 0)}}</view> -->
          <dk-cell contentRight="{{true}}" amount="true" left="0" contentFontSize="15" height="40rpx" contentColor="#FF7B1A" contentFontWeight="bold" content="{{item.balance ? item.balance : 0}}"></dk-cell>
          <view wx:if="{{item.children}}" style="width: 10%;text-align: right;margin-left: 10rpx;" 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>

    <view style="background-color: white;">
      <view wx:if="{{!item.checked}}" wx:for="{{item.children}}" wx:for-item="item_">
        <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}" data-index="{{index}}" data-item="{{item_}}" async-close bind:close="onCloseSwipe">
          <view data-item="{{item_}}" catchtap="toDetail" wx:for-index="index_" wx:key="index_" style="display: flex;padding:10rpx">
            <view style="display: flex; font-size: 13px;width: 100%;margin:2vw;justify-content: space-between;">
          <view style="display: flex;"> 
            <view wx:if="{{item_.flgNegative}}" style="margin-right:20rpx;width: 39rpx;height: 39rpx;text-align: center;">
                  <van-image round width="100%" height="100%" fit="fill" src="{{imageUrl + 'negative.png'}}" />
                </view>
              <view>{{item_.macName}}</view>
          </view>
              <view style="margin-right:5rpx;display: flex; ">
                <!-- <view class="sign-class">¥</view>
            <view>{{wxmlUtil.toThousandCents(item_.balance ? item_.balance : 0)}}</view> -->
                <dk-cell contentRight="{{true}}" amount="true" left="0" contentFontSize="15" height="40rpx" contentColor="#FF7B1A" contentFontWeight="bold" content="{{item_.balance ? item_.balance : 0}}"></dk-cell>
              </view>
            </view>
          </view>
          <view slot="right" class="van-swipe-cell__right">{{item_['flgValid'] ? $t['disable']: $t['enable']}}</view>
        </van-swipe-cell>

      </view>
    </view>
  </view>
</view>
<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}</van-divider>
<view style="height: 200rpx;"></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>