diff --git a/anrui-riskcenter-ui/src/views/secondarysales/relation/generatecontract.vue b/anrui-riskcenter-ui/src/views/secondarysales/relation/generatecontract.vue index 15365b8865..43e146cb12 100644 --- a/anrui-riskcenter-ui/src/views/secondarysales/relation/generatecontract.vue +++ b/anrui-riskcenter-ui/src/views/secondarysales/relation/generatecontract.vue @@ -5,7 +5,6 @@
{{ viewTitle }}
保存 - 生成 关闭
@@ -31,7 +30,7 @@ -
新车主名称
+
*新车主名称
@@ -39,11 +38,11 @@
-
客户类型
+
*客户类型
{{ formobj.customerType }}
-
联系电话
+
*联系电话
{{ formobj.mobile }}
@@ -80,6 +79,23 @@ +
附件
+ + +
合同
+ + + +
+
+ + +
证件
+ + + +
+
@@ -184,6 +200,8 @@ export default { endDate: '', certificateAddress: '', loanSecondarySalesVehVoList: [], + contractFiles: [], + otherFiles: [] }, rules: {} } @@ -275,9 +293,27 @@ export default { } }, saveOrUpdate() { + if (this.formobj.customerName === '' || this.formobj.mobile === '' || this.formobj.customerType === '') { + this.$message({ showClose: true, type: 'error', message: '客户信息中新车主名称、客户类型、联系电话等不能为空' }) + return + } this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true + if (this.formobj.contractFiles.length > 0) { + const aa = [] + this.formobj.contractFiles.forEach((e) => { + aa.push(e.url) + }) + this.formobj.contractFiles = aa + } + if (this.formobj.otherFiles.length > 0) { + const bb = [] + this.formobj.otherFiles.forEach((e) => { + bb.push(e.url) + }) + this.formobj.otherFiles = bb + } req.save(this.formobj).then((res) => { if (res.success) { this.$message({ showClose: true, type: 'success', message: '保存成功' }) @@ -291,23 +327,6 @@ export default { } }) }, - submit() { - // this.$refs['form_obj'].validate((valid) => { - // if (valid) { - // this.submitdisabled = true - // req.saveOrUpdate(this.formobj).then((res) => { - // if (res.success) { - // this.$message({ showClose: true, type: 'success', message: '保存成功' }) - // this.handleReturn('true') - // } else { - // this.submitdisabled = false - // } - // }).catch(() => { - // this.submitdisabled = false - // }) - // } - // }) - }, handleReturn(isreload) { if (isreload === 'true') this.$emit('reloadlist') this.formobj = { diff --git a/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue b/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue index c33012304e..3e11fb3516 100644 --- a/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue +++ b/anrui-riskcenter-ui/src/views/secondarysales/secondarysales.vue @@ -202,7 +202,7 @@ export default { size: 'small', icon: '', btnKey: 'toCreate', - btnLabel: '生成合同' + btnLabel: '补充信息' }, { type: 'primary',