cbs-4px-merchant-cli 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "cbs-4px-merchant-cli",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "BPortal Merchant CLI (fmc) skill — BPortal",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "package.json",
8
8
  "reference/auth.md",
9
9
  "reference/config.md",
10
+ "reference/custody.md",
10
11
  "reference/customs.md",
11
12
  "reference/finance.md",
12
13
  "reference/index.md",
@@ -0,0 +1,193 @@
1
+ # `fmc custody` command
2
+
3
+ > 异常托管 — 改带电 / 改产品。配合 `fmc problem list` 使用。
4
+
5
+ ## 背景
6
+
7
+ 当订单在仓库上架时出现异常(如内置电池、磁性物品、无渠道等),商家可通过以下命令将订单
8
+ 改换为支持带电的物流产品或替换为有渠道的产品,从而让异常单恢复正常走货。
9
+
10
+ ### 异常原因编码速查
11
+
12
+ | abnormalReasonName | reasonCode | 处理流程 |
13
+ | --- | --- | --- |
14
+ | 内电 | NZDC | 改带电 → `custody electric` |
15
+ | 磁性物品 | CXW | 改带电 → `custody electric` |
16
+ | 无渠道 | NC | 改产品 → `custody recommend` |
17
+
18
+ `problem list --output json` 返回的 `abnormalProblems[].abnormalReasonName` 即为上表中文列。
19
+
20
+ ---
21
+
22
+ ## Command details
23
+
24
+ ### `fmc custody electric`
25
+
26
+ | Field | Value |
27
+ | --- | --- |
28
+ | **Name** | `custody electric` |
29
+ | **Description** | 查询指定异常单可更换的带电产品列表及差价 |
30
+ | **Usage** | `fmc custody electric <orderNo> [flags]` |
31
+
32
+ 需要 API Key 认证。
33
+
34
+ #### Arguments
35
+
36
+ | Argument | Type | Required | Description |
37
+ | --- | --- | --- | --- |
38
+ | `<orderNo>` | string | yes | 物流单号 |
39
+
40
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
41
+
42
+ #### Examples
43
+
44
+ ```bash
45
+ fmc custody electric FPX12345678
46
+ ```
47
+
48
+ ```bash
49
+ fmc custody electric FPX12345678 --output json
50
+ ```
51
+
52
+ #### Output (text mode)
53
+
54
+ ```
55
+ 可改带电产品
56
+ ──────────────────────────────────────────────────
57
+
58
+ ECO-PKG-BAT 经济小包带电版
59
+ 差价(RMB) +5.00
60
+
61
+ STD-EXP-BAT 标准快递带电版
62
+ 差价(RMB) +12.00
63
+ ```
64
+
65
+ ---
66
+
67
+ ### `fmc custody recommend`
68
+
69
+ | Field | Value |
70
+ | --- | --- |
71
+ | **Name** | `custody recommend` |
72
+ | **Description** | 获取 AI 推荐的改产品方案(含推荐产品及预估差价) |
73
+ | **Usage** | `fmc custody recommend <orderNo> --reason <code> [flags]` |
74
+
75
+ 需要 API Key 认证。
76
+
77
+ #### Arguments
78
+
79
+ | Argument | Type | Required | Description |
80
+ | --- | --- | --- | --- |
81
+ | `<orderNo>` | string | yes | 物流单号 |
82
+
83
+ #### Options
84
+
85
+ | Flag | Type | Required | Description |
86
+ | --- | --- | --- | --- |
87
+ | `--reason <code>` | string | yes | 异常原因编码,如 NC(无渠道) |
88
+
89
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
90
+
91
+ #### Examples
92
+
93
+ ```bash
94
+ fmc custody recommend FPX12345678 --reason NC
95
+ ```
96
+
97
+ ```bash
98
+ fmc custody recommend FPX12345678 --reason NC --output json
99
+ ```
100
+
101
+ #### Output (text mode)
102
+
103
+ ```
104
+ AI 推荐改产品方案
105
+ ──────────────────────────────────────────────────
106
+ 方案类型 改产品
107
+ 方案说明 该订单无渠道,推荐更换为有渠道的产品
108
+ 预估差价 +3.50
109
+
110
+ 推荐产品
111
+ ECO-PKG 4PX经济小包
112
+ STD-EXP 4PX标准快递
113
+ ```
114
+
115
+ ---
116
+
117
+ ### `fmc custody change`
118
+
119
+ | Field | Value |
120
+ | --- | --- |
121
+ | **Name** | `custody change` |
122
+ | **Description** | 批量提交改带电/改产品方案(写操作,会真实改变订单的物流产品) |
123
+ | **Usage** | `fmc custody change [flags]` |
124
+
125
+ 需要 API Key 认证。**这是写操作**,默认在终端二次确认;非交互环境必须加 `-y`。
126
+
127
+ #### Options
128
+
129
+ | Flag | Type | Required | Description |
130
+ | --- | --- | --- | --- |
131
+ | `--order-nos <nos>` | string | yes | 物流单号,多个用逗号分隔 |
132
+ | `--pk-code <code>` | string | yes | 目标产品编码 |
133
+ | `--reason <code>` | string | yes | 异常原因编码:NZDC(内电)/CXW(磁性物品)/NC(无渠道) |
134
+ | `-y, --yes` | boolean | no | 跳过确认 |
135
+
136
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
137
+
138
+ #### Examples
139
+
140
+ ```bash
141
+ # 改带电:将内电异常单改为带电产品
142
+ fmc custody change --order-nos FPX12345678 --pk-code ECO-PKG-BAT --reason NZDC
143
+ ```
144
+
145
+ ```bash
146
+ # 批量改产品:将多条无渠道异常单改为有渠道产品
147
+ fmc custody change --order-nos FPX001,FPX002,FPX003 --pk-code ECO-PKG --reason NC -y
148
+ ```
149
+
150
+ ```bash
151
+ # 先 dry-run 查看将发送的请求
152
+ fmc custody change --order-nos FPX12345678 --pk-code ECO-PKG-BAT --reason NZDC --dry-run
153
+ ```
154
+
155
+ #### Output (text mode)
156
+
157
+ ```
158
+ 改带电批量执行结果
159
+ ──────────────────────────────────────────────────
160
+ 总计 3 条
161
+ 成功 2
162
+ 失败 1
163
+
164
+ 失败明细
165
+ FPX003 pkCode[ECO-PKG-BAT]不在该异常单可选的改带电产品列表中
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 典型工作流
171
+
172
+ ### A. 内电/磁性物品 → 改带电
173
+
174
+ 1. `fmc problem list --abnormal-status unresolved --output json`
175
+ → 从结果中找到 `abnormalReasonName` 为 "内电" 或 "磁性物品" 的订单
176
+ 2. `fmc custody electric <orderNo>` → 查看可改的带电产品及差价
177
+ 3. 选择合适的产品后:`fmc custody change --order-nos <no> --pk-code <code> --reason NZDC`
178
+
179
+ ### B. 无渠道 → 改产品
180
+
181
+ 1. `fmc problem list --abnormal-status unresolved --output json`
182
+ → 从结果中找到 `abnormalReasonName` 为 "无渠道" 的订单
183
+ 2. `fmc custody recommend <orderNo> --reason NC` → 查看 AI 推荐产品
184
+ 3. 选择合适的产品后:`fmc custody change --order-nos <no> --pk-code <code> --reason NC`
185
+
186
+ ### C. 批量托管处理
187
+
188
+ 1. `fmc problem list --abnormal-status unresolved --size 100 --output json`
189
+ 2. 按 `abnormalReasonName` 分类订单
190
+ 3. 内电/磁性类 → 逐单 `custody electric` 查产品 → 汇总后一次 `custody change`
191
+ 4. 无渠道类 → 逐单 `custody recommend` 查推荐 → 汇总后一次 `custody change`
192
+ 5. 首次执行前向用户确认,确认后加 `-y` 批量执行
193
+ 6. 执行完毕后向用户报告成功/失败/差价
@@ -38,6 +38,9 @@ Command **details** are in sibling `<group>.md` files in this directory.
38
38
  | `fmc problem lastmile list` | 查询尾程异常列表 | [problem.md](problem.md) |
39
39
  | `fmc problem arrear list` | 查询欠费件列表 | [problem.md](problem.md) |
40
40
  | `fmc problem intercepted list` | 查询拦截件列表 | [problem.md](problem.md) |
41
+ | `fmc custody electric` | 查询可改带电产品列表 | [custody.md](custody.md) |
42
+ | `fmc custody recommend` | 获取 AI 推荐改产品方案 | [custody.md](custody.md) |
43
+ | `fmc custody change` | 批量提交改带电/改产品(写) | [custody.md](custody.md) |
41
44
  | `fmc service repair list` | 查询售后工单列表 | [service.md](service.md) |
42
45
  | `fmc service check list` | 查询查件列表 | [service.md](service.md) |
43
46
  | `fmc service complaint list` | 查询投诉列表 | [service.md](service.md) |
@@ -101,6 +104,7 @@ Command **details** are in sibling `<group>.md` files in this directory.
101
104
  | `order` | `get`, `list`, `address-book`, `country`, `create`, `edit`, `forecast`, `cancel`, `intercept` | [order.md](order.md) |
102
105
  | `product` | `recommend`, `list`, `detail`, `eta`, `search` | [product.md](product.md) |
103
106
  | `problem` | `list`, `suggest`, `notify list`, `notify type`, `lastmile list`, `arrear list`, `intercepted list` | [problem.md](problem.md) |
107
+ | `custody` | `electric`, `recommend`, `change` | [custody.md](custody.md) |
104
108
  | `service` | `repair list`, `check list`, `complaint list`, `detail`, `record`, `claim list`, `claim detail`, `claim reason` | [service.md](service.md) |
105
109
  | `finance` | `balance`, `bill list`, `daily-fee list`, `unbilled list`, `recharge list`, `fee detail`, `frozen list` | [finance.md](finance.md) |
106
110
  | `pickup` | `material list`, `material detail`, `material quota`, `address list` | [pickup.md](pickup.md) |