Commit ad6198d8 by zhangquan

优化车系弹窗

1 parent 4b2dbc40
......@@ -211,6 +211,7 @@ export default {
}else{
callback()
}
this.validateField('saleStore')
},
trigger: 'change'
}],
......@@ -218,11 +219,15 @@ export default {
required: true,
validator: (rule, value, callback) => {
const target = this.merchantRequestList.find(item => !item.activityPrice)
const hasNegTarget = this.merchantRequestList.find(item => item.activityPrice<this.formObj.depositPrice)
if(!this.merchantRequestList.length){
callback(new Error('请选择门店'))
}else if(target){
callback(new Error('请输入门店活动价'))
}else if(this.formObj.paymentType == 2 && hasNegTarget){
callback(new Error('活动价不能小于定金'))
}else{
console.log(this.formObj.paymentType , hasNegTarget)
callback()
}
},
......
......@@ -119,6 +119,16 @@
this.selectdData = obj
},
changeBrandStatus(e, row, idx){
this.curBrandInfo = {
id: row.id,
name: row.name
}
this.sonBrandList = row?.childs || []
this.curSonBrandInfo = {
id: row?.childs?.[0]?.id,
name: row?.childs?.[0]?.name
}
this.carSeriesList = row?.childs?.[0]?.childs || []
const { id: rootId, name: rootName } = row
if(this.selectdData[rootId]){
this.$delete(this.selectdData, rootId)
......@@ -140,6 +150,11 @@
this.selectdData = {}
this.isClearData = false
}
this.curSonBrandInfo = {
id: row.id,
name: row.name
}
this.carSeriesList = row?.childs
const {id:rootId, name: rootName} = this.curBrandInfo
if(this.selectdData[rootId]){
if(this.selectdData[rootId][row.id]){
......@@ -190,8 +205,12 @@
id: row.id,
name: row.name
}
this.curSonBrandInfo = {
id: row?.childs?.[0]?.id,
name: row?.childs?.[0]?.name
}
this.sonBrandList = row?.childs || []
this.carSeriesList = []
this.carSeriesList = row?.childs?.[0]?.childs || []
},
showCarSeriesList(row){
if(row.id == this.curSonBrandInfo.id) return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!