detail.vue 2.09 KB
Newer Older
张锡奇's avatar
张锡奇 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
<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(){
张锡奇's avatar
张锡奇 committed
78
        this.columns[1].field = this.$route.params.mode == 0 ? '应收' : '应付';
张锡奇's avatar
张锡奇 committed
79 80 81 82
        let result = await this.request('getCipLiabilities',{
            data:{},
            params:{
                iCustomerId:this.$route.params.iCustomerId,
张锡奇's avatar
张锡奇 committed
83 84
                sType:'Details',
                sCustomerType:this.$route.params.mode == 0 ? '客户' : '供应商'
张锡奇's avatar
张锡奇 committed
85 86 87 88 89 90 91
            }
        },'加载中',{iProjectId:this.iProjectId});
        this.list = result;
    }
  }
}
</script>