Commit 76519711 by zhangquan

车系弹窗优化

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