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 () => {