fix(intake): 商品企划候选人排除供应商账号
This commit is contained in:
parent
5cd69fb9db
commit
57b2b405cf
@ -153,4 +153,28 @@ describe('intake-owner-options.service', () => {
|
||||
listIntakeOwnerOptionNamesByDepartmentScope('merchandisePlanning'),
|
||||
).resolves.toEqual(['内部A'])
|
||||
})
|
||||
|
||||
it('excludes supplier accounts from merchandise planning candidates', async () => {
|
||||
mockedFindMany.mockResolvedValue([
|
||||
{
|
||||
name: '兰考华兰家具',
|
||||
businessRoles: ['SUPPLIER'],
|
||||
department: null,
|
||||
team: null,
|
||||
},
|
||||
{
|
||||
name: '内部A',
|
||||
businessRoles: [],
|
||||
department: {
|
||||
name: '产品研发部',
|
||||
fullPath: '江苏简尚品牌管理有限公司 > 产品研发部',
|
||||
},
|
||||
team: null,
|
||||
},
|
||||
])
|
||||
|
||||
await expect(
|
||||
listIntakeOwnerOptionNamesByDepartmentScope('merchandisePlanning'),
|
||||
).resolves.toEqual(['内部A'])
|
||||
})
|
||||
})
|
||||
|
||||
@ -119,8 +119,12 @@ export async function listIntakeOwnerOptionNamesByDepartmentScope(
|
||||
|
||||
if (isOptionExternalIntakeUser) return false;
|
||||
|
||||
// 供应商自注册账号(SUPPLIER 角色)不是内部人员,
|
||||
// 不应出现在任何内部负责人候选里。
|
||||
if (user.businessRoles?.includes("SUPPLIER")) return false;
|
||||
|
||||
// 商品企划部已解散(2026-10 用户口径):商品企划不再按部门圈定候选人,
|
||||
// 直接开放为全部内部人员可搜索填写;外部人员已在上面排除。
|
||||
// 直接开放为全部内部人员可搜索填写;外部人员与供应商已在上面排除。
|
||||
if (scope === "merchandisePlanning") {
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user