front/.cursor/skills/oms-sales-price-publish-risk/SKILL.md
zzh f1d219ae48 feat: ship billing UI for additional services, conditions, and fee insights
Add product/channel billing condition editors, place-order additional services, billing simulator, forecast-to-inbound fee delta and margin warnings, insurance-aware claim tips, OMS preset dict seeds, and related AI skills/system pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 18:09:22 +08:00

58 lines
2.4 KiB
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.

---
name: oms-sales-price-publish-risk
description: >-
Analyzes OMS sales-product price publish risks by comparing pending vs effective
sell prices on /channel/salesProducts. Use when the user asks for 价格发布风险,
卖价对比, 做错价, 价格发布 AI 分析, publish preview vs online cache, or price
delta risk reports before confirming publish.
---
# OMS 销售产品卖价发布 · 风险分析
对比「待发布价」(`publish/preview?operatorType=price`)与「线上生效价」(最新/生效 `publish/price/list` 的 `content`),输出中文风险报告,降低做错价风险。
运行时权威(前端发给 XHS AI 的 system):
- `src/views/channel/salesProducts/pricePublishAiSkill.ts`
- 抽屉:`src/views/channel/salesProducts/components/PricePublishAiAssistDrawer.vue`
## 产出格式(必须)
```text
总评:高风险 | 中风险 | 低风险 | 无显著差异
摘要:一句话
风险点:
1. [高] 字段/价格项:旧值 → 新值;原因:…
2. [中] …
建议:发布前核对 … / 可发布 …
```
## 风险检查清单
1. 单价 / `calculationFormula` / `calculatedValue` 异常跳变(数量级、符号、空值、0 价)
2. `currency` 币种误改
3. 价格项新增 / 删除 / `status` 停用启用
4. `factors` / `factorValues` / `factorValuesJson` 维度错位
5. `customerGroupValues` 客户分组价漏改、串组、整组清空
6. `chargingCondition` / `costUnit` / `costItem` 语义变化
7. `priceArea` / `priceAreaId` / `priceAreaInfos` 分区错绑
8. 首次发布(无线上快照)时,检查是否像未完成草稿
9. 相对生效版的大面积替换(大量删除+新增)
## 数据约定
| 角色 | 来源 |
|------|------|
| 待发布 | `GET /channel/sales-product/publish/preview?operatorType=price` |
| 线上生效 | `GET /channel/sales-product/publish/price/list` → 生效/`items[0].content` |
| Diff | `computeSnapshotDiff(online, pending)` |
分析时优先看 Diff 变更行;快照可精简为 `prices[]` 的名称、币种、状态、factors、details(公式/金额/客户分组)。
## 原则
- 不要编造上下文中不存在的字段或金额
- 优先标出会导致客户错计费、少收/多收的变更
- **价格发布强制流程**:生成报告 → 用户「采用此报告」→ 随 `POST /channel/sales-product/publish` 的 `aiAnalysisReport` 落库;无报告不可发布
- 报告仅辅助决策,不代替人工确认发布