<style lang="less" >
    @import url('../../../../styles/common.less');
    #LiabilitiesDetail{
        background: #f6f5f9;
        height:100%;
        display: flex;
        flex-direction: column;
        .Table{
            flex-grow: 1;
            height:1px;
            overflow: auto;
        }
    }
</style>

<template>
  <div id="LiabilitiesDetail">
      <div class="Table">
        <customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>  
      </div>
  </div>
</template>

<script>
import Util from '@/libs/util.js';
import {mapState} from 'vuex';
import customerTable from '@/components/Table'

export default {
  name: 'LiabilitiesDetail',
  data () {
    return {
        list:[],
        columns:[
          {
              width:'50%',
              name:'日期',
              align:'center',
              field:'dBillDate',
          },
          {
              width:'50%',
              name:'金额',
              align:'center',
              field:'应收',
          }
      ],
      tableStyle:{
          theadBgColor:'rgba(223,238,253,1)',
          complexTrBgColor:'white',
          singleTrBgColor:'#eef4fe',
          theadTdBorder:false,
          tbodyTdBorder:false,
          tbodyHeight:'calc(100vh)',
          tbodyTrBorderBottom:'1px solid #dbe9f8',
          width:'100%'
      },
    }
  },
  components:{
    customerTable
  },
  computed:{
    ...mapState({
      iProjectId:state => state.app.iProjectId,
    })
  },
  async mounted(){

  },
  async activated(){
    this.list = [];
    window.d = this;
    await this.getDetail();
  },
  methods:{
    async getDetail(){
        let result = await this.request('getCipLiabilities',{
            data:{},
            params:{
                iCustomerId:this.$route.params.iCustomerId,
                sType:'Details'
            }
        },'加载中',{iProjectId:this.iProjectId});
        this.list = result;
    }
  }
}
</script>