Commit 3f020c0b by 张立顺

fix bug

1 parent ee49082a
...@@ -1956,28 +1956,36 @@ export default { ...@@ -1956,28 +1956,36 @@ export default {
} }
} }
}) })
this.customProductList = _list console.log(_list, '_list')
let list2 = []
if (this.editForm.vehicle.vehicleSeriesId) {
let cartype = this.editForm.vehicle.vehicleSeriesId
// let _price = this.editForm.vehicle.invoicePrice
_list.forEach(item => {
// 套餐商品不做过滤 没有这个字段也给全部默认显示
if (!item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
list2.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
} else {
list2 = _list
}
console.log(list2, '_list')
this.customProductList = list2
if (formDetail) return _list if (formDetail) return _list
} }
// var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
// this.editForm.suggestedSellingPrice = ''
// if (this.editForm.vehicle.invoicePrice) {
// var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2)
// targetItem &&
// targetItem.servicePackagePrices.forEach(item => {
// if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) {
// this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
// this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2)
// }
// })
// }
}, },
packageToCarType(cartype = '') { packageToCarType() {
if (cartype && this.editForm.orderStatus != 2) { let cartype = this.editForm.vehicle.vehicleSeriesId
let _price = this.editForm.vehicle.invoicePrice
if ((cartype || _price) && this.editForm.orderStatus != 2) {
let _list = [] let _list = []
this.copyCustomProductList.forEach(item => { this.copyCustomProductList.forEach(item => {
// 套餐商品不做过滤 // 套餐商品不做过滤 没有这个字段也给全部默认显示
console.log(item, 'copyCustomProductList')
if (!item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) { if (!item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
_list.push(item) _list.push(item)
} else { } else {
...@@ -1986,7 +1994,24 @@ export default { ...@@ -1986,7 +1994,24 @@ export default {
} }
} }
}) })
this.customProductList = _list console.log(_list, '_list')
let list2 = []
if (this.editForm.vehicle.invoicePrice) {
// let _price = this.editForm.vehicle.invoicePrice
_list.forEach(item => {
// 套餐商品不做过滤
if (item.parentId || !item.carHighestPrice || (item.carHighestPrice && _price <= NP.divide(item.carHighestPrice || 0, 100) && _price >= NP.divide(item.carLowestPrice || 0, 100))) {
list2.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
} else {
list2 = _list
}
this.customProductList = list2
} }
}, },
packageAttr(recovery = false, productArrData, detailInfo) { packageAttr(recovery = false, productArrData, detailInfo) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!