story#5314 二手车系统优化需求

This commit is contained in:
2025-04-11 10:52:57 +08:00
parent e56de7ff8b
commit 9ac5860ef8

View File

@ -121,10 +121,9 @@
</template> </template>
</van-field> </van-field>
</div> </div>
<div class="item"> <div class="item" style="margin-bottom:20px">
<span> <span class="star">*</span>底盘品牌</span> <span> <span class="star">*</span>底盘品牌</span>
<van-field <van-field
style="border: none"
class="radioWrap" class="radioWrap"
v-model="form.underpanBrand" v-model="form.underpanBrand"
input-align="right" input-align="right"
@ -387,7 +386,7 @@ export default {
this.$toast('车辆45度不能为空') this.$toast('车辆45度不能为空')
return return
} }
if(!this.form.vehicleRearPhoto) { if(!this.form.vehicleRearPhoto && type == 1) {
this.$toast('车辆后方45度不能为空') this.$toast('车辆后方45度不能为空')
return return
} }
@ -402,7 +401,13 @@ export default {
}else if(this.form.vehicleType !=='平板拖车'){ }else if(this.form.vehicleType !=='平板拖车'){
this.form.boardType='' this.form.boardType=''
} }
let rule = this.validationRules.find(item => 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 === null ||
item.value === undefined || item.value === undefined ||
item.value === '' item.value === ''