A2-A3 补充关联明细码值防回归
这个提交包含在:
@@ -898,10 +898,10 @@ export function ReimbursementDetailPage() {
|
|||||||
|
|
||||||
const linkedItem = detail.items.find((item) => item.id === linkedItemId);
|
const linkedItem = detail.items.find((item) => item.id === linkedItemId);
|
||||||
if (!linkedItem) {
|
if (!linkedItem) {
|
||||||
return linkedItemId;
|
return "未识别明细";
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${linkedItem.expenseType?.name ?? linkedItem.expenseTypeId} · ${linkedItem.description ?? "未填写说明"}`;
|
return `${linkedItem.expenseType?.name ?? "未识别费用类型"} · ${linkedItem.description ?? "未填写说明"}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -538,6 +538,7 @@ test.describe("R111 国内报销发票与附件双端体验", () => {
|
|||||||
expect(bodyText).not.toMatch(/\bdraft\b/);
|
expect(bodyText).not.toMatch(/\bdraft\b/);
|
||||||
expect(bodyText).not.toMatch(/\bbound\b/);
|
expect(bodyText).not.toMatch(/\bbound\b/);
|
||||||
expect(bodyText).not.toContain("business_client_meal");
|
expect(bodyText).not.toContain("business_client_meal");
|
||||||
|
expect(bodyText).not.toContain("expense-type-r111");
|
||||||
await page.screenshot({ path: screenshotPath("pc-reimbursement-detail.png"), fullPage: true });
|
await page.screenshot({ path: screenshotPath("pc-reimbursement-detail.png"), fullPage: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ async function expectNoRawReimbursementCodes(page: Page) {
|
|||||||
expect(bodyText).not.toMatch(/\bdraft\b/);
|
expect(bodyText).not.toMatch(/\bdraft\b/);
|
||||||
expect(bodyText).not.toMatch(/\bbound\b/);
|
expect(bodyText).not.toMatch(/\bbound\b/);
|
||||||
expect(bodyText).not.toContain("business_client_meal");
|
expect(bodyText).not.toContain("business_client_meal");
|
||||||
|
expect(bodyText).not.toContain("expense-type-r125");
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildMe() {
|
function buildMe() {
|
||||||
|
|||||||
@@ -232,6 +232,14 @@ function scanReimbursementRawCodeDisplay(file, source) {
|
|||||||
regex: /expenseType\?\.name\s*\?\?\s*item\.expenseTypeId/g,
|
regex: /expenseType\?\.name\s*\?\?\s*item\.expenseTypeId/g,
|
||||||
message: "普通报销详情不应在费用类型缺失时回退展示内部费用类型 ID。",
|
message: "普通报销详情不应在费用类型缺失时回退展示内部费用类型 ID。",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
regex: /expenseType\?\.name\s*\?\?\s*linkedItem\.expenseTypeId/g,
|
||||||
|
message: "普通报销详情的发票关联明细不应回退展示内部费用类型 ID。",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
regex: /return\s+linkedItemId;/g,
|
||||||
|
message: "普通报销详情的发票关联明细不应回退展示内部明细 ID。",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const pattern of patterns) {
|
for (const pattern of patterns) {
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户