Commit 76519711 by zhangquan

车系弹窗优化

1 parent f284273d
......@@ -332,7 +332,7 @@ export default {
return {merchantId , merchantName, activityPrice, giveIntegral}
})
const params = {
merchantRequestList,
saleMerchantList: merchantRequestList,
...obj
}
if(this.routeInfo.id) params.id = this.routeInfo.id
......@@ -377,7 +377,7 @@ export default {
this.formObj.source = '2',
this.formObj.method = '2',
this.formObj.coverList = [res.goodsImage]
this.merchantRequestList = res.merchantList?.map(item => {
this.merchantRequestList = res.saleMerchantList?.map(item => {
let activityPrice = item.activityPrice ? Number(Number(item.activityPrice/100).toFixed(2)) : 0
return {...item, activityPrice}
}) || []
......
......@@ -16,6 +16,7 @@
</el-option>
</el-select> -->
<el-autocomplete
clearable
debounce="1000"
v-model="curbrandName"
:fetch-suggestions="querySearchAsync"
......@@ -114,7 +115,8 @@
querySearchAsync(queryString, cb){
var restaurants = this.searchList;
var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : [];
cb(results);
if(!queryString) this.filterBrandList = this.carSeriesData
if(results?.length>0) cb(results);
},
createStateFilter(queryString) {
return (state) => {
......@@ -130,15 +132,15 @@
let { brandId, brandName, childBrandId, childBrandName, vehicleSeriesId, vehicleSeriesName} = item
if(obj[brandId]){
if(obj[brandId][childBrandId]){
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: childBrandId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}else{
obj[brandId][childBrandId] = []
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: childBrandId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}
}else{
obj[brandId] = {}
obj[brandId][childBrandId] = []
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: childBrandId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}
})
this.selectdData = obj
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!