You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
358 lines
14 KiB
358 lines
14 KiB
<template>
|
|
<div class="app-container">
|
|
<div v-show="viewState == 1">
|
|
<div class="tab-header webtop">
|
|
<div>{{ viewTitle }}</div>
|
|
<div>
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="listconadd">
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
|
<el-row style="border-top: 1px solid #e0e3eb">
|
|
<el-col :span="8">
|
|
<div class="span-sty">申请部门</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.dept }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">申请人</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.applyName }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">申请日期</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<div class="span-sty">客户名称</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.customer }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">贷款人</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.borrowerName }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">贷款合同编号</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.loanContractNo }}</span></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<div class="span-sty">资方</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.bankName }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">资方合同编号</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.bankContractNo }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<div class="span-sty">停放地点</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.location }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">相关费用</div>
|
|
<el-form-item><el-input class="addinputInfo addinputw" @keyup.native="UpNumber" v-model="formobj.fees" clearable placeholder=""/></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">费用说明</div>
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.feesShows" clearable placeholder=""/></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<div class="title titleOne">
|
|
<div>赎回车辆列表(含主车、挂车)</div>
|
|
<el-button size="mini" type="primary" class="btntopblueline" @click="lookCollection">催收记录</el-button>
|
|
</div>
|
|
<el-table :key="tableKey" :data="formobj.vinList" :index="index" border style="width: 100%">
|
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
|
|
<el-table-column fixed label="操作" width="80" align="center">
|
|
<template slot-scope="scope">
|
|
<el-button size="small" v-if="scope.row.vehType !== '主车'" type="danger" @click="delete(scope.$index)">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="vinNo" label="车架号" align="center" min-width="100" />
|
|
<el-table-column prop="vehMark" label="车牌号" align="center" min-width="100"/>
|
|
<el-table-column prop="vehType" label="车辆类型" align="center" min-width="120"/>
|
|
<el-table-column prop="vehModel" label="车型" align="center" min-width="130"/>
|
|
</el-table>
|
|
<div class="title titleOne">
|
|
<div>已还与欠款情况</div>
|
|
<el-button size="mini" type="primary" class="btntopblueline" @click="lookStorage">入库申请</el-button>
|
|
</div>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<div class="span-sty">已还金额</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.alRepaidMoney }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">当前逾期金额/其中资金占用费</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.currentBeMoney }}/{{ formobj.wheFundOccMoney }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">未到期金额</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.unexpiredMoney }}</span></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<div class="span-sty">总期数/当前期数</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.nper }}/{{ formobj.currentPeriod }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">已还金额换算期数</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.alRepaidMoneyConPeriod }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">逾期金额换算期数</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.beOverdueMoneyAndPeriod }}</span></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<div class="span-sty">本次还款金额</div>
|
|
<el-form-item><el-input class="addinputInfo" style="width: 15%" @keyup.native="UpNumber" v-model="formobj.amount" clearable placeholder=""/></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<div class="span-sty">赎回方案</div>
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.plan" clearable placeholder=""/></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<div class="span-sty">附件</div>
|
|
<el-form-item>
|
|
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.files" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<!-- 查看车辆历史催收记录 -->
|
|
<vehiclecollectionrecords v-show="viewState == 2" ref="divCollection" @doback="resetState" />
|
|
<!-- 查看入库申请详情-->
|
|
<returntostorageInfo v-show="viewState == 3" ref="divStorage" @doback="resetState" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import req from '@/api/surrenderforredemption/surrenderforredemption'
|
|
import uploadImg from '@/components/uploadFile/uploadImg'
|
|
import vehiclecollectionrecords from '../overduevehicle/vehiclecollectionrecords'
|
|
import returntostorageInfo from '../returntostorage/returntostorageInfo'
|
|
|
|
export default {
|
|
name: 'SurrenderForRedemptionAdd',
|
|
components: {
|
|
uploadImg,
|
|
vehiclecollectionrecords,
|
|
returntostorageInfo
|
|
},
|
|
data() {
|
|
return {
|
|
viewTitle: '',
|
|
viewState: 1,
|
|
submitdisabled: false,
|
|
tableKey: 1,
|
|
index: 0,
|
|
formobj: {
|
|
alRepaidMoney: '',
|
|
alRepaidMoneyConPeriod: '',
|
|
amount: '',
|
|
applyDate: '',
|
|
applyName: '',
|
|
bankContractNo: '',
|
|
bankName: '',
|
|
beOverdueMoneyAndPeriod: '',
|
|
borrowerName: '',
|
|
busVinSid: '',
|
|
currentBeMoney: '',
|
|
currentPeriod: '',
|
|
customer: '',
|
|
dept: '',
|
|
deptSid: '',
|
|
fees: '',
|
|
feesShows: '',
|
|
files: [],
|
|
instanceId: '',
|
|
ledgerSid: '',
|
|
loanContractNo: '',
|
|
location: '',
|
|
nper: '',
|
|
orgPath: '',
|
|
plan: '',
|
|
rksqSid: '',
|
|
sid: '',
|
|
taskId: '',
|
|
unexpiredMoney: '',
|
|
userSid: '',
|
|
vinList: [],
|
|
wheFundOccMoney: ''
|
|
},
|
|
rules: {}
|
|
}
|
|
},
|
|
methods: {
|
|
UpNumber(e) {
|
|
e.target.value = e.target.value.replace(/[^0-9.]/g, '') // 清除“数字”和“.”以外的字符
|
|
e.target.value = e.target.value.replace(/^00/, '0.') // 开头不能有两个0
|
|
e.target.value = e.target.value.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
|
|
e.target.value = e.target.value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
|
|
e.target.value = e.target.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
|
|
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
|
|
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
|
|
e.target.value = parseFloat(e.target.value)
|
|
}
|
|
},
|
|
showAdd(row) {
|
|
this.viewTitle = '【新增】交回车辆赎回申请'
|
|
this.$nextTick(() => {
|
|
this.$refs['form_obj'].clearValidate()
|
|
})
|
|
req.redemptionInit({ ledgerSid: row.ledgerSid }).then((resp) => {
|
|
if (resp.success) {
|
|
this.formobj = resp.data
|
|
this.formobj.applyName = window.sessionStorage.getItem('name')
|
|
this.formobj.dept = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
|
|
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid')
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
var nowDate = new Date()
|
|
var date = {
|
|
year: nowDate.getFullYear(),
|
|
month: nowDate.getMonth() + 1,
|
|
day: nowDate.getDate()
|
|
}
|
|
this.formobj.applyDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
|
|
}
|
|
})
|
|
},
|
|
showEdit(row) {
|
|
this.viewTitle = '【编辑】交回车辆赎回申请'
|
|
this.$nextTick(() => {
|
|
this.$refs['form_obj'].clearValidate()
|
|
})
|
|
req.fetchBySid({ sid: row.sid }).then((res) => {
|
|
if (res.success) {
|
|
this.formobj = res.data
|
|
}
|
|
})
|
|
},
|
|
lookCollection() {
|
|
this.viewState = 2
|
|
this.$refs['divCollection'].showInfo({ saleVehSid: this.formobj.busVinSid })
|
|
},
|
|
delete(index) {
|
|
this.formobj.vinList.splice(index, 1)
|
|
},
|
|
lookStorage() {
|
|
this.viewState = 3
|
|
this.$refs['divStorage'].showInfo({ sid: this.formobj.rksqSid })
|
|
},
|
|
resetState() {
|
|
this.viewState = 1
|
|
},
|
|
saveOrUpdate() {
|
|
this.$refs['form_obj'].validate((valid) => {
|
|
if (valid) {
|
|
this.submitdisabled = true
|
|
req.saveOrUpdate(this.formobj).then((res) => {
|
|
if (res.success) {
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.submitdisabled = false
|
|
}
|
|
}).catch(() => {
|
|
this.submitdisabled = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
submit() {
|
|
this.$refs['form_obj'].validate((valid) => {
|
|
if (valid) {
|
|
this.submitdisabled = true
|
|
req.submit(this.formobj).then((res) => {
|
|
if (res.success) {
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功' })
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.submitdisabled = false
|
|
}
|
|
}).catch(() => {
|
|
this.submitdisabled = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
handleReturn(isreload) {
|
|
if (isreload === 'true') this.$emit('reloadlist')
|
|
this.formobj = {
|
|
alRepaidMoney: '',
|
|
alRepaidMoneyConPeriod: '',
|
|
amount: '',
|
|
applyDate: '',
|
|
applyName: '',
|
|
bankContractNo: '',
|
|
bankName: '',
|
|
beOverdueMoneyAndPeriod: '',
|
|
borrowerName: '',
|
|
busVinSid: '',
|
|
currentBeMoney: '',
|
|
currentPeriod: '',
|
|
customer: '',
|
|
dept: '',
|
|
deptSid: '',
|
|
fees: '',
|
|
feesShows: '',
|
|
files: [],
|
|
instanceId: '',
|
|
ledgerSid: '',
|
|
loanContractNo: '',
|
|
location: '',
|
|
nper: '',
|
|
orgPath: '',
|
|
plan: '',
|
|
rksqSid: '',
|
|
sid: '',
|
|
taskId: '',
|
|
unexpiredMoney: '',
|
|
userSid: '',
|
|
vinList: [],
|
|
wheFundOccMoney: ''
|
|
}
|
|
this.submitdisabled = false
|
|
this.$emit('doback')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.span-sty {
|
|
width: 200px !important;
|
|
}
|
|
.addinputInfo {
|
|
margin-left: 190px !important;
|
|
}
|
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
|
margin-left: 190px !important;
|
|
width: calc(100% - 185px);
|
|
}
|
|
.titleOne {
|
|
padding: 7px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
|