quotaInfo.vue 4.2 KB
<template>
  <a-spin :spinning="confirmLoading">
    
    <a-card title="额度节点信息"
        :bordered="false">
        <a-card :bordered="false">
          <a-row>
            <a-col :span="8">客户名称: {{this.idCardName}}</a-col>
            <a-col :span="8">手机号: {{this.mobilePhoneView}}</a-col>
          </a-row>
        </a-card>
      <a-table ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSourceQuota"
        :pagination="false"
        :loading="loading"
        style="padding-top:20px;">
      </a-table>
    </a-card>
  </a-spin>
</template>
<script>
import { creditAmountDetail } from '@/api/configApi'
import { creditAmountDetailUseCredit } from '@/api/insys'
import { axios } from '@/utils/requestLocal'

export default {
  name: 'personApprovalRecord',
  props: {
    userType: {//用户类型 1 个人 2 企业 3企业法人
      type: Number,
      default: null,
    },
    strategyType: {//用户类型 1 进件 2 用信
      type: Number,
      default: null,
    },
    uniqueNo: {//查询编号
      type: String,
      default: null,
    }
  },
  data () {
    return {
      confirmLoading: false,
      current: 3,
      loading:false,
      qrUrl:'',
      columns: [
       {
          title: '层级',
           width: '150px',
          align: 'center',
          
          dataIndex: 'creditLevel'
        },
        {
          title: '额度名称',
          align: 'center',
          width: 100,
          dataIndex: 'creditAmountName'
        },
        {
          title: '授信冻结金额(元)',
          align: 'center',
          dataIndex: 'creditFrozen'
        },
        {
          title: '已用额度(元)',
          align: 'center',
          dataIndex: 'creditAmountUsed'
        },
        {
          title: '可用额度(元)',
          align: 'center',
          dataIndex: 'activitiSync',
          customRender: function(t, r, index) {
            return Number(r.creditAmount) - Number(r.creditAmountUsed) - Number(r.creditAmountFloat)
          }
        },
        {
          title: '在途额度(元)',
          align: 'center',
          dataIndex: 'creditAmountFloat'
        },
        {
          title: '生效日期',
          align: 'center',
          scopedSlots: { customRender: 'zhanbi' },
          dataIndex: 'creditStartDate'
        },
        {
          title: '失效日期',
          align: 'center',
          scopedSlots: { customRender: 'zhanbi' },
          dataIndex: 'creditEndDate'
        },
        {
          title: '状态',
          align: 'center',
          width: 100,
          dataIndex: 'creditStatus',
          customRender: function(t, r, index) {
            switch (t) {
              case 1:
                return '正常'
                break
              case 2:
                return '过期'
                break
              case 3:
                return '锁定'
                break
            }
          }
        }
      ],
      dataSourceQuota:[],
      idCardName:'',
      mobilePhoneView:''
    }
  },
  mounted(){
    console.log(this.dataSource)
  },
  methods: {
    loadData(){
      let that = this
      that.dataSourceQuota = []
      if(!this.uniqueNo){
        this.$message.warning('uniqueNo is not null')
      }
      let p = {},promiseFn;
      if(this.strategyType == 1){
        p["customerType"] = this.userType,
        p['id']= this.uniqueNo
        promiseFn = creditAmountDetail(p)
      }else{
        p["customerType"] = this.userType,
        p['customerNo']= this.uniqueNo
        promiseFn = creditAmountDetailUseCredit(p)
      }
      promiseFn.then(res => {
        if (res.status.statusCode == 0) {
          that.dataSourceQuota.push(res.result.creditAmountTree)
          that.idCardName = res.result.idCardName
          that.mobilePhoneView = res.result.mobilePhoneView
          if(that.userType == '2'){
            that.idCardName = res.result.enterpriseName
          }
        } else {
          this.$message.warning(res.status.statusReason)
        }
      })
    },
    // 自定义附件信息查看
    handleAttachmentLook (record) {
      window.open(record.approvalUploadFileUrl)
    },
  }
}
</script>
<style>
</style>