|
|
@ -805,34 +805,59 @@ export default { |
|
|
|
} else { |
|
|
|
this.formobj.deductionPolicyFourThree = 1 |
|
|
|
} |
|
|
|
// if (this.formobj.vehicleList.length > 0) { |
|
|
|
// for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
// if (this.formobj.vehicleList[i].vinNo !== '') { |
|
|
|
// if (this.formobj.vehicleList[i].vinNo.length < 17) { |
|
|
|
// const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位' |
|
|
|
// this.$message({ showClose: true, type: 'error', message: message }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
req.submitVehicleApply(this.formobj).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: '提交成功' |
|
|
|
}) |
|
|
|
// 子页面向父级页面传递值(关闭弹框) |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 操作成功,告诉父级页面关闭弹框 |
|
|
|
code: 1 |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
var hint = 0 |
|
|
|
if (this.formobj.vehicleList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].vinNo === '') { |
|
|
|
hint = 1 |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if (hint !== 0) { |
|
|
|
const tip = '有些车架号没有填写,是否分批入库' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
req.submitVehicleApply(this.formobj).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: '提交成功' |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'error', |
|
|
|
message: '提交失败' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
hint = 0 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
req.submitVehicleApply(this.formobj).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: '提交成功' |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'error', |
|
|
|
message: '提交失败' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|