From 81d52892f5d6ab8b0473547ed99fc94531cf435d Mon Sep 17 00:00:00 2001 From: luo Date: Tue, 4 Aug 2026 16:44:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/shop-management/list/index.vue | 59 +++++++++++++++--------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/src/views/shop-management/list/index.vue b/src/views/shop-management/list/index.vue index 9d22512..c449f95 100644 --- a/src/views/shop-management/list/index.vue +++ b/src/views/shop-management/list/index.vue @@ -127,7 +127,7 @@ - + Number(userStore.info.user_type) === 3) const canModifyShopStatus = hasAuth('shop:modify_status') const router = useRouter() @@ -573,23 +576,27 @@ placeholder: '请选择状态' } }, - { - label: '平台业务员', - prop: 'business_owner_account_id', - type: 'select', - config: { - clearable: true, - filterable: true, - remote: true, - remoteMethod: (query: string) => searchPlatformSalespeople(query), - placeholder: '请选择或搜索平台业务员' - }, - options: () => - salespersonOptions.value.map((salesperson) => ({ - label: `${salesperson.username} (${salesperson.phone_summary})`, - value: salesperson.id - })) - } + ...(!isAgentAccount.value + ? [ + { + label: '平台业务员', + prop: 'business_owner_account_id', + type: 'select' as const, + config: { + clearable: true, + filterable: true, + remote: true, + remoteMethod: (query: string) => searchPlatformSalespeople(query), + placeholder: '请选择或搜索平台业务员' + }, + options: () => + salespersonOptions.value.map((salesperson) => ({ + label: `${salesperson.username} (${salesperson.phone_summary})`, + value: salesperson.id + })) + } + ] + : []) ]) // 列配置 @@ -972,7 +979,9 @@ loadTopLevelShops() // 加载顶级店铺用于级联选择 searchDefaultRoles('') // 加载初始默认角色列表 searchParentShops('') // 加载上级店铺选项 - searchPlatformSalespeople('') // 加载启用的平台业务员选项 + if (!isAgentAccount.value) { + searchPlatformSalespeople('') // 加载启用的平台业务员选项 + } }) // 获取店铺列表 @@ -989,7 +998,9 @@ parent_id: searchForm.parent_id, level: searchForm.level, status: searchForm.status, - business_owner_account_id: searchForm.business_owner_account_id + ...(!isAgentAccount.value && { + business_owner_account_id: searchForm.business_owner_account_id + }) } const res = await ShopService.getShops(params) if (res.code === 0) { @@ -1060,9 +1071,11 @@ init_password: formData.init_password, init_phone: formData.init_phone, default_role_id: formData.default_role_id!, - business_owner_account_id: formData.business_owner_account_id, client_login_disabled: formData.client_login_disabled } + if (!isAgentAccount.value) { + data.business_owner_account_id = formData.business_owner_account_id + } // 可选字段 - parent_id 可能是数组(级联选择器)或数字 if (formData.parent_id) { @@ -1083,9 +1096,11 @@ const data: UpdateShopParams = { shop_name: formData.shop_name, status: formData.status, - business_owner_account_id: formData.business_owner_account_id, client_login_disabled: formData.client_login_disabled } + if (!isAgentAccount.value) { + data.business_owner_account_id = formData.business_owner_account_id + } // 可选字段 if (formData.province) data.province = formData.province