|
|
@ -604,28 +604,34 @@ export default { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆信息表不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm('是否确定提交该业务', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.createBtn = true |
|
|
|
this.formobj.procInsId = this.formobj.procInstId |
|
|
|
submitInfo(this.formobj).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.createBtn = false |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
this.createBtn = false |
|
|
|
if (this.formobj.discountLeave.length > 0 && this.formobj.carList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.discountLeave.length; i++) { |
|
|
|
if (this.formobj.discountLeave[i].discountLeaveNum != 0) { |
|
|
|
this.$confirm('存在未赠送的套餐,是否需要赠送', '提示', { |
|
|
|
confirmButtonText: '否', |
|
|
|
cancelButtonText: '是', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.createBtn = true |
|
|
|
this.formobj.procInsId = this.formobj.procInstId |
|
|
|
submitInfo(this.formobj).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.createBtn = false |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
this.createBtn = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn(isreload) { |
|
|
|