Pārlūkot izejas kodu

Merge branch 'master' of http://git.keao.tech/SupplyChain/front

zhanglb 3 gadi atpakaļ
vecāks
revīzija
0a86949f09

+ 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 = {}

+ 5 - 0
front-vue/src/views/service/creditLine/creditLine.vue

@@ -85,6 +85,11 @@
         <el-table-column label="生效日期" align="center" prop="zfpcrStartDate" show-overflow-tooltip />
         <el-table-column label="到期日期" align="center" prop="zfpcrEndDate" show-overflow-tooltip />
         <el-table-column label="授信状态" :formatter="statuFormat" align="center" prop="zfsqStatus" show-overflow-tooltip />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
+            <template slot-scope="scope">
+                <el-button size="mini" type="text" icon="el-icon-view" @click="handleRows(scope.row)" v-hasPermi="['credit:line:query']">详情</el-button>
+            </template>
+        </el-table-column>
     </el-table>
     <!--  -->
     <el-table class="zap-table" v-loading="loading" :data="creditLineList" @selection-change="handleSelectionChange" :row-key="rowKey" stripe  :cell-style="changeCellStyle" v-if="companyType != '02'">

+ 1 - 1
front-vue/src/views/service/financeRecord/addFinanceRecord.vue

@@ -429,7 +429,7 @@
         :zfiId="this.form.zfiId"
         :parent="parent"
       ></pdf-show>
-      <span slot="footer" class="dialog-footer" style="float: right">
+      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="selectType">签署</el-button>
         <el-button type="primary" plain="" @click="pdfShowDialog = false"
           >取消</el-button

+ 5 - 3
front-vue/src/views/service/financeRecord/detailFinanceRecord.vue

@@ -128,8 +128,10 @@
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                    <el-form-item label="融资状态:" prop="zfrStatus" size="large"  label-width="101px" v-if="this.status != '01'">
-                        <el-input v-model="form.zfrStatus" clearable placeholder="请输入融资状态" maxlength="25" readonly />
+                      <el-form-item label="融资状态:" prop="zfrStatus" size="large"  label-width="101px" v-if="this.status != '01'">
+                      <el-select v-model="form.zfrStatus" placeholder="请选择状态" clearable  disabled>
+                        <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+                    </el-select>
                     </el-form-item>
                 </el-col>
             </el-row>
@@ -159,7 +161,7 @@
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="融资状态:" prop="zfrStatus" size="large"  label-width="101px" v-if="this.status == '01'">
-                      <el-select v-model="form.zfrStatus" placeholder="请选择状态" clearable>
+                      <el-select v-model="form.zfrStatus" placeholder="请选择状态" clearable  disabled>
                         <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
                     </el-select>
                     </el-form-item>

+ 1 - 1
front-vue/src/views/service/financeRecord/recordSeal.vue

@@ -430,7 +430,7 @@
         :zfiId="this.form.zfiId"
         :parent="parent"
       ></pdf-show>
-      <span slot="footer" class="dialog-footer" style="float: right">
+      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="selectType">签署</el-button>
         <el-button type="primary" plain="" @click="pdfShowDialog = false"
           >取消</el-button

+ 80 - 2
front-vue/src/views/service/repayment/detailRepayment.vue

@@ -1,5 +1,11 @@
 <template>
   <div class="app-container zap-main">
+    <div style="background-color: #ffffff;padding: 15px 25px;height:60px;vertical-align:middle;" v-if="form.fileId">
+      <span style="margin-left:3%;">还款登记附件:</span>
+      <span>{{form.fileName}}</span>
+      <el-button style="float:right;margin-right:3%"  size="mini" type="text" icon="el-icon-view" @click="handleDownload(form.fileUrl)">下载</el-button>
+      <el-button style="float:right;margin-right:3%"  size="mini" type="text" icon="el-icon-view" @click="handlePreview(form.fileName,form.fileUrl)">预览</el-button>
+    </div>
     <el-form
       class="zap-form"
       :inline="true"
@@ -7,7 +13,7 @@
       :model="form"
       :rules="rules"
       label-width="auto"
-      style="padding-top: 20px"
+      style="padding-top: 20px;margin-top:20px"
       disabled
     >
       <el-form-item label="还款明细编号:" prop="zfcName" size="large">
@@ -57,6 +63,10 @@
           :show-overflow-tooltip="true"
         />
       </el-table>
+      <el-dialog  :visible.sync="openFile" width="1000px" append-to-body>
+                <img :src="wordUrl" v-if="show" width='450px' height='500px'/>
+                <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid"/>
+            </el-dialog>
     </el-form>
     <div style="margin-top: 100px; margin-left:45%">
       <el-button type="primary" plain @click="cancel">取消</el-button>
@@ -66,6 +76,7 @@
 
 <script>
 import { getRepayment } from "@/api/service/repayment/repayment";
+import {getToken} from "@/utils/auth";
 export default {
   name: "detailRepayment",
   components: {},
@@ -82,6 +93,9 @@ export default {
       total: 0,
       // 是否显示弹出层
       open: false,
+      openFile:false,
+      show:false,
+      heid:false,
       list: [],
       // 表单参数
       form: {},
@@ -134,7 +148,71 @@ export default {
       this.$store.dispatch("tagsView/delView", this.$route);
       this.$router.go(-1);
       this.open = false;
-    }
+    },
+    //附件预览
+    handlePreview(fileName,fileUrl) {
+        const pfiUrl = fileUrl;
+        const pfiFileName = fileName;
+        if (this.form.fileId) {
+            console.log(pfiFileName.substr(-3));
+            if (pfiFileName.substr(-3) == "pdf") {
+                this.wordUrl = pfiUrl + "/" + getToken();
+                this.show=false;
+                this.heid=true;
+            } else if (
+                pfiFileName.substr(-3) == "jpg" ||
+                pfiFileName.substr(-3) == "png" ||
+                pfiFileName.substr(-3) == "JPG" ||
+                pfiFileName.substr(-3) == "PNG" ||
+                pfiFileName.substr(-4) == "jpeg" ||
+                pfiFileName.substr(-3) == "JPEG" 
+            ) {
+                this.wordUrl =
+                    pfiUrl +
+                    "/" +
+                    getToken();
+                    this.show=true;
+                    this.heid=false;
+                        console.log("====>",this.wordUrl);
+            } else if (
+                pfiFileName.substr(-3) == "doc" ||
+                pfiFileName.substr(-3) == "DOC"||
+                pfiFileName.substr(-4) == "docx" ||
+                pfiFileName.substr(-3) == "DOCX"
+            ) {
+                this.wordUrl =
+                    "https://view.officeapps.live.com/op/view.aspx?src=" +
+                    pfiUrl +
+                    "/" +
+                    getToken() +
+                    "/" +
+                    pfiFileName;
+                    this.show=false;
+                    this.heid=true;
+                    console.log("====>",this.wordUrl);
+            } else {
+                this.$message({
+                    message: "暂不支持该类型文件预览",
+                    type: "warning",
+                });
+                return;
+            }
+        }
+        this.openFile = true;
+    },
+    //附件下载
+        handleDownload(url){
+            const pfiUrl = url;
+            if(pfiUrl != null && pfiUrl != ''){
+            window.open(pfiUrl +"/"+ getToken());
+            }else{
+                this.$message({
+                message: '该附件不存在!',
+                type: 'warning'
+                });
+                return;
+            }
+        },
   }
 };
 </script>