story#5314 二手车系统优化需求
This commit is contained in:
@ -401,17 +401,21 @@ export default {
|
||||
}else if(this.form.vehicleType !=='平板拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let _validationRules;
|
||||
if( type === 0 ) {
|
||||
_validationRules = this.validationRules.filter(item => item.name != '底盘品牌不能为空')
|
||||
} else {
|
||||
_validationRules = this.validationRules
|
||||
}
|
||||
let rule = _validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
let rule
|
||||
if( type == 1 ) {
|
||||
rule = this.validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
} else {
|
||||
rule = this.validationRulesSimple.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
}
|
||||
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
@ -526,6 +530,16 @@ export default {
|
||||
{ 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>
|
||||
|
Reference in New Issue
Block a user