From d21c060903ca4fafaa36a00faa9569cfa118d195 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 9 Mar 2024 17:57:24 +0800 Subject: [PATCH] =?UTF-8?q?CRM=EF=BC=9A=E5=AE=8C=E5=96=84=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/permission/index.ts | 4 ++-- src/views/crm/permission/components/TransferForm.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index e1f31747..4f88b14f 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -15,9 +15,9 @@ export interface PermissionVO { } export interface TransferReqVO { - bizId: number // 模块编号 + id: number // 模块编号 newOwnerUserId: number // 新负责人的用户编号 - oldOwnerPermissionLevel: number // 老负责人加入团队后的权限级别 + oldOwnerPermissionLevel?: number // 老负责人加入团队后的权限级别 toBizTypes?: number[] // 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 } diff --git a/src/views/crm/permission/components/TransferForm.vue b/src/views/crm/permission/components/TransferForm.vue index 0205faca..311071be 100644 --- a/src/views/crm/permission/components/TransferForm.vue +++ b/src/views/crm/permission/components/TransferForm.vue @@ -19,7 +19,7 @@ - + 移除 加入团队 @@ -86,10 +86,16 @@ const open = async (bizId: number) => { dialogVisible.value = true dialogTitle.value = getDialogTitle() resetForm() - formData.value.bizId = bizId + formData.value.id = bizId } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 - +// 老负责人负责方式 +const handleOwnerChange = (val: boolean) => { + if (!val) { + // 移除的话提交不带 oldOwnerPermissionLevel 参数 + formData.value.oldOwnerPermissionLevel = undefined + } +} /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => {