diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index c5bc311..00aeb66 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -5,6 +5,8 @@
"ComponentPublicInstance": true,
"ComputedRef": true,
"DirectiveBinding": true,
+ "EdiAdvisorOpenOptions": true,
+ "EdiBatchOpenOptions": true,
"EffectScope": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
@@ -16,7 +18,9 @@
"McpCapabilityGuide": true,
"McpCapabilityId": true,
"McpFieldHint": true,
- "NanaBatchOpenOptions": true,
+ "OpsGuideContext": true,
+ "OpsGuideModule": true,
+ "OpsGuideModuleId": true,
"PriceAskContext": true,
"PriceAskIntent": true,
"PropType": true,
@@ -34,6 +38,7 @@
"asyncComputed": true,
"autoResetRef": true,
"buildAskAdvisorQuery": true,
+ "buildOpsGuideContext": true,
"buildPriceAskPrefill": true,
"buildWaybillContextFromRow": true,
"computed": true,
@@ -80,6 +85,7 @@
"isReactive": true,
"isReadonly": true,
"isRef": true,
+ "listOpsGuideModules": true,
"makeDestructurable": true,
"mapActions": true,
"mapGetters": true,
@@ -205,6 +211,8 @@
"useDocumentVisibility": true,
"useDraggable": true,
"useDropZone": true,
+ "useEdiAdvisorPanel": true,
+ "useEdiBatchPanel": true,
"useElementBounding": true,
"useElementByPoint": true,
"useElementHover": true,
@@ -251,7 +259,6 @@
"useMouseInElement": true,
"useMousePressed": true,
"useMutationObserver": true,
- "useNanaBatchPanel": true,
"useNavigatorLanguage": true,
"useNetwork": true,
"useNow": true,
diff --git a/README.md b/README.md
index 5a4a972..ec47163 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,23 @@ npm run build
npm run lint
```
+### 页面路由与 Vite 代理(硬刷新 / 直链)
+
+部分模块的**页面 path** 与后端 API 共用同一代理前缀(如 `/channel`、`/marketing`、`/finance`)。开发模式下地址栏回车、F5、外链直开时,请求会先走 Vite `server.proxy`;若未把 SPA 路径 bypass 掉,会打到后端并得到空白页 / 404。
+
+新增与 API 同前缀的前端页面时,必须同步改 `vite.config.ts`:
+
+1. **对应前缀的 `proxy.*.bypass` 白名单**(如 `/channel` 的 `channelSpaPrefixes`)加入页面 path,返回 `'/index.html'`
+2. **插件 `exclude-frontend-routes-from-proxy` 的 `frontendRoutes`(或 `frontendRoutesExact`)** 同样加入该 path
+
+约定:
+
+- 页面 path 用**驼峰**(如 `/channel/pricingWorkbench`)
+- 后端 API 尽量用 **kebab-case**(如 `/channel/pricing-workbench/preview`),避免与 SPA 前缀冲突
+- 改完 `vite.config.ts` 后需**重启** `pnpm dev` 才生效
+
+渠道现有 SPA bypass 示例:`salesProducts`、`serviceChannels`、`pricingWorkbench`、`guide` 等(完整列表见 `vite.config.ts`)。
+
## 部署说明
1. 安装依赖 `pnpm i`
diff --git a/docs/IDE跨境物流-2个月获客营销方案-务实版.md b/docs/IDE跨境物流-2个月获客营销方案-务实版.md
index de033f7..5914eab 100644
--- a/docs/IDE跨境物流-2个月获客营销方案-务实版.md
+++ b/docs/IDE跨境物流-2个月获客营销方案-务实版.md
@@ -1,4 +1,4 @@
-# IDE 跨境物流 · 2 个月获客方案(务实版)
+# BCD 跨境物流 · 2 个月获客方案(务实版)
> 基于现有 OMS:**渠道代理门户**(专属链接/海报、名下客户与运单、预估→待结算→已打款返佣)+ **会员/优惠券/C2C 裂变**。
> 只写能马上干、系统已支持或运营线下能补齐的事;砍掉未上线能力(代理推代理终身分成、系统内提现、设备指纹四重防刷、毛利自动算销售提成等)。
diff --git a/docs/oms系统设计-050801.md b/docs/oms系统设计-050801.md
index 8d340c2..762071d 100644
--- a/docs/oms系统设计-050801.md
+++ b/docs/oms系统设计-050801.md
@@ -1902,7 +1902,7 @@ JWT → mapId(user.userid INT)
"requestId": "string", // 幂等键 t_order.RequestId//可选;重复则直接返回已有订单结果
"clientNo": "string", // 客户单号 t_order.ClientNo//可选
"trackNo": "string", // 跟踪号 t_order.TrackNo//可选
- "serviceNo": "string", // 运单号 t_order.ServiceNo//可选;未传时服务端自动生成(IDE 前缀)
+ "serviceNo": "string", // 运单号 t_order.ServiceNo//可选;未传时服务端自动生成(BCD 前缀)
"productCode": "string", // 产品代码 t_order.ProductCode//必填
"channelCode": "string", // 渠道代码 t_order.ChannelCode
"cargoAttribute": "string", // 货物属性 t_order.CargoAttribute:general-普货,electronics-3c&带电,sensitive-敏感货//必填
@@ -2059,7 +2059,7 @@ JWT → mapId(user.userid INT)
- 命中处理:**不创建订单**,直接返回失败(错误信息需明确「收件地址命中黑名单区域」),不进入草稿落库及后续流程。
5. 创建订单草稿
- - **`ServiceNo`**:请求体 `serviceNo` 为空时,服务端自动生成唯一运单号(**`IDE` + `yyMMddHHmmss` + 4 位随机数**,年份取后两位如 2026→26);`trackNo` 为空则落库 `NULL`。
+ - **`ServiceNo`**:请求体 `serviceNo` 为空时,服务端自动生成唯一运单号(**`BCD` + `yyMMddHHmmss` + 4 位随机数**,年份取后两位如 2026→26);`trackNo` 为空则落库 `NULL`。
- 插入 `t_order`:
- 写入字段:`ServiceNo`、`ClientNo`、`TrackNo`、`ProductCode`、`ChannelCode`、`ConsigneeCountry`、`CargoAttribute`、`ExportCustomsMode`、`OrderStatus`、`WarehouseId`、`CustomerId`、`IsCod`、`CodCurrency`、`CodSum`、`IsIntercept`、`IsRemote`、`PredeclareFailReason`、`SalesProductRulesVersion`、`SalesProductPriceVersion`、审计字段。
- 处理规则:
@@ -2184,7 +2184,7 @@ JWT → mapId(user.userid INT)
| 会话客户 | `ResolveEffectiveCustomerAsync` → 写 `input.CustomerId = sessionCustomer.Id` |
| 必填校验 | 另含 **`declaredCurrency`、`quantity`(>0)**、申报明细 **`enName/unitPrice/unitWeight/quantity`**;**`clientNo` 非必填** |
| `channelCode` | 未传时默认 **`product.ProductCode`** |
-| `serviceNo` | 自定义时查重,冲突 → **「运单号已存在」**;否则 **`IDE{yyMMddHHmmss}{4位随机}`** |
+| `serviceNo` | 自定义时查重,冲突 → **「运单号已存在」**;否则 **`BCD{yyMMddHHmmss}{4位随机}`** |
| 快照 | 见 **§4.3.5**(DB 发布 + Live 降级,**无 Redis**) |
| 应付/排货 | **创建时不执行**;入库时 **TryConfirm**(失败 → `pendingAllocation`) |
| 成功 | `OrderStatus=predeclared`;清空 `AllocationPendingReason`;触发系统面单生成写入 **`t_order_file.systemLabel`**;响应 **`labelUrl`** 读文件表(未就绪可为空) |
@@ -6751,7 +6751,7 @@ ValidateParcelCreateInputAsync
```json
{
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -6772,7 +6772,7 @@ ValidateParcelCreateInputAsync
"msg": "success",
"data": {
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -6828,7 +6828,7 @@ ValidateParcelCreateInputAsync
"items": [
{
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -6873,7 +6873,7 @@ ValidateParcelCreateInputAsync
```json
{
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -6895,7 +6895,7 @@ ValidateParcelCreateInputAsync
"msg": "success",
"data": {
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -6958,7 +6958,7 @@ ValidateParcelCreateInputAsync
"items": [
{
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"weight": 2.5,
"length": 20,
"width": 15,
@@ -7008,7 +7008,7 @@ ValidateParcelCreateInputAsync
```json
{
- "number": "IDE2607221859123456",
+ "number": "BCD2607221859123456",
"numberType": "waybill",
"labelTemplateId": 1
}
@@ -7024,7 +7024,7 @@ ValidateParcelCreateInputAsync
"msg": "success",
"data": {
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"customerOrderNo": "",
"trackingNo": "",
"otherNumber": "",
@@ -7068,7 +7068,7 @@ ValidateParcelCreateInputAsync
"items": [
{
"id": 1,
- "waybillNo": "IDE2607221859123456",
+ "waybillNo": "BCD2607221859123456",
"customerOrderNo": "CUST001",
"trackingNo": "TRK001",
"otherNumber": "",
@@ -8506,7 +8506,7 @@ GET /customer/account-flow/list?page=1&pageSize=50&bizType=orderPay&startTime=20
| 迭代日期 | 迭代编号 | 迭代功能 | 变更模块 | 备注 |
| --- | --- | --- | --- | --- |
| 2026-07-28 | 20260728-01 | 订单附件表 + 系统面单落文件表 | 订单 §1.5.4、§2.3、§4.1、§4.2.1、**§4.2.12**、§4.4.1、§4.4.1.8、§4.4.1.12、§4.4.1.17、§4.4.3.1、§10.6.1 | `t_order_file`;废弃订单 `LabelUrl`/`LabelGenerate*`;客户只读 systemLabel;下游 labelUrl→downstreamLabel |
-| 2026-07-22 | 20260722-01 | 查价/下单/入库/出库链路加固;待排货;运单号 IDE | 订单 §2.3、§4.3.5、§4.4.2.1、§4.4.3.1、§6.3;附录 §10.3.1;新手指引 `/order/guide` | 查价可选尺寸+参考价;创建仅 forecast 应收;入库可选排货→`pendingAllocation`;运单号 `IDE{yyMMddHHmmss}{4位随机}` |
+| 2026-07-22 | 20260722-01 | 查价/下单/入库/出库链路加固;待排货;运单号 BCD | 订单 §2.3、§4.3.5、§4.4.2.1、§4.4.3.1、§6.3;附录 §10.3.1;新手指引 `/order/guide` | 查价可选尺寸+参考价;创建仅 forecast 应收;入库可选排货→`pendingAllocation`;运单号 `BCD{yyMMddHHmmss}{4位随机}` |
| 2026-07-19 | 20260719-01 | 店铺订单创建物流 / 物流&代发 | 订单 §4.1、§2.3、§4.2.11、**§4.4.7**;附录权限 | 校对弹窗;`batch-create-logistics` / `batch-create-fulfill`;与匹配库存分流 |
| 2026-07-15 | 20260715-01 | 客户发件地址 + 揽收订单 | 订单 §4.1、§4.2.1、§4.2.10、§4.4.1.1、§4.4.4、§4.4.5;附录 §10.3.9 | 地址簿 `t_customer_sender_address`;`OrderSource=pickup` 复用小包创建;菜单客户/订单 |
| 2026-07-04 | 20260704-01 | 创建问题件 / 创建理赔件 | 订单 §4.2.1、§4.2.9、§4.4.1.13~§4.4.1.16;渠道 §5.3.0.7;附录 §10.3.6~§10.3.8 | 问题模板消费;`t_order_exception_event`;权限 `Order.Problematic.Create` 等 |
diff --git a/docs/定价工作台说明.md b/docs/定价工作台说明.md
new file mode 100644
index 0000000..80d370f
--- /dev/null
+++ b/docs/定价工作台说明.md
@@ -0,0 +1,44 @@
+# 定价工作台说明
+
+路由:`/channel/pricingWorkbench`
+权限资源:`Channel.PricingWorkbench`(Query / Preview / Apply / AiAssist)
+
+## 标准操作顺序
+
+1. **选渠道**:多选服务渠道买价(优先已发布快照;无快照则读草稿并警告)。摘要默认折叠;币种不一致会提示并禁用预览。
+2. **定规则**:毛利率、差异阈值、排除渠道;可选「对比现网卖价」与「改规则后自动重算」。
+3. **预览合成**:对齐分区/重量段,最低买价合成,毛利率硬计算。改规则后结果标过期,可一键重算;超阈值差异可「用 AI 解释」。
+4. **回写草稿**:有效预览后展开目标销售产品 / 价格项 / 客户组;成功后可跳转销售产品发布。
+
+成本合成:每个「分区 × 重量段」取参与渠道中的**最低买价**。
+毛利率硬计算:`sell = ceil(buy / (1 - m), 分)`;禁止以 AI 填数当唯一真相。
+
+## 与发布 / 审批衔接
+
+| 步骤 | 位置 | 说明 |
+|------|------|------|
+| 生成草稿 | 定价工作台 → 回写草稿 | `POST /channel/pricing-workbench/apply`,`Publish=false` |
+| AI 风险分析 | 销售产品 → 价格发布 | 沿用 `PricePublishAiAssistDrawer` / 发布风险 skill |
+| 发布审批 | 销售产品现有流程 | `Channel.SalesProduct.PublishPrice` 审批定义 |
+
+工作台 AI 默认收起;负责调毛利/排除渠道后触发同一套 preview 硬计算,以及解释相对现网卖价超阈值差异。正式出账仍以销售产品发布快照为准。
+
+## 差异闸门
+
+预览入参 `diffThreshold`(默认 15%):相对现网卖价 `|Δ|` 超过阈值的格进入 `diffRisks`。需在规则区选择「对比现网卖价」销售产品后,差异列表才有数据。
+
+## 审计
+
+`apply` 成功时写结构化日志:操作人、销售产品、价格项、渠道列表、毛利率、明细行数、可选 `analysisNote`。响应体带 `audit` 字段便于前端展示。
+
+## 首期非目标
+
+- 自动发布卖价、自动改排货分配
+- 跨币种汇兑(币种不一致直接阻断)
+- 用 AI 替代计费引擎出账
+
+## API
+
+- `GET /channel/pricing-workbench/channel-summaries?serviceChannelIds=1,2`
+- `POST /channel/pricing-workbench/preview`
+- `POST /channel/pricing-workbench/apply`
diff --git a/index.html b/index.html
index 430eeb1..2b979ce 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,7 @@
+
+
diff --git a/src/views/channel/pricingWorkbench/index.vue b/src/views/channel/pricingWorkbench/index.vue
new file mode 100644
index 0000000..5fda5e0
--- /dev/null
+++ b/src/views/channel/pricingWorkbench/index.vue
@@ -0,0 +1,1540 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
对比产品(取旧价)
+
+
+
+
+
+
+
+
+
+ 每段按列:旧价 · 新价 · 涨跌 · 毛利 · 成本
+ 涨
+ 跌
+
+
+
+
+
+
规则或渠道已变更,预览结果已过期。
+
+ 重新预览
+
+
+
+
+
+ {{ b }}
+
+
+ {{ w }}
+
+
+
+
+
超阈值差异({{ preview.diffRisks.length }})
+
+ 用 AI 解释
+
+
+
+
+ 另有 {{ preview.diffRisks.length - 8 }} 条…
+
+
+
+
+
+
+
+
∑
+
+ {{
+ previewStale && preview
+ ? '预览已过期'
+ : selectedChannelIds.length
+ ? '规则已就绪'
+ : '先选左侧渠道'
+ }}
+
+
+ {{
+ previewStale && preview
+ ? '点击下方按钮或右上角「预览合成」刷新矩阵'
+ : '选渠道并定规则后,点击「预览合成」'
+ }}
+
+
+ {{ previewStale && preview ? '重新预览' : '预览合成' }}
+
+
+
+
+
+
+
+
+ 4
+ 回写草稿 · 完成有效预览后展开
+
+
+
+
+
+ 仅写草稿,不发布。完成后请到销售产品做 AI 风险分析。
+
说明
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/channel/pricingWorkbench/pricingWorkbenchAiSkill.ts b/src/views/channel/pricingWorkbench/pricingWorkbenchAiSkill.ts
new file mode 100644
index 0000000..e166cfc
--- /dev/null
+++ b/src/views/channel/pricingWorkbench/pricingWorkbenchAiSkill.ts
@@ -0,0 +1,186 @@
+import type { PricingWorkbenchDiffRisk, PricingWorkbenchPreviewOutput } from '@/api/channel/pricingWorkbench'
+
+/** 与定价工作台 AI 侧栏对齐的运行时 skill */
+
+export type PricingWorkbenchAiRulePatch = {
+ /** 新的默认毛利率 0~1 */
+ marginRate?: number
+ /** 排除渠道 Id */
+ excludeChannelIds?: number[]
+ /** 分区毛利覆盖 */
+ zoneMarginRates?: Record
+ /** 是否需要服务端硬计算重算 */
+ needRecalc?: boolean
+ /** 中文说明 */
+ explanation?: string
+}
+
+export type ParsedPricingWorkbenchAi = {
+ patch: PricingWorkbenchAiRulePatch
+ summary?: string
+ risks: string[]
+ advice?: string
+ raw: string
+}
+
+const SKILL_CORE = `你是 OMS「定价工作台」助手:根据多渠道最低买价与毛利率规则,帮助调整规则并解释相对现网卖价的风险。
+
+## 硬约束(必须遵守)
+1. 禁止直接编造最终卖价数字当唯一真相;数字必须由后端硬计算:sell = ceil(buy / (1-m), 分)
+2. 你只输出「规则变更」与中文说明;需要改价时标记 needRecalc=true
+3. 成本合成策略固定为各格最低买价(min)
+
+## 产出格式(必须严格遵守,先 JSON 再中文)
+
+\`\`\`json
+{
+ "marginRate": 0.25,
+ "excludeChannelIds": [],
+ "zoneMarginRates": {},
+ "needRecalc": true,
+ "explanation": "一句话说明规则调整"
+}
+\`\`\`
+
+总评:高风险 | 中风险 | 低风险 | 无显著差异
+摘要:…
+风险点:
+1. …
+建议:…
+
+- marginRate 为 0~1 小数(25% → 0.25)
+- 用户只是问「为什么用了渠道 A」时:needRecalc=false,在 explanation/风险点解释
+- 不要编造上下文中不存在的渠道 Id 或分区
+`
+
+export function buildPricingWorkbenchAiSystemPrompt(): string {
+ return SKILL_CORE
+}
+
+export function buildPricingWorkbenchAiShortSystemPrompt(): string {
+ return (
+ '你是 OMS 定价工作台助手。输出 JSON 规则变更(marginRate/excludeChannelIds/zoneMarginRates/needRecalc)' +
+ '再附中文总评/摘要/风险点/建议。禁止编造最终卖价数字。'
+ )
+}
+
+export const PRICING_WORKBENCH_AI_DEFAULT_SKILL_KEY = 'oms-pricing-workbench'
+export const PRICING_WORKBENCH_AI_DEFAULT_PROMPT =
+ '请根据当前预览与差异风险,检查毛利是否合理,并给出是否需要调毛利或排除某渠道的建议。'
+
+export const PRICING_WORKBENCH_AI_QUICK_PROMPTS = [
+ '把默认毛利调到 20%,并说明影响',
+ '解释为何部分格子用了某渠道买价',
+ '相对现网卖价涨幅过大的格子给风险摘要',
+ '排除最贵的渠道后重新评估',
+]
+
+export function buildPricingWorkbenchUserContent(input: {
+ userPrompt: string
+ marginRate: number
+ channelIds: number[]
+ channelNames?: string[]
+ excludeChannelIds?: number[]
+ summary?: string
+ diffRisks?: PricingWorkbenchDiffRisk[]
+ previewSlim?: string
+}): string {
+ const lines: string[] = [
+ `用户指令:${input.userPrompt}`,
+ `当前默认毛利率:${input.marginRate}`,
+ `参与渠道 Id:${input.channelIds.join(',') || '无'}`,
+ ]
+ if (input.channelNames?.length) {
+ lines.push(`渠道名:${input.channelNames.join(' / ')}`)
+ }
+ if (input.excludeChannelIds?.length) {
+ lines.push(`已排除渠道:${input.excludeChannelIds.join(',')}`)
+ }
+ if (input.summary) lines.push(`预览摘要:${input.summary}`)
+ if (input.diffRisks?.length) {
+ lines.push('超阈值差异:')
+ input.diffRisks.slice(0, 30).forEach((r, i) => {
+ lines.push(`${i + 1}. ${r.message}`)
+ })
+ }
+ if (input.previewSlim) {
+ lines.push('预览精简:')
+ lines.push(input.previewSlim.slice(0, 6000))
+ }
+ return lines.join('\n')
+}
+
+export function slimPreviewForAi(preview: PricingWorkbenchPreviewOutput | null | undefined): string {
+ if (!preview) return ''
+ const cells = (preview.cells || [])
+ .filter((c) => c.sellPrice != null || c.flag)
+ .slice(0, 80)
+ .map((c) => ({
+ z: c.zoneLabel || c.zone,
+ w: c.weightSegment,
+ buy: c.buyPrice,
+ sell: c.sellPrice,
+ src: c.sourceChannelId,
+ flag: c.flag,
+ d: c.onlineDeltaRatio,
+ }))
+ return JSON.stringify(
+ {
+ currency: preview.currency,
+ marginRate: preview.marginRate,
+ zones: preview.zones?.slice(0, 40),
+ weights: preview.weightSegments?.slice(0, 40),
+ blockers: preview.blockers,
+ warnings: preview.warnings?.slice(0, 10),
+ cells,
+ diffRisks: preview.diffRisks?.slice(0, 20),
+ },
+ null,
+ 0,
+ )
+}
+
+export function parsePricingWorkbenchAiReply(raw: string): ParsedPricingWorkbenchAi {
+ const text = String(raw || '').trim()
+ const patch: PricingWorkbenchAiRulePatch = { needRecalc: false }
+ let summary: string | undefined
+ const risks: string[] = []
+ let advice: string | undefined
+
+ const jsonMatch = text.match(/```json\s*([\s\S]*?)```/i) || text.match(/\{[\s\S]*"needRecalc"[\s\S]*\}/)
+ if (jsonMatch) {
+ try {
+ const body = jsonMatch[1] || jsonMatch[0]
+ const obj = JSON.parse(body)
+ if (typeof obj.marginRate === 'number') patch.marginRate = obj.marginRate
+ if (Array.isArray(obj.excludeChannelIds)) {
+ patch.excludeChannelIds = obj.excludeChannelIds.map((x: any) => Number(x)).filter((n: number) => n > 0)
+ }
+ if (obj.zoneMarginRates && typeof obj.zoneMarginRates === 'object') {
+ patch.zoneMarginRates = obj.zoneMarginRates
+ }
+ if (typeof obj.needRecalc === 'boolean') patch.needRecalc = obj.needRecalc
+ if (typeof obj.explanation === 'string') patch.explanation = obj.explanation
+ } catch {
+ /* ignore */
+ }
+ }
+
+ const summaryMatch = text.match(/摘要[::]\s*(.+)/)
+ if (summaryMatch) summary = summaryMatch[1].trim()
+ const adviceMatch = text.match(/建议[::]\s*(.+)/)
+ if (adviceMatch) advice = adviceMatch[1].trim()
+
+ const riskBlock = text.match(/风险点[::]([\s\S]*?)(?:建议[::]|$)/)
+ if (riskBlock) {
+ riskBlock[1]
+ .split('\n')
+ .map((l) => l.replace(/^\s*\d+[\.\)、]\s*/, '').trim())
+ .filter((l) => l && l !== '无')
+ .forEach((l) => risks.push(l))
+ }
+
+ if (!summary && patch.explanation) summary = patch.explanation
+
+ return { patch, summary, risks, advice, raw: text }
+}
diff --git a/src/views/h5/admin-center/locale/en-US.ts b/src/views/h5/admin-center/locale/en-US.ts
index 220335f..763fdfa 100644
--- a/src/views/h5/admin-center/locale/en-US.ts
+++ b/src/views/h5/admin-center/locale/en-US.ts
@@ -1,6 +1,6 @@
export default {
'h5Admin.center.title': 'Ops Center',
- 'h5Admin.documentTitle': 'IDE Ops Center',
+ 'h5Admin.documentTitle': 'BCD Ops Center',
'h5Admin.tab.workplace': 'Home',
'h5Admin.tab.monitor': 'Monitor',
'h5Admin.tab.orders': 'Shipments',
diff --git a/src/views/h5/admin-center/locale/zh-CN.ts b/src/views/h5/admin-center/locale/zh-CN.ts
index 8b21d6f..03fc9a2 100644
--- a/src/views/h5/admin-center/locale/zh-CN.ts
+++ b/src/views/h5/admin-center/locale/zh-CN.ts
@@ -1,6 +1,6 @@
export default {
'h5Admin.center.title': '运营中心',
- 'h5Admin.documentTitle': 'IDE运营中心',
+ 'h5Admin.documentTitle': 'BCD运营中心',
'h5Admin.tab.workplace': '工作台',
'h5Admin.tab.monitor': '监控',
'h5Admin.tab.orders': '运单',
diff --git a/src/views/h5/customer-center/components/WechatOpenidMigrateModal.vue b/src/views/h5/customer-center/components/WechatOpenidMigrateModal.vue
new file mode 100644
index 0000000..ada1bc3
--- /dev/null
+++ b/src/views/h5/customer-center/components/WechatOpenidMigrateModal.vue
@@ -0,0 +1,112 @@
+
+
+
+ emit('update:visible', v)"
+ @cancel="handleCancel"
+ >
+ {{ tip }}
+
+
+
+
+
diff --git a/src/views/h5/customer-center/locale/en-US.ts b/src/views/h5/customer-center/locale/en-US.ts
index 0d75192..28abcc2 100644
--- a/src/views/h5/customer-center/locale/en-US.ts
+++ b/src/views/h5/customer-center/locale/en-US.ts
@@ -1,6 +1,6 @@
export default {
'h5.center.title': 'Customer Center',
- 'h5.documentTitle': 'IDE Customer Center',
+ 'h5.documentTitle': 'BCD Customer Center',
'h5.noticePopup.title': 'Notice',
'h5.noticePopup.markRead': 'Mark as read',
'h5.noticePopup.later': 'Later',
@@ -315,9 +315,9 @@ export default {
'h5.wxQr.success': 'Signed in',
'h5.login.title': 'Sign in',
- 'h5.login.brand': 'IDE Customer Center',
- 'h5.login.brandName': 'IDE',
- 'h5.login.brandHint': 'Welcome to your IDE portal',
+ 'h5.login.brand': 'BCD Customer Center',
+ 'h5.login.brandName': 'BCD',
+ 'h5.login.brandHint': 'Welcome to your BCD portal',
'h5.login.backToSite': 'Back to website',
'h5.login.tab.wechat': 'WeChat',
'h5.login.tab.password': 'Account',
diff --git a/src/views/h5/customer-center/locale/zh-CN.ts b/src/views/h5/customer-center/locale/zh-CN.ts
index d58f7b9..a7173bd 100644
--- a/src/views/h5/customer-center/locale/zh-CN.ts
+++ b/src/views/h5/customer-center/locale/zh-CN.ts
@@ -1,6 +1,6 @@
export default {
'h5.center.title': '客户中心',
- 'h5.documentTitle': 'IDE客户中心',
+ 'h5.documentTitle': 'BCD客户中心',
'h5.noticePopup.title': '公告',
'h5.noticePopup.markRead': '已读',
'h5.noticePopup.later': '稍后',
@@ -314,9 +314,9 @@ export default {
'h5.wxQr.success': '登录成功',
'h5.login.title': '登录',
- 'h5.login.brand': 'IDE客户中心',
- 'h5.login.brandName': 'IDE',
- 'h5.login.brandHint': '欢迎登录 IDE 客户门户',
+ 'h5.login.brand': 'BCD客户中心',
+ 'h5.login.brandName': 'BCD',
+ 'h5.login.brandHint': '欢迎登录 BCD 客户门户',
'h5.login.backToSite': '返回官网',
'h5.login.tab.wechat': '微信登录',
'h5.login.tab.password': '账号登录',
diff --git a/src/views/h5/customer-center/login/index.vue b/src/views/h5/customer-center/login/index.vue
index 2ce39fe..562b590 100644
--- a/src/views/h5/customer-center/login/index.vue
+++ b/src/views/h5/customer-center/login/index.vue
@@ -112,6 +112,14 @@
>
{{ agreementContent }}
+
+
@@ -132,7 +140,8 @@ import logoImg from '@/assets/logo2.png';
import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue';
import H5LoginPortalSwitch from '@/views/h5/components/H5LoginPortalSwitch.vue';
import WechatOAuthLoginButton from '../components/WechatOAuthLoginButton.vue';
-import { wxOAuthLogin } from '@/api/wechat';
+import WechatOpenidMigrateModal from '../components/WechatOpenidMigrateModal.vue';
+import { wxOAuthLogin, type WxLoginResult } from '@/api/wechat';
import {
parseAfterLoginPathFromOAuthState,
redirectToWeChatOAuth,
@@ -148,6 +157,9 @@ const rbacUserStore = useRbacUserStore();
const form = reactive({ account: '', password: '' });
const agreementChecked = ref(false);
const loading = ref(false);
+const migrateVisible = ref(false);
+const migrateTicket = ref('');
+const migrateNickname = ref('');
const errorBox = ref('');
const agreementVisible = ref(false);
const agreementTitle = ref('');
@@ -238,6 +250,27 @@ async function finishLogin() {
}
}
+async function applyWxLoginResult(result: WxLoginResult) {
+ const ok = await rbacUserStore.loginByWxResult(result);
+ if (!ok) {
+ Message.error(t('h5.login.failed'));
+ oauthBusy.value = false;
+ await router.replace({ path: route.path, query: stripOAuthQuery() });
+ return;
+ }
+ await finishLogin();
+}
+
+async function onMigrateSuccess(result: WxLoginResult) {
+ oauthBusy.value = true;
+ await applyWxLoginResult(result);
+}
+
+function onMigrateCancel() {
+ oauthBusy.value = false;
+ Message.info(t('wechat.openidMigrate.cancelled'));
+}
+
async function consumeOAuthCode(code: string) {
if (oauthConsuming) return;
oauthConsuming = true;
@@ -245,15 +278,16 @@ async function consumeOAuthCode(code: string) {
errorBox.value = '';
try {
const result = await wxOAuthLogin(code);
- const ok = await rbacUserStore.loginByWxResult(result);
- if (!ok) {
- Message.error(t('h5.login.failed'));
+ if (result.needOpenidMigrate && result.migrateTicket) {
+ migrateTicket.value = result.migrateTicket;
+ migrateNickname.value = result.nickname || '';
oauthBusy.value = false;
+ migrateVisible.value = true;
await router.replace({ path: route.path, query: stripOAuthQuery() });
return;
}
// 成功后保持全屏过渡直到离开本页,勿 toast / 勿先露出登录表单
- await finishLogin();
+ await applyWxLoginResult(result);
} catch (e: any) {
const msg = loginErrorForUser(e?.message || '') || t('h5.login.oauthFailed');
Message.error(msg);
diff --git a/src/views/login/locale/en-US.ts b/src/views/login/locale/en-US.ts
index d55caac..9d8e74e 100644
--- a/src/views/login/locale/en-US.ts
+++ b/src/views/login/locale/en-US.ts
@@ -1,7 +1,7 @@
export default {
- 'brand.name': 'IDE',
+ 'brand.name': 'BCD',
'brand.fullName': 'Immediate Delivery Express',
- 'brand.shortName': 'IDE',
+ 'brand.shortName': 'BCD',
'login.form.password.errMsg': 'Password cannot be empty',
'login.form.login.success': 'Login successful',
'login.form.login.failed': 'Login failed, please check your account and password',
@@ -16,9 +16,9 @@
'login.form.account.errMsg.agent': 'Please enter agent code',
'login.form.account.hint.customer': 'Sign in with phone, email, or customer code',
'login.form.login': 'Login',
- 'login.form.brandHint.customer': 'Welcome to your IDE portal',
- 'login.form.brandHint.admin': 'Welcome to IDE Operations Console',
- 'login.form.brandHint.agent': 'Welcome to IDE Channel Agent Portal',
+ 'login.form.brandHint.customer': 'Welcome to your BCD portal',
+ 'login.form.brandHint.admin': 'Welcome to BCD Operations Console',
+ 'login.form.brandHint.agent': 'Welcome to BCD Channel Agent Portal',
'login.brand.suffix.agent': 'Channel Agent',
'login.switchToWechat': 'Sign in with WeChat',
'login.switchToAccount': 'Account and password',
@@ -46,10 +46,10 @@
'login.theme.toNight': 'Switch to night mode',
'login.lang.toEn': 'Switch to English',
'login.lang.toZh': 'Switch to Chinese',
- 'login.hero.title': 'IDE',
+ 'login.hero.title': 'BCD',
'login.hero.tagline': 'Faster · Simpler · Professional',
'login.hero.desc.customer':
- 'Clear quotes, smooth booking, live tracking. AI flags risks and suggests the next step—so from pickup to delivery, IDE keeps every shipment visible, on time, and accounted for.',
+ 'Clear quotes, smooth booking, live tracking. AI flags risks and suggests the next step—so from pickup to delivery, BCD keeps every shipment visible, on time, and accounted for.',
'login.hero.admin.brief': 'Own three things — and make AI your co-pilot',
'login.hero.admin.pillar.care.title': 'More Professional',
'login.hero.admin.pillar.care.desc': 'Right lanes · No dropped issues · Clear end-to-end',
@@ -104,10 +104,10 @@
'login.care.close': 'Close',
'login.care.birthday': '{name}, happy birthday! Thanks for taking care of every shipment.',
'login.care.birthdaySoon': '{name}, your birthday is coming — warm wishes in advance.',
- 'login.care.tenure': '{name}, {days} days with IDE — thank you for your dedication.',
- 'login.care.tenureMilestone': '{name}, day {days} with IDE — today is worth remembering.',
+ 'login.care.tenure': '{name}, {days} days with BCD — thank you for your dedication.',
+ 'login.care.tenureMilestone': '{name}, day {days} with BCD — today is worth remembering.',
'login.care.tenureAnniversary':
- '{name}, happy {years}-year anniversary with IDE — thank you for going the distance.',
+ '{name}, happy {years}-year anniversary with BCD — thank you for going the distance.',
'login.care.holidayToast.newYear': '{name}, Happy New Year — steady start to the year.',
'login.care.holidayToast.springFestival':
'{name}, Happy Spring Festival — still on duty over the holiday? That\'s dedication.',
diff --git a/src/views/login/locale/zh-CN.ts b/src/views/login/locale/zh-CN.ts
index 4bdebec..8158dc7 100644
--- a/src/views/login/locale/zh-CN.ts
+++ b/src/views/login/locale/zh-CN.ts
@@ -1,5 +1,5 @@
export default {
- 'brand.name': 'IDE',
+ 'brand.name': 'BCD',
'brand.fullName': 'Immediate Delivery Express',
'brand.shortName': '即配',
'login.form.password.errMsg': '密码不能为空',
@@ -16,9 +16,9 @@
'login.form.account.errMsg.agent': '请输入代理编号',
'login.form.account.hint.customer': '支持手机号、邮箱或客户编号登录',
'login.form.login': '登录',
- 'login.form.brandHint.customer': '欢迎登录 IDE 客户门户',
- 'login.form.brandHint.admin': '欢迎登录 IDE 运营管理后台',
- 'login.form.brandHint.agent': '欢迎登录 IDE 渠道代理门户',
+ 'login.form.brandHint.customer': '欢迎登录 BCD 客户门户',
+ 'login.form.brandHint.admin': '欢迎登录 BCD 运营管理后台',
+ 'login.form.brandHint.agent': '欢迎登录 BCD 渠道代理门户',
'login.brand.suffix.agent': '渠道代理',
'login.switchToWechat': '微信扫码登录',
'login.switchToAccount': '账号密码登录',
@@ -46,10 +46,10 @@
'login.theme.toNight': '切换为夜间模式',
'login.lang.toEn': '切换为 English',
'login.lang.toZh': '切换为中文',
- 'login.hero.title': 'IDE',
+ 'login.hero.title': 'BCD',
'login.hero.tagline': 'Faster · Simpler · Professional',
'login.hero.desc.customer':
- '查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议、少踩坑——从揽收到签收,IDE 陪你把每一票发好、盯紧、交代清楚。',
+ '查价说得清、下单走得顺、轨迹跟得上。AI 帮你看风险、提建议、少踩坑——从揽收到签收,BCD 陪你把每一票发好、盯紧、交代清楚。',
'login.hero.admin.brief': '开工前对齐三件事,并让 AI 成为搭档',
'login.hero.admin.pillar.care.title': '更专业',
'login.hero.admin.pillar.care.desc': '线路选对 · 异常不丢 · 全程说得清',
@@ -97,7 +97,7 @@
'login.care.close': '关闭',
'login.care.birthday': '{name},生日快乐!感谢你一直把每一票照顾得很好。',
'login.care.birthdaySoon': '{name},生日快到了,提前送上祝福。',
- 'login.care.tenure': '{name},已与 IDE 并肩 {days} 天,谢谢你的付出。',
+ 'login.care.tenure': '{name},已与 BCD 并肩 {days} 天,谢谢你的付出。',
'login.care.tenureMilestone': '{name},并肩第 {days} 天,今天值得被记住。',
'login.care.tenureAnniversary': '{name},入职 {years} 周年快乐!感谢你一路把货送远。',
'login.care.holidayToast.newYear': '{name},元旦快乐,新年第一班也稳稳的。',
diff --git a/src/views/order/orderGuide/guide-dev.md b/src/views/order/orderGuide/guide-dev.md
index 5b25853..f270d30 100644
--- a/src/views/order/orderGuide/guide-dev.md
+++ b/src/views/order/orderGuide/guide-dev.md
@@ -142,7 +142,7 @@ flowchart TD
| 步骤 | 内容 |
|------|------|
-| 运单号 | `IDE` + `yyMMddHHmmss` + 4 位随机 |
+| 运单号 | `BCD` + `yyMMddHHmmss` + 4 位随机 |
| `t_order` | 产品、国家、快照版本;**此时不写 ChannelCode** |
| 重量 | `forecast/receive/ship/downstream` 四行,同套长宽厚实重;`Cubic=L×W×H/1e6` |
| 子表 | sender / recipient / declaration |
@@ -301,7 +301,7 @@ flowchart TD
| 预报成功 | `predeclared` | 清空失败原因;可能仍有 `AllocationPendingReason` |
| 预报失败 | `draft` | `PredeclareFailReason=具体错误` |
-运单号格式:`IDE` + `yyMMddHHmmss` + 4 位随机。
+运单号格式:`BCD` + `yyMMddHHmmss` + 4 位随机。
---
diff --git a/src/views/order/orderGuide/guide-ops.md b/src/views/order/orderGuide/guide-ops.md
index 7e62a19..ae03973 100644
--- a/src/views/order/orderGuide/guide-ops.md
+++ b/src/views/order/orderGuide/guide-ops.md
@@ -143,7 +143,7 @@
### 4.2 运单号
-- 系统自动生成,一般以 **IDE** 开头(如 `IDE2607221859123456`)
+- 系统自动生成,一般以 **BCD** 开头(如 `BCD2607221859123456`)
- 客户单号是客户自己的编号;运单号是系统给客户查件用的号
### 4.3 黑名单 vs 偏远(别混)
diff --git a/src/views/register/locale/en-US.ts b/src/views/register/locale/en-US.ts
index c0962b4..75291ce 100644
--- a/src/views/register/locale/en-US.ts
+++ b/src/views/register/locale/en-US.ts
@@ -1,7 +1,7 @@
export default {
'marketing.register.title': 'Register',
'marketing.register.subtitle': 'Member pricing and welcome benefits',
- 'marketing.register.brandHint': 'Welcome to IDE customer portal',
+ 'marketing.register.brandHint': 'Welcome to BCD customer portal',
'marketing.register.brandHint.web': 'Register with email & phone',
'marketing.register.brandHint.wechat': 'Register with WeChat',
'marketing.register.choose.web': 'Web register',
diff --git a/src/views/register/locale/zh-CN.ts b/src/views/register/locale/zh-CN.ts
index f0fe9df..1935f65 100644
--- a/src/views/register/locale/zh-CN.ts
+++ b/src/views/register/locale/zh-CN.ts
@@ -1,9 +1,9 @@
export default {
'marketing.register.title': '客户注册',
'marketing.register.subtitle': '注册即享会员价与新人福利',
- 'marketing.register.brandHint': '欢迎注册 IDE 客户门户',
- 'marketing.register.brandHint.web': '网页注册 IDE 客户账号',
- 'marketing.register.brandHint.wechat': '微信扫码注册 IDE 客户账号',
+ 'marketing.register.brandHint': '欢迎注册 BCD 客户门户',
+ 'marketing.register.brandHint.web': '网页注册 BCD 客户账号',
+ 'marketing.register.brandHint.wechat': '微信扫码注册 BCD 客户账号',
'marketing.register.choose.web': '网页注册',
'marketing.register.choose.webDesc': '填写资料,立即开通客户门户',
'marketing.register.choose.wechat': '微信注册',
diff --git a/src/views/site/SiteAdvisorShell.vue b/src/views/site/SiteAdvisorShell.vue
index 4631fa3..f6b3a08 100644
--- a/src/views/site/SiteAdvisorShell.vue
+++ b/src/views/site/SiteAdvisorShell.vue
@@ -17,18 +17,18 @@
-
-
-
-

-
+
+
+

+
+
{{ runwayTitle }}
@@ -37,43 +37,45 @@
-
-
{{ copy.composeLead }}
{{ copy.trustLine }}
diff --git a/src/views/site/SiteHeader.vue b/src/views/site/SiteHeader.vue
index 0830f36..17db987 100644
--- a/src/views/site/SiteHeader.vue
+++ b/src/views/site/SiteHeader.vue
@@ -2,9 +2,9 @@