3 changed files with 752 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/monthListPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/updateRecord', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/deleteBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
saveRecords: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/saveRecords', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
fetchBySid: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/updateRecordInfo', |
||||
|
method: 'get', |
||||
|
params: data |
||||
|
}) |
||||
|
}, |
||||
|
// 下载模板
|
||||
|
downloadExcel: function() { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanrepaymenthistory/downloadExcel', |
||||
|
method: 'post', |
||||
|
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
} |
||||
|
} |
@ -0,0 +1,197 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">贷款合同编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.loanContractNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">资方</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.bankName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">资方合同编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.bankContractNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">贷款人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.borrowerName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">车架号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.vinNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">期数</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.period }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">应还日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.dueDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">本期应还</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.dueMoney }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">本期未还</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.outstandingMoney }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">还款方式</div> |
||||
|
<el-form-item> |
||||
|
<el-select class="addinputInfo" v-model="formobj.returnWayKey" placeholder="请选择" clearable filterable @change="returnWayChange"> |
||||
|
<el-option v-for="item in repaymentWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty colSty">实还金额</div> |
||||
|
<el-form-item><el-input v-model="formobj.actualMoney" @keyup.native="UpNumber" clearable placeholder="" class="addinputInfo" style="width: 20%"/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/monthlypayment/monthlypayment' |
||||
|
import { typeValues } from '@/api/Common/dictcommons' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Adjust', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
submitdisabled: false, |
||||
|
repaymentWay_list: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
loanContractNo: '', |
||||
|
bankName: '', |
||||
|
bankContractNo: '', |
||||
|
borrowerName: '', |
||||
|
vinNo: '', |
||||
|
period: '', |
||||
|
dueDate: '', |
||||
|
outstandingMoney: '', |
||||
|
dueMoney: '', |
||||
|
returnWay: '', |
||||
|
returnWayKey: '', |
||||
|
actualMoney: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showEdit(sid) { |
||||
|
this.viewTitle = '月还调整' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
typeValues({ type: 'repaymentWay' }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.repaymentWay_list = resp.data |
||||
|
} |
||||
|
}) |
||||
|
req.fetchBySid({ sid: sid }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
UpNumber(e) { |
||||
|
e.target.value = e.target.value.replace(/[^0-9]/g, '') // 清除“数字”和“.”以外的字符 |
||||
|
e.target.value = e.target.value.replace(/^00/, '0') // 开头不能有两个0 |
||||
|
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { |
||||
|
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
||||
|
e.target.value = parseFloat(e.target.value) |
||||
|
} |
||||
|
}, |
||||
|
returnWayChange(value) { |
||||
|
const choose = this.repaymentWay_list.filter((item) => item.dictKey === value) |
||||
|
if (choose.length > 0 && choose !== null) { |
||||
|
this.formobj.returnWay = choose[0].dictValue |
||||
|
} else { |
||||
|
this.formobj.returnWay = '' |
||||
|
} |
||||
|
}, |
||||
|
save() { |
||||
|
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 |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
loanContractNo: '', |
||||
|
bankName: '', |
||||
|
bankContractNo: '', |
||||
|
borrowerName: '', |
||||
|
vinNo: '', |
||||
|
period: '', |
||||
|
dueDate: '', |
||||
|
outstandingMoney: '', |
||||
|
dueMoney: '', |
||||
|
returnWay: '', |
||||
|
returnWayKey: '', |
||||
|
actualMoney: '' |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,502 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--列表页面--> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar view-title="当月还款记录" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<!--Start查询列表部分--> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> |
||||
|
<el-form-item label="贷款合同编号"> |
||||
|
<el-input v-model="listQuery.params.loanContractNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="车架号"> |
||||
|
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="资方"> |
||||
|
<el-input v-model="listQuery.params.bankName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="资方合同编号"> |
||||
|
<el-input v-model="listQuery.params.bankContractNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="客户名称"> |
||||
|
<el-input v-model="listQuery.params.customer" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="贷款人"> |
||||
|
<el-input v-model="listQuery.params.borrowerName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="还款方式"> |
||||
|
<el-select v-model="listQuery.params.returnWayKey" filterable clearable placeholder=""> |
||||
|
<el-option v-for="item in returnWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="期数"> |
||||
|
<el-input v-model="listQuery.params.period" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="应还日期"> |
||||
|
<el-date-picker v-model="listQuery.params.dueStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.dueEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="实还日期"> |
||||
|
<el-date-picker v-model="listQuery.params.actualStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.actualEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="数据日期"> |
||||
|
<el-date-picker v-model="listQuery.params.dataStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.dataEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="划扣状态"> |
||||
|
<el-select v-model="listQuery.params.buckleKey" filterable clearable placeholder=""> |
||||
|
<el-option v-for="item in buckle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">当月未申请划扣还款记录</div> |
||||
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--Start 主页面主要部分 --> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column fixed type="selection" align="center" width="50"/> |
||||
|
<el-table-column fixed label="序号" type="index" width="60" :index="indexMethod" align="center"/> |
||||
|
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="120"/> |
||||
|
<el-table-column prop="vinNo" label="车架号" align="center" width="120"/> |
||||
|
<el-table-column prop="bankName" label="资方" align="center" width="100"/> |
||||
|
<el-table-column prop="bankContractNo" label="资方合同编号" align="center" width="140"/> |
||||
|
<el-table-column prop="customer" label="客户名称" align="center" width="140"/> |
||||
|
<el-table-column prop="borrowerName" label="贷款人" align="center" width="160"/> |
||||
|
<el-table-column prop="returnWay" label="还款方式" align="center"/> |
||||
|
<el-table-column prop="period" label="期数" align="center" width="100"/> |
||||
|
<el-table-column prop="dueDate" label="应还日期" align="center" width="100"/> |
||||
|
<el-table-column prop="dueMoney" label="本期应还" align="center" width="140"/> |
||||
|
<el-table-column prop="outstandingMoney" label="本期未还" align="center" width="140"/> |
||||
|
<el-table-column prop="actualDate" label="实还日期" align="center" width="140"/> |
||||
|
<el-table-column prop="actualMoney" label="实还金额" align="center" width="140"/> |
||||
|
<el-table-column prop="dataTime" label="数据日期" align="center" width="140"/> |
||||
|
<el-table-column prop="buckle" label="划扣状态" align="center" width="140"/> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!--End 主页面主要部分--> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- 调整 --> |
||||
|
<adjust ref="divAdd" v-show="viewState == 2" @doback="resetState" @reloadlist="getList"/> |
||||
|
<!-- 划扣 --> |
||||
|
<deductAdd ref="divDeduct" v-show="viewState == 3" @doback="resetState" @reloadlist="getList"/> |
||||
|
<!-- 导入 --> |
||||
|
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> |
||||
|
<el-card class="box-card"> |
||||
|
<div> |
||||
|
<el-upload |
||||
|
ref="upload" |
||||
|
class="upload-demo" |
||||
|
accept=".xls" |
||||
|
name="file" |
||||
|
:action="updateAction" |
||||
|
:on-success="handleSuccess" |
||||
|
:file-list="fileList" |
||||
|
:auto-upload="false" |
||||
|
:multiple="false" |
||||
|
:limit="1" |
||||
|
:data="uploadData" |
||||
|
:headers="headers" |
||||
|
> |
||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
|
<el-button style="margin-left: 10px;" size="small" type="primary" @click="downLoad">下载模板</el-button> |
||||
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h3>文件上传结果</h3> |
||||
|
<el-card class="box-card"> |
||||
|
<div>{{ uploadResultMesssage }}</div> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
<div slot="footer" class="dialog-footer" style="text-align: center"> |
||||
|
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button> |
||||
|
<el-button size="small" @click="dialogVisible = false">取消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import req from '@/api/monthlypayment/monthlypayment' |
||||
|
import { typeValues } from '@/api/Common/dictcommons' |
||||
|
import adjust from './adjust' |
||||
|
import deductAdd from '../deduct/deductAdd' |
||||
|
|
||||
|
export default { |
||||
|
name: 'MonthlyPayment', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
adjust, |
||||
|
deductAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
dialogVisible: false, |
||||
|
updateAction: process.env.VUE_APP_BASE_API + '/riskcenter/v1/loanrepaymenthistory/getExcelInfo', |
||||
|
fileList: [], |
||||
|
upload_list: [], |
||||
|
uploadResultMesssage: '', |
||||
|
uploadData: { |
||||
|
sid: '' |
||||
|
}, |
||||
|
headers: { |
||||
|
token: window.sessionStorage.getItem('token') |
||||
|
}, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'success', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'doImport', |
||||
|
btnLabel: '导入' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'edit', |
||||
|
btnKey: 'toEdit', |
||||
|
btnLabel: '调整' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'toDeduct', |
||||
|
btnLabel: '划扣' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], // 用于导出的时候保存已选择的SIDs |
||||
|
returnWay_list: [], |
||||
|
buckle_list: [ |
||||
|
{ |
||||
|
dictKey: '001', |
||||
|
dictValue: '未申请' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: '002', |
||||
|
dictValue: '申请中' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: '003', |
||||
|
dictValue: '审核通过' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: '004', |
||||
|
dictValue: '审核未通过' |
||||
|
} |
||||
|
], |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
// 翻页 |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
userSid: '', |
||||
|
menuUrl: '', |
||||
|
loanContractNo: '', |
||||
|
vinNo: '', |
||||
|
dueStartDate: '', |
||||
|
dueEndDate: '', |
||||
|
actualStartDate: '', |
||||
|
actualEndDate: '', |
||||
|
dataStartTime: '', |
||||
|
dataEndTime: '', |
||||
|
bankName: '', |
||||
|
orgPath: '', |
||||
|
bankContractNo: '', |
||||
|
customer: '', |
||||
|
borrowerName: '', |
||||
|
period: '', |
||||
|
returnWayKey: '', |
||||
|
buckleKey: '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.init() |
||||
|
this.getList() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
typeValues({ type: 'repaymentWay' }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.returnWay_list = resp.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
||||
|
switch (btnKey) { |
||||
|
case 'doImport': |
||||
|
this.doImport() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'toDeduct': |
||||
|
this.toDeduct() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
// 信息条数 获取点击时当前的sid |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 表中序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
this.listQuery.params.menuUrl = this.$route.path |
||||
|
req.listPage(this.listQuery).then((response) => { |
||||
|
this.listLoading = false |
||||
|
if (response.success) { |
||||
|
this.list = response.data.records |
||||
|
this.listQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 点击重置 |
||||
|
handleReset() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
userSid: '', |
||||
|
menuUrl: '', |
||||
|
loanContractNo: '', |
||||
|
vinNo: '', |
||||
|
dueStartDate: '', |
||||
|
dueEndDate: '', |
||||
|
actualStartDate: '', |
||||
|
actualEndDate: '', |
||||
|
dataStartTime: '', |
||||
|
dataEndTime: '', |
||||
|
bankName: '', |
||||
|
orgPath: '', |
||||
|
bankContractNo: '', |
||||
|
customer: '', |
||||
|
borrowerName: '', |
||||
|
period: '', |
||||
|
returnWayKey: '', |
||||
|
buckleKey: '' |
||||
|
} |
||||
|
} |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 导入 |
||||
|
doImport() { |
||||
|
this.dialogVisible = true |
||||
|
this.fileList = [] |
||||
|
this.upload_list = [] |
||||
|
this.uploadResultMesssage = '' |
||||
|
}, |
||||
|
downLoad() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.downloadExcel().then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '当月还款记录模板' + '.xls' |
||||
|
const elink = document.createElement('a') |
||||
|
elink.download = fileName |
||||
|
elink.style.display = 'nonde' |
||||
|
elink.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(elink) |
||||
|
elink.click() |
||||
|
URL.revokeObjectURL(elink.href) |
||||
|
document.body.removeChild(elink) |
||||
|
}).catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}, |
||||
|
submitUpload() { |
||||
|
this.$refs.upload.submit() |
||||
|
}, |
||||
|
handleSuccess(resp, file, fileList) { |
||||
|
const _this = this |
||||
|
if (resp.success) { |
||||
|
_this.uploadResultMesssage = resp.msg |
||||
|
// 上传文件数据成功后立即保存数据 |
||||
|
if (resp.data.length > 0 && resp.data !== null) { |
||||
|
this.upload_list = resp.data |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
handleConfirm() { |
||||
|
if (this.upload_list.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请先上传当月还款记录' }) |
||||
|
return |
||||
|
} |
||||
|
req.saveRecords(this.upload_list).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.dialogVisible = false |
||||
|
this.getList() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 划扣 |
||||
|
toDeduct() { |
||||
|
if (this.sids.length > 0) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divDeduct'].showAdd(this.sids) |
||||
|
} else { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行划扣操作' }) |
||||
|
} |
||||
|
}, |
||||
|
// 删除 |
||||
|
doDel() { |
||||
|
if (this.sids.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
||||
|
return |
||||
|
} |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
} |
||||
|
this.getList() |
||||
|
loading.close() |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
// 调整 |
||||
|
toEdit(row) { |
||||
|
if (this.sids.length === 1) { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showEdit(this.sids[0]) |
||||
|
} else { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' }) |
||||
|
} |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
/*表格列设置fixed后固定列出现下边框的设置*/ |
||||
|
/deep/ .el-table__fixed { |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
/*表格列设置fixed后固定列出现下边框的设置*/ |
||||
|
/deep/ .el-table__fixed-right { |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue