<template>
|
<div>
|
<div class="form-content">
|
<FormList
|
:info="formInfo"
|
:isShowDetail="isShowDetail"
|
@handleClick="isShowDetail = !isShowDetail"
|
@updateValue="updateValue"
|
@onSubmit="onSubmit"
|
@setValueInfo="setValueInfo"
|
:isChangeArray="false"
|
@resetValue="resetValue"
|
></FormList>
|
</div>
|
|
<p class="export-excle">
|
<Download :type="0" :values="valueInfo" @handleClick="download"></Download>
|
</p>
|
|
<div class="list-content">
|
<TableList
|
:pageInfo="pageInfo"
|
@doAction="doAction"
|
@handleCurrentChange="handleCurrentChange"
|
@handleSizeChange="handleSizeChange"
|
@handleSelectionChange="handleSelectionChange"
|
:isMultipleSelect="!hideButton"
|
:activeIndex="activeIndex"
|
:isAutoIndex="true"
|
:isPaddingRight="false"
|
ref="tableRef"
|
:list="records"
|
:header="tableHeader"
|
:height="tableHeight"
|
:loading="loading"
|
></TableList>
|
</div>
|
|
<p class="message">
|
提示:超过12个月数据。请输入查询条件:申请编号或姓名。
|
</p>
|
|
|
<el-dialog
|
width="850px"
|
:visible.sync="isShowTrial"
|
custom-class="comm-dialog"
|
:modal-append-to-body="false"
|
>
|
<Trial
|
:info="tempRecord"
|
@handleClick="isShowTrial = false"
|
:formList="trialHeader"
|
@updateValue="updateTrialValue"
|
></Trial>
|
</el-dialog>
|
|
</div>
|
</template>
|
<script>
|
/**
|
* 借据查询页面
|
*/
|
import FormList from './components/FormList'
|
import TableList from './components/TableList'
|
import Download from './components/Download'
|
import Trial from './components/Trial'
|
import {
|
qryProdList,
|
qryDimensionList,
|
qryFlowPhaseList,
|
getAllCityAreaList,
|
// qryRepayTypeList,
|
qryCustomRepayList,
|
acctLoanRemindList,
|
getDictionaryList,
|
qryFirstInternalOrgInfo,
|
createExportAcctLoanRemind,
|
applyTransaction,
|
malTrial
|
} from '@comprehensive/serve/public'
|
import { expirationReminderHeader, trialHeader } from '@comprehensive/utils/tableHeaders'
|
import { expirationReminderSearch } from '@comprehensive/utils/formItems'
|
import { alert } from '@comprehensive/utils/comm'
|
|
const queryFlag = '02'
|
|
export default {
|
name: 'expirationReminder',
|
components: {
|
FormList,
|
TableList,
|
Download,
|
Trial,
|
},
|
computed: {
|
activeIndex(){
|
const arr = []
|
this.records.forEach((item,i) => {
|
this.checkInfoList.forEach(val => {
|
if(item.applyserialno == val.applyserialno){
|
arr.push(i)
|
}
|
});
|
});
|
return arr
|
}
|
},
|
data() {
|
return {
|
// 是否显示详情页
|
isShowList: true,
|
|
// 搜索表单字段及描述
|
// formInfo: [...debitSearch],
|
formInfo: [],
|
trialHeader: [],
|
tempRecord: {},
|
// 借据查询过滤字段
|
formInfoFilter: [
|
// 'customerid',
|
// 'paymentNameCodes',
|
// 'businesssum',
|
// 'businesstermmonth',
|
// 'businesstermday',
|
// 'extendtimes',
|
// 'changePsLimit',
|
// 'waiveLimit',
|
// 'loanupStatus',
|
// 'discountflag',
|
// 'discounttype',
|
// 'a1FeePayTypeCodes',
|
// 'loanPutoutBTypeCode',
|
// 'rfactorflag',
|
// 'businesstermmonthlist',
|
// 'businesstermdaylist',
|
// 'businesssumlist'
|
],
|
// 表单结果数据
|
valueInfo: {},
|
records: [],
|
tableHeader: [...expirationReminderHeader],
|
pageInfo: {
|
currentPage: 1,
|
pageSize: 10,
|
total: 0
|
},
|
// 是否显示所有表单项
|
isShowDetail: false,
|
checkInfoList: [],
|
tableHeight: '560px',
|
serialNo: '',
|
objectType: '',
|
customerID: '',
|
loading: false,
|
hideButton: true,
|
isShowTrial: false,
|
}
|
},
|
created() {
|
if(this.$route.name == 'comprehensive') {
|
this.hideButton = false
|
}
|
this.init()
|
},
|
methods: {
|
showDailog(){
|
this.$refs.tableRef.openDialog()
|
},
|
// 页面初始化处理
|
init() {
|
// 修改借据查询条件过滤
|
const { formInfoFilter } = this
|
this.formInfo = expirationReminderSearch.filter(
|
({ name }) => !formInfoFilter.includes(name)
|
)
|
this.qryPaymentName()
|
this.qryProdList()
|
this.qryDimensionList()
|
this.qryFlowPhaseList()
|
this.getAllCityAreaList()
|
this.loanList()
|
this.getDictionaryList()
|
this.qryFirstInternalOrgInfo()
|
// this.qryCustomRepayList()
|
this.a1feepaytypeList()
|
this.discountTypeList()
|
this.loanputoutbtypeCodeList()
|
this.discountLoanupStatus()
|
},
|
|
resetValue() {
|
this.pageInfo.currentPage = 1
|
this.loanList()
|
},
|
|
// 设置表单结果数据
|
setValueInfo(info = {}) {
|
this.valueInfo = info
|
},
|
|
// 还款方式
|
async qryPaymentName() {
|
const res = await getDictionaryList({ codeNo: 'PaymentName' })
|
const { result } = res
|
this.setOrGetFormInfo('paymentNameCodes', { options: result })
|
},
|
|
// 产品名称下拉列表
|
async qryProdList() {
|
const res = await qryProdList({ productTypeNo: '' })
|
const { result } = res
|
this.setOrGetFormInfo('productids', { options: result })
|
},
|
|
// 贴息类型
|
async discountTypeList() {
|
const res = await getDictionaryList({ codeNo: 'DiscountType' })
|
const { result } = res
|
this.setOrGetFormInfo('discounttype', { options: result })
|
},
|
|
// 借据状态
|
async getDictionaryList() {
|
const res = await getDictionaryList({ codeNo: 'LoanStatus' })
|
const { result } = res
|
this.setOrGetFormInfo('loanStatuses', { options: result })
|
},
|
|
// 手续费收取方式
|
async a1feepaytypeList() {
|
const res = await getDictionaryList({ codeNo: 'PoundageCharge' })
|
const { result } = res
|
this.setOrGetFormInfo('a1FeePayTypeCodes', { options: result })
|
},
|
|
// 贷款发放商家标志
|
async loanputoutbtypeCodeList() {
|
const res = await getDictionaryList({ codeNo: 'YesNo' })
|
const { result } = res
|
this.setOrGetFormInfo('loanPutoutBTypeCode', { options: result })
|
},
|
|
// 挂起状态
|
async discountLoanupStatus() {
|
const res = await getDictionaryList({ codeNo: 'YesNo' })
|
const { result } = res
|
this.setOrGetFormInfo('loanupStatus', { options: result })
|
},
|
|
// 产品维度下拉列表
|
async qryDimensionList() {
|
const { valueInfo } = this
|
let { productid = '' } = valueInfo
|
const res = await qryDimensionList({ productid })
|
const { result } = res
|
this.setOrGetFormInfo('dimensions', { options: result })
|
},
|
|
// 当前流程阶段下拉列表
|
async qryFlowPhaseList() {
|
const res = await qryFlowPhaseList({})
|
const { result } = res
|
this.setOrGetFormInfo('phaseNo', { options: result })
|
},
|
|
// 业务城市下拉列表
|
async getAllCityAreaList() {
|
const res = await getAllCityAreaList({ queryFlag })
|
const { result } = res
|
this.setOrGetFormInfo('businesscities', { options: result })
|
},
|
|
// 查询一级内部机构列表
|
async qryFirstInternalOrgInfo() {
|
const res = await qryFirstInternalOrgInfo({})
|
const { result } = res
|
this.setOrGetFormInfo('refereebllevel1iorg', { options: result })
|
this.setOrGetFormInfo('formbllevel1iorg', { options: result })
|
},
|
|
// // 获取还款方式列表
|
// async qryRepayTypeList() {
|
// const res = await qryRepayTypeList({
|
// // 贷款期限
|
// creditTerm: '',
|
|
// // 产品维度编号
|
// dimensionCode: '',
|
|
// // 产品编号
|
// productCode: '',
|
|
// // 还款方式 字典:PaymentName
|
// repaymentType: '',
|
|
// // 期限单位 M:月,D:日
|
// termUnit: ''
|
// })
|
// const { result } = res
|
// this.setOrGetFormInfo('paymentNameCodes', { options: result })
|
// },
|
|
// // 获取自定义还款方式列表
|
// async qryCustomRepayList() {
|
// const res = await qryCustomRepayList({})
|
// const { result } = res
|
// this.setOrGetFormInfo('paymentNameCodes', { options: result })
|
// },
|
|
updateTrialValue(index, info) {
|
const { value } = info
|
const dateFormate = 'YYYY/MM/DD'
|
if (value === null) {
|
return false
|
}
|
let item = this.checkInfoList[0]
|
this.toTrial(item, {
|
trialDate: this.dayjs(value).format(dateFormate)
|
})
|
},
|
|
// 获取当前数据列表
|
async loanList() {
|
this.loading = true
|
let { valueInfo, pageInfo, serialNo } = this
|
const res = await acctLoanRemindList({
|
...valueInfo,
|
...pageInfo
|
})
|
const { list = [], total, pages } = res.result
|
this.loading = false
|
this.records = list.reduce((pre, curr) => {
|
// 贷款期限处理
|
const { termUnit, businessTermMonth, businessTermDay } = curr
|
let businessTerm = ''
|
if (termUnit === 'M' && businessTermMonth) {
|
businessTerm = `${businessTermMonth}月`
|
}
|
if (termUnit === 'D' && businessTermDay) {
|
businessTerm = `${businessTermDay}天`
|
}
|
pre.push({
|
...curr,
|
businessTerm
|
})
|
return pre
|
}, [])
|
|
this.pageInfo = {
|
...pageInfo,
|
total
|
}
|
},
|
|
// 更新表单数据或查找某项数据
|
setOrGetFormInfo(nameKey, newInfo) {
|
let { formInfo } = this
|
let index = formInfo.findIndex(({ name }) => name === nameKey)
|
let result = {}
|
if (!isNaN(index)) {
|
this.$set(this.formInfo, index, { ...formInfo[index], ...newInfo })
|
result = this.formInfo[index]
|
}
|
if (typeof newInfo === 'undefined') {
|
return result
|
}
|
},
|
|
// 更新数据
|
updateValue(value, item) {
|
let { name } = item
|
this.setOrGetFormInfo(name, { value })
|
if (name === 'productid') {
|
this.qryDimensionList()
|
}
|
},
|
|
// 查询操作
|
onSubmit() {
|
// let { valueInfo } = this
|
this.pageInfo.currentPage = 1
|
this.loanList()
|
},
|
|
// 表单事件回调
|
doAction(name, item, index) {
|
// 点击申请编号的处理
|
if (name === 'applyserialno') {
|
const {
|
applyserialno,
|
flowno,
|
objecttype,
|
customerid,
|
occurType,
|
phone,
|
productID
|
} = item
|
// flowno objecttype 两个字段接口暂时缺失
|
this.serialNo = applyserialno
|
this.customerID = customerid
|
|
// 注意objecttype非驼峰命名,跟接口一致
|
this.objectType = objecttype
|
this.isShowList = false
|
this.$router.push(
|
`/comprehensiveTransaction/loanDetail/${applyserialno}?occurType=${occurType}&flowno=${flowno}&objectType=${objecttype}&customerID=${customerid}&phone=${phone}&productID=${productID}`
|
)
|
|
// // 案场贷款申请详情
|
// if (flowno === 'CreditFlowCase') {
|
// this.isShowList = false
|
// this.$router.push(
|
// `/comprehensiveTransaction/loanDetail/${applyserialno}?flowno=${flowno}&objectType=${objecttype}&customerID=${customerid}`
|
// )
|
// } else {
|
// this.$message('目前仅完成案场功能!')
|
// }
|
|
// // 非案场贷款申请详情
|
// if (flowno === 'CreditFlowCommon') {
|
// }
|
|
// // 易贷贷款申请详情
|
// if (flowno === 'MortgageFlow') {
|
// }
|
|
// // 快贷贷款申请详情
|
// if (flowno === 'BuildingBusinessFlow') {
|
// }
|
// console.log(
|
// `name: ${name}, flowno: ${flowno}, serialNo: ${applyserialno}`
|
// )
|
}
|
},
|
|
// 财务放款阶段需要获取列表选中的数据
|
handleSelectionChange(array) {
|
this.checkInfoList = array;
|
},
|
|
async doButtonAction(val) {
|
if (!this.checkInfoList.length) {
|
this.$message.warning("请选择需要处理的数据");
|
return;
|
}
|
if (this.checkInfoList.length !== 1) {
|
this.$message.warning("只可选择一条数据");
|
return;
|
}
|
|
// const origin = 'http://10.1.1.163'// location.origin
|
const origin = location.origin
|
let item = this.checkInfoList[0]
|
if(val == 1) {
|
location.href = origin + `/rlc-mal-web/#/comm/apply?pageId=41&serialNo=${item.loanserialno}&transCode=T1004&isApplyPhase=2&isHiddenAppoveOpinion=1&phaseNo=0010&applyType=01`
|
}
|
if(val == 8) {
|
if(item.loanstatus != 0){
|
this.$message.warning("只有借据状态为正常,才支持提前部分还款!");
|
}else{
|
location.href = origin + `/rlc-mal-web/#/comm/apply?pageId=41&serialNo=${item.loanserialno}&transCode=T2000&isApplyPhase=2&isHiddenAppoveOpinion=1&phaseNo=0010&applyType=05&trialPart=1`
|
}
|
}
|
if(val == 2) {
|
location.href = origin + `/rlc-mal-web/#/comm/apply?pageId=41&serialNo=${item.loanserialno}&transCode=T1004&isApplyPhase=2&isHiddenAppoveOpinion=1&phaseNo=0010&applyType=03`
|
}
|
if(val == 3) {
|
let {result} = await applyTransaction({ transCode: "5001", loanSerialno: item.loanserialno})
|
location.href = origin + `/rlc-mal-web/#/comm/apply?serialNo=&transCode=5001&pageId=37&transLogSerialno=${result.transLogSerialno}&objectType=TransactionApply&tabName=%E7%94%B3%E8%AF%B7%E4%BF%A1%E6%81%AF&phaseNo=0000&isApplyPhase=1&isHiddenAppoveOpinion=2`
|
}
|
if(val == 4) {
|
location.href = origin + `/rlc-mal-web/#/comm/apply?pageId=41&serialNo=${item.loanserialno}&transCode=T1004&isApplyPhase=2&isHiddenAppoveOpinion=1&phaseNo=0010&applyType=01`
|
}
|
if(val == 5) {
|
this.toTrial(item)
|
// let { transLogSerialno } = await applyTransaction({ transCode: "2000", loanSerialno: item.loanserialno})
|
// location.href = origin + `/rlc-mal-web/#/comm/apply?objectType=TransactionApply&applySerialno=${item.applyserialno}&transCode=2000&codeNo=&phaseNo=0030&pageId=&loanSerialno=${item.loanserialno}&withholdStatus=&transLogSerialno=${transLogSerialno}&tabName=%E7%94%B3%E8%AF%B7%E4%BF%A1%E6%81%AF&isApplyPhase=1&isHiddenAppoveOpinion=2`
|
}
|
if(val == 6) {
|
if(item.loanstatus == 2 || item.loanstatus == 3 || item.loanstatus == 4) {
|
const parameterMap = JSON.stringify({
|
ObjectNo: item.applyserialno,
|
send: 'yes'
|
})
|
location.href = origin + `/rlc-mal-web/#/comm/apply?pageId=&serialNo=${item.loanserialno}&applySerialno=&phaseNo=&objectType=TransactionApply&transCode=T1009&isApplyPhase=2&isHiddenAppoveOpinion=2&isHideButton&objectNo=${item.applyserialno}¶meterMap=${parameterMap}`
|
} else {
|
this.$message.warning("该单据未结清,不支持结清证明发送");
|
}
|
}
|
if(val == 7) {
|
let { result } = await applyTransaction({ transCode: "2001", loanSerialno: item.loanserialno})
|
location.href = origin +`/rlc-mal-web/#/comm/apply?objectType=TransactionApply&applySerialno=${item.applyserialno}&transCode=2001&codeNo=&phaseNo=&pageId=&loanSerialno=${item.loanserialno}&withholdStatus=&transLogSerialno=${result.transLogSerialno}&tabName=%E7%94%B3%E8%AF%B7%E4%BF%A1%E6%81%AF&isApplyPhase=1&isHiddenAppoveOpinion=2`
|
}
|
},
|
|
async toTrial(item,info) {
|
const {result} = await malTrial({
|
loanSerialno: item.loanserialno,
|
...info
|
})
|
const detail = result
|
// 逾期部分应还总金额 = 逾期应还本金+逾期应还罚息+逾期应还利息+逾期应还手续费+逾期应还平台服务费+逾期应还担保费+逾期应还展期费+逾期应还还款计划变更手续费
|
detail.overdueAllBalance = (parseFloat(detail.overduePrincipalBalance) +
|
parseFloat(detail.overduePalpenaltyBalance) +
|
parseFloat(detail.overdueInterestBalance) +
|
parseFloat(detail.overdueInterestBalanceA1) +
|
parseFloat(detail.overdueInterestBalanceA2) +
|
parseFloat(detail.overdueInterestBalanceA3) +
|
parseFloat(detail.overdueInterestBalanceA6) +
|
parseFloat(detail.overdueInterestBalanceA8)).toFixed(2)
|
// 提前结清部分应还总金额 = 提前还本金+提前还罚息+提前还利息+提前还手续费+提前还平台服务费+提前还担保费+提前还展期费+归还提前还款违约金金额+提前还展期费+提前还还款计划变更手续费
|
detail.repayBalance = (parseFloat(detail.prePrincipalBalance) +
|
parseFloat(detail.prePalpenaltyBalance) +
|
parseFloat(detail.preInterestBalance) +
|
parseFloat(detail.preInterestBalanceA1) +
|
parseFloat(detail.preInterestBalanceA2) +
|
parseFloat(detail.preInterestBalanceA3) +
|
parseFloat(detail.interestBalanceA5) +
|
parseFloat(detail.preInterestBalanceA6) +
|
parseFloat(detail.preInterestBalanceA8)).toFixed(2)
|
|
|
this.isShowTrial = true
|
this.trialHeader = this.getFormList(detail)
|
this.tempRecord = detail
|
if (Object.keys(info).length > 0) {
|
this.$message.success('数据已更新!')
|
}
|
},
|
|
|
getFormList(initValues = {}, list) {
|
const formList = trialHeader
|
if (typeof list === 'undefined') {
|
list = [...formList]
|
}
|
const keys = Object.keys(initValues)
|
if (keys.length > 0) {
|
return list.reduce((pre, curr) => {
|
let { value, name, descName, descValue, children } = curr
|
if (typeof value === 'undefined' && Array.isArray(children)) {
|
// has children
|
pre.push({
|
...curr,
|
children: this.getFormList(initValues, children)
|
})
|
} else {
|
let result = { ...curr }
|
result.value =
|
typeof initValues[name] === 'undefined' ? value : initValues[name]
|
if (typeof descValue === 'undefined' && descName) {
|
const dValue = initValues[descName]
|
result.descValue = typeof dValue === 'undefined' ? '' : dValue
|
}
|
pre.push(result)
|
}
|
return pre
|
}, [])
|
}
|
return [...list]
|
},
|
// 点击详情页返回的处理
|
backList(flg = true) {
|
this.isShowList = flg
|
},
|
|
// 修改翻页条数
|
handleSizeChange(val) {
|
this.pageInfo.pageSize = val
|
this.loanList()
|
},
|
|
// 修改翻页数
|
handleCurrentChange(val) {
|
this.pageInfo.currentPage = val
|
this.loanList()
|
},
|
|
// 导出excle
|
async download(values = {}) {
|
const res = await createExportAcctLoanRemind(values)
|
if(res.code == '00'){
|
alert('提交成功',res.msg,() => {})
|
}
|
}
|
}
|
}
|
</script>
|
<style lang="postcss" scoped>
|
.list-content {
|
font-size: 14px;
|
}
|
.export-excle {
|
margin: 0 0 20px 0;
|
}
|
.message{
|
font-size: 12px;
|
color: #666666;
|
padding: 10px 20px;
|
background-color: #FAFAFA;
|
}
|
</style>
|