Commit ad6198d8 by zhangquan

优化车系弹窗

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