Browse Source

核心企业统计

peixh 4 years ago
parent
commit
764e416d1d
2 changed files with 124 additions and 15 deletions
  1. 9 0
      front-vue/src/api/service/report/credit.js
  2. 115 15
      front-vue/src/views/home.vue

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

@@ -153,6 +153,15 @@ export function listHasRaised(query) {
   })
 }
 
+// 查询核心企业30天内待还款
+export function listPendingRepayment(query) {
+  return request({
+    url: '/sc-service/report/credit/listPendingRepayment',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询核心企业已放款金额
 export function listRepayment(query) {
   return request({

+ 115 - 15
front-vue/src/views/home.vue

@@ -259,7 +259,7 @@
         
         <!-- 核心企业 -->
         <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-button v-for="(item,index) in hxDateTypeList" :key="index" @click="changeFxHxDateType(item.value)">{{item.label}}</el-button>
             <el-row :gutter="20">
                 <!-- 第一行 -->
                 <el-col :xs="24" :sm="12" :md="8" :lg="8">
@@ -291,9 +291,9 @@
                 </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__title">30天待还款</div>
                         <div class="zap-card__wrap zap-card__blue">
-                            <span class="zap-card__num">{{handleInput(expiredList.allAmount)}}</span>
+                            <span class="zap-card__num">{{handleInput(hxPendingMoney)}}</span>
                             <span class="zap-card__unit">元</span>
                         </div>
                     </div>
@@ -354,6 +354,55 @@
                     </div>
                 </el-col> -->
             </el-row>
+            <el-button v-for="(item,index) in hxDateTypeList" :key="index" @click="changeZxHxDateType(item.value)">{{item.label}}</el-button>
+            <el-row :gutter="20">
+                <!-- 第一行 -->
+                <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__gold">
+                            <span class="zap-card__num">{{handleInput(hxCreditLineAllForward)}}</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__gold">
+                            <span class="zap-card__num">{{handleInput(usableAmountForward)}}</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(hxCreditAllForward)}}</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(hxPendingMoneyForward)}}</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(hxHasRaisedForward)}}</span>
+                            <span class="zap-card__unit">元</span>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
             <!-- 我的待办、消息 -->
             <el-row class="zap-list">
                 <div class="text item">
@@ -437,7 +486,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="zfrAmount" :show-overflow-tooltip="true"/>
+                                <el-table-column label="金额" align="center" prop="zfrLoanAmount" :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>
@@ -764,7 +813,7 @@ import * as echarts from 'echarts';
 import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance, getLoseEffectBalance,
  getReturnBalance, getFinanceAmount, getFinanceAmountAll, getExpiredBalance, getCoreCreditLine, 
  getCreditLineList, getCreditLineNumList, financeRecordMonth, getExpiredList, 
- listCreditLineAll,listCreditAll,listHasRaised,listRepayment} from '@/api/service/report/credit'
+ listCreditLineAll,listCreditAll,listHasRaised,listRepayment,listPendingRepayment} 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";
@@ -942,9 +991,14 @@ export default {
             //核心企业
             hxCreditLineAll: 0,        //授信总额度反向 
             hxCreditLineAllForward: 0,   // 授信总额度正向
-            usableAmount: 0 ,            //可用授信额度
+            usableAmount: 0 ,            //可用授信额度反向 
+            usableAmountForward: 0,      //可用授信额度正向
             hxCreditAll: 0,                 //我开立的融信
-            hxHasRaised: 0,             //已融资金额
+            hxPendingMoney: 0,            //30天内待还款反向
+            hxPendingMoneyForward: 0,     //30天内待还款正向
+            hxCreditAllForward: 0,                 //我确权的
+            hxHasRaised: 0,             //已融资金额反向
+            hxHasRaisedForward: 0,     //已融资金额正向
             hxRepayment: 0,             //已放款金额
 
         }
@@ -1084,7 +1138,8 @@ export default {
                     this.getOldWorkList()
                 //核心企业
                 }else if(this.company.scyType == '01'){
-                    this.changeHxDateType("00")
+                    this.changeFxHxDateType("00")
+                    this.changeZxHxDateType("00")
                     //融资中金额
                     this.getAvailableBalance()
                     //融资中金额 -- 正向保理
@@ -1109,8 +1164,7 @@ export default {
                     this.getFinanceRecordYear()  
                     //即将到期额度(30天)
                     this.getExpiredBalance()
-                    //即将到期额度(30天)-- 列表
-                    this.getExpiredList()
+                    
                     //查询待办
                     this.getWorkList()
                     //查询消息
@@ -1153,18 +1207,29 @@ export default {
                 
             });
         },
-        changeHxDateType(hxDateType){
+        changeFxHxDateType(hxDateType){
             this.hxDateType = hxDateType;
             //授信总额度
             this.listCreditLineAll()
-            //授信总额度 -- 正向保理
-            this.listCreditLineAllForward()
             //我开立的融信
             this.listCreditAll()
             //已融资金额
             this.listHasRaised()
             //已放款
             this.listRepayment()
+            //30天内待还款反向
+            this.listPendingRepayment()
+        },
+        changeZxHxDateType(hxDateType){
+            this.hxDateType = hxDateType;
+            //授信总额度 -- 正向保理
+            this.listCreditLineAllForward()
+            //我确权的
+            this.listCreditAllForward()
+            //30天内待还款正向
+            this.listPendingRepaymentForward()
+            //已融资金额 正向 
+            this.listHasRaisedForward()
         },
         //入驻企业数量
         getCompanyNum(){
@@ -1281,7 +1346,9 @@ export default {
             let queryParams = {}
             queryParams.zfpType = '0'
             listCreditLineAll(queryParams).then(res => {
-                this.hxCreditLineAllForward = res.data.allAmount
+                debugger
+                this.hxCreditLineAllForward = res.data.allAmountForward
+                this.usableAmountForward = res.data.usableAmountForward;
             })
         },
         //核心企业我开立的融信
@@ -1293,7 +1360,17 @@ export default {
                 this.hxCreditAll = res.data.allAmount;
             })
         },
-        //核心企业已融资金额
+        //核心企业我确权的
+        listCreditAllForward(){
+            let queryParams = {}
+            queryParams.zfpType = '0'
+            queryParams.hxDateType = this.hxDateType
+            listCreditAll(queryParams).then(res => {
+                debugger
+                this.hxCreditAllForward = res.data.allAmount;
+            })
+        },
+        //核心企业已融资金额反向
         listHasRaised(){
             let queryParams = {}
             queryParams.hxDateType = this.hxDateType
@@ -1301,6 +1378,29 @@ export default {
                 this.hxHasRaised = res.data.allAmount;
             })
         },
+        //核心企业已融资金额正向
+        listHasRaisedForward(){
+            let queryParams = {}
+            queryParams.zfpType = '0'
+            queryParams.hxDateType = this.hxDateType
+            listHasRaised(queryParams).then(res => {
+                this.hxHasRaisedForward = res.data.allAmount;
+            })
+        },
+         //核心企业已放款金额
+        listPendingRepayment(){
+            listPendingRepayment().then(res => {
+                this.hxPendingMoney = res.data.allAmount;
+            })
+        },
+         //核心企业已放款金额
+        listPendingRepaymentForward(){
+            let queryParams = {}
+            queryParams.zfpType = '0'
+            listPendingRepayment(queryParams).then(res => {
+                this.hxPendingMoneyForward = res.data.allAmount;
+            })
+        },
         //核心企业已放款金额
         listRepayment(){
             let queryParams = {}