二手车交易,审核加字段

This commit is contained in:
2025-03-14 15:07:35 +08:00
parent 509ab301a2
commit 4dbf2dc8c7
2 changed files with 67 additions and 33 deletions

View File

@ -209,24 +209,43 @@ export default {
this.$toast('请填写不通过原因')
return
}
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,
auditResult: type ? 1 : 0 ,
auditReason: this.auditReason,
...this.form,
})
// await this.submitHandle()
setTimeout(()=>{
this.closeParentDialog()
},1000)
} finally {
} catch (e){
console.log(e)
}
finally {
console.log(type)
}
},
// 发布求购
async submitHandle(){
if (!this.radio && this.type==1) {
if (!this.radio) {
this.$toast('请勾选我已阅读并同意')
return
}
@ -251,17 +270,15 @@ export default {
...this.form,
})
if(res.code == 200 && !res.msg){
if(this.type==1){
this.$toast('发布成功')
if(this.isWebFunc()){
setTimeout(()=>{
this.closeParentDialog()
},1000)
}else{
setTimeout(()=>{
this.$router.push({ name: "mineRelease",query:{activeTab : 1}})
},1000)
}
this.$toast('发布成功')
if(this.isWebFunc()){
setTimeout(()=>{
this.closeParentDialog()
},1000)
}else{
setTimeout(()=>{
this.$router.push({ name: "mineRelease",query:{activeTab : 1}})
},1000)
}
}else{
this.$toast(res.msg)