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.
 
 
 
 
 
 

174 lines
5.8 KiB

<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择挂车页面</div>
<div>
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
<el-button type="info" size="small" @click="handleColse()">关闭</el-button>
</div>
</div>
<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="100px" class="tab-header">
<el-form-item label="挂车名称">
<el-input v-model="listQuery.params.trailerTypeValue" 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.zcVinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</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>
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="trailerTypeValue" label="挂车名称" align="center" />
<el-table-column prop="vinNo" label="挂车车架号" align="center" />
<el-table-column prop="brandName" label="主车品牌" align="center" />
<el-table-column prop="zcVinNo" label="主车车架号" align="center" />
<el-table-column prop="customerName" label="客户名称" align="center" />
</el-table>
</div>
<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>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/anruifinmanagement/payment'
export default {
name: 'TrailerCar',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
multipleSelection: [],
listLoading: false,
listQuery: {
current: 1,
size: 5,
params: {
trailerTypeValue: '',
useOrgSid: '',
vinNo: '',
zcVinNo: '',
customerName: '',
sids: []
},
total: 0
}
}
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
this.multipleSelection = row
},
showData(value, useOrgSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].trailerSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.listQuery.params.useOrgSid = useOrgSid
this.handleReset()
},
// 查询列表信息
getList() {
this.listLoading = true
req.trailerApply(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
} else {
this.listQuery.total = 0
this.list = []
}
})
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
// 重置按钮
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.trailerTypeValue = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.zcVinNo = ''
this.listQuery.params.customerName = ''
this.getList()
},
// 添加修改返回
handleConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$notify({ title: '提示', message: '请选择至少一条记录!', type: 'error', duration: 2000 })
}
},
// 返回
handleColse() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>