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.
213 lines
6.4 KiB
213 lines
6.4 KiB
<template>
|
|
<div class="app-container">
|
|
<div v-show="viewState == 1">
|
|
<div class="tab-header webtop">
|
|
<div>车型选择</div>
|
|
<div>
|
|
<el-button type="primary" size="small" @click="handleSelect()">确认</el-button>
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="webcon">
|
|
<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-row>
|
|
<el-form-item label="车型:" class="searchlist">
|
|
<el-input v-model="listQuery.params.modelName" placeholder="" clearable style="width: 150px"/>
|
|
</el-form-item>
|
|
<el-form-item label="车型配置:" class="searchlist">
|
|
<el-input v-model="listQuery.params.configName" placeholder="" clearable style="width: 150px"/>
|
|
</el-form-item>
|
|
</el-row>
|
|
<div class="searchbtns">
|
|
<el-button type="primary" @click="handleFilter">查询</el-button>
|
|
<el-button type="primary" @click="handReset">重置</el-button>
|
|
</div>
|
|
</el-form>
|
|
</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 type="selection" align="center" width="50"/>
|
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
|
|
<el-table-column label="品牌" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.brandName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="车型" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.modelName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="常用配置" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.configName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="预计订金日期" align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.sealTypeValue }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { listPageByVehmodel } from '@/api/jichuxinxi/crmvehicle'
|
|
import Pagination from '@/components/pagination'
|
|
import pageye from '@/components/pagination/pageye'
|
|
|
|
export default {
|
|
name: 'chexingxuanze',
|
|
components: {
|
|
Pagination,
|
|
pageye
|
|
},
|
|
data() {
|
|
return {
|
|
isSearchShow: false,
|
|
searchxianshitit: '隐藏查询条件',
|
|
viewState: 1,
|
|
tableKey: 0,
|
|
list: [],
|
|
sids: [],
|
|
listLoading: false,
|
|
listQuery: {
|
|
current: 1,
|
|
size: 10,
|
|
params: {
|
|
modelName: '',
|
|
configName: '',
|
|
brandSid: '',
|
|
},
|
|
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) {
|
|
const aa = []
|
|
row.forEach((element) => {
|
|
aa.push({
|
|
modelName: element.modelName,
|
|
configName: element.configName,
|
|
otherConfig: element.otherConfig
|
|
})
|
|
})
|
|
this.sids = aa
|
|
console.log('勾选记录', this.sids)
|
|
},
|
|
showInfo(brandSid) {
|
|
console.log(brandSid, 99999)
|
|
if (brandSid !== '') {
|
|
this.listQuery.params.brandSid = brandSid
|
|
this.getList()
|
|
}
|
|
},
|
|
// 查询列表信息
|
|
getList() {
|
|
this.listLoading = true
|
|
listPageByVehmodel(this.listQuery).then((response) => {
|
|
this.listLoading = false
|
|
if (response.success) {
|
|
this.listQuery.total = response.data.total
|
|
this.list = response.data.records
|
|
}
|
|
})
|
|
},
|
|
// 查询按钮
|
|
handleFilter() {
|
|
this.listQuery.current = 1
|
|
this.getList()
|
|
},
|
|
handReset() {
|
|
this.listQuery = {
|
|
current: 1,
|
|
size: 10,
|
|
params: {
|
|
modelName: '',
|
|
configName: '',
|
|
brandSid: ''
|
|
},
|
|
total: 0
|
|
}
|
|
this.getList()
|
|
},
|
|
handleSelect() {
|
|
if (this.sids.length === 1) {
|
|
this.$emit('handleReturnSelect', this.sids)
|
|
} else if (this.sids.length > 1) {
|
|
this.$notify({
|
|
title: '提示',
|
|
message: '不能选中多个!',
|
|
type: 'error',
|
|
duration: 2000
|
|
})
|
|
} else {
|
|
this.$notify({
|
|
title: '提示',
|
|
message: '没有选择信息!',
|
|
type: 'error',
|
|
duration: 2000
|
|
})
|
|
return
|
|
}
|
|
},
|
|
handleReturn() {
|
|
this.$emit('handleReturn')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.listtop {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border: 1px solid #dfe4ed;
|
|
height: 40px;
|
|
}
|
|
.tit {
|
|
margin-bottom: -10px;
|
|
}
|
|
.pagination {
|
|
margin-bottom: -10px;
|
|
}
|
|
.line {
|
|
display: inline-block;
|
|
margin: 0px 15px;
|
|
}
|
|
</style>
|
|
|