diff --git a/src/views/caseManage/createCase.vue b/src/views/caseManage/createCase.vue index 69e116b..fd70fc1 100644 --- a/src/views/caseManage/createCase.vue +++ b/src/views/caseManage/createCase.vue @@ -161,7 +161,7 @@
- 提交 + 提交
@@ -265,6 +265,7 @@ }, allowAdd: true, // 允许新增联系人 addLoading: false, // 添加允许等待 + submitLoading: false, reportersList: [], // 联系人选择列表 eorcList: [], // 案卷类别 caseTypeList: [], // 案卷类别二级 @@ -346,6 +347,7 @@ methods: { // 提交 submit() { + this.submitLoading = true this.$refs['form'].validate((valid) => { if (valid && this.twiceValidate()) { // 初步校验通过 @@ -381,10 +383,14 @@ if (response.code === 200) { this.$message.success('新建成功') this.$emit('cancel') + this.submitLoading = false } }).catch(_ => { this.$emit('cancel') + this.submitLoading = false }) + } else { + this.submitLoading = false } }) }, @@ -480,9 +486,13 @@ tel: phone } getCustomerList(params).then(response => { - if (response.code === 200 && response.data && response.data.total === 1) { - this.form.reporterName = response.data.rows[0].name - this.allowAdd = false + if (response.code === 200 && response.data) { + if (response.data.total === 1) { + this.form.reporterName = response.data.rows[0].name + this.allowAdd = false + } else { + this.allowAdd = true + } } }) },