From c7f7d40de78c2b142f71f5788a2cee39b0d2183d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Wed, 21 Dec 2022 17:37:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=B9=B6=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/Customer/addForm.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/main/Customer/addForm.vue b/src/views/main/Customer/addForm.vue index 4c80940..3242a25 100644 --- a/src/views/main/Customer/addForm.vue +++ b/src/views/main/Customer/addForm.vue @@ -9,10 +9,15 @@ > --> - + + + + 保存并新增 + + - {{ this.id ? '修改' : '新增' }} + {{ this.id ? '修改' : '保存' }} @@ -367,7 +372,7 @@ export default { /** * 提交表单 */ - handleSubmit() { + handleSubmit(WebType) { const { form: { validateFields } } = this @@ -421,10 +426,15 @@ export default { DjyCustomerAdd({ ...values, propString: propString, contacts: this.ContactsData }) .then(res => { if (res.success) { - this.id = res.data this.$message.success('新增成功') this.confirmLoading = false this.$emit('ok', values) + if (WebType == 'New') { + this.form.resetFields() + this.ContactsData = [] + } else { + this.id = res.data + } } else { this.$message.error(`新增失败,${res.message}`) }