|
|
@ -553,17 +553,41 @@ export default { |
|
|
|
saveOrUpdate() { |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (this.formobj.isOtherProduct) { |
|
|
|
if (this.formobj.loanFinOtherPolicy.productTypeKey === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中产品类别不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.maxLoanRatio === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中最高融资比例不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.maxLoanAmount === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中最高融资额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.periodKey === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中期数不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.yearRatio === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中年利率不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.useDept_list.length > 0) { |
|
|
|
const aa = [] |
|
|
|
for (var i = 0; i < this.orgList.length; i++) { |
|
|
|
for (var k = 0; k < this.useDept_list.length; k++) { |
|
|
|
if (this.orgList[i].orgDeptSid === this.useDept_list[k]) { |
|
|
|
this.formobj.useDeptList.push({ |
|
|
|
aa.push({ |
|
|
|
deptName: this.orgList[i].orgDeptName, |
|
|
|
deptSid: this.orgList[i].orgDeptSid |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.formobj.useDeptList = aa |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '适用销售部门不能为空' }) |
|
|
|
return |
|
|
@ -583,27 +607,6 @@ export default { |
|
|
|
this.formobj.vehTypeValueList = [] |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.isOtherProduct) { |
|
|
|
if (this.formobj.loanFinOtherPolicy.productTypeKey === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中产品类别不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.maxLoanRatio === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中最高融资比例不能为空' }) |
|
|
|
return |
|
|
|
}if (this.formobj.loanFinOtherPolicy.maxLoanAmount === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中最高融资额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.periodKey === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中期数不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.loanFinOtherPolicy.yearRatio === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '其它融中年利率不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.submitdisabled = true |
|
|
|
// 保存 |
|
|
|
req.saveOrUpdate(this.formobj).then((res) => { |
|
|
|