|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-container zap-main">
|
|
|
<search-bar
|
|
|
+ v-if="activeName === 'first'"
|
|
|
:checkList="checkList"
|
|
|
:tableList="tableList"
|
|
|
:selfDom="selfDom"
|
|
@@ -57,6 +58,64 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</search-bar>
|
|
|
+ <search-bar
|
|
|
+ v-if="activeName === 'second'"
|
|
|
+ :checkList="checkListOne"
|
|
|
+ :tableList="tableListOne"
|
|
|
+ :selfDom="selfDom"
|
|
|
+ :companyType="companyType"
|
|
|
+ :tableId="tableIdOne"
|
|
|
+ @query="handleQuery"
|
|
|
+ @reset="resetQuery">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" v-show="showSearch" label-width="80px">
|
|
|
+ <el-row type="flex" style="flex-wrap:wrap;">
|
|
|
+ <el-form-item class="zap-flex-1 mr24" label="授信类型" prop="zfpType" v-if="companyType != '02'" size="medium">
|
|
|
+ <el-select class="zap-form-input--small" v-model="queryParams.zfpType" placeholder="请选择类型" clearable>
|
|
|
+ <el-option v-for="dict in queryTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="zap-flex-1" label="类型" prop="zfpcrQuery" size="medium">
|
|
|
+ <el-select class="zap-form-input--medium" v-model="queryParams.zfpcrQuery" clearable>
|
|
|
+ <el-option v-for="dict in queryTypesOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" v-if="dict.dictValue == '02' && companyType == '00'" />
|
|
|
+ <el-option v-for="dict in queryTypesOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" v-if="dict.dictValue != '02'" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="zap-flex-1 ml24" prop="zfpcrValue" v-if="this.queryParams.zfpcrQuery" size="medium" label-width="0">
|
|
|
+ <el-input class="zap-form-input--default" v-model="queryParams.zfpcrValue" placeholder="请输入关键字模糊查询" clearable maxlength="25" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" style="flex-wrap:wrap;">
|
|
|
+ <el-form-item class="zap-flex-1 mr24" label="授信状态" prop="zfpcrStatus" size="medium">
|
|
|
+ <el-select class="zap-form-input--small" v-model="queryParams.zfpcrStatus" placeholder="请选择状态" clearable>
|
|
|
+ <el-option v-for="dict in queryStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item class="zap-flex-1" label="生效日期" prop="startTime" size="medium">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.startTime"
|
|
|
+ unlink-panels
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item class="zap-flex-1" label="到期日期" prop="endTime" size="medium">
|
|
|
+ <el-date-picker
|
|
|
+ class="zap-form-input--medium"
|
|
|
+ v-model="queryParams.endTime"
|
|
|
+ unlink-panels
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </search-bar>
|
|
|
<div class="zap-content zap-margin-top">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['credit:line:add']">新增</el-button>
|
|
|
</div>
|
|
@@ -68,22 +127,23 @@
|
|
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="核心企业" align="center" prop="scyName" show-overflow-tooltip />
|
|
|
- <el-table-column label="融资产品" align="center" prop="zfpName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="核心企业" align="center" v-if="uncheckListOne.scyName" prop="scyName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="融资产品" align="center" v-if="uncheckListOne.zfpName" prop="zfpName" show-overflow-tooltip />
|
|
|
<el-table-column
|
|
|
label="授信额度"
|
|
|
:formatter="moneyFormat"
|
|
|
align="center"
|
|
|
+ v-if="uncheckListOne.zfsqAmount"
|
|
|
prop="zfsqAmount"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
- <el-table-column label="利率(%)" align="center" prop="zfpcrRate" width="120" />
|
|
|
- <el-table-column label="已使用额度" :formatter="moneyFormat" align="center" prop="zfiAmount" width="120" />
|
|
|
- <el-table-column label="可用额度" :formatter="moneyFormat" align="center" prop="usableAmount" width="120" />
|
|
|
- <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" fixed="right">
|
|
|
+ <el-table-column label="利率(%)" align="center" v-if="uncheckListOne.zfpcrRate" prop="zfpcrRate" width="120" />
|
|
|
+ <el-table-column label="已使用额度" :formatter="moneyFormat" align="center" v-if="uncheckListOne.zfiAmount" prop="zfiAmount" width="120" />
|
|
|
+ <el-table-column label="可用额度" :formatter="moneyFormat" align="center" v-if="uncheckListOne.usableAmount" prop="usableAmount" width="120" />
|
|
|
+ <el-table-column label="生效日期" align="center" prop="zfpcrStartDate" v-if="uncheckListOne.zfpcrStartDate" show-overflow-tooltip />
|
|
|
+ <el-table-column label="到期日期" align="center" prop="zfpcrEndDate" v-if="uncheckListOne.zfpcrEndDate" show-overflow-tooltip />
|
|
|
+ <el-table-column label="授信状态" :formatter="statuFormat" align="center" v-if="uncheckListOne.zfsqStatus" prop="zfsqStatus" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<plain-button size="mini" type="text" @click="handleRows(scope.row)" v-hasPermi="['credit:line:query']">详情</plain-button>
|
|
|
</template>
|
|
@@ -297,6 +357,7 @@ export default {
|
|
|
zfpcrValue: null,
|
|
|
},
|
|
|
options: [],
|
|
|
+ activeName: "first",
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
//筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
|
|
@@ -361,6 +422,48 @@ export default {
|
|
|
uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
|
|
|
selfDom: this,
|
|
|
tableId: "/sc-service/creditLine/list",
|
|
|
+ tableListOne: [
|
|
|
+ {
|
|
|
+ label: 'scyName',
|
|
|
+ value: '核心企业'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfpName",
|
|
|
+ value: "融资产品"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfsqAmount",
|
|
|
+ value: "授信额度"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfpcrRate",
|
|
|
+ value: "利率"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfiAmount",
|
|
|
+ value: "已使用额度"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "usableAmount",
|
|
|
+ value: "可用额度"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfpcrStartDate",
|
|
|
+ value: "生效日期"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfpcrEndDate",
|
|
|
+ value: "到期日期"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "zfsqStatus",
|
|
|
+ value: "授信状态"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ checkListOne: [], //筛选列选中的数据列表--显示隐藏列用
|
|
|
+ uncheckListOne: {}, //控制筛选列显示隐藏--显示隐藏列用
|
|
|
+ selfDom: this,
|
|
|
+ tableIdOne: "/sc-service/creditLine/list/one",
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
zfpcrProductId: [{
|
|
@@ -426,6 +529,7 @@ export default {
|
|
|
this.getList().then(() => {
|
|
|
this.queryParams.zfpcrQuery = "00";
|
|
|
});
|
|
|
+
|
|
|
},
|
|
|
activated() {
|
|
|
// this.getContractList();
|
|
@@ -452,18 +556,22 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.columnQuery();
|
|
|
+ this.getList();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询授信信息列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
return listCreditLine(this.queryParams).then(response => {
|
|
|
- debugger
|
|
|
this.creditLineList = response.data.records;
|
|
|
if (response.data.records[0]) {
|
|
|
this.companyType = response.data.records[0].companyType
|
|
|
console.log(this.companyType, "企业类型")
|
|
|
+ if(this.companyType == '02'){
|
|
|
+ this.activeName='second';
|
|
|
+ }
|
|
|
+ this.columnQuery();
|
|
|
}
|
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
@@ -482,7 +590,11 @@ export default {
|
|
|
//获取页面路径
|
|
|
var psfPagePath = window.location.pathname;
|
|
|
//用请求后台的url作为唯一标识
|
|
|
- var psfTableName = this.tableId;
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ var psfTableName = this.tableId;
|
|
|
+ }else{
|
|
|
+ var psfTableName = this.tableIdOne;
|
|
|
+ }
|
|
|
var columnForm = {};
|
|
|
columnForm.psfPagePath = psfPagePath;
|
|
|
columnForm.psfTableName = psfTableName;
|
|
@@ -490,15 +602,63 @@ export default {
|
|
|
if (response.data && response.data.psfShowData) {
|
|
|
this.checkList = response.data.psfShowData;
|
|
|
}
|
|
|
- this.filter();
|
|
|
+ this.filter(this.checkList);
|
|
|
});
|
|
|
},
|
|
|
//控制隐藏显示的函数
|
|
|
filter(checkList) {
|
|
|
- if (!!checkList) {
|
|
|
- this.checkList = checkList;
|
|
|
+ // if(this.companyType == '02'){
|
|
|
+
|
|
|
+ // }else{
|
|
|
+
|
|
|
+ // }
|
|
|
+ debugger
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ if (!!checkList) {
|
|
|
+ this.checkList = checkList;
|
|
|
+ }
|
|
|
+ this.columnfilter(
|
|
|
+ this.checkList,
|
|
|
+ this.tableList,
|
|
|
+ this.uncheckList
|
|
|
+ );
|
|
|
+
|
|
|
+ } else if (this.activeName == "second") {
|
|
|
+ if (!!checkList) {
|
|
|
+ this.checkListOne = checkList;
|
|
|
+ }
|
|
|
+ this.columnfilter(
|
|
|
+ this.checkListOne,
|
|
|
+ this.tableListOne,
|
|
|
+ this.uncheckListOne
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ columnfilter( checkList, tableList, uncheckList) {
|
|
|
+ //初始化数据
|
|
|
+ if (checkList.length == 0) {
|
|
|
+ for (let index in tableList) {
|
|
|
+ let table = tableList[index];
|
|
|
+ checkList.push(table.label);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let index in tableList) {
|
|
|
+ let table = tableList[index];
|
|
|
+ uncheckList[table.label] = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ //数据准备
|
|
|
+ for (let item in uncheckList) {
|
|
|
+ uncheckList[item] = false;
|
|
|
+ }
|
|
|
+ //数据处理
|
|
|
+ for (let index in checkList) {
|
|
|
+ let name = checkList[index];
|
|
|
+ if (name in uncheckList) {
|
|
|
+ uncheckList[name] = true;
|
|
|
+ }
|
|
|
}
|
|
|
- columnfilter(this.selfDom);
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|