空运未填报价日期时不默认当天,查出舱位后由销售点选再写回日期。

包装类型里的托盘不再被抄进增值服务。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-13 18:35:52 +08:00
co-authored by Cursor
parent dda210c219
commit 7ef4a1b1cf
21 changed files with 1068 additions and 58 deletions
+38 -4
View File
@@ -21,10 +21,44 @@ test("land FTL shows vehicle not pieces", () => {
const map = Object.fromEntries(rows.map((r) => [r.label, r.value]));
expect(map["运输方式"]).toBe("陆运");
expect(map["运输类型"]).toBe("国内运输整车");
expect(map["车型/数量"]).toBe("53尺(16.5厢车)");
expect(map["始发站"]).toBe("上海");
expect(map["货物品名"]).toBe("茶叶");
expect(map["件数"]).toBeUndefined();
expect(map["车型/数量"]).toBe("53尺(16.5厢车)");
expect(map["始发站"]).toBe("上海");
expect(map["货物品名"]).toBe("茶叶");
expect(map["件数"]).toBeUndefined();
expect(map["增值服务"]).toBeUndefined();
});
test("air shows added services only when filled", () => {
const filled = buildDemandFields({
businessLine: "AIR",
bizTypeLabel: "空运",
factsJson: JSON.stringify({
起运港: "深圳",
目的港: "吉隆坡",
品名: "茶叶",
件数: "10",
毛重: "100",
体积: "2",
包装方式: "纸箱",
报价日期: "2026-10-13",
added_services: "托盘、前置仓、带电",
}),
});
const map = Object.fromEntries(filled.map((r) => [r.label, r.value]));
expect(map["增值服务"]).toBe("托盘、前置仓、带电");
expect(map["包装类型"]).toBe("纸箱");
const empty = buildDemandFields({
businessLine: "AIR",
bizTypeLabel: "空运",
factsJson: JSON.stringify({
目的港: "吉隆坡",
品名: "茶叶",
包装方式: "纸箱",
}),
});
const emptyMap = Object.fromEntries(empty.map((r) => [r.label, r.value]));
expect(emptyMap["增值服务"]).toBeUndefined();
});
test("sea shows container spec", () => {