|
|
@ -645,6 +645,19 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].isSettle === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
@ -652,6 +665,8 @@ export default { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
@ -662,11 +677,16 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitVehicleApply() { |
|
|
|
if (this.formobj.vehicleList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].isSettle === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) |
|
|
|
return |
|
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].isSettle === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -677,6 +697,8 @@ export default { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|