<template>
|
<div
|
class="loanApprovalApply"
|
v-loading.fullscreen.lock="waiting"
|
element-loading-background="transparent"
|
>
|
<el-form
|
ref="loanApprovalApply"
|
:model="loanApprovalApply"
|
inline
|
label-width="95px"
|
size="small"
|
>
|
<el-form-item label="客户姓名" prop="customerName">
|
<el-input v-model="loanApprovalApply.customerName" placeholder="请输入"></el-input>
|
</el-form-item>
|
<el-form-item label="证件号码" prop="certId">
|
<el-input v-model="loanApprovalApply.certId" placeholder="请输入"></el-input>
|
</el-form-item>
|
<el-form-item label="产品名称" prop="productIdArray">
|
<el-select
|
v-model="loanApprovalApply.productIdArray"
|
clearable
|
multiple
|
filterable
|
placeholder="请选择"
|
collapse-tags
|
:title="title"
|
@mouseenter.native="mouseEnter(loanApprovalApply.productIdArray,productList,'productCode','productName')"
|
>
|
<el-option
|
v-for="item in productList"
|
:key="item.productCode"
|
:label="item.productName"
|
:value="item.productCode"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
|
<el-form-item label="审批状态" prop="phasenoArray" v-show="isshow">
|
<el-select
|
v-model="loanApprovalApply.phasenoArray"
|
clearable
|
multiple
|
filterable
|
placeholder="请选择"
|
collapse-tags
|
:title="title"
|
@mouseenter.native="mouseEnter(loanApprovalApply.phasenoArray,phasechoiceList,'code','name')"
|
>
|
<el-option
|
v-for="item in qryFlowPhaseList"
|
:key="item.code"
|
:label="item.taskName"
|
:value="item.taskKey"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
|
<el-form-item size="small">
|
<el-button style="padding:8px 15px;" plain @click="resetForm('loanApprovalApply')">重置</el-button>
|
<el-button style="margin-left: 22px;padding:8px 15px;" type="primary" @click="handleSearch(loanApprovalApply)">搜索</el-button>
|
<el-button type="text" v-show="!isshow" @click="show()">
|
展开
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
</el-button>
|
<el-button type="text" v-show="isshow" @click="show()">
|
收起
|
<i class="el-icon-arrow-up el-icon--right"></i>
|
</el-button>
|
</el-form-item>
|
</el-form>
|
<div class="table">
|
<el-table
|
:data="loanApplyFlowList"
|
:cell-class-name="cellClass"
|
:header-cell-class-name="headerCellClass"
|
v-loading="loading"
|
highlight-current-row
|
stripe
|
>
|
<el-table-column type="index" width="40" label=" "></el-table-column>
|
<el-table-column prop="customerName" label="客户姓名" width="170" />
|
<el-table-column prop="phone" label="手机号码" width="170" />
|
<el-table-column prop="certId" label="证件号码" width="170" />
|
<el-table-column prop="productName" label="产品名称" width="170" />
|
<el-table-column prop="shopName" label="门店名称" width="300" />
|
<el-table-column prop="marriageDesc" label="婚姻状态" width="170" />
|
<el-table-column prop="creditAmt" label="授信额度" width="170" >
|
<template slot-scope="scope">
|
<span>{{ scope.row.creditAmt?scope.row.creditAmt = formatMoney(scope.row.creditAmt):'--' }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="phasename" label="审批状态" width="170" />
|
<el-table-column prop="operationUserName" label="操作人员" />
|
|
<el-table-column label="操作管理" fixed="right" width="130">
|
<template slot-scope="scope">
|
<div style=" margin: 2px 0">
|
<el-button
|
type="text"
|
@click="detail(scope.row)"
|
>详情</el-button>
|
<el-button
|
type="text"
|
v-if="type != '0'"
|
:disabled="!(scope.row.phaseno=='0060' || scope.row.phaseno=='0070' || scope.row.phaseno=='0080')"
|
@click="edit(scope.row)"
|
>修改</el-button>
|
</div>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-pagination
|
background
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
:current-page.sync="currentPage"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="10"
|
layout="prev, pager, next, jumper, total, sizes"
|
:total="total"
|
></el-pagination>
|
</div>
|
</div>
|
</template>
|
<script>
|
import "./index.styl";
|
import {
|
qryProdList,
|
qryCustomerInfoListnew,
|
customerQryFlowPhaseList
|
} from "@/api/product";
|
export default {
|
data() {
|
return {
|
isshow: false,
|
qryFlowPhaseList:[],
|
phasechoiceList:[
|
{
|
name:'待处理',
|
code:'00'
|
},
|
{
|
name:'通过',
|
code:'01'
|
},
|
{
|
name:'拒绝',
|
code:'02'
|
},
|
{
|
name:'驳回',
|
code:'03'
|
},
|
],
|
loanApprovalApply: {
|
currentPage: "1",
|
pageSize: "10"
|
},
|
loanApplyFlowList: [],
|
productList: "",
|
type:'',
|
title: "",
|
total: 0,
|
currentPage: 1,
|
waiting: false,
|
loading: false,
|
isSwitch: true,
|
};
|
},
|
mounted() {
|
var _this = this;
|
window.onresize = function() {
|
// 定义窗口大小变更通知事件
|
_this.clientWidth = window.parent.document.body.clientWidth;
|
};
|
},
|
activated() {
|
//获取产品列表
|
qryProdList({}).then(res => {
|
this.productList = res.result;
|
});
|
this.customerQryFlowPhaseList()
|
//调用查询贷款申请列表方法
|
this.getApplyFlowList(this.loanApprovalApply);
|
},
|
methods: {
|
// 获取下拉值
|
customerQryFlowPhaseList(){
|
customerQryFlowPhaseList({}).then(res=>{
|
this.qryFlowPhaseList = res.result
|
})
|
},
|
// 金额格式化
|
formatMoney(value) {
|
if (value) {
|
value =
|
parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
|
if (value == "NaN") return;
|
let l = value
|
.split(".")[0]
|
.split("")
|
.reverse();
|
let r = value.split(".")[1];
|
let t = "";
|
for (let i = 0; i < l.length; i++) {
|
t += l[i] + ((i + 1) % 3 === 0 && i + 1 !== l.length ? "," : "");
|
}
|
return (
|
t
|
.split("")
|
.reverse()
|
.join("") +
|
"." +
|
r
|
);
|
}
|
},
|
// 鼠标悬浮获取选中的name
|
mouseEnter(valArr, array, key, name) {
|
this.title = "";
|
if (valArr.length) {
|
for (let i = 0; i < valArr.length; i++) {
|
for (let j = 0; j < array.length; j++) {
|
if (valArr[i] == array[j][key]) {
|
this.title += this.title ? "," + array[j][name] : array[j][name];
|
break;
|
}
|
}
|
}
|
}
|
},
|
headerCellClass() {
|
return "headerCellClass";
|
},
|
cellClass() {
|
return "cellClass";
|
},
|
//查询贷款申请列表
|
getApplyFlowList(form) {
|
// const obj = {};
|
// for (const key in form) {
|
// if (form[key] instanceof Array) {
|
// if (form[key].length) {
|
// obj[key] = form[key].join(",");
|
// }
|
// } else {
|
// obj[key] = form[key];
|
// }
|
// }
|
if(!form.productIdArray || form.productIdArray.length <1){
|
delete form.productIdArray
|
}
|
this.loading = true;
|
let type = this.$route.query.type || ''
|
this.type = type
|
let phasenoArray = []
|
if(type==1){
|
phasenoArray = ["0060"]
|
}
|
if(type==2){
|
phasenoArray = ["0070"]
|
}
|
if(type==3){
|
phasenoArray = ["0080"]
|
}
|
if(form.phasenoArray){
|
if(form.phasenoArray.length < 1){
|
delete form.phasenoArray
|
}
|
}
|
|
qryCustomerInfoListnew({phasenoArray,...form}).then(res => {
|
this.loading = false;
|
if (res.result.records.length) {
|
this.loanApplyFlowList = res.result.records;
|
this.total = res.result.total;
|
} else {
|
// 判断当前页没数据的页码如果是1就不用刷新
|
if (form.currentPage > 1) {
|
form.currentPage--;
|
this.getApplyFlowList(form);
|
} else {
|
this.loanApplyFlowList = res.result.records;
|
this.total = res.result.total;
|
}
|
}
|
});
|
},
|
// 详情
|
detail(row) {
|
this.$router.push({
|
path: `/comprehensiveTransaction/ClientsDetail/${row.customerId}`,
|
query: {
|
occurType: row.occurtype,
|
indInfoPreSerialno:row.indInfoPreSerialno,
|
isEdit:false,
|
hidemenu:true
|
}
|
});
|
},
|
|
//点击修改
|
edit(row) {
|
const hidemenu = this.$route.path === '/clientsNewManage'
|
this.$store.commit("SET_applyInfo", row);
|
this.$router.push({
|
path: `/comprehensiveTransaction/ClientsDetail/${row.customerId}`,
|
query: {
|
occurType: row.occurtype,
|
indInfoPreSerialno:row.indInfoPreSerialno,
|
isEdit:true,
|
hidemenu:hidemenu
|
}
|
});
|
},
|
//设置每页多少条
|
handleSizeChange(val) {
|
this.loanApprovalApply.pageSize = val;
|
this.getApplyFlowList(this.loanApprovalApply);
|
},
|
//查询当前页
|
handleCurrentChange(val) {
|
this.loanApprovalApply.currentPage = val;
|
this.getApplyFlowList(this.loanApprovalApply);
|
},
|
// 点击展开或收起
|
show() {
|
this.isshow = !this.isshow;
|
},
|
// 搜索
|
handleSearch(form) {
|
if (form.inputDate) {
|
form.beginDate = form.inputDate[0];
|
form.endDate = form.inputDate[1];
|
}
|
form.currentPage = 1;
|
this.currentPage = 1;
|
this.getApplyFlowList(form);
|
},
|
// 重置搜索表单
|
resetForm(formName) {
|
this.$refs[formName].resetFields();
|
},
|
}
|
};
|
</script>
|