refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试
这个提交包含在:
@@ -5,7 +5,7 @@ import {
|
||||
} from '../../../src/modules/team/service/currency-tax';
|
||||
import { TaxCalculationResult } from '../../../src/comm/types/omni';
|
||||
|
||||
describe('Point 57 (P1): 跨境多币种汇率换算与出海发票税制计算', () => {
|
||||
describe('Point 57 (P1): 跨国多币种汇率换算与国际发票税制计算', () => {
|
||||
let service: CurrencyTaxCalculatorService;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -35,7 +35,7 @@ describe('Point 57 (P1): 跨境多币种汇率换算与出海发票税制计算'
|
||||
});
|
||||
});
|
||||
|
||||
describe('2. calculateInternationalTax (出海合规发票税制计算)', () => {
|
||||
describe('2. calculateInternationalTax (国际合规发票税制计算)', () => {
|
||||
it('阿联酋企业或个人消费应按 5% VAT 计税', () => {
|
||||
const res = calculateInternationalTax({
|
||||
amount: 1000,
|
||||
@@ -50,7 +50,7 @@ describe('Point 57 (P1): 跨境多币种汇率换算与出海发票税制计算'
|
||||
expect(res.taxName).toBe('UAE VAT');
|
||||
});
|
||||
|
||||
it('欧盟企业间跨境 B2B (Reverse Charge) 应适用反向征税 0% VAT', () => {
|
||||
it('欧盟企业间跨国 B2B (Reverse Charge) 应适用反向征税 0% VAT', () => {
|
||||
const res = calculateInternationalTax({
|
||||
amount: 2000,
|
||||
currency: 'EUR',
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
assertLeadAccessPermission,
|
||||
} from '../../../src/modules/team/service/data-scope';
|
||||
|
||||
describe('Point 52: 出海多租户团队成员细粒度数据隔离与销售管辖范围保护', () => {
|
||||
describe('Point 52: 多租户团队成员细粒度数据隔离与销售管辖范围保护', () => {
|
||||
let service: TeamDataScopeService;
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -44,7 +44,7 @@ describe('【财务与运营新账统计】TeamFinanceAnalyticsService 单元测
|
||||
expect(Array.isArray(result.planDistribution)).toBe(true);
|
||||
expect(result.planDistribution.some((item) => item.plan === 'pro')).toBe(true);
|
||||
|
||||
// 出海区域分布
|
||||
// 国际区域分布
|
||||
expect(Array.isArray(result.regionalRevenue)).toBe(true);
|
||||
|
||||
// 流水明细
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('Point 19: 离职资产交接工单流程与历史线索迁移 单元
|
||||
lead1.id = 1;
|
||||
lead1.userId = 1001;
|
||||
lead1.cardId = 101;
|
||||
lead1.name = '重点出海客户 A';
|
||||
lead1.name = '重点合作客户 A';
|
||||
lead1.isPool = false;
|
||||
lead1.status = 'contacted';
|
||||
leads.push(lead1);
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('Point 28: 展会现场团队获客实时排行榜大屏广播 (Live Ra
|
||||
u1.id = 101;
|
||||
u1.name = 'Alex Rivera';
|
||||
u1.tenantId = 1;
|
||||
u1.departmentName = '出海一队';
|
||||
u1.departmentName = '国际业务一队';
|
||||
|
||||
const c1 = new CardInfoEntity();
|
||||
c1.id = 1;
|
||||
@@ -103,7 +103,7 @@ describe('Point 28: 展会现场团队获客实时排行榜大屏广播 (Live Ra
|
||||
u2.id = 102;
|
||||
u2.name = 'Sarah Wang';
|
||||
u2.tenantId = 1;
|
||||
u2.departmentName = '出海二队';
|
||||
u2.departmentName = '国际业务二队';
|
||||
|
||||
const c2 = new CardInfoEntity();
|
||||
c2.id = 2;
|
||||
|
||||
@@ -47,7 +47,7 @@ describe('Point 17: 后台组织架构、部门树与成员名片分配 (Team Me
|
||||
users = [];
|
||||
cards = [];
|
||||
|
||||
// 预置部门数据:总部 (1) -> 研发中心 (2) -> 前端组 (3); 总部 (1) -> 销售出海中心 (4)
|
||||
// 预置部门数据:总部 (1) -> 研发中心 (2) -> 前端组 (3); 总部 (1) -> 国际业务拓展部 (4)
|
||||
const d1 = new BaseSysDepartmentEntity();
|
||||
d1.id = 1;
|
||||
d1.name = '全球商务总部';
|
||||
@@ -56,7 +56,7 @@ describe('Point 17: 后台组织架构、部门树与成员名片分配 (Team Me
|
||||
|
||||
const d2 = new BaseSysDepartmentEntity();
|
||||
d2.id = 2;
|
||||
d2.name = '海外研发中心';
|
||||
d2.name = '国际研发中心';
|
||||
d2.parentId = 1;
|
||||
d2.orderNum = 10;
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('Point 17: 后台组织架构、部门树与成员名片分配 (Team Me
|
||||
|
||||
const d4 = new BaseSysDepartmentEntity();
|
||||
d4.id = 4;
|
||||
d4.name = '出海业务拓展部';
|
||||
d4.name = '国际业务拓展部';
|
||||
d4.parentId = 1;
|
||||
d4.orderNum = 20;
|
||||
|
||||
@@ -201,7 +201,7 @@ describe('Point 17: 后台组织架构、部门树与成员名片分配 (Team Me
|
||||
expect(root.title).toBe('全球商务总部');
|
||||
expect(root.children?.length).toBe(2);
|
||||
|
||||
// children 排序应为 海外研发中心 (orderNum: 10) 和 出海业务拓展部 (orderNum: 20)
|
||||
// children 排序应为 国际研发中心 (orderNum: 10) 和 国际业务拓展部 (orderNum: 20)
|
||||
expect(root.children?.[0].id).toBe(2);
|
||||
expect(root.children?.[0].children?.length).toBe(1); // 前端组 (3)
|
||||
expect(root.children?.[0].children?.[0].id).toBe(3);
|
||||
@@ -211,7 +211,7 @@ describe('Point 17: 后台组织架构、部门树与成员名片分配 (Team Me
|
||||
// 人数统计验证
|
||||
expect(root.memberCount).toBe(1); // u1 在总部
|
||||
expect(root.children?.[0].children?.[0].memberCount).toBe(1); // u2 在前端组
|
||||
expect(root.children?.[1].memberCount).toBe(1); // u3 在出海业务部
|
||||
expect(root.children?.[1].memberCount).toBe(1); // u3 在国际业务部
|
||||
});
|
||||
|
||||
it('2.2 addDepartment 校验部门名称必填并成功入库', async () => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户