二手车交易,审核加字段
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user