Commit fbb5d121 by zhangquan

过滤产品

1 parent 8b01bca4
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"glsx-common": "^2.0.4", "glsx-common": "^2.0.4",
"glsx-components": "^1.5.4", "glsx-components": "^1.5.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"number-precision": "^1.6.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
......
...@@ -316,6 +316,7 @@ import { fetchConfig } from '@/config' ...@@ -316,6 +316,7 @@ import { fetchConfig } from '@/config'
import utils from '../../util/util' import utils from '../../util/util'
import uploadInfo from './uploadInfo.vue' import uploadInfo from './uploadInfo.vue'
import FormatInput from '@/components/FormatInput' import FormatInput from '@/components/FormatInput'
import NP from 'number-precision'
export default { export default {
name: 'editEquity', name: 'editEquity',
data() { data() {
...@@ -435,8 +436,8 @@ export default { ...@@ -435,8 +436,8 @@ export default {
type: 'input', type: 'input',
placeholder: '请输入车辆价格', placeholder: '请输入车辆价格',
maxlength: 11, maxlength: 11,
inputBlur: () => { inputBlur: e => {
this.packageToPrice() this.packageToPrice(e)
} }
}, },
{ {
...@@ -1615,6 +1616,7 @@ export default { ...@@ -1615,6 +1616,7 @@ export default {
this.customProductList.push(item) this.customProductList.push(item)
} }
}) })
this.copyCustomProductList = this.$common.utils.deepClone(this.customProductList) //复制一份出来当做过滤源数据
this.autoGenerate(this.customProductList, this.productList) this.autoGenerate(this.customProductList, this.productList)
}, },
setDisabled(partDisabledList = []) { setDisabled(partDisabledList = []) {
...@@ -1767,18 +1769,32 @@ export default { ...@@ -1767,18 +1769,32 @@ export default {
}, },
// 改建议价,实际销售价 // 改建议价,实际销售价
packageToPrice() { packageToPrice() {
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode) let _price = e?.target?.value || ''
this.editForm.suggestedSellingPrice = '' if (_price) {
if (this.editForm.vehicle.invoicePrice) { let _list = []
var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2) this.copyCustomProductList.forEach(item => {
targetItem && if (!item.carHighestPrice || (item.carHighestPrice && _price < NP.divide(item.carHighestPrice || 0, 100) && _price > NP.divide(item.carLowestPrice || 0, 100))) {
targetItem.servicePackagePrices.forEach(item => { _list.push(item)
if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) { } else {
this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2) if (this.autoPackageCodeList.includes(item.packageCode)) {
this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2) this.changeRaido(false, item)
} }
}) }
} })
this.customProductList = _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)
// }
// })
// }
}, },
packageAttr(recovery = false, productArrData, detailInfo) { packageAttr(recovery = false, productArrData, detailInfo) {
// 2023 7月底版本 改版 // 2023 7月底版本 改版
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!