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.
335 lines
12 KiB
335 lines
12 KiB
<template>
|
|
<div class="app-container">
|
|
<!-- Start 列表页面 -->
|
|
<div v-show="viewState == 1">
|
|
<button-bar view-title="间还转付记录" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
|
<div class="main-content">
|
|
<div class="switch_btn">
|
|
<el-button :class="{btn_style:viewState === 1}">待转付</el-button>
|
|
<el-button class="" @click="handleClick">已转付</el-button>
|
|
</div>
|
|
<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" class="tab-header">
|
|
<el-form-item label="贷款合同编号">
|
|
<el-input v-model="listQuery.params.loanContractNo" clearable placeholder="" class="addinputw"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="车架号">
|
|
<el-input v-model="listQuery.params.vinNo" clearable placeholder="" class="addinputw"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="资方">
|
|
<el-input v-model="listQuery.params.bankName" clearable placeholder="" class="addinputw"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="资方合同编号">
|
|
<el-input v-model="listQuery.params.bankContractNo" clearable placeholder="" class="addinputw"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="应还日期">
|
|
<el-date-picker v-model="listQuery.params.dueStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
|
|
<span style="padding: 0 8px">至</span>
|
|
<el-date-picker v-model="listQuery.params.dueEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
|
|
</el-form-item>
|
|
<el-form-item label="预转付日期">
|
|
<el-date-picker v-model="listQuery.params.prepareStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
|
|
<span style="padding: 0 8px">至</span>
|
|
<el-date-picker v-model="listQuery.params.prepareEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
|
|
</el-form-item>
|
|
<el-form-item label="逾期状态">
|
|
<el-select v-model="listQuery.params.overdue" clearable placeholder="请选择">
|
|
<el-option v-for="item in overdue_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="btn" style="text-align: center;">
|
|
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
|
|
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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>
|
|
<div class="">
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
|
|
<el-table-column fixed width="50" type="selection" align="center"/>
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
|
|
<el-table-column prop="paymentState" label="转付状态" align="center" width="100" />
|
|
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160" />
|
|
<el-table-column prop="vinNo" label="车架号" align="center" width="120" />
|
|
<el-table-column prop="bankName" label="资方" align="center" width="150" />
|
|
<el-table-column prop="bankContractNo" label="资方合同编号" align="center" width="160" />
|
|
<el-table-column prop="customer" label="客户名称" align="center" min-width="120" />
|
|
<el-table-column prop="borrowerName" label="贷款人" align="center" width="100" />
|
|
<el-table-column prop="period" label="期数" align="center" width="80" />
|
|
<el-table-column prop="dueDate" label="应还日期" align="center" width="100" />
|
|
<el-table-column prop="dueMoney" label="应还金额" align="center" width="100" />
|
|
<el-table-column prop="actualDate" label="实还日期" align="center" width="100" />
|
|
<el-table-column prop="actualMoney" label="实还金额" align="center" width="100" />
|
|
<el-table-column prop="prepareDate" label="预转付日期" align="center" width="120" />
|
|
</el-table>
|
|
</div>
|
|
<div class="pages">
|
|
<!-- 翻页 -->
|
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End 列表页面 -->
|
|
<!-- 已选择列表 -->
|
|
<alsotransfer v-show="viewState == 2" ref="divSelect" @doback="resetState"/>
|
|
<!-- 新增 -->
|
|
<agentbusinessAdd v-show="viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import req from '@/api/agentbusiness/agentbusiness'
|
|
import Pagination from '@/components/pagination'
|
|
import pageye from '@/components/pagination/pageye'
|
|
import ButtonBar from '@/components/ButtonBar'
|
|
import alsotransfer from './alsotransfer'
|
|
import agentbusinessAdd from '../agentbusiness/agentbusinessAdd'
|
|
|
|
export default {
|
|
name: 'PendingTransfer',
|
|
components: {
|
|
Pagination,
|
|
pageye,
|
|
ButtonBar,
|
|
alsotransfer,
|
|
agentbusinessAdd
|
|
},
|
|
data() {
|
|
return {
|
|
viewState: 1,
|
|
btndisabled: false,
|
|
btnList: [
|
|
{
|
|
type: 'primary',
|
|
size: 'small',
|
|
icon: '',
|
|
btnKey: 'toAdd',
|
|
btnLabel: '代收代付申请'
|
|
},
|
|
{
|
|
type: 'primary',
|
|
size: 'small',
|
|
icon: 'export',
|
|
btnKey: 'doExport',
|
|
btnLabel: '导出'
|
|
},
|
|
{
|
|
type: 'info',
|
|
size: 'small',
|
|
icon: 'cross',
|
|
btnKey: 'doClose',
|
|
btnLabel: '关闭'
|
|
}
|
|
],
|
|
isSearchShow: false,
|
|
searchxianshitit: '显示查询条件',
|
|
// 查询条件 -----------
|
|
tableKey: 0,
|
|
list: [],
|
|
sids: [],
|
|
multipleSelection: [],
|
|
overdue_list: [
|
|
{
|
|
dictKey: '0',
|
|
dictValue: '是'
|
|
},
|
|
{
|
|
dictKey: '1',
|
|
dictValue: '否'
|
|
}
|
|
],
|
|
listLoading: false,
|
|
listQuery: {
|
|
params: {
|
|
userSid: '',
|
|
menuUrl: '',
|
|
loanContractNo: '',
|
|
vinNo: '',
|
|
dueStartDate: '',
|
|
dueEndDate: '',
|
|
accountTypekey: '',
|
|
prepareStartDate: '',
|
|
prepareEndDate: '',
|
|
orgPath: '',
|
|
type: '0',
|
|
bankContractNo: '',
|
|
bankName: '',
|
|
period: '',
|
|
overdue: ''
|
|
},
|
|
current: 1,
|
|
size: 10,
|
|
total: 0
|
|
},
|
|
rules: {}
|
|
}
|
|
},
|
|
created() {
|
|
// 初始化变量
|
|
this.getList()
|
|
},
|
|
mounted() {
|
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
},
|
|
methods: {
|
|
// 搜索条件效果
|
|
clicksearchShow() {
|
|
this.isSearchShow = !this.isSearchShow
|
|
if (this.isSearchShow) {
|
|
this.searchxianshitit = '隐藏查询条件'
|
|
} else {
|
|
this.searchxianshitit = '显示查询条件'
|
|
}
|
|
},
|
|
btnHandle(btnKey) {
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
|
switch (btnKey) {
|
|
case 'toAdd':
|
|
this.toAdd()
|
|
break
|
|
case 'doExport':
|
|
this.doExport()
|
|
break
|
|
case 'doClose':
|
|
this.doClose()
|
|
break
|
|
default:
|
|
break
|
|
}
|
|
},
|
|
// 序号
|
|
indexMethod(index) {
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
|
var pageindex = index + 1 + pagestart
|
|
return pageindex
|
|
},
|
|
handleSelectionChange(row) {
|
|
const aa = []
|
|
this.multipleSelection = row
|
|
row.forEach((element) => {
|
|
aa.push(element.sid)
|
|
})
|
|
this.sids = aa
|
|
},
|
|
// 查询列表信息
|
|
getList() {
|
|
this.listLoading = true
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
this.listQuery.params.menuUrl = this.$route.path
|
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
|
|
req.transferPaymentList(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
|
|
}
|
|
})
|
|
},
|
|
toAdd() {
|
|
if (this.sids.length > 0) {
|
|
if (this.multipleSelection.length > 0) {
|
|
let aa = '0'
|
|
this.multipleSelection.forEach((e) => {
|
|
if (e.paymentState === '转付中') {
|
|
aa = '1'
|
|
return
|
|
}
|
|
})
|
|
// 1代表选择的数据中包含转付状态为转付中的,不允许进行代收代付操作
|
|
if (aa === '0') {
|
|
this.viewState = 3
|
|
this.$refs['divAdd'].showAdd(this.sids)
|
|
} else {
|
|
this.$message({ showClose: true, type: 'error', message: '请选择转付状态为待转付的记录进行代收代付操作' })
|
|
}
|
|
}
|
|
} else {
|
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' })
|
|
}
|
|
},
|
|
handleClick() {
|
|
this.viewState = 2
|
|
this.$refs['divSelect'].getList()
|
|
},
|
|
// 查询按钮
|
|
handleFilter() {
|
|
this.listQuery.current = 1
|
|
this.getList()
|
|
},
|
|
handleReset() {
|
|
this.listQuery = {
|
|
params: {
|
|
userSid: '',
|
|
menuUrl: '',
|
|
loanContractNo: '',
|
|
vinNo: '',
|
|
dueStartDate: '',
|
|
dueEndDate: '',
|
|
accountTypekey: '',
|
|
prepareStartDate: '',
|
|
prepareEndDate: '',
|
|
orgPath: '',
|
|
type: '0',
|
|
bankContractNo: '',
|
|
bankName: '',
|
|
period: '',
|
|
overdue: ''
|
|
},
|
|
current: 1,
|
|
size: 10,
|
|
total: 0
|
|
}
|
|
this.getList()
|
|
},
|
|
resetState() {
|
|
this.viewState = 1
|
|
},
|
|
doExport() {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: 'Loading',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
})
|
|
req.transferedPaymentExcel(this.listQuery.params).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()
|
|
})
|
|
},
|
|
doClose() {
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
this.$router.go(-1)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.btn_style {
|
|
background-color: #018ad2;
|
|
color: white;
|
|
font-weight: 600;
|
|
}
|
|
</style>
|
|
|