Browse Source

完善交回车辆台账

master
yunuo970428 1 year ago
parent
commit
f29768ff18
  1. 21
      anrui-riskcenter-ui/src/api/returntheaccount/returntheaccount.js
  2. 16
      anrui-riskcenter-ui/src/router/index.js
  3. 404
      anrui-riskcenter-ui/src/views/returntheaccount/returntheaccount.vue

21
anrui-riskcenter-ui/src/api/returntheaccount/returntheaccount.js

@ -0,0 +1,21 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/riskcenter/v1/LoanReturnVehLedger/listPage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
update: function(data) {
return request({
url: '/riskcenter/v1/LoanReturnVehLedger/update',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
}

16
anrui-riskcenter-ui/src/router/index.js

@ -599,6 +599,22 @@ export const constantRoutes = [
}
]
},
{
path: '/returntheaccount',
component: Layout,
redirect: '/returntheaccount',
meta: {
title: '交回车辆台账'
},
children: [
{
path: '/returntheaccount/returntheaccount',
component: () => import('@/views/returntheaccount/returntheaccount.vue'),
name: 'ReturnTheAccount',
meta: { title: '交回车辆台账', noCache: true }
}
]
},
{
path: '/surrenderforredemption',
component: Layout,

404
anrui-riskcenter-ui/src/views/returntheaccount/returntheaccount.vue

@ -0,0 +1,404 @@
<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" class="tab-header">
<el-form-item label="分公司">
<el-input v-model="listQuery.params.useOrgName" 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.vehMark" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车辆类型">
<el-input v-model="listQuery.params.vehType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" 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-input v-model="listQuery.params.location" placeholder="" clearable/>
</el-form-item>
<el-form-item label="处置方式">
<el-select v-model="listQuery.params.disposalKey" placeholder="请选择" clearable>
<el-option v-for="item in disposal_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
<el-form-item label="入库日期">
<el-date-picker v-model="listQuery.params.inboundDateStart" 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.inboundDateEnd" 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.outboundDateStart" 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.outEndDate" 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.vehicleState" placeholder="请选择" clearable>
<el-option v-for="item in vehicleState_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" 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 type="selection" align="center" width="50"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column label="分公司" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.useOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center" width="120">
<template slot-scope="scope">
<span class="bluezi" @click="lookVin(scope.row)">{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="车牌号" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.vehMark }}</span>
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.vehType }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center" min-width="170">
<template slot-scope="scope">
<span>{{ scope.row.vehModel }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.customer }}</span>
</template>
</el-table-column>
<el-table-column label="贷款人" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.borrowerName }}</span>
</template>
</el-table-column>
<el-table-column label="逾期金额" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.overMoney }}</span>
</template>
</el-table-column>
<el-table-column label="未到期金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.notBecomeDueMoney }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="处置方式" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.disposal }}</span>
</template>
</el-table-column>
<el-table-column label="入库价" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.inboundMoney }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
</template>
</el-table-column>
<el-table-column label="出库日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.outboundDate }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.vehicleState }}</span>
</template>
</el-table-column>
</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>
<!-- 查看交回车辆入库申请详情 -->
<returntostorageInfo v-show="viewState == 2" ref="divStorage" @doback="resetState"/>
<!-- 修改存放地点 -->
<el-dialog title="编辑存放地点" :visible.sync="dialogVisible" width="60%">
<el-form class="formadd" >
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>存放地点</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="formobj.location" placeholder="" class="addinputw" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="confirm"> </el-button>
<el-button type="info " size="mini" @click="dialogVisible = false"> </el-button>
</div>
</el-form>
</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/returntheaccount/returntheaccount'
import { typeValues } from '@/api/Common/dictcommons'
import returntostorageInfo from '../returntostorage/returntostorageInfo'
export default {
name: 'ReturnTheAccount',
components: {
Pagination,
pageye,
ButtonBar,
returntostorageInfo
},
data() {
return {
dialogVisible: false,
formobj: {
location: '',
locationSid: '',
sid: ''
},
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
disposal_list: [],
vehicleState_list: [],
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
borrowerName: '',
customer: '',
disposalKey: '',
inboundDateEnd: '',
inboundDateStart: '',
location: '',
menuUrl: '',
orgPath: '',
outboundDateEnd: '',
outboundDateStart: '',
useOrgName: '',
userSid: '',
vehMark: '',
vehModel: '',
vehType: '',
vehicleState: '',
vinNo: ''
}
}
}
},
created() {
this.init()
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'disposal' }).then((res) => {
if (res.success) {
this.disposal_list = res.data
}
})
typeValues({ type: 'returnVehicleState' }).then((res) => {
if (res.success) {
this.vehicleState_list = res.data
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toEdit':
this.toEdit()
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: 5,
total: 0,
params: {
borrowerName: '',
customer: '',
disposalKey: '',
inboundDateEnd: '',
inboundDateStart: '',
location: '',
menuUrl: '',
orgPath: '',
outboundDateEnd: '',
outboundDateStart: '',
useOrgName: '',
userSid: '',
vehMark: '',
vehModel: '',
vehType: '',
vehicleState: '',
vinNo: ''
}
}
this.getList()
},
toEdit() {
if (this.sids.length === 1) {
this.formobj = {
location: '',
locationSid: '',
sid: ''
}
this.dialogVisible = true
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' })
}
},
confirm() {
this.formobj.sid = this.sids[0]
req.update(this.formobj).then((resp) => {
if (resp.success) {
this.$message({showClose: true, type: 'success', message: '操作成功' })
this.dialogVisible = false
this.getList()
}
})
},
lookVin(row) {
this.viewState = 2
this.$refs['divStorage'].showInfo({ sid: row.busSid })
},
//
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save