|
|
|
@ -42,8 +42,8 @@ |
|
|
|
|
<el-table-column prop="guaranteeAmount" label="担保额度(元)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="guaranteeTime" label="担保期限" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="applyTime" label="申请日期" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="repaymentAmount" label="还款额度(元)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="remainAmount" label="剩余额度(元)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="repaymentAmount" label="已还款金额(元)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="remainAmount" label="剩余金额(元)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="repaymentTime" label="还款期数" align="center"></el-table-column> |
|
|
|
|
<!-- <el-table-column prop="department" label="所属部门" align="center"></el-table-column> --> |
|
|
|
|
<el-table-column prop="paymentStatus" label="还款状态" align="center"></el-table-column> |
|
|
|
@ -84,23 +84,23 @@ |
|
|
|
|
<el-input disabled v-model="guaranteeForm.legalName" placeholder="自动读取"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款银行:" prop="bank"> |
|
|
|
|
<div class="df"> |
|
|
|
|
<div class="df" style="font-size:16px"> |
|
|
|
|
<el-input class="dn" type="text" v-model="guaranteeForm.bank"></el-input> |
|
|
|
|
<el-autocomplete |
|
|
|
|
class="dib" |
|
|
|
|
:disabled="!wanderEdit" |
|
|
|
|
:disabled="!wanderEdit||status=='newRecord'" |
|
|
|
|
@input="bankgroup($event,'main')" |
|
|
|
|
v-model="mainbank" |
|
|
|
|
placeholder="输入银行名称" |
|
|
|
|
:fetch-suggestions="querySearchAsync" |
|
|
|
|
></el-autocomplete> |
|
|
|
|
<p class="mgl10">-</p> |
|
|
|
|
<el-input :disabled="!wanderEdit" @change="bankgroup($event,'else')" v-model="elsebank" class="wd45 mgl10 dib" placeholder="分行名称" clearable></el-input> |
|
|
|
|
<el-input style="font-size:.875rem" :disabled="!wanderEdit||status=='newRecord'" @change="bankgroup($event,'else')" v-model="elsebank" class="wd45 mgl10 dib" placeholder="分行名称" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款起止日期:" prop="loanStartTime"> |
|
|
|
|
<el-date-picker |
|
|
|
|
:disabled="wanderEdit" |
|
|
|
|
:disabled="wanderEdit&&status=='oldLoansEdit'||status=='newRecord'" |
|
|
|
|
v-model="starEndDate" |
|
|
|
|
@change="starEndTimeFn" |
|
|
|
|
type="daterange" |
|
|
|
@ -111,7 +111,7 @@ |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="业务类别:" prop="businessType"> |
|
|
|
|
<el-select :disabled="!wanderEdit" v-model="guaranteeForm.businessType" placeholder="请选择"> |
|
|
|
|
<el-select :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.businessType" placeholder="请选择"> |
|
|
|
|
<el-option label="融资担保" value="融资担保"></el-option> |
|
|
|
|
<el-option label="担保" value="担保"></el-option> |
|
|
|
|
<el-option label="借贷" value="借贷"></el-option> |
|
|
|
@ -126,7 +126,7 @@ |
|
|
|
|
<el-col :span="12" > |
|
|
|
|
<el-form-item label="客户名称:" prop="customerName"> |
|
|
|
|
<el-select |
|
|
|
|
:disabled="!wanderEdit" |
|
|
|
|
:disabled="!wanderEdit||status=='newRecord'" |
|
|
|
|
v-model="guaranteeForm.customerName" |
|
|
|
|
@change="searchClientChange($event,'name')" |
|
|
|
|
filterable |
|
|
|
@ -149,17 +149,22 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="担保额度/贷款金额(元):" prop="guaranteeAmount"> |
|
|
|
|
<el-input :disabled="!wanderEdit" v-model="guaranteeForm.guaranteeAmount" placeholder="请输入担保额度"></el-input> |
|
|
|
|
<div class="cashChinese"> |
|
|
|
|
<el-input oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.guaranteeAmount" placeholder="请输入担保额度"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="担保期限:" prop="guaranteeTime"> |
|
|
|
|
<div class="df"> |
|
|
|
|
<el-input :disabled="!wanderEdit" v-model="guaranteeForm.guaranteeTime" placeholder="输入期限" style="width:94%;margin-right:5px"></el-input><p style="white-space: nowrap;">个月</p> |
|
|
|
|
<!-- <el-input onkeyup="value=this.value.replace(/\D+/g,'')" v-model="guaranteeForm.guaranteeTime" placeholder="输入期限" style="width:94%;margin-right:5px"></el-input><p style="white-space: nowrap;">个月</p> --> |
|
|
|
|
<el-select :disabled="!wanderEdit||status=='newRecord'" class="wd100" v-model="guaranteeForm.guaranteeTime" :placeholder="'选择期限'" > |
|
|
|
|
<el-option v-for="item in timeLimit" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="贷款用途:" prop="amountWide"> |
|
|
|
|
<el-select :disabled="!wanderEdit" v-model="guaranteeForm.amountWide" placeholder="请选择"> |
|
|
|
|
<el-select :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.amountWide" placeholder="请选择"> |
|
|
|
|
<el-option v-for="(item, index) in loansUse" :key="index" :label="item.label" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -179,11 +184,11 @@ |
|
|
|
|
<el-form label-width="160px" ref="comp" :disabled="disabledAll" :model="comp" :rules="compRule"> |
|
|
|
|
<el-col :span="12" > |
|
|
|
|
<el-form-item label="代偿金额(元):"> |
|
|
|
|
<el-input :disabled="!wanderEdit" oninput="value=value.replace(/[^\d.]/g,'')" v-model="comp.compensationAmount" placeholder="请输入"></el-input> |
|
|
|
|
<el-input oninput="value=value.replace(/[^\d.]/g,'')" v-model="comp.compensationAmount" placeholder="请输入"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="代偿时间 :"> |
|
|
|
|
<el-date-picker |
|
|
|
|
:disabled="!wanderEdit" |
|
|
|
|
|
|
|
|
|
v-model="comp.compensatoryTime" |
|
|
|
|
@change="compensatoryTimeChange" |
|
|
|
|
type="date" |
|
|
|
@ -194,9 +199,9 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<!-- 代偿金额 - 代偿日后续 还款的金额,每一笔还款,都在这里减去 --> |
|
|
|
|
<!-- 代偿金额 - 代偿日后 还款的金额 - 每一次的利息总额,每一笔还款,都在这里减去 --> |
|
|
|
|
<!-- TODO 此处的代偿未计算完善,后端缺字段 --> |
|
|
|
|
<el-form-item label="代偿余额(元):"> |
|
|
|
|
<!-- <el-input disabled v-model="comp.compensatoryBalance" placeholder="请输入"></el-input> --> |
|
|
|
|
<el-input disabled v-model="computedCompensatoryBalance" placeholder="请输入"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -215,18 +220,18 @@ |
|
|
|
|
<el-col :span="24" style="margin-right: 120px;"> |
|
|
|
|
<div class="df"> |
|
|
|
|
<el-form-item label="清收负责人:" style="width:30%" prop="personLiable"> |
|
|
|
|
<el-input :disabled="!entering&&status!=='newLoans'" @focus="principal=true" v-model="liquidate.personLiable" placeholder="请选择"></el-input> |
|
|
|
|
<el-input :disabled="!entering&&status!=='newLoans'||status=='newRecord'" @focus="principal=true" v-model="liquidate.personLiable" placeholder="请选择"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="所属清收组:" style="width:35%" prop="collectionGroupId"> |
|
|
|
|
<div class="df"> |
|
|
|
|
<el-select :disabled="!entering&&status!=='newLoans'" v-model="liquidate.collectionGroupId" placeholder="请选择"> |
|
|
|
|
<el-select :disabled="!entering&&status!=='newLoans'||status=='newRecord'" v-model="liquidate.collectionGroupId" placeholder="请选择"> |
|
|
|
|
<el-option v-for="(item, index) in organizationArrs" :key="index" :label="item.groupName" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-button @click="organization=true" type="text" class="mgl10">自定义</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="所在区域:" style="width:30%" prop="area"> |
|
|
|
|
<el-select :disabled="!entering&&status!=='newLoans'" v-model="liquidate.area" placeholder="请选择"> |
|
|
|
|
<el-select :disabled="!entering&&status!=='newLoans'||status=='newRecord'" v-model="liquidate.area" placeholder="请选择"> |
|
|
|
|
<el-option v-for="(item, index) in area" :key="index" :label="item.name" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -262,13 +267,14 @@ |
|
|
|
|
</el-card> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<!-- 还款信息在新建的时候不予展示 --> |
|
|
|
|
<el-col :span="24" v-if="status!=='newLoans'"> |
|
|
|
|
<!-- 还款信息在 新建业务 + 编辑业务 的时候不予展示 --> |
|
|
|
|
<!-- TODO 编辑业务后出现消失的情况 --> |
|
|
|
|
<el-col :span="24" v-if="status!=='newLoans'&&status!='oldLoansEdit'"> |
|
|
|
|
<el-card shadow="hover" class="mgb20 mat20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="mgb20 left-border fz-16"><p class="c-black mgl10">还款信息</p></div> |
|
|
|
|
<div> |
|
|
|
|
<el-form :model="repaymentForm" :rules="rules" ref="repaymentForm" label-width="160px" :disabled="this.loanbackStatus == '查看'"> |
|
|
|
|
<el-form :model="repaymentForm" :rules="rules" ref="repaymentForm" label-width="160px" :disabled="loanbackStatus == '查看'"> |
|
|
|
|
<el-col :span="12" > |
|
|
|
|
<el-form-item label="应还款日" prop="repaymentDate" class="date" > |
|
|
|
|
<el-date-picker v-model="repaymentForm.repaymentDate" placeholder="请选择应还款日" |
|
|
|
@ -280,7 +286,7 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="本次还款(元)" prop="currentRepayment" > |
|
|
|
|
<el-input v-model="repaymentForm.currentRepayment" placeholder="请输入本次还款金额" type="text" maxlength="10" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input> |
|
|
|
|
<el-input v-model="repaymentForm.currentRepayment" placeholder="请输入本次还款的本金金额" type="text" maxlength="10" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="其他费用(元)"> |
|
|
|
@ -324,13 +330,13 @@ |
|
|
|
|
<div class="df" style="margin-top:23px"> |
|
|
|
|
<span style="margin-right:20px">(2)资产</span> |
|
|
|
|
<el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentAssetsName" placeholder="请输入资产名称"></el-input> |
|
|
|
|
<el-input style="width:20%;min-width:250px;margin-left:20px" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentAssetsAmount" placeholder="请输入金额"></el-input> |
|
|
|
|
<el-input style="width:20%;min-width:250px;margin-left:20px" :disabled="!repaymentForm.repaymentAssetsName" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentAssetsAmount" placeholder="请输入金额"></el-input> |
|
|
|
|
<span style="margin-left:15px">元</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="df" style="margin-top:23px"> |
|
|
|
|
<span style="margin-right:20px">(3)其他</span> |
|
|
|
|
<el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentOtherName" placeholder="请输入其他方式"></el-input> |
|
|
|
|
<el-input style="width:20%;min-width:250px;margin-left:20px" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentOtherAmount" placeholder="请输入金额"></el-input> |
|
|
|
|
<el-input style="width:20%;min-width:250px;margin-left:20px" :disabled="!repaymentForm.repaymentOtherName" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentOtherAmount" placeholder="请输入金额"></el-input> |
|
|
|
|
<span style="margin-left:15px">元</span> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
@ -345,7 +351,7 @@ |
|
|
|
|
</el-card> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<div class="mab20 flex-start-around" v-if="this.loanbackStatus != '查看'"> |
|
|
|
|
<div class="mab20 flex-start-around" v-if="loanbackStatus!='查看'"> |
|
|
|
|
<el-button v-preventReClick type="primary" round class="mag" @click="saveAdd('repaymentForm')">提交</el-button> |
|
|
|
|
<el-button type="primary" plain round class="mag" @click="cancel">取消</el-button> |
|
|
|
|
</div> |
|
|
|
@ -357,10 +363,10 @@ |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover" class="mgb20 mat20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="mgb20 left-border fz-16"><p class="c-black mgl10">还款信息</p></div> |
|
|
|
|
<div style="height:35px" class="mgb20 left-border fz-16 flex-align-center"><p class="c-black mgl10">还款信息 <span style="font-size:14px">企业名称:{{StatisticsData.company}}</span></p></div> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="100px" class="flex-start-around"> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form label-width="120px" class="flex-start-around"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="已还款期数:"> |
|
|
|
|
<span>{{StatisticsData.repaymentSum}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
@ -370,7 +376,7 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="逾期期数:"> |
|
|
|
|
<span>{{StatisticsData.overdueSum}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
@ -380,8 +386,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="逾期利息(元):"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="已缴逾期利息(元):"> |
|
|
|
|
<span>{{StatisticsData.overdueInterest}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
@ -389,6 +395,15 @@ |
|
|
|
|
<span>{{StatisticsData.remainSum}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="代偿金额(元):"> |
|
|
|
|
<span>{{StatisticsData.compensationAmount}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="代偿余额(元):"> |
|
|
|
|
<span>{{StatisticsData.compensatoryBalance}}</span> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -506,12 +521,17 @@ |
|
|
|
|
<cancel_btn @click.native="principal=false"></cancel_btn> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 清收组 --> |
|
|
|
|
<el-dialog title="清收组" width="40%" :visible.sync="organization"> |
|
|
|
|
<div class="organization"> |
|
|
|
|
<div class="organization-row"> |
|
|
|
|
<div class="left">序号</div> |
|
|
|
|
<div class="center" style="border:0">名称</div> |
|
|
|
|
<div class="handle">操作</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-for="(item, index) in organizationArrs" :key="index" class="organization-row"> |
|
|
|
|
<div class="left">{{index+1}}</div> |
|
|
|
|
<!-- @blur="blurOrganization($event,item)" --> |
|
|
|
|
<input v-focus class="center" style="border:0" @blur="item.groupName=$event.target.value" v-if="!item.edit" :value="item.groupName"></el-input> |
|
|
|
|
<input class="center" disabled style="border:0" v-if="item.edit" :value="item.groupName"></el-input> |
|
|
|
|
<div class="handle df"> |
|
|
|
@ -520,17 +540,23 @@ |
|
|
|
|
<el-button type="text" @click="delOrganization(item,index)">删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-button class="addBtn" type="primary" icon="el-icon-plus" circle @click="addOrganizationArrs"></el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="fj-center wd100 "> |
|
|
|
|
<el-button round type="" @click="organization=false">返回</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { mapState } from 'vuex'; |
|
|
|
|
import { allBankName, insuranceList, insuranceDetail, repaymentEntry, repaymentList, repaymentStatistics, excelHis, delRepayment, repaymentDetail, excelInsurance, updateInsurance, updateRepayment, designateEmpTrees, getAllClient ,saveInsurance,companyInfoBySth,liquidateList,liquidateEdit,liquidateDel,deleteInsurance, editInsurance, compensationSituation,importInsurance , exportFailure} from '../../../utils/api'; |
|
|
|
|
import core from '../../../utils/core'; |
|
|
|
|
import core from '../../../utils/core';// fMoney3 |
|
|
|
|
// 使用轻量级的、仅限数字的函数实现 |
|
|
|
|
// import { create, all } from 'mathjs/number' |
|
|
|
|
// const math = create(all) |
|
|
|
|
let math = require('mathjs'); |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -549,9 +575,9 @@ import core from '../../../utils/core'; |
|
|
|
|
id: '', |
|
|
|
|
|
|
|
|
|
repaymentForm: { |
|
|
|
|
currentRepayment: '', |
|
|
|
|
interest: '', |
|
|
|
|
otherExpenses: '', |
|
|
|
|
currentRepayment:0, |
|
|
|
|
interest: 0, |
|
|
|
|
otherExpenses:0, |
|
|
|
|
overdueDays: 0 |
|
|
|
|
}, |
|
|
|
|
upLoadPop:false,// 导入弹框 |
|
|
|
@ -562,11 +588,11 @@ import core from '../../../utils/core'; |
|
|
|
|
], |
|
|
|
|
currentRepayment: [ |
|
|
|
|
{ required: true, message: '请输入本次还款金额', trigger: 'blur' }, |
|
|
|
|
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
{ pattern: /^(([0-9][0-9]*)|(([0]\.\d{1,2}|[0-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
], |
|
|
|
|
interest: [ |
|
|
|
|
{ required: true, message: '请输入利息', trigger: 'blur' }, |
|
|
|
|
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
{ pattern: /^(([0-9][0-9]*)|(([0]\.\d{1,2}|[0-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
logTypeList: [{ |
|
|
|
@ -658,13 +684,22 @@ import core from '../../../utils/core'; |
|
|
|
|
guaranteeForm: {// 担保信息 |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 选择期限 |
|
|
|
|
timeLimit:[ |
|
|
|
|
{ value: '1个月', label: '1个月' }, |
|
|
|
|
{ value: '3个月', label: '3个月' }, |
|
|
|
|
{ value: '6个月', label: '6个月' }, |
|
|
|
|
{ value: '9个月', label: '9个月' }, |
|
|
|
|
{ value: '12个月', label: '12个月' }, |
|
|
|
|
{ value: '24个月', label: '24个月' }, |
|
|
|
|
], |
|
|
|
|
guaranteeRule:{ |
|
|
|
|
bank: [{ required: true, message: '请选择贷款银行', trigger: 'change' }], |
|
|
|
|
loanStartTime:[{ required: true, message: '请选择贷款起止日期', trigger: 'change' }], |
|
|
|
|
businessType:[{ required: true, message: '请选择业务类别', trigger: 'change' }], |
|
|
|
|
customerName:[{ required: true, message: '请输入系统已有客户名称', trigger: 'change' }], |
|
|
|
|
guaranteeAmount: [{ required: true, message: '请输入担保额度/贷款金额', trigger: 'blur' },], |
|
|
|
|
guaranteeTime: [{ required: true, message: '请输入期限', trigger: 'blur' },], |
|
|
|
|
guaranteeTime: [{ required: true, message: '请输入期限', trigger: 'change' },], |
|
|
|
|
amountWide:[{ required: true, message: '请选择贷款用途', trigger: 'change' }], |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -704,14 +739,30 @@ import core from '../../../utils/core'; |
|
|
|
|
cash:0,// 当前金额 |
|
|
|
|
btns:{}, |
|
|
|
|
ids:[], |
|
|
|
|
interest:'',// 代偿后的利息 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed:{ |
|
|
|
|
computedCompensatoryBalance(){ |
|
|
|
|
this.comp.compensatoryBalance = this.comp.compensationAmount||0 - this.cash |
|
|
|
|
return this.comp.compensationAmount||0 - this.cash |
|
|
|
|
computedCompensatoryBalance:function(){// 代偿余额计算 |
|
|
|
|
/* TODO 未完成状态判断 */ |
|
|
|
|
// if(this.status){} // 如果是处于录入状态才减去count |
|
|
|
|
console.log(this.repaymentForm,'this.repaymentForm') |
|
|
|
|
if(!this.repaymentForm.currentRepayment)this.repaymentForm.currentRepayment = 0 |
|
|
|
|
if(!this.repaymentForm.otherExpenses)this.repaymentForm.otherExpenses = 0 |
|
|
|
|
if(!this.repaymentForm.interest)this.repaymentForm.interest = 0 |
|
|
|
|
let a = this.repaymentForm.currentRepayment , b = this.repaymentForm.otherExpenses , c = this.repaymentForm.interest |
|
|
|
|
|
|
|
|
|
let count = math.format(math.chain(math.bignumber(a)).add(math.bignumber(b)).add(math.bignumber(c)).done()) |
|
|
|
|
console.log(count,'当前的计算') |
|
|
|
|
// 余额 = 代偿总额 - 代偿日后还款总额 |
|
|
|
|
this.comp.compensatoryBalance = (this.comp.compensationAmount - this.cash - count)||0 |
|
|
|
|
// 当前代偿余额 = 额外减去 本次还款,利息,其他费用 |
|
|
|
|
|
|
|
|
|
return (this.comp.compensationAmount?this.comp.compensationAmount - this.cash - count:0)||0 |
|
|
|
|
}, |
|
|
|
|
source(){// 在点击录入时,判断系统流转的是否进行过编辑 |
|
|
|
|
return this.$store.state.loan.source |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
bankSelect:function(){ |
|
|
|
|
return this.$store.state.guarantee.bankData |
|
|
|
|
}, |
|
|
|
@ -730,21 +781,11 @@ import core from '../../../utils/core'; |
|
|
|
|
disabledAll(){ |
|
|
|
|
return this.$store.state.loan.disabledAll |
|
|
|
|
}, |
|
|
|
|
totalRepayment(){ |
|
|
|
|
if(isNaN(parseFloat(this.repaymentForm.otherExpenses)) || this.repaymentForm.otherExpenses == ''){ |
|
|
|
|
// 本次利息加本次还款,如果为NaN |
|
|
|
|
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest))) { |
|
|
|
|
return '' |
|
|
|
|
} else { |
|
|
|
|
return (parseFloat(this.repaymentForm.currentRepayment)*100 + parseFloat(this.repaymentForm.interest)*100)/100 |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest) + parseFloat(this.repaymentForm.otherExpenses))) { |
|
|
|
|
return '' |
|
|
|
|
} else { |
|
|
|
|
return (parseFloat(this.repaymentForm.currentRepayment)*100 + parseFloat(this.repaymentForm.interest)*100 + parseFloat(this.repaymentForm.otherExpenses)*100)/100 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
totalRepayment(){// 本次还款总额 |
|
|
|
|
// 本次还款 + 利息 + 其他费用 - 还款总额 |
|
|
|
|
// 本次还款 currentRepayment 利息 interest 其他费用 otherExpenses 减免金额 deductionAmount |
|
|
|
|
let data = this.repaymentForm |
|
|
|
|
return ((data.currentRepayment||0)*100 + (data.interest||0)*100 + (data.otherExpenses||0)*100 - (data.deductionAmount||0)*100)/100 |
|
|
|
|
}, |
|
|
|
|
overdueDays(){ |
|
|
|
|
if(this.repaymentForm.repaymentDate && !this.repaymentForm.actualRepaymentDate){ |
|
|
|
@ -780,10 +821,18 @@ import core from '../../../utils/core'; |
|
|
|
|
return 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 计算本次还款的清偿方式总额 |
|
|
|
|
reimbursement(){ |
|
|
|
|
return this.repaymentForm.repaymentCash||0+this.repaymentForm.repaymentAssetsAmount||0+this.repaymentForm.repaymentOtherAmount||0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
"$store.state.loan.loanStatus":function(val){ |
|
|
|
|
if(val!=2){ |
|
|
|
|
this.comp.compensatoryBalance = 0 |
|
|
|
|
this.cash = 0 |
|
|
|
|
} |
|
|
|
|
this.loanStatus = val |
|
|
|
|
if(val == 1){ |
|
|
|
|
this.insuranceData = [] |
|
|
|
@ -793,9 +842,15 @@ import core from '../../../utils/core'; |
|
|
|
|
this.$store.commit('discernEdit',false) |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
this.getData() |
|
|
|
|
this.loanbackStatus = '' |
|
|
|
|
} |
|
|
|
|
if(val == 2){ |
|
|
|
|
this.id = this.$store.state.loan.id |
|
|
|
|
console.log(this.souce,'判断是否系统流转--0') |
|
|
|
|
if(this.source === 0&&this.status==="oldLoans"){// 判断系统流转是否进行过编辑 |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
console.log(this.RepaymentId,this.id,'RepaymentId,进入2页面') |
|
|
|
|
this.id = this.$store.state.loan.id || this.$store.state.loan.RepaymentId |
|
|
|
|
this.RepaymentId = this.$store.state.loan.RepaymentId |
|
|
|
|
this.loanbackStatus = this.$store.state.loan.loanbackStatus |
|
|
|
|
this.guaranteeForm = {} |
|
|
|
@ -808,6 +863,7 @@ import core from '../../../utils/core'; |
|
|
|
|
// 处于编辑状态,额外添加一个编辑中的状态判断 |
|
|
|
|
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() |
|
|
|
|
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ |
|
|
|
|
console.log(this.loanbackStatus,'什么状态') |
|
|
|
|
this.getRepaymentDetail() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -818,6 +874,7 @@ import core from '../../../utils/core'; |
|
|
|
|
this.repaymentList() |
|
|
|
|
} |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: this.loanStatus }); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
principal:function(val){// 处理组织架构选人是否清空 |
|
|
|
|
this.designateEmpTrees() |
|
|
|
@ -826,13 +883,22 @@ import core from '../../../utils/core'; |
|
|
|
|
this.clearNodeArr = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
status:function (params) { |
|
|
|
|
// status:function (params) { |
|
|
|
|
|
|
|
|
|
// }, |
|
|
|
|
loanStatus(val){ |
|
|
|
|
if(val==1){ |
|
|
|
|
this.starEndDate = [] |
|
|
|
|
this.guaranteeForm = {} |
|
|
|
|
this.mainbank = '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created(){ |
|
|
|
|
console.log(math.format(math.chain(math.bignumber(0.1)).add(math.bignumber(0.2)).done()),'计算数据') |
|
|
|
|
console.log(this.loanbackStatus,'this.loanbackStatus') |
|
|
|
|
this.liquidateList() |
|
|
|
|
if(this.bankSelect.length===0){ |
|
|
|
|
if(this.bankSelect.length===0){// 请求银行数据 |
|
|
|
|
allBankName().then(res=>{ |
|
|
|
|
let arr = res.data.map(item=>{ |
|
|
|
|
return {value:item.bankName} |
|
|
|
@ -840,11 +906,12 @@ import core from '../../../utils/core'; |
|
|
|
|
this.$store.commit('getBanks',arr) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 判断当前处于哪个页面 |
|
|
|
|
this.loanStatus = this.$store.state.loan.loanStatus |
|
|
|
|
if(this.loanStatus == 1){ |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
// 处于录入或新增时 |
|
|
|
|
if(this.loanStatus == 2){ |
|
|
|
|
this.id = this.$store.state.loan.id |
|
|
|
|
this.RepaymentId = this.$store.state.loan.RepaymentId |
|
|
|
@ -857,6 +924,7 @@ import core from '../../../utils/core'; |
|
|
|
|
overdueDays: 0 |
|
|
|
|
} |
|
|
|
|
// 处于编辑状态 |
|
|
|
|
console.log(this.status,'处于什么状态') |
|
|
|
|
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() |
|
|
|
|
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ |
|
|
|
|
this.getRepaymentDetail() |
|
|
|
@ -871,6 +939,9 @@ import core from '../../../utils/core'; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods:{ |
|
|
|
|
init(val){ |
|
|
|
|
this.$math.bignumber(val) |
|
|
|
|
}, |
|
|
|
|
// 查询担保列表 |
|
|
|
|
async getData() { |
|
|
|
|
this.dataLoading = true |
|
|
|
@ -921,32 +992,37 @@ import core from '../../../utils/core'; |
|
|
|
|
// this.$message.error('请先选择担保列表数据 !'); |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/* TODO 如果处于流转且没有编辑过的情况下,加个提示 */ |
|
|
|
|
//还款录入/新建业务 |
|
|
|
|
edit(row,val){ |
|
|
|
|
this.$store.commit('disabledAll',false)// 取消禁用全部, |
|
|
|
|
if(!row){// 进入新建业务界面 |
|
|
|
|
if(!row){// 没有row传值,进入新建业务界面--录入无关 |
|
|
|
|
console.log('进入新建业务') |
|
|
|
|
this.loanStatus = 2 |
|
|
|
|
this.$store.commit("loanbackStatusData", { loanbackStatus: '' });// 判断按钮状态 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 2 }); |
|
|
|
|
this.$store.commit('setNewOrOld','newLoans') |
|
|
|
|
this.$store.commit('entering',false) |
|
|
|
|
this.$store.commit('wanderEdit',true) |
|
|
|
|
|
|
|
|
|
if(val){// 编辑业务阶段 |
|
|
|
|
this.$store.commit('setNewOrOld','oldLoans')// 区分进入还款或者新建 |
|
|
|
|
if(val){// --编辑业务阶段 |
|
|
|
|
this.$store.commit('setNewOrOld','oldLoansEdit')// 进入业务编辑 |
|
|
|
|
// 编辑手动添加的业务 |
|
|
|
|
this.$store.commit('entering',true) |
|
|
|
|
this.id = val.id |
|
|
|
|
this.$store.commit("idData", { id: val.id });// 存业务id用于刷新复现 |
|
|
|
|
if(val.source==0){// 编辑流转的业务 |
|
|
|
|
if(val.source==0){// 编辑流转的业务--区分流转手动录入 |
|
|
|
|
this.$store.commit('wanderEdit',false) |
|
|
|
|
// console.log(this.status,'status') |
|
|
|
|
}else{ |
|
|
|
|
this.$store.commit('wanderEdit',true) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
val?this.$store.commit('discernEdit',true):this.$store.commit('discernEdit',false) |
|
|
|
|
}else{// 进入还款录入,添加个额外判断进入编辑界面 |
|
|
|
|
|
|
|
|
|
this.loanbackStatus = '录入' // 新增判断,用于后退 |
|
|
|
|
this.$store.commit("loanbackStatusData", { loanbackStatus: '录入' }); |
|
|
|
|
}else{ |
|
|
|
|
console.log('进入录入界面') |
|
|
|
|
// 进入还款录入,添加个额外判断进入编辑界面 |
|
|
|
|
this.$store.commit('wanderEdit',true) |
|
|
|
|
this.$store.commit('entering',false) // 不可编辑-业务编辑区域 |
|
|
|
|
this.$store.commit('discernEdit',true)// 区分是否可编辑业务 |
|
|
|
@ -955,7 +1031,7 @@ import core from '../../../utils/core'; |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 2 });// 切换页面状态 |
|
|
|
|
this.id = row.id |
|
|
|
|
this.$store.commit("idData", { id: row.id });// 存业务id用于刷新复现 |
|
|
|
|
|
|
|
|
|
this.$store.commit("source",this.row.source);// 存来源,用于判断是否编辑过系统流转的业务 |
|
|
|
|
this.RepaymentId = '' |
|
|
|
|
this.$store.commit("RepaymentIdData", { RepaymentId: '' });// 查还款记录详情用 |
|
|
|
|
this.loanbackStatus = '录入' |
|
|
|
@ -1015,6 +1091,10 @@ import core from '../../../utils/core'; |
|
|
|
|
compensatoryTime:reimbursement.compensatoryTime, |
|
|
|
|
compensatoryBalance:reimbursement.compensatoryBalance, |
|
|
|
|
} |
|
|
|
|
if(this.comp.compensatoryTime){// 详情读取一次代偿信息 |
|
|
|
|
this.compensatoryTimeChange(this.comp.compensatoryTime) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 清收 |
|
|
|
|
this.liquidate = { |
|
|
|
|
personLiable:reimbursement.personLiable, |
|
|
|
@ -1049,53 +1129,140 @@ import core from '../../../utils/core'; |
|
|
|
|
this.repaymentForm.overdueDays = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 判断是否清偿方式总额不等于还款额度 |
|
|
|
|
/* TODO 待处理,未完成判断 |
|
|
|
|
* else 系统流转编辑有问题, |
|
|
|
|
* else 还款记录添加代偿金额和代偿余额 |
|
|
|
|
* else 代偿余额还需要减掉总利息 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
isReimbursement(){ |
|
|
|
|
if(this.reimbursement&&this.reimbursement!==this.repaymentForm.currentRepayment){ |
|
|
|
|
return false |
|
|
|
|
}else return true |
|
|
|
|
}, |
|
|
|
|
//录入提交 |
|
|
|
|
saveAdd(repaymentForm){ |
|
|
|
|
// if(!this.isReimbursement()){ |
|
|
|
|
// return this.$message.warning('清偿总额需等于本次还款!') |
|
|
|
|
// } |
|
|
|
|
console.log(this.status,'newL为新增业务') |
|
|
|
|
// 判断是否新增业务 |
|
|
|
|
if(this.status==='newLoans'){ |
|
|
|
|
if(this.status==='newLoans'||this.status=="oldLoansEdit"){ |
|
|
|
|
console.log('进入新增业务') |
|
|
|
|
this.saveInsurance() |
|
|
|
|
}else{// 处于编辑/新增录入,需要判断该业务是否新增的,或是流转的,有不同处理方式 |
|
|
|
|
let form2 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs[repaymentForm].validate((valid) => { |
|
|
|
|
}else{ |
|
|
|
|
console.log('进入录入环节') |
|
|
|
|
// 处于编辑/新增录入,需要判断该业务是否新增的,或是流转的,有不同处理方式 |
|
|
|
|
// 担保信息 |
|
|
|
|
const form1 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs['refGuaranteeForm'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
resolve() |
|
|
|
|
}else{ |
|
|
|
|
this.$message.error('请输入必填信息!') |
|
|
|
|
has = true |
|
|
|
|
reject() |
|
|
|
|
// return this.$message.error('请输入必填信息!') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
Promise.all([this.saveInsurance(),form2]).then(()=>{ |
|
|
|
|
if(this.RepaymentId == ''){ |
|
|
|
|
this.repaymentForm.insuranceId = this.id |
|
|
|
|
this.repaymentForm.totalRepayment = this.totalRepayment |
|
|
|
|
this.repaymentForm.overdueDays = this.overdueDays |
|
|
|
|
repaymentEntry(this.repaymentForm).then(res=>{ |
|
|
|
|
this.$message.success("录入成功!"); |
|
|
|
|
this.loanStatus = 1 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
console.log(this.$refs["repaymentForm"],'值') |
|
|
|
|
// 清收信息 |
|
|
|
|
const form3 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs['liquidate'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
resolve() |
|
|
|
|
}else{ |
|
|
|
|
reject() |
|
|
|
|
// if(!has) return this.$message.error('请输入必填信息!') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
let form2 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs["repaymentForm"].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
resolve() |
|
|
|
|
}else{ |
|
|
|
|
this.repaymentForm.totalRepayment = this.totalRepayment |
|
|
|
|
this.repaymentForm.overdueDays = this.overdueDays |
|
|
|
|
updateRepayment(this.repaymentForm).then(res=>{ |
|
|
|
|
this.$message.success("编辑成功!"); |
|
|
|
|
this.loanStatus = 3 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 3 }); |
|
|
|
|
reject() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
let that = this |
|
|
|
|
function fn (){ |
|
|
|
|
if(that.RepaymentId == ''){// 新增录入 |
|
|
|
|
console.log('新增录入') |
|
|
|
|
that.repaymentForm.insuranceId = that.id |
|
|
|
|
console.log(that.id,'id') |
|
|
|
|
that.repaymentForm.totalRepayment = that.totalRepayment |
|
|
|
|
that.repaymentForm.overdueDays = that.overdueDays |
|
|
|
|
let obj ={} |
|
|
|
|
// 如果处于编辑业务状态 或者是还款录入状态 |
|
|
|
|
if(that.discernEdit) obj.insuranceId = that.id |
|
|
|
|
Object.assign(obj,that.comp,that.liquidate) |
|
|
|
|
let param = { |
|
|
|
|
alInsuranceList:that.guaranteeForm,// 担保信息 |
|
|
|
|
alReimbursement:obj// 代偿清收相关 |
|
|
|
|
} |
|
|
|
|
Promise.all([repaymentEntry(that.repaymentForm),editInsurance(param)]).then((res1,res2)=>{ |
|
|
|
|
that.$message.success("录入成功!"); |
|
|
|
|
that.loanStatus = 3 |
|
|
|
|
that.$store.commit("loanStatusData", { loanStatus: 3 }); |
|
|
|
|
}) |
|
|
|
|
}else{// 编辑录入 |
|
|
|
|
let obj ={} |
|
|
|
|
// 如果处于编辑业务状态 或者是还款录入状态 |
|
|
|
|
if(that.discernEdit) obj.insuranceId = that.id |
|
|
|
|
Object.assign(obj,that.comp,that.liquidate) |
|
|
|
|
let param = { |
|
|
|
|
alInsuranceList:that.guaranteeForm,// 担保信息 |
|
|
|
|
alReimbursement:obj// 代偿清收相关 |
|
|
|
|
} |
|
|
|
|
that.repaymentForm.totalRepayment = that.totalRepayment |
|
|
|
|
that.repaymentForm.overdueDays = that.overdueDays |
|
|
|
|
Promise.all([updateRepayment(that.repaymentForm),editInsurance(param)]).then((res1,res2)=>{ |
|
|
|
|
that.$message.success("编辑成功!"); |
|
|
|
|
that.loanStatus = 3 |
|
|
|
|
that.$store.commit("loanStatusData", { loanStatus: 3 }); |
|
|
|
|
}) |
|
|
|
|
// updateRepayment(that.repaymentForm).then(res=>{ |
|
|
|
|
// that.$message.success("编辑成功!"); |
|
|
|
|
// that.loanStatus = 3 |
|
|
|
|
// that.$store.commit("loanStatusData", { loanStatus: 3 }); |
|
|
|
|
// }).catch(err=>{ |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('正在执行录入') |
|
|
|
|
Promise.all([form1,form3,form2]).then(()=>{ |
|
|
|
|
if(!this.totalSame()){ |
|
|
|
|
return this.$confirm('清偿方式的金额之和与本次还款总额不符,可能会导致数据统计错误,是否继续?', '提示', { |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(()=>{ |
|
|
|
|
fn() |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
console.log('此处报错') |
|
|
|
|
return '我是错误信息' |
|
|
|
|
}) |
|
|
|
|
} else{ |
|
|
|
|
fn() |
|
|
|
|
} |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
console.log(err,'err') |
|
|
|
|
this.$message.error('请输入必填信息!') |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//取消录入 |
|
|
|
|
cancel(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.status=="newLoans"||this.status=="oldLoansEdit"){ |
|
|
|
|
this.loanStatus = 1 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 1 }); |
|
|
|
|
}else{ |
|
|
|
|
this.loanStatus = 3 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 3 }); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//选择实际还款日日期 |
|
|
|
|
clickEndTime(){ |
|
|
|
@ -1180,15 +1347,21 @@ import core from '../../../utils/core'; |
|
|
|
|
this.$message.error('请先选择还款记录列表数据 !'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//查询还款记录列表详情 |
|
|
|
|
//进入新增还款记录 |
|
|
|
|
addRepayment(){ |
|
|
|
|
this.loanStatus = 2 |
|
|
|
|
this.loanStatus = 2 // 切页面,保存 |
|
|
|
|
this.$store.commit("loanStatusData", { loanStatus: 2 }); |
|
|
|
|
console.log(this.$store.state.loan.hisidId) |
|
|
|
|
// 新增判断 |
|
|
|
|
this.RepaymentId = '' |
|
|
|
|
this.$store.commit("RepaymentIdData", { RepaymentId: '' }); |
|
|
|
|
this.loanbackStatus = '新增' |
|
|
|
|
this.$store.commit("RepaymentIdData", { RepaymentId: this.RepaymentId }); |
|
|
|
|
|
|
|
|
|
this.loanbackStatus = '新增' // 新增判断,用于后退 |
|
|
|
|
this.$store.commit("loanbackStatusData", { loanbackStatus: '新增' }); |
|
|
|
|
this.$store.commit('setNewOrOld','newRecord') |
|
|
|
|
|
|
|
|
|
this.$store.commit('setNewOrOld','newRecord') // 判断新增还款记录 |
|
|
|
|
|
|
|
|
|
console.log(this.status,'是否是新增数据') |
|
|
|
|
this.$store.commit('disabledAll',false) |
|
|
|
|
}, |
|
|
|
|
// 还款记录:查看/编辑 |
|
|
|
@ -1200,6 +1373,10 @@ import core from '../../../utils/core'; |
|
|
|
|
this.id = row.insuranceId |
|
|
|
|
this.$store.commit("idData", { id: row.insuranceId }); |
|
|
|
|
this.loanbackStatus = type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$store.commit('setNewOrOld','oldLoans')// 区分进入还款或者新建 |
|
|
|
|
|
|
|
|
|
// 不可编辑 |
|
|
|
|
type==='编辑'?this.$store.commit('discernEdit',false):this.$store.commit('discernEdit',false) |
|
|
|
|
if (type==='查看') { |
|
|
|
@ -1210,7 +1387,9 @@ import core from '../../../utils/core'; |
|
|
|
|
|
|
|
|
|
this.$store.commit("loanbackStatusData", { loanbackStatus: type }); |
|
|
|
|
}, |
|
|
|
|
// 取得录入页面数据详情 |
|
|
|
|
async getRepaymentDetail(){ |
|
|
|
|
console.log(this.RepaymentId,'调用详情接口') |
|
|
|
|
let res = await repaymentDetail({ |
|
|
|
|
id: this.RepaymentId |
|
|
|
|
}); |
|
|
|
@ -1358,25 +1537,28 @@ import core from '../../../utils/core'; |
|
|
|
|
this.liquidateList() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
saveInsurance(){// 新增保后业务 或编辑 |
|
|
|
|
saveInsurance(){// 新增保后业务 或编辑业务 |
|
|
|
|
/* TODO 需要处理没有还款信息的编辑 */ |
|
|
|
|
let has = false |
|
|
|
|
// 担保信息 |
|
|
|
|
const form1 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs['refGuaranteeForm'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
resolve() |
|
|
|
|
}else{ |
|
|
|
|
has = true |
|
|
|
|
return this.$message.error('请输入必填信息!') |
|
|
|
|
// return this.$message.error('请输入必填信息!') |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// 清收信息 |
|
|
|
|
const form3 = new Promise((resolve,reject)=>{ |
|
|
|
|
this.$refs['liquidate'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
resolve() |
|
|
|
|
}else{ |
|
|
|
|
if(!has) return this.$message.error('请输入必填信息!') |
|
|
|
|
// if(!has) return this.$message.error('请输入必填信息!') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
@ -1393,7 +1575,7 @@ import core from '../../../utils/core'; |
|
|
|
|
alInsuranceList:this.guaranteeForm,// 担保信息 |
|
|
|
|
alReimbursement:obj// 代偿清收相关 |
|
|
|
|
} |
|
|
|
|
if(this.discernEdit){// 处于编辑状态下,且 |
|
|
|
|
if(this.discernEdit){// 处于编辑状态下-- |
|
|
|
|
editInsurance(param).then(res=>{ |
|
|
|
|
if(this.entering){ |
|
|
|
|
this.$message.success('编辑业务成功!') |
|
|
|
@ -1401,7 +1583,7 @@ import core from '../../../utils/core'; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{// 处于新增状态下 |
|
|
|
|
param.source = 1 |
|
|
|
|
// param.source = 1 |
|
|
|
|
saveInsurance(param).then(res=>{ |
|
|
|
|
// 新增业务,返回上一页 |
|
|
|
|
if(this.status==='newLoans'){ |
|
|
|
@ -1422,6 +1604,7 @@ import core from '../../../utils/core'; |
|
|
|
|
alInsuranceList:this.guaranteeForm,// 担保信息 |
|
|
|
|
alReimbursement:obj// 代偿清收相关 |
|
|
|
|
} |
|
|
|
|
console.log(param,'编辑传值') |
|
|
|
|
if(this.discernEdit){// 处于编辑状态下,且 |
|
|
|
|
editInsurance(param).then(res=>{ |
|
|
|
|
if(this.entering){ |
|
|
|
@ -1443,7 +1626,7 @@ import core from '../../../utils/core'; |
|
|
|
|
} |
|
|
|
|
}).catch(()=>{ |
|
|
|
|
// alert('验证错误') |
|
|
|
|
return false |
|
|
|
|
return this.$message.error('请输入必填信息!') |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
deleteInsurance(row){// 删除保后业务--仅新建可删 |
|
|
|
@ -1459,6 +1642,11 @@ import core from '../../../utils/core'; |
|
|
|
|
compensatoryTimeChange(val){// 代偿时间处理,取得已偿还金额 |
|
|
|
|
compensationSituation({data:val,insuranceId:this.id}).then(res=>{ |
|
|
|
|
this.cash = res.data.amount |
|
|
|
|
console.log('取得当前的cash',this.cash) |
|
|
|
|
/* TODO 利息,其他,本次还款*/ |
|
|
|
|
// 利息 |
|
|
|
|
// this.interest = res.data.xx |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
uploadSuccess(response, file, fileList) { // 上传成功 |
|
|
|
@ -1479,6 +1667,16 @@ import core from '../../../utils/core'; |
|
|
|
|
// } |
|
|
|
|
// this.uploadList.push({ name: file.name, url: response.message.fileUrl }); |
|
|
|
|
}, |
|
|
|
|
// 判断本次总额是否和清偿方式相同 |
|
|
|
|
totalSame(){ |
|
|
|
|
// 总额 |
|
|
|
|
let count = (+this.repaymentForm.repaymentCash||0) + (+this.repaymentForm.repaymentAssetsAmount||0) + (+this.repaymentForm.repaymentOtherAmount||0) |
|
|
|
|
if(this.totalRepayment!=count){ |
|
|
|
|
return false |
|
|
|
|
}else{ |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1522,6 +1720,8 @@ import core from '../../../utils/core'; |
|
|
|
|
.handle{ |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
width: 25%; |
|
|
|
|
background: #00b9ff54; |
|
|
|
|
} |
|
|
|
@ -1530,7 +1730,7 @@ import core from '../../../utils/core'; |
|
|
|
|
.addBtn{ |
|
|
|
|
position: relative; |
|
|
|
|
left: 50%; |
|
|
|
|
top: 10px; |
|
|
|
|
top: 0; |
|
|
|
|
transform:translate(-50%,0); |
|
|
|
|
} |
|
|
|
|
.download_tips { |
|
|
|
|