|
|
@ -283,11 +283,10 @@ |
|
|
|
<el-input v-model="repaymentForm.otherExpenses" placeholder="请输入其他费用" type="text" maxlength="8" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input> |
|
|
|
<el-input v-model="repaymentForm.otherExpenses" placeholder="请输入其他费用" type="text" maxlength="8" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12" > |
|
|
|
<el-col :span="12" > |
|
|
|
<el-form-item label="实际还款日" class="date"> |
|
|
|
<el-form-item label="实际还款日" class="date" > |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker |
|
|
|
v-model="repaymentForm.actualRepaymentDate" |
|
|
|
v-model="repaymentForm.actualRepaymentDate" |
|
|
|
type="date" style="width: 100%;" |
|
|
|
type="date" style="width: 100%;" |
|
|
@ -358,7 +357,7 @@ |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form label-width="100px" class="flex-start-around"> |
|
|
|
<el-form label-width="100px" class="flex-start-around"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="还款期数:"> |
|
|
|
<el-form-item label="已还款期数:"> |
|
|
|
<span>{{StatisticsData.repaymentSum}}</span> |
|
|
|
<span>{{StatisticsData.repaymentSum}}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
@ -372,7 +371,7 @@ |
|
|
|
<span>{{StatisticsData.overdueSum}}</span> |
|
|
|
<span>{{StatisticsData.overdueSum}}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="还款额度(元):"> |
|
|
|
<el-form-item label="已还款额度(元):"> |
|
|
|
<span>{{StatisticsData.alreadyPaymentSum}}</span> |
|
|
|
<span>{{StatisticsData.alreadyPaymentSum}}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -723,6 +722,7 @@ import core from '../../../utils/core'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
totalRepayment(){ |
|
|
|
totalRepayment(){ |
|
|
|
if(isNaN(parseFloat(this.repaymentForm.otherExpenses)) || this.repaymentForm.otherExpenses == ''){ |
|
|
|
if(isNaN(parseFloat(this.repaymentForm.otherExpenses)) || this.repaymentForm.otherExpenses == ''){ |
|
|
|
|
|
|
|
// 本次利息加本次还款,如果为NaN |
|
|
|
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest))) { |
|
|
|
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest))) { |
|
|
|
return '' |
|
|
|
return '' |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -781,6 +781,7 @@ import core from '../../../utils/core'; |
|
|
|
this.comp = {} |
|
|
|
this.comp = {} |
|
|
|
this.liquidate ={} |
|
|
|
this.liquidate ={} |
|
|
|
this.$store.commit('discernEdit',false) |
|
|
|
this.$store.commit('discernEdit',false) |
|
|
|
|
|
|
|
this.$forceUpdate(); |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
if(val == 2){ |
|
|
|
if(val == 2){ |
|
|
@ -794,7 +795,6 @@ import core from '../../../utils/core'; |
|
|
|
otherExpenses: '', |
|
|
|
otherExpenses: '', |
|
|
|
overdueDays: 0 |
|
|
|
overdueDays: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.guaranteeForm,'kanxia gura') |
|
|
|
|
|
|
|
// 处于编辑状态,额外添加一个编辑中的状态判断 |
|
|
|
// 处于编辑状态,额外添加一个编辑中的状态判断 |
|
|
|
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() |
|
|
|
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() |
|
|
|
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ |
|
|
|
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ |
|
|
@ -817,12 +817,10 @@ import core from '../../../utils/core'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
status:function (params) { |
|
|
|
status:function (params) { |
|
|
|
console.log(params,'status'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
created(){ |
|
|
|
console.log(this.btn,'mate',this.$router.currentRoute.meta.btn) |
|
|
|
|
|
|
|
this.liquidateList() |
|
|
|
this.liquidateList() |
|
|
|
if(this.bankSelect.length===0){ |
|
|
|
if(this.bankSelect.length===0){ |
|
|
|
allBankName().then(res=>{ |
|
|
|
allBankName().then(res=>{ |
|
|
@ -918,7 +916,6 @@ import core from '../../../utils/core'; |
|
|
|
edit(row,val){ |
|
|
|
edit(row,val){ |
|
|
|
this.$store.commit('disabledAll',false) |
|
|
|
this.$store.commit('disabledAll',false) |
|
|
|
if(!row){// 进入新建业务界面 |
|
|
|
if(!row){// 进入新建业务界面 |
|
|
|
console.log('进入新增业务'); |
|
|
|
|
|
|
|
this.loanStatus = 2 |
|
|
|
this.loanStatus = 2 |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 2 }); |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 2 }); |
|
|
|
this.$store.commit('setNewOrOld','newLoans') |
|
|
|
this.$store.commit('setNewOrOld','newLoans') |
|
|
@ -927,14 +924,9 @@ import core from '../../../utils/core'; |
|
|
|
this.$store.commit('entering',true) |
|
|
|
this.$store.commit('entering',true) |
|
|
|
this.id = val.id |
|
|
|
this.id = val.id |
|
|
|
this.$store.commit("idData", { id: val.id });// 存业务id用于刷新复现 |
|
|
|
this.$store.commit("idData", { id: val.id });// 存业务id用于刷新复现 |
|
|
|
console.log(this.entering,'ent') |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
val?this.$store.commit('discernEdit',true):this.$store.commit('discernEdit',false) |
|
|
|
val?this.$store.commit('discernEdit',true):this.$store.commit('discernEdit',false) |
|
|
|
console.log('新建',this.discernEdit); |
|
|
|
|
|
|
|
}else{// 进入还款录入,添加个额外判断进入编辑界面 |
|
|
|
}else{// 进入还款录入,添加个额外判断进入编辑界面 |
|
|
|
console.log(row.id,'当前业务ID') |
|
|
|
|
|
|
|
console.log('进入录入或者编辑业务') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$store.commit('entering',false) // 不可编辑业务编辑区域 |
|
|
|
this.$store.commit('entering',false) // 不可编辑业务编辑区域 |
|
|
|
this.$store.commit('discernEdit',true)// 区分是否可编辑业务 |
|
|
|
this.$store.commit('discernEdit',true)// 区分是否可编辑业务 |
|
|
|
this.$store.commit('setNewOrOld','oldLoans')// 区分进入还款或者新建 |
|
|
|
this.$store.commit('setNewOrOld','oldLoans')// 区分进入还款或者新建 |
|
|
@ -982,7 +974,6 @@ import core from '../../../utils/core'; |
|
|
|
id: this.id |
|
|
|
id: this.id |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.guaranteeLoading = false |
|
|
|
this.guaranteeLoading = false |
|
|
|
console.log(res.data,'此处guar被赋值'); |
|
|
|
|
|
|
|
this.guaranteeForm = res.data.insuranceList |
|
|
|
this.guaranteeForm = res.data.insuranceList |
|
|
|
this.starEndDate = [this.guaranteeForm.loanStartTime,this.guaranteeForm.loanEndTime] |
|
|
|
this.starEndDate = [this.guaranteeForm.loanStartTime,this.guaranteeForm.loanEndTime] |
|
|
|
// 处理银行字符串 |
|
|
|
// 处理银行字符串 |
|
|
@ -1039,7 +1030,7 @@ import core from '../../../utils/core'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
//录入提交 |
|
|
|
//录入提交 |
|
|
|
saveAdd(repaymentForm){ |
|
|
|
saveAdd(repaymentForm){ |
|
|
|
// 判断是否新增 |
|
|
|
// 判断是否新增业务 |
|
|
|
if(this.status==='newLoans'){ |
|
|
|
if(this.status==='newLoans'){ |
|
|
|
this.saveInsurance() |
|
|
|
this.saveInsurance() |
|
|
|
}else{// 处于编辑/新增录入,需要判断该业务是否新增的,或是流转的,有不同处理方式 |
|
|
|
}else{// 处于编辑/新增录入,需要判断该业务是否新增的,或是流转的,有不同处理方式 |
|
|
@ -1053,8 +1044,6 @@ import core from '../../../utils/core'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
Promise.all([this.saveInsurance(),form2]).then(()=>{ |
|
|
|
Promise.all([this.saveInsurance(),form2]).then(()=>{ |
|
|
|
console.log(this.RepaymentId,'id有无') |
|
|
|
|
|
|
|
console.log(this.discernEdit,'是否为编辑') |
|
|
|
|
|
|
|
if(this.RepaymentId == ''){ |
|
|
|
if(this.RepaymentId == ''){ |
|
|
|
this.repaymentForm.insuranceId = this.id |
|
|
|
this.repaymentForm.insuranceId = this.id |
|
|
|
this.repaymentForm.totalRepayment = this.totalRepayment |
|
|
|
this.repaymentForm.totalRepayment = this.totalRepayment |
|
|
@ -1106,9 +1095,8 @@ import core from '../../../utils/core'; |
|
|
|
async statistics(){ |
|
|
|
async statistics(){ |
|
|
|
let res = await repaymentStatistics({ |
|
|
|
let res = await repaymentStatistics({ |
|
|
|
insuranceId: this.hisidId, |
|
|
|
insuranceId: this.hisidId, |
|
|
|
guaranteeAmount: this.guaranteeAmount |
|
|
|
// guaranteeAmount: this.guaranteeAmount |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(res,'当前的res--11'); |
|
|
|
|
|
|
|
this.StatisticsData = res.data |
|
|
|
this.StatisticsData = res.data |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 还款记录列表 |
|
|
|
// 还款记录列表 |
|
|
@ -1123,7 +1111,6 @@ import core from '../../../utils/core'; |
|
|
|
res.data.list.map(e =>{ |
|
|
|
res.data.list.map(e =>{ |
|
|
|
e.repaymentStatus = this.core.stcStatus(e.repaymentStatus) |
|
|
|
e.repaymentStatus = this.core.stcStatus(e.repaymentStatus) |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log(res,'记录列表信息') |
|
|
|
|
|
|
|
this.repaymentData = res.data.list |
|
|
|
this.repaymentData = res.data.list |
|
|
|
this.histotals = res.data.totalCount |
|
|
|
this.histotals = res.data.totalCount |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1257,18 +1244,15 @@ import core from '../../../utils/core'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
principalNode(val){// 组织架构选择人员 |
|
|
|
principalNode(val){// 组织架构选择人员 |
|
|
|
console.log(val,'组织架构选人'); |
|
|
|
|
|
|
|
this.$set(this.liquidate,'personLiable',val[0].name) |
|
|
|
this.$set(this.liquidate,'personLiable',val[0].name) |
|
|
|
this.liquidate.personLiableId = val[0].id |
|
|
|
this.liquidate.personLiableId = val[0].id |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
principalSeleted(){// 选择清收负责人 |
|
|
|
principalSeleted(){// 选择清收负责人 |
|
|
|
console.log('确定选择'); |
|
|
|
|
|
|
|
this.principal = false |
|
|
|
this.principal = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
searchClientChange(val,state){// 实时搜索客户详细信息 |
|
|
|
searchClientChange(val,state){// 实时搜索客户详细信息 |
|
|
|
companyInfoBySth({name:val}).then(res=>{ |
|
|
|
companyInfoBySth({name:val}).then(res=>{ |
|
|
|
// console.log(res,'请求客户接口取值,取得客户资料'); |
|
|
|
|
|
|
|
let data = res.data |
|
|
|
let data = res.data |
|
|
|
this.$set(this.guaranteeForm,'phone',data.legalPhone) |
|
|
|
this.$set(this.guaranteeForm,'phone',data.legalPhone) |
|
|
|
this.$set(this.guaranteeForm,'legalName',data.legalName) |
|
|
|
this.$set(this.guaranteeForm,'legalName',data.legalName) |
|
|
@ -1326,7 +1310,6 @@ import core from '../../../utils/core'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
blurOrganization(item,index){// 清收组织保存 |
|
|
|
blurOrganization(item,index){// 清收组织保存 |
|
|
|
item.edit = true |
|
|
|
item.edit = true |
|
|
|
console.log(index,item,'当前的值'); |
|
|
|
|
|
|
|
this.liquidateEdit('',item) |
|
|
|
this.liquidateEdit('',item) |
|
|
|
}, |
|
|
|
}, |
|
|
|
starEndTimeFn(val){// 贷款起止日期的处理 |
|
|
|
starEndTimeFn(val){// 贷款起止日期的处理 |
|
|
@ -1344,7 +1327,6 @@ import core from '../../../utils/core'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
liquidateEdit(val,item){// 清收组编辑活新增 |
|
|
|
liquidateEdit(val,item){// 清收组编辑活新增 |
|
|
|
console.log(item,'传进来的值'); |
|
|
|
|
|
|
|
let param = { |
|
|
|
let param = { |
|
|
|
groupName:item.groupName,// 清收组名称 |
|
|
|
groupName:item.groupName,// 清收组名称 |
|
|
|
} |
|
|
|
} |
|
|
@ -1352,7 +1334,6 @@ import core from '../../../utils/core'; |
|
|
|
param.id = item.id |
|
|
|
param.id = item.id |
|
|
|
} |
|
|
|
} |
|
|
|
liquidateEdit(param).then(res=>{ |
|
|
|
liquidateEdit(param).then(res=>{ |
|
|
|
console.log(res); |
|
|
|
|
|
|
|
this.liquidateList() |
|
|
|
this.liquidateList() |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1380,8 +1361,38 @@ import core from '../../../utils/core'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 同时处理多个表单的验证 |
|
|
|
// 同时处理多个表单的验证 |
|
|
|
return Promise.all([form1,form3]).then(()=>{ |
|
|
|
return Promise.all([form1,form3]).then(()=>{ |
|
|
|
this.$confirm('确定保存该记录?', '提示', {type:"info"}).then(()=>{ |
|
|
|
if(this.status==='newLoans'){// 新增需要提示 |
|
|
|
|
|
|
|
this.$confirm('确定保存该记录?', '提示', {type:"info"}).then(()=>{ |
|
|
|
|
|
|
|
let obj ={} |
|
|
|
|
|
|
|
// 如果处于编辑业务状态 或者是还款录入状态 |
|
|
|
|
|
|
|
if(this.discernEdit) obj.insuranceId = this.id |
|
|
|
|
|
|
|
Object.assign(obj,this.comp,this.liquidate) |
|
|
|
|
|
|
|
let param = { |
|
|
|
|
|
|
|
alInsuranceList:this.guaranteeForm,// 担保信息 |
|
|
|
|
|
|
|
alReimbursement:obj// 代偿清收相关 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.discernEdit){// 处于编辑状态下,且 |
|
|
|
|
|
|
|
editInsurance(param).then(res=>{ |
|
|
|
|
|
|
|
if(this.entering){ |
|
|
|
|
|
|
|
this.$message.success('编辑业务成功!') |
|
|
|
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else{// 处于新增状态下 |
|
|
|
|
|
|
|
param.source = 1 |
|
|
|
|
|
|
|
saveInsurance(param).then(res=>{ |
|
|
|
|
|
|
|
// 新增业务,返回上一页 |
|
|
|
|
|
|
|
if(this.status==='newLoans'){ |
|
|
|
|
|
|
|
this.$message.success('新增业务成功!') |
|
|
|
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(e=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else{// 编辑不需要提示 |
|
|
|
let obj ={} |
|
|
|
let obj ={} |
|
|
|
// 如果处于编辑业务状态 或者是还款录入状态 |
|
|
|
// 如果处于编辑业务状态 或者是还款录入状态 |
|
|
|
if(this.discernEdit) obj.insuranceId = this.id |
|
|
|
if(this.discernEdit) obj.insuranceId = this.id |
|
|
@ -1392,31 +1403,25 @@ import core from '../../../utils/core'; |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.discernEdit){// 处于编辑状态下,且 |
|
|
|
if(this.discernEdit){// 处于编辑状态下,且 |
|
|
|
editInsurance(param).then(res=>{ |
|
|
|
editInsurance(param).then(res=>{ |
|
|
|
console.log(res,'编辑业务'); |
|
|
|
|
|
|
|
if(this.entering){ |
|
|
|
if(this.entering){ |
|
|
|
this.$message.success('编辑业务成功!') |
|
|
|
this.$message.success('编辑业务成功!') |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}else{// 处于新增状态下 |
|
|
|
}else{// 处于新增状态下 |
|
|
|
|
|
|
|
param.source = 1 |
|
|
|
saveInsurance(param).then(res=>{ |
|
|
|
saveInsurance(param).then(res=>{ |
|
|
|
// 新增业务,返回上一页 |
|
|
|
// 新增业务,返回上一页 |
|
|
|
if(this.status==='newLoans'){ |
|
|
|
if(this.status==='newLoans'){ |
|
|
|
this.$message.success('新增业务成功!') |
|
|
|
this.$message.success('新增业务成功!') |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err=>{ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}).catch(e=>{ |
|
|
|
|
|
|
|
console.log(e,'取消保存记录') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(()=>{ |
|
|
|
}).catch(()=>{ |
|
|
|
// alert('验证错误') |
|
|
|
// alert('验证错误') |
|
|
|
console.log(err,'err') |
|
|
|
|
|
|
|
return false |
|
|
|
return false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1427,7 +1432,6 @@ import core from '../../../utils/core'; |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
deleteInsurance(row.id).then(res=>{ |
|
|
|
deleteInsurance(row.id).then(res=>{ |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
console.log(res,'res'); |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|