<template> <div class="content"> <van-tabs @change="change" line-height="0" line-width="80px" color="#FF574C" title-active-color="#FF574C" v-model="active" swipeable > <van-tab v-for="(item, index) of titles" :key="index" :title="item.name"> <div class="search"> <mobile-input label-width="10px" :reset="resetvalue" input-align="left" name="searchContent" v-model="searchContent" placeholder="请输入关键字" size="small" /> <div style=" width: 200px; display: flex; justify-content: space-evenly; align-items: self-start; " > <van-button color="#FF574C" type="primary" @click="screen" plain style="width: 70px; height: 34px" size="small" >筛选 </van-button > <van-button color="#FF574C" type="primary" @click="search" style="width: 70px; height: 34px" size="small" >查询 </van-button > </div> <van-popup class="screenPopup" v-model="show" position="top" :style="{ height: '40%' }" > <div class="searchStyle"> <div v-show="active == 1"></div> <mobile-input label="客户名称" label-width="10px" :reset="resetvalue" input-align="left" name="searchContent" v-model="searchContent" placeholder="请输入关键字" size="small" /> <div v-show="active == 0" class="screenType"> <div>贷后检查类型(多选):</div> <div class="label"> <div @click="mortgage_customers" :style="mc"> 房屋按揭业务贷款 </div> <div @click="funds_customers" :style="fc">资金用途</div> <div @click="consumption_customers" :style="cc"> 消费类贷款 </div> </div> </div> <div v-show="active == 2" class="screenType"> <div>贷后检查类型(多选):</div> <div class="label"> <div @click="funds_customers" :style="fc">资金用途</div> <div @click="consumption_customers" :style="cc"> 消费类贷款 </div> </div> </div> <div class="screenType"> <div>贷后任务状态(多选):</div> <div class="label"> <div @click="implement_customers" :style="ic">正常执行</div> <div @click="undone_customers" :style="uc">超期未完成</div> <div v-if="TaskStatus" @click="normal_customers" :style="nc"> 正常完成 </div> <div v-if="TaskStatus" @click="overdue_customers" :style="oc"> 超期完成 </div> </div> </div> <div v-show="active == 1"></div> </div> <div class="screenbutton"> <van-button color="#FF574C" type="primary" @click="search" style="width: 100px; height: 50px; display: block" size="small" >查询 </van-button > <van-button color="#FF574C" type="primary" @click="reset" plain style="width: 100px; height: 50px; display: block" size="small" >重置 </van-button > </div> </van-popup> </div> <!--贷后检查列表--> <div class="wh-100"> <scroller-view v-if="nodata" v-calculate-height :pulldown="pulldown" :pullup="pullup" :refresh-data="onrefreshdata" :load-data="onloaddata" > <div v-for="(item, index) in CustomerList" :key="index" class="customer-bottom-list" @click="collection(item)" > <div class="customer-bottom-list-top"> <div> <span style="color: #ff574c">{{ index + 1 }}</span> </div> <div>{{ item.CUSTOMERNAME }}</div> <div>{{ item.BUSINESSTYPENAME }} | {{ item.INSPECTTYPE }} | {{ item.STATUS }}</div> </div> <div class="customer-bottom-list-bottom"> 借款余额:{{ formatNum(item.BALANCE) }} </div> </div> </scroller-view> </div> </van-tab> </van-tabs> <div @click="addButton" class="add-button">新增</div> <van-popup v-model="showPicker" round position="bottom"> <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" /> </van-popup> </div> </template> <script lang="ts"> import { Component, Vue } from "vue-property-decorator"; import { Search } from "vant"; import nettyApi from "@/constants/api/ms-netty/netty.api.ts"; import IF from "@/public/factory/InterFaceFactory"; import { NativeUI } from "@/public/ts/NativeUI"; import { Popup } from "vant"; import { Picker } from "vant"; Vue.use(Picker); Vue.use(Popup); Vue.use(Search); /** * @Description 贷后检查 * @Author JiangTao * @Date 2022-01-18 下午 04:06 */ @Component({ name: "AfterLoan" }) export default class AfterLoan extends Vue { pageNo = 1; active = 0; titles = [ { name: "业务类-个贷", bsno: "1" }, { name: "合作项目", bsno: "2" }, { name: "业务类-网贷", bsno: "3" }, { name: "随意分", bsno: "4" } ]; CustomerList: any = []; searchContent = ""; //搜索的内容 nodata = true; pullup = true; pulldown = true; chooseTypes = ""; //贷后检查类型 chooseStatus = ""; //检查任务状态 show = false; resetvalue = false; selectType: any = ""; TaskStatus = true; //true全量查询,false部分查询 showPicker = false; columns: any = []; src = require("../../../../assets/svg/red-subscript.svg"); s = { backgroundColor: "#fff4f6", border: "1px solid #fd5065", color: "#fd5065", backgroundImage: `url("${this.src}")`, backgroundRepeat: "no-repeat", backgroundPosition: "right bottom" }; mc: any = {}; //房屋按揭业务贷款 fc: any = {}; //资金用途 cc: any = {}; //消费类贷款 ic: any = {}; //正常执行 uc: any = {}; //超期未完成 nc: any = {}; //正常完成 oc: any = {}; //超期完成 get cusType() { if (this.active == 0 || this.active == 1) { return 1; } else if (this.active == 2 || this.active == 3) { return 2; } else { return 2; } } mounted() { this.showPicker = false; this.show = false; if (sessionStorage.getItem("businessType") == "Upcoming") { this.TaskStatus = false; this.chooseStatus = "1,2"; } else if (sessionStorage.getItem("businessType") == "Common") { this.TaskStatus = true; this.chooseStatus = "1,2,3,4"; } if (this.active == 0) { this.columns = [ { value: "01", text: "房屋按揭业务贷款" }, { value: "02", text: "资金用途" }, { value: "04", text: "消费类贷款" } ]; this.selectPerCustCheck(); } else if (this.active == 1) { this.columns = [{ text: "合作项目", value: "05" }]; this.selectPerCustCheck2(); } } activated() { this.showPicker = false; this.show = false; if (sessionStorage.getItem("businessType") == "Upcoming") { this.TaskStatus = false; this.chooseStatus = "1,2"; } else if (sessionStorage.getItem("businessType") == "Common") { this.TaskStatus = true; this.chooseStatus = "1,2,3,4"; } if (this.active == 0) { this.columns = [ { value: "01", text: "房屋按揭业务贷款" }, { value: "02", text: "资金用途" }, { value: "04", text: "消费类贷款" } ]; this.selectPerCustCheck(); } else if (this.active == 1) { this.columns = [{ text: "合作项目", value: "05" }]; this.selectPerCustCheck2(); } else if (this.active == 2) { this.columns = [ { text: "资金用途检查", value: "02" }, { text: "消费类贷款", value: "04" } ]; this.selectNetPerCustCheck(); } else if (this.active == 3) { this.columns = [{ text: "随意分", value: "08" }]; this.selectNetPerCustCheck2(); } } //房屋按揭业务贷款 mortgage_customers() { if (this.mc == this.s) { this.mc = {}; } else { this.mc = this.s; } } //资金用途 funds_customers() { if (this.fc == this.s) { this.fc = {}; } else { this.fc = this.s; } } //消费类贷款 consumption_customers() { if (this.cc == this.s) { this.cc = {}; } else { this.cc = this.s; } } //正常执行 implement_customers() { if (this.ic == this.s) { this.ic = {}; } else { this.ic = this.s; } } //超期未完成 undone_customers() { if (this.uc == this.s) { this.uc = {}; } else { this.uc = this.s; } } //正常完成 normal_customers() { if (this.nc == this.s) { this.nc = {}; } else { this.nc = this.s; } } //超期完成 overdue_customers() { if (this.oc == this.s) { this.oc = {}; } else { this.oc = this.s; } } /** * @Description 新增 * @Author JiangTao * @Date 2022-01-28 上午 11:24 */ addButton() { this.showPicker = true; } onConfirm(value: any) { this.showPicker = false; this.selectType = value; this.showPicker = false; this.$router.push({ path: "/AddContactCheckView", query: { type: this.selectType, cusType: this.cusType as any //客户类别,1为个贷,2为网贷 } }); } /** * @Description 筛选 * @Author JiangTao * @Date 2022-01-18 下午 04:16 */ screen() { this.show = true; } /** * @Description 搜索 * @Author JiangTao * @Date 2022-01-18 下午 04:17 */ search() { this.chooseStatus = ""; this.chooseTypes = ""; if (this.ic == this.s) { this.chooseStatus = this.chooseStatus + "1,"; } if (this.uc == this.s) { this.chooseStatus = this.chooseStatus + "2,"; } if (this.nc == this.s) { this.chooseStatus = this.chooseStatus + "3,"; } if (this.oc == this.s) { this.chooseStatus = this.chooseStatus + "4,"; } if (this.chooseStatus != "") { this.chooseStatus = this.chooseStatus.substring( 0, this.chooseStatus.length - 1 ); } else { if (sessionStorage.getItem("businessType") == "Upcoming") { this.chooseStatus = "1,2"; } else if (sessionStorage.getItem("businessType") == "Common") { this.chooseStatus = "1,2,3,4"; } } if (this.active == 0) { if (this.mc == this.s) { this.chooseTypes = this.chooseTypes + "01,"; } if (this.fc == this.s) { this.chooseTypes = this.chooseTypes + "02,"; } if (this.cc == this.s) { this.chooseTypes = this.chooseTypes + "04,"; } if (this.chooseTypes != "") { this.chooseTypes = this.chooseTypes.substring( 0, this.chooseTypes.length - 1 ); } this.selectPerCustCheck(); } else if (this.active == 1) { this.selectPerCustCheck2(); } else if (this.active == 2) { if (this.fc == this.s) { this.chooseTypes = this.chooseTypes + "02,"; } if (this.cc == this.s) { this.chooseTypes = this.chooseTypes + "04,"; } if (this.chooseTypes != "") { this.chooseTypes = this.chooseTypes.substring( 0, this.chooseTypes.length - 1 ); } this.selectNetPerCustCheck(); } else if (this.active == 3) { this.selectNetPerCustCheck2(); } this.show = false; } /** * @Description 重置 * @Author JiangTao * @Date 2022-01-18 下午 05:36 */ reset() { if (sessionStorage.getItem("businessType") == "Upcoming") { this.chooseStatus = "1,2"; } else if (sessionStorage.getItem("businessType") == "Common") { this.chooseStatus = "1,2,3,4"; } this.mc = {}; //房屋按揭业务贷款 this.fc = {}; //资金用途 this.cc = {}; //消费类贷款 this.ic = {}; //正常执行 this.uc = {}; //超期未完成 this.nc = {}; //正常完成 this.oc = {}; //超期完成 this.chooseTypes = ""; //贷后检查类型 this.searchContent = ""; this.resetvalue = true; if (this.active == 0) { this.columns = [ { value: "01", text: "房屋按揭业务贷款" }, { value: "02", text: "资金用途" }, { value: "04", text: "消费类贷款" } ]; this.selectPerCustCheck(); } else if (this.active == 1) { this.columns = [{ text: "合作项目", value: "05" }]; this.selectPerCustCheck2(); } else if (this.active == 2) { this.columns = [ { text: "资金用途检查", value: "02" }, { text: "消费类贷款", value: "04" } ]; this.selectNetPerCustCheck(); } else if (this.active == 3) { this.columns = [{ text: "随意分", value: "08" }]; this.selectNetPerCustCheck2(); } } //上拉加载 onloaddata() { this.pageNo = Math.ceil(this.CustomerList.length / 10) + 1; if (this.active == 0) { return this.selectPerCustCheck(this.pageNo); } else if (this.active == 1) { return this.selectPerCustCheck2(this.pageNo); } else if (this.active == 2) { return this.selectNetPerCustCheck(this.pageNo); } else if (this.active == 3) { return this.selectNetPerCustCheck2(this.pageNo); } } /** * @Description 下拉刷新 * @Author JiangTao * @Date 2022-01-17 下午 05:14 */ onrefreshdata() { if (this.active == 0) { return this.selectPerCustCheck(); } else if (this.active == 1) { return this.selectPerCustCheck2(); } else if (this.active == 2) { return this.selectNetPerCustCheck(); } else if (this.active == 3) { return this.selectNetPerCustCheck2(); } } collection(item: any) { this.$store.commit("setEmpty"); this.$store.commit("setCusInfo", item); sessionStorage.setItem("activeType", this.active + ""); if (this.cusType == 1) { this.$router.push({ name: "PostLoanDetailsView" }); } else if (this.cusType == 2) { this.$router.push({ name: "NetPostLoanDetailsView" }); } } /** * @Description 查询个人客户贷后检查 * @Author JiangTao * @Date 2022-01-24 上午 11:41 */ selectPerCustCheck(pageNo = 1) { this.nodata = true; this.pullup = true; this.pulldown = true; let params = { ROWNUMSTART: (pageNo - 1) * 10, ROWNUMEND: pageNo * 10, CUSTOMERNAME: this.searchContent, INSPECTTYPE: this.chooseTypes == "" ? "01,02,04" : this.chooseTypes, STATUS: this.chooseStatus, TODOFLAG: "01", //01为待办,02为业务查询 tc: nettyApi.TRADE_CODE.selectGDLoanCheckList }; NativeUI.showWaiting(); return IF.transferDataInter(nettyApi.commonRq, params).then((res: any) => { NativeUI.closeWaiting(); if (res.rc == 1) { if(res.AFTER_LOAN_CHECK_LIST.length==0){ this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); }else{ if (pageNo == 1) { this.CustomerList = res.AFTER_LOAN_CHECK_LIST; } else { this.CustomerList = this.CustomerList.concat( res.AFTER_LOAN_CHECK_LIST ); } } } else { this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); } if (res.AFTER_LOAN_CHECK_LIST && res.AFTER_LOAN_CHECK_LIST.length < 10) { this.pullup = false; } if (this.CustomerList.length == 0) { this.nodata = false; this.pulldown = false; } }); } selectPerCustCheck2(pageNo = 1) { this.nodata = true; this.pullup = true; this.pulldown = true; let params = { ROWNUMSTART: (pageNo - 1) * 10, ROWNUMEND: pageNo * 10, CUSTOMERNAME: this.searchContent, INSPECTTYPE: "05", STATUS: this.chooseStatus, TODOFLAG: "01", //01为待办,02为业务查询 tc: nettyApi.TRADE_CODE.selectGDLoanCheckList }; NativeUI.showWaiting(); return IF.transferDataInter(nettyApi.commonRq, params).then((res: any) => { NativeUI.closeWaiting(); if (res.rc == 1) { if(res.AFTER_LOAN_CHECK_LIST.length==0){ this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); }else{ if (pageNo == 1) { this.CustomerList = res.AFTER_LOAN_CHECK_LIST; } else { this.CustomerList = this.CustomerList.concat( res.AFTER_LOAN_CHECK_LIST ); } } } else { this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); } if (res.AFTER_LOAN_CHECK_LIST && res.AFTER_LOAN_CHECK_LIST.length < 10) { this.pullup = false; } if (this.CustomerList.length == 0) { this.nodata = false; this.pulldown = false; } }); } /** *@description: 网贷贷后检查业务类 *@author: wanghang *@date: 2022-02-21 */ selectNetPerCustCheck(pageNo = 1) { this.nodata = true; this.pullup = true; this.pulldown = true; let params = { ROWNUMSTART: (pageNo - 1) * 10, ROWNUMEND: pageNo * 10, CUSTOMERNAME: this.searchContent, INSPECTTYPE: this.chooseTypes == "" ? "02,04" : this.chooseTypes, STATUS: this.chooseStatus, TODOFLAG: "01", //01为待办,02为业务查询 tc: nettyApi.TRADE_CODE.selectNetLoanCheckList }; NativeUI.showWaiting(); return IF.transferDataInter(nettyApi.commonRq, params).then((res: any) => { NativeUI.closeWaiting(); if (res.rc == 1) { if(res.AFTER_LOAN_CHECK_LIST.length==0){ this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); }else{ if (pageNo == 1) { this.CustomerList = res.AFTER_LOAN_CHECK_LIST; } else { this.CustomerList = this.CustomerList.concat( res.AFTER_LOAN_CHECK_LIST ); } } } else { this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); } if (res.AFTER_LOAN_CHECK_LIST && res.AFTER_LOAN_CHECK_LIST.length < 10) { this.pullup = false; } if (this.CustomerList.length == 0) { this.nodata = false; this.pulldown = false; } }); } /** *@description: 网贷贷后检查随意分 *@author: wanghang *@date: 2022-02-21 */ selectNetPerCustCheck2(pageNo = 1) { this.nodata = true; this.pullup = true; this.pulldown = true; let params = { ROWNUMSTART: (pageNo - 1) * 10, ROWNUMEND: pageNo * 10, CUSTOMERNAME: this.searchContent, INSPECTTYPE: "08", STATUS: this.chooseStatus, TODOFLAG: "01", //01为待办,02为业务查询 tc: nettyApi.TRADE_CODE.selectNetLoanCheckList }; NativeUI.showWaiting(); return IF.transferDataInter(nettyApi.commonRq, params).then((res: any) => { NativeUI.closeWaiting(); if (res.rc == 1) { if(res.AFTER_LOAN_CHECK_LIST.length==0){ this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); }else{ if (pageNo == 1) { this.CustomerList = res.AFTER_LOAN_CHECK_LIST; } else { this.CustomerList = this.CustomerList.concat( res.AFTER_LOAN_CHECK_LIST ); } } } else { this.CustomerList = []; NativeUI.toast("暂无贷后检查客户"); } if (res.AFTER_LOAN_CHECK_LIST && res.AFTER_LOAN_CHECK_LIST.length < 10) { this.pullup = false; } if (this.CustomerList.length == 0) { this.nodata = false; this.pulldown = false; } }); } /** * @Description 标签切换 * @Author JiangTao * @Date 2022-01-17 下午 05:02 */ change() { this.pageNo = 1; this.CustomerList = []; this.reset(); } //格式化处理数字 formatNum(num: any) { let strs = num.split("."); let p1 = strs[0]; let temp = ""; let p2 = strs[1]; for (let j = p1.length - 1; j >= 0; j--) { if ((p1.length - j) % 3 == 0) { if (j == 0) { temp += p1[j]; } else { temp += p1[j]; temp += ","; } } else { temp += p1[j]; } } if (p2 == null) { p2 = "00"; } else if (p2.length == 1) { p2 += "0"; } temp = temp.split("").reverse().join(""); return temp + "." + p2; } } </script> <style scoped> ::v-deep .van-cell__title, ::v-deep .van-field__label { display: flex; align-items: center; width: 20%; } .content { width: 100%; } .search { width: 100%; height: 70px; border: 1px solid #e1e2e3; display: flex; align-items: center; justify-content: center; } ::v-deep .d-form-field { padding-bottom: 0; width: 70%; height: 50px; } ::v-deep .van-field__control { height: 30px; } .customer-bottom-list { border-radius: 10px; background-color: #f8fdff; box-shadow: 0 0 6px #d7d7d7; margin: 0 20px 16px 20px; padding-bottom: 10px; position: relative; } .customer-bottom-list-top > div:nth-child(1) { width: 30px; height: 30px; border: 1px solid #ff574c; border-radius: 15px; display: flex; justify-content: center; align-items: center; } .customer-bottom-list-top > div:nth-child(2) { font-size: 16px; font-weight: bold; width: auto; margin: 0 10px; } .customer-bottom-list-top > div:nth-child(3) { color: #f59a23; } .customer-bottom-list-top { width: 90%; display: flex; justify-content: flex-start; align-items: center; padding-top: 1.5%; margin-left: 1.5%; } .customer-bottom-list-bottom { height: 26px; display: flex; margin-top: 10px; padding-left: 56px; justify-content: flex-start; align-items: center; } .screenPopup { width: 75%; margin-left: 25%; display: flex; align-items: center; justify-content: center; padding: 60px 5% 5px 5%; z-index: 99 !important; } .screenPopup > div:nth-child(1) { width: 85%; height: 100%; } ::v-deep .van-overlay { z-index: 90 !important; } .screenbutton { width: 15%; height: 100%; display: flex; flex-direction: column; align-content: center; justify-content: center; } ::v-deep .screenbutton button { margin: 20px auto; } ::v-deep .screenbutton .van-button__content { font-size: 18px; } .searchStyle { display: grid; align-items: center; grid-template-columns: 1fr; } .searchStyle div { width: 90%; } ::v-deep .scroller { margin-top: 10px; padding-top: 10px; height: 100%; overflow-y: auto; transform: translateX(1px); } ::v-deep .van-tabs--line .van-tabs__wrap { width: 50%; } ::v-deep .van-tab--active { border-bottom: 3px solid #ff574c; } ::v-deep .van-tabs__line { height: 0; background-color: white; } .screenType { display: flex; align-items: center; justify-content: space-around; padding-left: 1rem; color: #999999; } .screenType > div:nth-child(1) { width: 25%; } .label { width: 100%; height: 60%; display: flex; justify-content: space-evenly; align-items: center; } .label div { width: 25%; font-size: 13px; padding-top: 1.1%; padding-bottom: 0.7%; border-radius: 5px; text-align: center; background-color: white; border: 1px solid rgba(215, 215, 215, 1); margin: 0.7% 1%; } .add-button { position: absolute; width: 80px; height: 80px; border-radius: 40px; background-color: #ff574c; top: 80%; right: 5%; box-shadow: 0 5px 10px #e7aaa8; display: flex; justify-content: center; align-items: center; color: white; font-size: 20px; } ::v-deep .van-popup--bottom { width: 75% !important; margin-left: 25% !important; } </style>