<!--pages/finance/list_balance_ranking/list_balance_ranking.wxml-->
<view class="ns"  id="top_ban" style="height:{{isIPX?'88px':'64px'}};">
  <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image>
  <text style="top:{{isIPX?'54px':'30px'}};">余额表</text>
</view>
<view class="home_wrapper" style="margin-top:{{isIPX?'88px':'64px'}};">
      <view class="search_info">
        <view class="date_box" bind:tap="openPick">
          <image src="/image/icon/date_icon.png"></image>
          <p>{{date}}</p>
        </view>
        <van-popup show="{{showPickerTime}}" position="bottom"> 
          <van-datetime-picker
            value="{{currentDate}}"
            type="year-month"
            title="选择年月"
            min-date="{{minDate}}"
            max-date="{{maxDate}}"
            bind:confirm="onConfirm"
            bind:cancel="closePick"
          />
        </van-popup>
        <view class="search_block">
          <image src="/image/apply/fixedAssets_icon_1.png" mode="" class="icon"/>
          <view class="ipt" bind:tap="openPup" >{{subjectName==''?'请选择科目查询':subjectName}}</view>
          <image src="/image/apply/delete_icon_input.png" mode="" class="delete_icon" wx:if="{{subjectName}}" bind:tap="emptyInput"/>
        </view>
<!--      visible=true  <view class="total">共{{listLength}}个资产</view> @input="getSearch"-->
      </view>

      <view class="radio_box">
        <van-checkbox value="{{queryParams.showSubSubject}}" bind:change="showSub" checked-color="#2facfe">显示明细</van-checkbox>
        <view class="total">共{{listLength}}条</view>
      </view>

      <view class="balance-main">
<!--        <view class="main-title">-->
<!--          <view class="company">单位:{{ this.$store.getters.bookName }}</view>-->
<!--          <view class="nper">{{ accountingYear }}年{{ accountingMonth }}期</view>-->
<!--          <view class="amountOf">金额:元</view>-->
<!--        </view>-->
        <view class="main-center">
          <view class="datagrid">
            <view class="header">
              <view class="xmmc">科目</view>
              <view class="qj">期初余额</view>
              <view class="zy">本期发生</view>
              <view class="dfje">期末余额</view>
            </view>
            <view class="header header_sec">
              <view class="xmmc">编码</view>
              <view class="qj">名称</view>
              <view class="zy">本期发生</view>
              <view class="dfje">期末余额</view>
              <view class="xmmc">科目</view>
              <view class="qj">期初余额</view>
              <view class="zy">本期发生</view>
              <view class="dfje">期末余额</view>
            </view>
            <view class="mok_list">
              <ul class="list">
                <li class="header_sec" wx:for="{{applicationList}}" wx:key="id">
                  <view class="xmmc">{{ item.subjectId }}</view>
                  <view class="xmmc">{{item.subjectName}}</view>
                  <view class="qj">{{ item.qcjfye }}</view>
                  <view class="qj">{{item.qcdfye}}</view>
                  <view class="zy">{{item.bqjffs}}</view>
                  <view class="zy">{{item.bqdffs}}</view>
                  <view class="dfje">{{item.qmjffs}}</view>
                  <view class="dfje">{{item.qmdffs}}</view>
                </li>
              </ul>
            </view>
          </view>
        </view>
      </view>
      <!-- <SubjectTreeChooser :visible.sync="visible" @select="getSearch" v-model="queryParams.startSubjectId" :year="queryParams.startDate ? queryParams.startDate.substr(0, 4) : null" :can-select-non-leaf="true" height="480px"></SubjectTreeChooser> -->
      <van-popup show="{{popupVisible}}" root-portal position="bottom" close-on-click-overlay bind:after-enter="openTabs"  bind:close="onClose">
          <!-- <van-search
            v-model="searchValue"
            placeholder="按科目编码/名称筛选"
            @input="onSearch"
          /> -->
        <van-tabs wx:if="{{tabsVisible}}" animated sticky id="tabs" bind:change="onTabChanged">
          <van-tab title="{{item.subjectName}}" name="{{item.subjectId}}" wx:for="{{subjects}}" wx:key="index">
            <view style="height: 480px;">
              <childrenPage bind:cancel="changeTabItem" subjects="{{item.children}}"></childrenPage>
            </view>
          </van-tab>
        </van-tabs>
      </van-popup>
    </view>

    