<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<loading wx:if="{{loading}}"></loading>

<van-sticky scroll-top="0">
  <!-- 查询条件 -->
  <dk-dropdown-menu model:value="{{searchForm}}" flgSearchText="{{false}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" >
  </dk-dropdown-menu>
</van-sticky>
<!-- 总的应收收款 -->
<view>
  <view class="detail-top" data-item="{{item}}">
    <image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
    <view class="detail-top-sup" style="display: flex;">
      <view style="width: 13%;">
        <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/order_billing_detail_01.png'}}"></image>
      </view>
      <view style="display: flex;">
        {{objInfo.supName?objInfo.supName  
                        :objInfo.cusName + "  " + objInfo.cusPhone}}
      </view>
    </view>
    <view style="display: flex; justify-content: space-around;color: #002340;font-weight: bold;">
      <view style=" padding-top: 15rpx;  ">
        {{objectType == 'cusId'?'应收余额':'应付余额'}}
      </view>
      <view style=" padding-top: 15rpx;font-size: 36rpx;  ">
        {{objectType == 'cusId'?wxmlUtil.toThousandCents(objInfo.receivableResidue):wxmlUtil.toThousandCents(objInfo.payableResidue)}}
      </view>
    </view>
    <view style="display: flex; justify-content: space-around;color: #002340;font-weight: bold;">
      <view style=" padding-top: 15rpx;  ">        
        {{objectType == 'cusId'?'预收余额':'预付余额'}}
      </view>
      <view style=" padding-top: 15rpx;font-size: 36rpx;  "> 
        {{objectType == 'cusId'?wxmlUtil.toThousandCents(objInfo.receiptResidue):wxmlUtil.toThousandCents(objInfo.paymentResidue)}}
      </view>
    </view>
  </view>
</view>

<!-- 列表数据 -->
<view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class">
  <view class="main-foot" style="border-radius: 15rpx;">
    <view class="table-content" data-item="{{item}}">
      <view style="padding:16rpx;">
        <view style="display:flex;justify-content: left;align-items: center;">
          <view style="width: 10%;">
            <van-checkbox checked-color="#E4002B" value="{{ item.checked }}" data-index="{{index}}" data-index_="{{index_}}" bind:change="onListItemChange"></van-checkbox>
          </view>
          <view style="width: 90%;font-size: 28rpx;color:#1B365D;padding: 20rpx;">
            <view style="margin-top: 20rpx;">单据单号： {{item.biznisNo}}</view>
            <view style="margin-top: 20rpx;">单据类型： {{item.biznisTypeName}}</view>
            <view style="margin-top: 20rpx;">单据金额： {{wxmlUtil.toThousandCents(item.amtShould)}}</view>
            <view style="margin-top: 20rpx;">未/已核销： {{wxmlUtil.toThousandCents(item.amtResidue)}}/{{wxmlUtil.toThousandCents(item.amtHandle)}}</view>
            <view style="margin-top: 20rpx;"> 账务日期： {{item.accDate}}</view>
          </view>

        </view>
      </view>

    </view>
  </view>
</view>


<!-- 暂无数据 -->
<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />

<view style="height: 200rpx;"></view>


<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="returnData"></dk-save-button>