员工岗位可重新启用;调价认空运航线;会话存档跳号补拉;陆运报价按车型列回填
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -146,7 +146,6 @@ _LAND_COLLAB_BY_PAIR: dict[tuple[str, str], tuple[str, ...]] = {
|
||||
("中港整车", "中港/中亚/中欧"): (
|
||||
"客户名称",
|
||||
"HS编码",
|
||||
"车型/数量",
|
||||
"贸易条款",
|
||||
"货值",
|
||||
"包装方式",
|
||||
@@ -769,21 +768,29 @@ def _pricing_required_keys(
|
||||
land_subtype: str,
|
||||
facts: dict[str, str] | None = None,
|
||||
) -> list[str]:
|
||||
"""当前激活的首次查价内部键列表。中港整车/零担是两个运输类型。"""
|
||||
"""
|
||||
当前激活的首次查价内部键列表。中港整车/零担是两个运输类型。
|
||||
|
||||
合同里偶有「车型数量」等别名键,这里折成 normalize_facts 后的内部键,
|
||||
避免销售已填「车型/数量」仍被判缺。
|
||||
"""
|
||||
_ = facts
|
||||
line = (business_line or "").strip().upper()
|
||||
pricing = contract.get("pricing_required") or {}
|
||||
raw: list[str] = []
|
||||
if line == "SEA":
|
||||
return list((pricing.get("SEA") or {}).get("always") or [])
|
||||
if line == "AIR":
|
||||
return list((pricing.get("AIR") or {}).get("always") or [])
|
||||
if line == "LAND":
|
||||
raw = list((pricing.get("SEA") or {}).get("always") or [])
|
||||
elif line == "AIR":
|
||||
raw = list((pricing.get("AIR") or {}).get("always") or [])
|
||||
# 空运选填键不得进首次查价必填:合同与 AIR_OPTIONAL_FIELDS 对齐,避免再逼销售补起运地。
|
||||
optional_air = {key for key, _label in AIR_OPTIONAL_FIELDS} | {"报价日期"}
|
||||
raw = [k for k in raw if k not in optional_air]
|
||||
elif line == "LAND":
|
||||
land = pricing.get("LAND") or {}
|
||||
block = land.get(land_subtype) or {}
|
||||
if not block:
|
||||
return []
|
||||
return list(block.get("always") or [])
|
||||
return []
|
||||
if block:
|
||||
raw = list(block.get("always") or [])
|
||||
return [_ALIASES.get(k, k) for k in raw]
|
||||
|
||||
|
||||
_PLACE_KEYS = ("起运港", "目的港")
|
||||
|
||||
Reference in New Issue
Block a user