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.
 
 
 
 
 
 

358 lines
14 KiB

<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择车辆页面</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</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="120px" class="tab-header">
<el-form-item label="品牌:">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="功能:">
<el-select v-model="listQuery.params.vehicleType" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="系列:">
<el-select v-model="listQuery.params.productLine" placeholder="请选择" filterable clearable>
<el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="变速箱:">
<el-select v-model="listQuery.params.gearboxType" placeholder="请选择" filterable clearable>
<el-option v-for="item in gearboxType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="驱动:">
<el-select v-model="listQuery.params.driveForm" placeholder="请选择" filterable clearable>
<el-option v-for="item in driveForm_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="排放标准:">
<el-select v-model="listQuery.params.emissionStandard" placeholder="请选择" filterable clearable>
<el-option v-for="item in emissionStandard_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="马力:">
<el-select v-model="listQuery.params.power" placeholder="请选择" filterable clearable>
<el-option v-for="item in power_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="燃料:">
<el-select v-model="listQuery.params.fuelType" placeholder="请选择" filterable clearable>
<el-option v-for="item in fuelType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="版本:">
<el-select v-model="listQuery.params.vehicleVersion" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleVersion_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.vehicleAlias" 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-date-picker v-model="listQuery.params.priceStartDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<span style="padding: 0 8px">至</span>
<el-date-picker v-model="listQuery.params.priceEndDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="公司入库日期">
<el-date-picker v-model="listQuery.params.orgPriceStartDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<span style="padding: 0 8px">至</span>
<el-date-picker v-model="listQuery.params.orgPriceEndDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="买断日期">
<el-date-picker v-model="listQuery.params.solidStartDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<span style="padding: 0 8px">至</span>
<el-date-picker v-model="listQuery.params.solidEndDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="快捷检索:">
<el-input v-model="listQuery.params.modelName" 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="50px" type="selection" align="center"/>
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
<template slot-scope="scope">
<span>{{ scope.row.locationName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
</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 { baseDisCountPackageGetVeh } from '@/api/jichuxinxi/salepolicy'
import { typeValues, brandDown } from '@/api/dictcommons/dictcommons'
export default {
name: 'vehicleSelect',
components: {
Pagination
},
data() {
return {
brand_list: [],
vehicleType_list: [],
productLine_list: [],
gearboxType_list: [],
driveForm_list: [],
emissionStandard_list: [],
power_list: [],
fuelType_list: [],
vehicleVersion_list: [],
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 5,
params: {
brandSid: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
modelName: '',
power: '',
productLine: '',
vehicleAlias: '',
vehicleType: '',
vehicleVersion: '',
userSid: '',
vinNo: '',
orgSid: '',
priceStartDate: '',
priceEndDate: '',
orgPriceStartDate: '',
orgPriceEndDate: '',
solidStartDate: '',
solidEndDate: '',
vehSids: []
},
total: 0
}
}
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
init() {
this.shujuzidian()
this.getList()
},
shujuzidian() {
typeValues({ type: 'vehicleFunction' }).then((res) => {
if (res.success) {
this.vehicleType_list = res.data
}
})
typeValues({ type: 'productLine' }).then((res) => {
if (res.code === '200') {
this.productLine_list = res.data
}
})
typeValues({ type: 'driver' }).then((res) => {
if (res.code === '200') {
this.driveForm_list = res.data
}
})
typeValues({ type: 'horsepower' }).then((res) => {
if (res.code === '200') {
this.power_list = res.data
}
})
typeValues({ type: 'vehicleVersion' }).then((res) => {
if (res.code === '200') {
this.vehicleVersion_list = res.data
}
})
typeValues({ type: 'fuelType' }).then((res) => {
if (res.code === '200') {
this.fuelType_list = res.data
}
})
typeValues({ type: 'gearbox' }).then((res) => {
if (res.code === '200') {
this.gearboxType_list = res.data
}
})
typeValues({ type: 'emissionStandard' }).then((res) => {
if (res.code === '200') {
this.emissionStandard_list = res.data
}
})
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
// 返回
handleReturn() {
this.$emit('doback')
},
// 查询列表信息
getList() {
this.listLoading = true
baseDisCountPackageGetVeh(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()
},
// 重置按钮
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.driveForm = ''
this.listQuery.params.emissionStandard = ''
this.listQuery.params.fuelType = ''
this.listQuery.params.gearboxType = ''
this.listQuery.params.modelName = ''
this.listQuery.params.power = ''
this.listQuery.params.productLine = ''
this.listQuery.params.vehicleAlias = ''
this.listQuery.params.vehicleType = ''
this.listQuery.params.vehicleVersion = ''
this.listQuery.params.userSid = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.priceStartDate = ''
this.listQuery.params.priceEndDate = ''
this.listQuery.params.orgPriceStartDate = ''
this.listQuery.params.orgPriceEndDate = ''
this.listQuery.params.solidStartDate = ''
this.listQuery.params.solidEndDate = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
vehModelSid: element.vehModelSid,
vehModelName: element.vehModelName,
vehSid: element.vehSid,
vinNo: element.vinNo,
manufactorSettlementPrice: element.manufactorSettlementPrice,
priceDate: element.priceDate,
libraryAge: element.libraryAge,
settlementStatus: element.settlementStatus,
settlementStatusValue: element.settlementStatusValue,
guidedDKPrice: element.guidedDKPrice,
guidedQKPrice: element.guidedQKPrice
})
})
this.sids = aa
},
showData(value, createOrgSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.vehSids = aa
} else {
this.listQuery.params.vehSids = []
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.orgSid = createOrgSid
brandDown({ useOrg: createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.init()
},
// 添加修改返回
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条车型记录!',
type: 'error',
duration: 2000
})
}
}
}
}
</script>
<style scoped>
</style>