二手车交易,必填项回到原本
This commit is contained in:
@ -194,7 +194,22 @@ export default {
|
||||
this.$toast('请填写不通过原因')
|
||||
return
|
||||
}
|
||||
await this.commonMethods()
|
||||
let flag=this.validateHandle()
|
||||
if(flag){
|
||||
this.$toast(flag)
|
||||
return
|
||||
}
|
||||
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
|
||||
this.$toast('落板方式不能为空')
|
||||
return
|
||||
}else if(this.form.vehicleType !=='拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
}
|
||||
try {
|
||||
await auditCarInfo({
|
||||
id: this.id,
|
||||
@ -215,7 +230,12 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
commonMethods() {
|
||||
// 发布求购
|
||||
async submitHandle(){
|
||||
if (!this.radio) {
|
||||
this.$toast('请勾选我已阅读并同意')
|
||||
return
|
||||
}
|
||||
let flag=this.validateHandle()
|
||||
if(flag){
|
||||
this.$toast(flag)
|
||||
@ -232,14 +252,6 @@ export default {
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
}
|
||||
},
|
||||
// 发布求购
|
||||
async submitHandle(){
|
||||
if (!this.radio) {
|
||||
this.$toast('请勾选我已阅读并同意')
|
||||
return
|
||||
}
|
||||
await this.commonMethods()
|
||||
try {
|
||||
let res = await publishCarInfo({
|
||||
...this.form,
|
||||
|
Reference in New Issue
Block a user