story#5314 二手车系统优化需求
This commit is contained in:
@ -401,17 +401,21 @@ export default {
|
|||||||
}else if(this.form.vehicleType !=='平板拖车'){
|
}else if(this.form.vehicleType !=='平板拖车'){
|
||||||
this.form.boardType=''
|
this.form.boardType=''
|
||||||
}
|
}
|
||||||
let _validationRules;
|
let rule
|
||||||
if( type === 0 ) {
|
if( type == 1 ) {
|
||||||
_validationRules = this.validationRules.filter(item => item.name != '底盘品牌不能为空')
|
rule = this.validationRules.find(item =>
|
||||||
} else {
|
item.value === null ||
|
||||||
_validationRules = this.validationRules
|
item.value === undefined ||
|
||||||
}
|
item.value === ''
|
||||||
let rule = _validationRules.find(item =>
|
)
|
||||||
item.value === null ||
|
} else {
|
||||||
item.value === undefined ||
|
rule = this.validationRulesSimple.find(item =>
|
||||||
item.value === ''
|
item.value === null ||
|
||||||
)
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if(rule){
|
if(rule){
|
||||||
this.$toast(rule.name)
|
this.$toast(rule.name)
|
||||||
return
|
return
|
||||||
@ -526,6 +530,16 @@ export default {
|
|||||||
{ value: this.form.underpanBrand, name: '底盘品牌不能为空' },
|
{ value: this.form.underpanBrand, name: '底盘品牌不能为空' },
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
validationRulesSimple() {
|
||||||
|
return [
|
||||||
|
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
|
||||||
|
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
|
||||||
|
{ value: this.form.areaCode, name: '所在城市不能为空' },
|
||||||
|
{ value: this.form.mileage, name: '行驶里程不能为空' },
|
||||||
|
{ value: this.form.contactNumber, name: '联系方式不能为空' },
|
||||||
|
{ value: this.form.minPrice, name: '售价不能为空' },
|
||||||
|
];
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user