diff --git a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagementAdd.vue b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagementAdd.vue index 115a3f8e30..23903748ee 100644 --- a/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagementAdd.vue +++ b/anrui-riskcenter-ui/src/views/financialpolicymanagement/financialpolicymanagementAdd.vue @@ -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) => { diff --git a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementAdd.vue b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementAdd.vue index 9e1bb9ca21..af3d6c6eab 100644 --- a/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementAdd.vue +++ b/anrui-riskcenter-ui/src/views/otherfinancialpolicymanagement/otherfinancialpolicymanagementAdd.vue @@ -302,16 +302,18 @@ export default { this.$refs['form_obj'].validate((valid) => { if (valid) { 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 } if (this.formobj.vehTypeKeyList.length > 0) { const aa = []