|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="app-container"> |
|
|
|
<div> |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>现车库存</div> |
|
|
|
<div>车辆查询</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirm()">确定</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
@ -12,50 +12,26 @@ |
|
|
|
<div class="searchcon"> |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form ref="listQueryform" :model="listQuery" label-width="100px" :inline="true" class="tab-header"> |
|
|
|
<el-form ref="listQueryform" :model="listQuery" label-width="80px" :inline="true" class="tab-header"> |
|
|
|
<el-form-item label="品牌"> |
|
|
|
<el-select v-model="listQuery.params.brandSid" class="addinputw" placeholder="请选择"> |
|
|
|
<el-option v-for="item in carbrand_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
<el-select v-model="listQuery.params.brandSid" class="addinputw" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in carbrand_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="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in vehicleFunction_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="请选择" clearable class="addinputw"> |
|
|
|
<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" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item in gearboxType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
<el-form-item label="车型"> |
|
|
|
<el-input v-model="listQuery.params.modelNameAndCode" clearable class="addinputw" placeholder=""/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驱动"> |
|
|
|
<el-select v-model="listQuery.params.driveForm" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<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" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<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" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item in power_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
<el-form-item label="车架号"> |
|
|
|
<el-input v-model="listQuery.params.vinNo" clearable class="addinputw" placeholder=""/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="燃料"> |
|
|
|
<el-select v-model="listQuery.params.fuelType" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item in fuelType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
<el-form-item label="颜色"> |
|
|
|
<el-select v-model="listQuery.params.carColorKey" placeholder="请选择" clearable class="addinputw" filterable> |
|
|
|
<el-option v-for="item in carColor_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" class="addinputw" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item in vehicleVersion_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
<el-form-item label="存放地点"> |
|
|
|
<el-select v-model="listQuery.params.location" class="addinputw" clearable placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in location_list" :key="item.sid" :label="item.warehouseName" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
@ -66,7 +42,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">现车库存列表</div> |
|
|
|
<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=""> |
|
|
@ -119,6 +95,7 @@ |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import req from '@/api/supplychain/purchasereturntowarehouse' |
|
|
|
import { typeValues, brandDown, fetchByUseOrgSid, getPathSidByUserSid } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'xuanzecheliang', |
|
|
@ -128,22 +105,13 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
createPage: '', |
|
|
|
dialogVisible: false, // 弹窗 |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
btndisabled: false, |
|
|
|
viewState: 1, // 1、列表 2、添加-车辆预定 3、编辑 4、查看 5、订金-定金收取 |
|
|
|
// 查询 ----------- |
|
|
|
carbrand_list: [], // 品牌 |
|
|
|
vehicleFunction_list: [], // 功能 |
|
|
|
productLine_list: [], // 系列 |
|
|
|
gearboxType_list: [], // 变速箱 |
|
|
|
driveForm_list: [], // 驱动 |
|
|
|
emissionStandard_list: [], // 排放标准 |
|
|
|
power_list: [], // 马力 |
|
|
|
fuelType_list: [], // 燃料 |
|
|
|
vehicleVersion_list: [], // 版本 |
|
|
|
carColor_list: [], // 功能 |
|
|
|
location_list: [], // 版本 |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
@ -155,30 +123,39 @@ export default { |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
brandSid: '', |
|
|
|
driveForm: '', |
|
|
|
emissionStandard: '', |
|
|
|
fuelType: '', |
|
|
|
gearboxType: '', |
|
|
|
lockedState: '', |
|
|
|
power: '', |
|
|
|
productLine: '', |
|
|
|
vehicleState: '', |
|
|
|
vehicleType: '', |
|
|
|
vehicleVersion: '', |
|
|
|
modelNameAndCode: '', |
|
|
|
vinNo: '', |
|
|
|
carColorKey: '', |
|
|
|
location: '', |
|
|
|
vinNoList: [], |
|
|
|
userSid: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
selectDate: undefined, |
|
|
|
temp: {}, // 添加和编辑 |
|
|
|
vinNoList: [], |
|
|
|
depositVehicleList: [], |
|
|
|
visible: true, |
|
|
|
hetongdanganguanliInfoShow: false |
|
|
|
// ------------------------------------ |
|
|
|
vinNoList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
typeValues({ type: 'bodyColor' }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.carColor_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
brandDown({ useOrg: res.data }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.carbrand_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
fetchByUseOrgSid({ sid: res.data }).then((respsone) => { |
|
|
|
if (respsone.success) { |
|
|
|
this.location_list = respsone.data |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
@ -194,140 +171,38 @@ export default { |
|
|
|
this.listQuery.total = 0 |
|
|
|
this.listQuery.size = 5 |
|
|
|
this.listQuery.params.brandSid = '' |
|
|
|
this.listQuery.params.driveForm = '' |
|
|
|
this.listQuery.params.emissionStandard = '' |
|
|
|
this.listQuery.params.fuelType = '' |
|
|
|
this.listQuery.params.gearboxType = '' |
|
|
|
this.listQuery.params.lockedState = '' |
|
|
|
this.listQuery.params.power = '' |
|
|
|
this.listQuery.params.productLine = '' |
|
|
|
this.listQuery.params.vehicleState = '' |
|
|
|
this.listQuery.params.vehicleType = '' |
|
|
|
this.listQuery.params.modelNameAndCode = '' |
|
|
|
this.listQuery.params.vinNo = '' |
|
|
|
this.listQuery.params.carColorKey = '' |
|
|
|
this.listQuery.params.location = '' |
|
|
|
this.listQuery.params.userSid = '' |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 勾选 |
|
|
|
handleSelectionChange(row) { |
|
|
|
console.log('row', row) |
|
|
|
this.depositVehicleList = row |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
aa.push({ |
|
|
|
configName: element.configName, |
|
|
|
configSid: element.configSid, |
|
|
|
priceDate: element.priceDate, |
|
|
|
vehicleAlias: element.vehicleAlias, |
|
|
|
vinNo: element.vinNo |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
console.log('选择sid', this.sids) |
|
|
|
}, |
|
|
|
// 品牌下拉 |
|
|
|
getType() { |
|
|
|
// 品牌下拉 |
|
|
|
req.selectBrand().then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.carbrand_list = res.data |
|
|
|
console.log('下拉框请求品牌', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 功能 |
|
|
|
req.pullDown({ |
|
|
|
type: 'vehicleFunction' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleFunction_list = res.data |
|
|
|
console.log('下拉框请求功能', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 系列 |
|
|
|
req.pullDown({ |
|
|
|
type: 'productLine' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.productLine_list = res.data |
|
|
|
console.log('下拉框请求系列', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 变速箱 |
|
|
|
req.pullDown({ |
|
|
|
type: 'gearbox' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.gearboxType_list = res.data |
|
|
|
console.log('下拉框请求变速箱', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 驱动 |
|
|
|
req.pullDown({ |
|
|
|
type: 'driver' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.driveForm_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 排放标准 |
|
|
|
req.pullDown({ |
|
|
|
type: 'emissionStandard' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.emissionStandard_list = res.data |
|
|
|
console.log('下拉框请求排放标准', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 马力 |
|
|
|
req.pullDown({ |
|
|
|
type: 'horsepower' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.power_list = res.data |
|
|
|
console.log('下拉框请求马力', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 燃料 |
|
|
|
req.pullDown({ |
|
|
|
type: 'fuelType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.fuelType_list = res.data |
|
|
|
console.log('下拉框请求燃料', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 版本 |
|
|
|
req.pullDown({ |
|
|
|
type: 'vehicleVersion' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleVersion_list = res.data |
|
|
|
console.log('下拉框请求版本', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 确认 |
|
|
|
handleConfirm() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
if (this.vinNoList.length > 0) { |
|
|
|
console.log('已选择的数据', this.vinNoList) |
|
|
|
for (var i = 0; i < this.vinNoList.length; i++) { |
|
|
|
for (var j = 0; j < this.depositVehicleList.length; j++) { |
|
|
|
if (this.vinNoList[i] === this.depositVehicleList[j].vinNo) { |
|
|
|
const index = this.depositVehicleList.findIndex(val => { |
|
|
|
return this.depositVehicleList[j].vinNo === this.vinNoList[i] |
|
|
|
}) |
|
|
|
this.depositVehicleList.splice(index, 1) |
|
|
|
console.log('进入if判断', index) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$emit('handleVehicle', this.depositVehicleList) |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.multipleTable.clearSelection() |
|
|
|
}) |
|
|
|
this.handleReturn() |
|
|
|
this.$emit('handleVehicle', this.sids) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择车辆!', |
|
|
|
message: '请选择至少一条车辆记录!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
// 返回 |
|
|
@ -364,7 +239,7 @@ export default { |
|
|
|
// 排除已选信息 |
|
|
|
loadVinNo(vinNoList) { |
|
|
|
this.listQuery.params.vinNoList = vinNoList |
|
|
|
this.getType() |
|
|
|
this.init() |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
} |
|
|
|