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}`) }