diff --git a/src/views/company-manage/components/add-form.vue b/src/views/company-manage/components/add-form.vue index ee8d3722..a27c919b 100644 --- a/src/views/company-manage/components/add-form.vue +++ b/src/views/company-manage/components/add-form.vue @@ -226,6 +226,7 @@ export default { }, methods: { handleClose() { + this.$refs.addOrEditFormRef.resetFields() this.$emit('update:formDialogVisible', false) }, onSubmitForm() { @@ -239,7 +240,8 @@ export default { logo, nickName, phonenumber, - userName, + deptId, + parentId, } = this.addOrEditForm const params = { deptName, @@ -254,6 +256,11 @@ export default { password, }, } + + if (this.formType == 2) { + params.deptId = deptId + params.parentId = parentId + } const SEND_FUN = this.formType == 2 ? editCompanyAPI : addCompanyAPI const res = await SEND_FUN(params)