Files
shanxia2.0/docs/superpowers/specs/2026-08-21-pl-plan-party-address-mutex-design.md
T
2026-08-21 13:45:35 +08:00

20 lines
752 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运输计划表单 · 供/需客户与取/送地址互斥
**日期:** 2026-08-21
**状态:** 按方案 1 实现(仅前端弹窗)
**范围:** `web-admin` 运输计划新增/编辑弹窗 `pl-plan-form-dialog`
## 规则
1. **供方客户 ≠ 需方客户**(以 `supplierId` / `customerId` 非空且相等判定)
2. **取货地址 ≠ 送货地址**:地址文案 trim 后相同,**或** 两侧 lng/lat 均有且数值相等(任一成立即冲突)
## 拦截时机(方案 C)
- **选择时:** Toast + 回滚本次选择(客户下拉 / 客户搜索弹窗 / 地址库选择)
- **保存时:** `validateBusinessRules` 再兜底,不提交
## 非目标
- 不改安排运输弹窗、不改后端 API(可后续加)