BIZ8-8 增强财务台账项目扫读

这个提交包含在:
2026-05-13 20:57:41 +08:00
父节点 8e7c96c094
当前提交 1c9d0dc612
共修改 7 个文件,包含 271 行新增和 4 行删除
@@ -106,6 +106,7 @@ function buildFinanceLedgerItem(overrides = {}) {
owner: { id: ACTOR_ID, employee_no: "E001", name: "张三" },
submitter: { id: ACTOR_ID, employee_no: "E001", name: "张三" },
department: { id: "dept-1", name: "财务部" },
project: { id: "project-1", project_no: "PJ-001", name: "交付项目" },
paid_by_employee: { id: ACTOR_ID, employee_no: "F001", name: "财务" },
invoice_pool_items: [{ id: "invoice-1", status: "archived", archived_reason: "used_complete" }],
_count: { attachments: 1, invoice_pool_items: 1 },
@@ -217,6 +218,7 @@ describe("ap operations export route", () => {
expect(response.body).toContain("待付款批次");
expect(response.body).toContain("财务台账");
expect(response.body).toContain("BX-20260406-001");
expect(response.body).toContain("交付项目");
expect(response.body).toContain("异常付款项");
expect(response.body).toContain("风险标记");
expect(response.body).toContain("对账异常");
@@ -0,0 +1,22 @@
const {
FINANCE_LEDGER_EXPORT_HEADERS,
buildFinanceLedgerWhere,
} = require("../../../src/services/financeLedger");
describe("finance ledger service", () => {
it("includes project fields in keyword search and export headers", () => {
const where = buildFinanceLedgerWhere({ q: "交付项目" });
expect(where).toEqual({
AND: [
{
OR: expect.arrayContaining([
{ project: { is: { project_no: { contains: "交付项目", mode: "insensitive" } } } },
{ project: { is: { name: { contains: "交付项目", mode: "insensitive" } } } },
]),
},
],
});
expect(FINANCE_LEDGER_EXPORT_HEADERS).toContain("项目");
});
});