peixh 4 роки тому
батько
коміт
0ce81f2a5f
2 змінених файлів з 157 додано та 16 видалено
  1. 36 0
      front-vue/src/api/service/report/credit.js
  2. 121 16
      front-vue/src/views/home.vue

+ 36 - 0
front-vue/src/api/service/report/credit.js

@@ -124,4 +124,40 @@ export function financeRecordMonth(query) {
     method: 'get',
     params: query
   })
+}
+
+// 查询核心企业总授信额度
+export function listCreditLineAll(query) {
+  return request({
+    url: '/sc-service/report/credit/listCreditLineAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询核心企业总授信额度
+export function listCreditAll(query) {
+  return request({
+    url: '/sc-service/report/credit/listCreditAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询核心企业已融资金额
+export function listHasRaised(query) {
+  return request({
+    url: '/sc-service/report/credit/listHasRaised',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询核心企业已放款金额
+export function listRepayment(query) {
+  return request({
+    url: '/sc-service/report/credit/listRepayment',
+    method: 'get',
+    params: query
+  })
 }

+ 121 - 16
front-vue/src/views/home.vue

@@ -259,27 +259,64 @@
         
         <!-- 核心企业 -->
         <div v-if="company.scyType == '01'" class="zap-margin">
+            <el-button v-for="(item,index) in hxDateTypeList" :key="index" @click="changeHxDateType(item.value)">{{item.label}}</el-button>
             <el-row :gutter="20">
                 <!-- 第一行 -->
                 <el-col :xs="24" :sm="12" :md="8" :lg="8">
-                    <div class="zap-card" @click="toCredit()">
-                        <div class="zap-card__title">我开立的融信</div>
-                        <div class="zap-card__wrap zap-card__blue">
-                            <span class="zap-card__num">{{handleInput(getFinancedNum())}}</span>
+                    <div class="zap-card" @click="toCreditLine()">
+                        <div class="zap-card__title">总授信额度</div>
+                        <div class="zap-card__wrap zap-card__gold">
+                            <span class="zap-card__num">{{handleInput(hxCreditLineAll)}}</span>
                             <span class="zap-card__unit">元</span>
                         </div>
                     </div>
                 </el-col>
                 <el-col :xs="24" :sm="12" :md="8" :lg="8">
                     <div class="zap-card" @click="toCreditLine()">
-                        <div class="zap-card__title">可用授额度</div>
+                        <div class="zap-card__title">可用授额度</div>
                         <div class="zap-card__wrap zap-card__gold">
-                            <span class="zap-card__num">{{handleInput(getsubNum())}}</span>
+                            <span class="zap-card__num">{{handleInput(usableAmount)}}</span>
                             <span class="zap-card__unit">元</span>
                         </div>
                     </div>
                 </el-col>
                 <el-col :xs="24" :sm="12" :md="8" :lg="8">
+                    <div class="zap-card" @click="toCredit()">
+                        <div class="zap-card__title">我开立的融信</div>
+                        <div class="zap-card__wrap zap-card__blue">
+                            <span class="zap-card__num">{{handleInput(hxCreditAll)}}</span>
+                            <span class="zap-card__unit">元</span>
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="12" :md="8" :lg="8" v-if="hxDateType == '00'">
+                    <div class="zap-card">
+                        <div class="zap-card__title">30天的待还款</div>
+                        <div class="zap-card__wrap zap-card__blue">
+                            <span class="zap-card__num">{{handleInput(expiredList.allAmount)}}</span>
+                            <span class="zap-card__unit">元</span>
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="12" :md="8" :lg="8" v-if="hxDateType != '00'">
+                    <div class="zap-card">
+                        <div class="zap-card__title">还款金额</div>
+                        <div class="zap-card__wrap zap-card__blue">
+                            <span class="zap-card__num">{{handleInput(hxRepayment)}}</span>
+                            <span class="zap-card__unit">元</span>
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="12" :md="8" :lg="8">
+                    <div class="zap-card">
+                        <div class="zap-card__title">已融资金额</div>
+                        <div class="zap-card__wrap zap-card__blue">
+                            <span class="zap-card__num">{{handleInput(hxHasRaised)}}</span>
+                            <span class="zap-card__unit">元</span>
+                        </div>
+                    </div>
+                </el-col>
+                <!-- <el-col :xs="24" :sm="12" :md="8" :lg="8">
                     <div class="zap-card" @click="toRepayment()">
                         <div class="zap-card__title">即将到期付款</div>
                         <div class="zap-card__wrap zap-card__pink">
@@ -287,9 +324,9 @@
                             <span class="zap-card__unit">元</span>
                         </div>
                     </div>
-                </el-col>
+                </el-col> -->
                 <!-- 第二行 -->
-                <el-col :xs="24" :sm="12" :md="8" :lg="8">
+                <!-- <el-col :xs="24" :sm="12" :md="8" :lg="8">
                     <div class="zap-card">
                         <div class="zap-card__title">我的待办</div>
                         <div class="zap-card__wrap zap-card__blue">
@@ -315,7 +352,7 @@
                             <span class="zap-card__unit">元</span>
                         </div>
                     </div>
-                </el-col>
+                </el-col> -->
             </el-row>
             <!-- 我的待办、消息 -->
             <el-row class="zap-list">
@@ -400,7 +437,7 @@
                         <el-tab-pane label="30天内待还款汇总" name="fourth" style="height:400px">
                             <el-table :data="expiredList" :show-header="true">
                                 <el-table-column label="融资编号" align="center" prop="zfiNumber" :show-overflow-tooltip="true"/>
-                                <el-table-column label="金额" align="center" prop="afiAmount" :show-overflow-tooltip="true"/>
+                                <el-table-column label="金额" align="center" prop="zfrAmount" :show-overflow-tooltip="true"/>
                                 <el-table-column label="到期时间" align="center" prop="afiExpireDate" :show-overflow-tooltip="true">
                                     <template slot-scope="scope">
                                         <span>{{ parseTime(new Date(scope.row.afiExpireDate), '{y}-{m}-{d}') }}</span>
@@ -724,7 +761,10 @@
 </template>
 <script>
 import * as echarts from 'echarts';
-import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance, getLoseEffectBalance, getReturnBalance, getFinanceAmount, getFinanceAmountAll, getExpiredBalance, getCoreCreditLine, getCreditLineList, getCreditLineNumList, financeRecordMonth, getExpiredList } from '@/api/service/report/credit'
+import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance, getLoseEffectBalance,
+ getReturnBalance, getFinanceAmount, getFinanceAmountAll, getExpiredBalance, getCoreCreditLine, 
+ getCreditLineList, getCreditLineNumList, financeRecordMonth, getExpiredList, 
+ listCreditLineAll,listCreditAll,listHasRaised,listRepayment} from '@/api/service/report/credit'
 import { getCompanyNum, getFinanceSupplier, getFinanceNum, getCompanyReport } from '@/api/service/report/company'
 import { getOwnCompany } from "@/api/common/company";
 import { accAdd, accSub } from "@/utils/calculation";
@@ -768,6 +808,12 @@ export default {
                 {label:"周",value:"00"},
                 {label:"年",value:"01"}
             ],
+            hxDateType:"00",
+            hxDateTypeList: [
+                {label:"实时",value:"00"},
+                {label:"年度",value:"01"},
+                {label:"历史",value:"02"}
+            ],
             companyExtraOption:{
               xAxis: [
                   {
@@ -892,7 +938,15 @@ export default {
             companyData:true,
             companyWork:true,
             companyChart:true,
-            input1: ''
+            input1: '',
+            //核心企业
+            hxCreditLineAll: 0,        //授信总额度反向 
+            hxCreditLineAllForward: 0,   // 授信总额度正向
+            usableAmount: 0 ,            //可用授信额度
+            hxCreditAll: 0,                 //我开立的融信
+            hxHasRaised: 0,             //已融资金额
+            hxRepayment: 0,             //已放款金额
+
         }
     },
     created: function () {
@@ -1030,10 +1084,7 @@ export default {
                     this.getOldWorkList()
                 //核心企业
                 }else if(this.company.scyType == '01'){
-                    //授信总额度
-                    this.getCreditLineAll()
-                    //授信总额度 -- 正向保理
-                    this.getCreditLineAllForward()
+                    this.changeHxDateType("00")
                     //融资中金额
                     this.getAvailableBalance()
                     //融资中金额 -- 正向保理
@@ -1102,6 +1153,19 @@ export default {
                 
             });
         },
+        changeHxDateType(hxDateType){
+            this.hxDateType = hxDateType;
+            //授信总额度
+            this.listCreditLineAll()
+            //授信总额度 -- 正向保理
+            this.listCreditLineAllForward()
+            //我开立的融信
+            this.listCreditAll()
+            //已融资金额
+            this.listHasRaised()
+            //已放款
+            this.listRepayment()
+        },
         //入驻企业数量
         getCompanyNum(){
             getCompanyNum().then((response) => {
@@ -1204,6 +1268,47 @@ export default {
                 this.creditLineAllForward = res.data.allAmount
             })
         },
+        //核心企业授信总额度 -- 反向
+        listCreditLineAll(){
+            let queryParams = {}
+            listCreditLineAll(queryParams).then(res => {
+                this.hxCreditLineAll = res.data.allAmount;
+                this.usableAmount = res.data.usableAmount;
+            })
+        },
+        //核心企业授信总额度 -- 正向保理
+        listCreditLineAllForward(){
+            let queryParams = {}
+            queryParams.zfpType = '0'
+            listCreditLineAll(queryParams).then(res => {
+                this.hxCreditLineAllForward = res.data.allAmount
+            })
+        },
+        //核心企业我开立的融信
+        listCreditAll(){
+            let queryParams = {}
+            queryParams.hxDateType = this.hxDateType
+            listCreditAll(queryParams).then(res => {
+                debugger
+                this.hxCreditAll = res.data.allAmount;
+            })
+        },
+        //核心企业已融资金额
+        listHasRaised(){
+            let queryParams = {}
+            queryParams.hxDateType = this.hxDateType
+            listHasRaised(queryParams).then(res => {
+                this.hxHasRaised = res.data.allAmount;
+            })
+        },
+        //核心企业已放款金额
+        listRepayment(){
+            let queryParams = {}
+            queryParams.hxDateType = this.hxDateType
+            listRepayment(queryParams).then(res => {
+                this.hxRepayment = res.data.allAmount;
+            })
+        },
         //平台放款金额
         getAllLoanBalance(){
             return accAdd(this.loanBalance, this.returnBalance, 2)