WuYongJie
f30866530a
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/wuyongjie-bom-estimate-agent-phase0
2026-09-16 17:37:23 +08:00
WuYongJie
48871454e9
feat(bom-costing): BOM 预估 v2 —— 价格回退工具、case 级预估卡编排与预览页
...
- agent 工具:尺寸感知镜像检索 + 分类画像三级级联(包装 v1 回退链,导出纯函数复用)
- case 级编排:首批代表 SKU 自动精算,其余按需点算;结果持久缓存(新表 BomCostingAgentSkuEstimate,幂等迁移)
- EstimateCard 契约:代码侧聚合五行构成/区间包络/最小置信度/不确定点并集
- API:/api/bom-costing/cases/[id]/agent-estimate(GET 缓存卡 + POST 运行,复用模块鉴权)
- 预览页:/bom-costing/estimate(预估卡 + SKU 列表按需点算 + 竞品图片浏览,旁路不过闸门不设默认入口)
- Select 组件:透传 id/aria 到触发按钮;修复 skill 知识未注入循环的缺陷
- 基线工具:report:bom-agent-baseline(定价覆盖率 + shadow 聚合,含隧道重试)
- 设计文档:docs/架构设计/BOM成本预估v2-agent方案设计-20260916.md
2026-09-16 17:37:06 +08:00
WuYongJie
6f023e3f0d
fix(product-archive): 导出改为流式写出,修复全量导出 OOM 崩溃
...
正式站导出「产品全量档案资料」必然崩溃:整包写法在 89 列下约 60MB/千行,
生产 Node 堆被 PM2 限到 768MB,实际只能撑约 5000 行,而档案表已有 7 万余行。
PM2 记录 exited with code [0] via signal [SIGABRT],error log 19 次
FATAL ERROR: Reached heap limit,最后一次 GC dump 763.5MB(= 堆上限)。
改成「先冻结行 id 快照 → 每 2000 行分批取数 → ExcelJS 流式写出 → 边生成边下发」,
服务端堆占用与导出总行数解耦;并加同机并发上限 3(超限 429)兜底。
- repository:listRows 全量取数改为 openRowSource。先冻结本次要导的有序 id 快照,
再按 id 分批取完整行并按冻结顺序重排,避免导出期间上游同步导致行集合错位。
- service:createWorkbook 整包 writeBuffer 改为 openWorkbook 流式写出。
useSharedStrings:false(共享字符串表会累积全部唯一文本且无法回收);
冻结首行走 addWorksheet 的 views 选项(流式 worksheet 的 views 只有 getter,
直接赋值会被静默忽略);并发额度在「正常写完」与「客户端断开」两条路径都归还。
- route:改为流式响应,不再发 Content-Length(改 chunked);监听 request.signal,
客户端断开时销毁生成流;响应头发出后生成失败只能掐断流,故在路由层记日志。
- 前端:下载态文案改为「正在生成并下载文件...」;无 Content-Length 时显示「已接收 X」;
收流中断统一提示为可读文案,不再只报网络错误。
- 测试:5 个用例,含冻结首行回归守护与「客户端中途断开不泄漏并发额度」守护。
验证:本地真实库 66033 行 × 89 列,NODE_OPTIONS=--max-old-space-size=768 下
首字节 0.5s / 总耗时 26.7s / 产物 25.8MB / 峰值 heapUsed 152.5MB(对照:整包写法
同规模在 4GB 堆直接 OOM)。3001 真实路由 13951 行:status 200、无 Content-Length、
chunked、首字节 0.2s、5.5s / 5.6MB。产物特性 10/10(表名、冻结首行、autoFilter
A1:CK1、89 列宽度、表头加粗与文本、行数),并用 openpyxl 独立交叉复核一致。
jest 5/5 通过、type-check EXIT=0。
已知边界:只在本机 next dev 验证,未跑 next build / next start。
2026-09-16 16:07:31 +08:00
WuYongJie
9533c2e4ec
merge: 商品抠图配置合并上游专用抠图模型目录 + BOM 核算 agent 旁路引擎与文本脱敏契约
...
- ai-config: 任一协议模式合并网关与异步两份模型目录,抠图模型置顶标记,选中自动对齐协议
- bom-costing/agent: 估算引擎(契约/工具/循环/网关适配/组装器,27 测试)旁路试验版
- lib: 预估文本对外脱敏契约共享模块(public-estimate-text)
- scripts: shadow 偏差报表与 agent 试跑工具(工程域专用)
2026-09-16 15:17:03 +08:00
WuYongJie
6492c2e400
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/wuyongjie-bom-estimate-agent-phase0
2026-09-16 15:14:00 +08:00
WuYongJie
20755dfdd1
feat(ai-config): 商品抠图配置合并上游专用抠图模型目录并升级选择器
...
- 目录服务:商品抠图任一协议模式都合并通用网关与异步媒体任务两份目录,
模型带 source 来源标记,抠图模型置顶;提取器按端点路径选择
- 配置页:原生 select 换平台 Select(可搜索、暗色协调),抠图模型带
【抠图】标记,选中后运行协议自动对齐异步媒体任务
- Select 组件:rest props 透传到触发按钮,支持 aria-label/id
2026-09-16 15:13:52 +08:00
WuYongJie
f8d74a5543
fix(intake): 补齐按SKU锁定与导入保护
2026-09-16 14:21:57 +08:00
WuYongJie
d73508bae6
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/wuyongjie-bom-estimate-agent-phase0
2026-09-16 14:18:51 +08:00
WuYongJie
2d93a22721
feat(bom-costing): agent 估算引擎(旁路试验版)
...
- agent/ 契约+工具+接线+循环+skill知识+网关适配+端到端组装器(27 测试)
- agent 只读仓储(归档素材/镜像价格/材质目录/案例与SKU简报)
- shadow 偏差报表与 trial 试跑脚本(工程域专用)
- 纪律:单价只来自工具结果、总额代码汇总、硬预算+trace、1688 仅中性摘要
2026-09-16 14:18:39 +08:00
WuYongJie
9c9a6a9a08
fix(product-archive): 固定列不再透字,操作列改图标按钮
...
问题:产品全量档案的「序号」「操作」是两个 position: sticky 固定列。
主题样式把半透明的 --sc-hover(rgba(17,19,21,0.035))用 !important 打到了
这两个固定列上,覆盖了组件自带的不透明底色;横向滚动时压在固定列下方的
单元格文字就会透出来,污染序号列与操作列。
修复:
- .archive-td-index / .archive-td-actions 从半透明 hover 规则中摘出,
改为「不透明底色 var(--sc-surface) + linear-gradient(var(--sc-hover)) 叠加色层」,
视觉与原来一致,但底色恒不透明(浅色与深色主题均适用)
- 操作列「查看 / 更多」文字按钮改为图标按钮(Eye / MoreHorizontal),
补 title 与 aria-label,菜单项加图标并改用 --sc-* 主题变量配色
- 操作列宽度由 138px 收窄到 96px(colgroup / th / td 同步)
验证:3001 真机 puppeteer 复验 9/9 通过——hover 与横向滚动后两个固定列
背景均为不透明 rgb;操作列仅 2 个图标、无文字、宽度 96px;「更多」菜单与
「商品修改日志」入口正常,图标「查看」仍能打开条码档案详情。
type-check EXIT=0。jest 的 3 个失败用例均与本改动无关(主体文件属其他线程
未提交改动,或与 HEAD 逐字节一致属既有失败)。
2026-09-16 13:54:43 +08:00
WuYongJie
2a7d2b04a2
feat(intake): 成品寄样支持一键填是/填否批量设置是否寄出
...
在产品开发明细-成品寄样工作区,「请寄样」旁新增「一键填否」「一键填是」,
一键把当前批次显示的 SKU 行的「是否寄出」填好,之后仍可单独改个别行
(例:30 个 SKU 先全填否,再把第 1 个改成是)。
实现要点:
- 只填空行,不覆盖已选过的行;目标为当前批次显示行的 skuId 集合。
- 单行默认值计算抽成 buildFinishedSampleShipmentRowWithShipped 复用,
批量走 applyFinishedSampleShipmentDecisionToRows(无变化时返回原引用)。
- 权限沿用 canEditFinishedSampleShipmentDecision;无权限或无待填写行时按钮置灰。
- HeaderActions 经 DocumentWorkspaceHeaderActionsSlot 透传动作、权限与待填写行数。
验证:
- type-check EXIT=0
- 新增单测 8 例 + 组件测试 5 例 + 集成测试 3 例 全通过
- 既有回归 buildNonIntegratedDetailChrome / buildNonIntegratedDocumentWorkspaceHeaderActions 通过
- 3001 真机(puppeteer)确认按钮组与交互元素就位,用户目视验收通过
2026-09-16 12:10:53 +08:00
WuYongJie
495ff9f30b
test(intake): 样包测量只读断言随锁定口径对齐
...
非集成权限工作流用例中原断言期望样包测量「已确认」行仍可编辑,
与本次落地的口径(已确认即不可改、取消确认后方可改)冲突,
随主提交一并校正为期望 readonly,并加注释说明规则来源。
补 d3dc8821 遗漏的这一个测试文件(主提交已含对应实现)。
2026-09-16 12:01:21 +08:00
WuYongJie
3ae72e800f
feat(intake): 产品定厂与样包测量按SKU取消确认
...
为采购、跟单、管理员增加按当前批次取消样包测量 / 产品定厂确认的能力,
取消只退回未推送聚水潭的 SKU,已推送 SKU 保持锁定,且不清空任何业务字段。
主要改动:
- 取消确认:新增 workflow-confirmation/cancel 接口与服务端按结构化
systemEnteredAt 逐 SKU 重算逻辑;严格要求先取消样包测量再取消产品定厂;
「全部」页签不开放取消入口,仅具体批次页签可取消
- 编辑锁逐 SKU 化:基础信息、产品定厂、样包测量、产品核价改为逐 SKU 判定,
旧页面保存、整件删除、并发聚水潭推送均增加已推送 SKU 保护
- 样包测量锁定口径对齐:已确认即不可改,取消确认后可改;
界面只读、写入拦截与 Excel 导入共用同一判定
- 基础信息修订签名纳入产品公共字段,公共字段变更自动退回当前批次基础信息确认
- 修复产品定厂回写误退回基础信息确认:手动同步侧与派生侧统一使用
buildBasicInfoRevisionSignature,避免两侧签名形态错位导致比对恒不等
- 修复 advisory lock 被 Prisma 按 void 结果反序列化导致的保存报错
(无返回值加锁改用 executeRaw,产品行 FOR UPDATE 仍走 queryRaw)
- 并发保护:普通保存、正式 SPU 分配、资产中心系列部件写入、AI白底图乐观保存
统一接入产品级锁与锁内最新数据重读,避免旧快照覆盖取消结果
2026-09-16 12:01:21 +08:00
WuYongJie
9e50804b2e
1688代发异常事项:当月业绩列/供应商列/整装拆装维护 + Excel式列头筛选
...
- 列表新增当月真实业绩列(SPU 汇总条码当月值,条码展开行显示自身),当月无业绩整行过滤
- 新增供应商列(取 SPU 内非空 supplierName),列顺序调整为 SPU|业绩|供应商|运营
- 维护抽屉新增整装/拆装二选一,标记整装的 SPU 在"是否有图纸"列显示"整装不需要图纸"
- 顶部有无筛选与 Excel 式列头筛选(含 filter-options 接口)
- 新增迁移 20260915180000_add_dropship_issue_assembly_type(SupplyChainDropshipIssue.assemblyType)
2026-09-16 08:43:27 +08:00
WuYongJie
b0fd9a8800
1688代发异常事项:SPU级维护表+运营筛选+图纸/视频筛选+条码搜索
2026-09-16 08:43:06 +08:00
WuYongJie
8a7d6cae5a
fix(barcode-print): restore legacy split-code text layout
...
Full-Page scaling mis-measured the 3096x416 single-line PNG by its intrinsic size and shrank the whole layout. Templates two and three now share the restored legacy ADD_PRINT_TEXT segments.
2026-09-15 18:08:49 +08:00
WuYongJie
36616821cf
feat(progress): add column header filters
2026-09-15 16:57:42 +08:00
WuYongJie
170d776aa6
feat(supplier-recommendations): add guided editor options
2026-09-15 14:44:48 +08:00
WuYongJie
f6dd04eeee
fix(finished-progress): backfill sample merchandiser owner
2026-09-15 13:45:40 +08:00
WuYongJie
499cbf66d1
feat(finished-progress): link automatic rows to sample details
2026-09-15 11:26:52 +08:00
WuYongJie
79f34971d6
fix(finished-progress): exclude historical JST entries
2026-09-15 10:58:04 +08:00
WuYongJie
b63b2fe974
fix(1688): accept opaque CDN image responses
2026-09-15 10:05:15 +08:00
WuYongJie
ed15789a81
feat(finished-progress): require completed samples and improve automatic purchase intake
...
Require a real completed sample before finished-product intake. Carry factory, brand, merchandiser, delivery date and minimum order quantity into editable records; leave order date blank and support bulk maintenance.
Generate one factory contract per source group, place new automatic orders first and enlarge the horizontal scrollbar. Include source identity migration and regressions.
Validation: TypeScript noEmit; 18 Jest suites / 164 tests; local 3001 browser drag, wheel, and bottom-row checks.
2026-09-14 18:07:47 +08:00
WuYongJie
2aa856197b
feat(supply-chain): 1688代发数据明细产品图片点击弹窗预览
...
- 新增 DropshipImageCell:缩略图可点击,平台 Modal 弹窗放大(等比铺满,最高680px)
- 缩略图样式收口到 .imageButton,避免与就地渲染的 Modal 大图互相污染
- 大图复用 source-image 认证代理 URL,浏览器缓存零额外请求
2026-09-14 10:02:55 +08:00
伯阳
bc2104b169
test(supply-chain): verify merged 1688 entries and record integration checks
2026-09-12 18:32:24 +08:00
伯阳
e271d1b941
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/wuyongjie-1688-xuxiake-integration
2026-09-12 18:29:30 +08:00
伯阳
dfdc3c3626
feat(supply-chain): integrate 1688 dropship analytics with shared daily sales
...
Preserve shared barcode/day facts and atomic synchronization; add DF sales, cost and operator enrichment, filters, trends, and module-scoped image access. Include additive migration and deployment/backfill handoff. Independent review: passed with warnings; existing master-data audit failures match baseline.
2026-09-12 18:29:16 +08:00
WuYongJie
5156ead4c1
供应链新品管理新增「1688代发异常事项」占位入口
...
- 新增 /supply-chain/new-products/dropship-issues 占位页(功能建设中)
- supply-chain-menu 新品管理分组加菜单项,targetKey=newProductDropshipIssues
- 权限体系 targetKey 类型/列表/路由映射同步
- 侧栏清理未使用的 Home 图标导入
2026-09-12 18:05:22 +08:00
WuYongJie
38259cc40c
运营负责人SPU级兜底:同SPU最新销售条码的负责人下放给未匹配条码
2026-09-12 17:10:28 +08:00
WuYongJie
f6dc344b71
fix(home): workbench entry inside quick-links fold with unified styles
...
- expand list now starts with a fixed workbench entry (router.push to
the workspace picker) followed by configured links
- replace next/link with button + router.push inside the nav item so
styled-jsx scoped styles apply; fixes icon/label wrapping and keeps
font size and spacing consistent across entries
- tests updated for the new push-based navigation and roles
2026-09-12 17:02:38 +08:00
WuYongJie
6aba6e077c
fix(installation-demo): allow customer service model upload with progress toast
...
- /api/upload/model 去掉 requireDesignWorkspaceWrite 硬性门槛:改为安装演示
canEdit 或设计工作区权限二者其一即可上传(客服等已配置安装演示编辑权限
的角色可上传模型,其他模块设计权限语义不变)
- 上传进度右下角浮层按系统既有导入进度样式实现(文件名+百分比+进度条,
完成绿色停留 3 秒自动收起,失败红色保留可关闭)
- installationModelUpload 改用 XHR 以获得真实上传字节进度,工具箱共用不受影响
2026-09-12 15:51:11 +08:00
WuYongJie
0ea1c3ecdd
feat(home): admin-configured quick links with sidebar home fold
...
- HomeQuickLink table + migration; CRUD API with admin-only writes and
internal-only visibility (suppliers/external intake excluded)
- sidebar home item folds open configured links in both product and
supply-chain sidebars, entries open in a new tab
- home portal top-right manage entry with sort/enable/delete sheet
- permission matrix default: home overview open to all internal subjects
so switching to supply chain no longer lands on an empty page
2026-09-12 15:04:08 +08:00
WuYongJie
4f2ea0bdf0
fix(installation-demo): route customer service through node permissions
...
删除安装演示权限里硬编码的客服强制只读分享口径:原 isCustomerServiceUser
(CUSTOMER_SERVICE 角色或部门路径含客服中心)直接返回 canEdit=false 且排在
节点权限 overrides 之前,导致正式站给客服配置的编辑权限永远无效,客服只能
查看和分享、无法新建编辑截取。
删除后客服与普通员工一致走节点权限配置:客服主体 customerService
(部门路径含客服中心),正式站已配置的编辑权限即刻生效,可新建图纸、
维护编号、截取、分享与下载。
2026-09-12 14:24:11 +08:00
WuYongJie
aaa9c74eec
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/local-3001-integration
2026-09-12 11:13:15 +08:00
WuYongJie
dd693dfbd5
运营部门负责人/运营负责人接入聚水潭销售宽表cater/ider
...
- dws repository 新增 listLatestOpsOwners:rpt.dws_sn_sales_full_info_di 按 skuoid 取 stat_date 最新一条的 cater/ider,全条码范围
- enrichment 链路新增 ops owners patch:来源码 DWS_SALES_OPS 可追溯;字段级有值才覆盖(dws 无值保留档案原值)
- opsDirector(运营总负责人)不接
- 本地全量验证:抽样 10 条与上游 100% 一致;3001 API 验收通过
2026-09-12 11:12:50 +08:00
WuYongJie
04b24f7972
feat(barcode-print): add size template and keep package codes on one line
2026-09-11 17:12:52 +08:00
WuYongJie
222f3e6a97
feat(barcode-print): add size template and keep package codes on one line
2026-09-11 17:08:02 +08:00
WuYongJie
6f49206964
fix(installation-demo): recapture by current viewpoint, align material counts, add finished-frame ending
...
- 编号重截取按当前视角取景(engine 截图支持 viewpoint:current,默认行为不变),成功/失败给可见消息
- 动作分解物料数量改为该动作实际命中节点数(fixed/action 帧同口径),徽标与编号标注共用管理编号覆盖值
- 动作分解末尾固定追加成品展示收尾帧:复用成品展示截图,不参与截取与计数,支持调整画面与文字标注
- 编号标注对账按编号兜底认领并清理超量残留,修复部件重绑后改数量导致标注叠加翻倍
- 成品线稿统一 detail 风格,与动作图线宽一致
2026-09-11 14:34:04 +08:00
WuYongJie
0c7d147129
chore(product-archive): default daily sales schedule to Beijing 08:00
...
- local scheduled task installer: compute next 08:00 Asia/Shanghai start boundary
- production systemd timer installer: default OnCalendar 08:00 Asia/Shanghai
- aligns installers with already-active 08:00 runtimes on both ends
2026-09-11 09:44:56 +08:00
WuYongJie
9e5a0d20b5
DF开头SKU档案图片接入聚水潭skumap三表平台图
...
- 新增 jst-skumap-pic.repository:rpt.jst_skumap/_pdd/_qmcust_add 三表 UNION,按 sku_id 取 modified 最新非空 pic,仅 DF 开头
- enrichment 同步链路:DF 条码 image 字段改用 skumap 平台图(无图清空),来源记录 JST_SKUMAP_PIC 可追溯;其他 SKU 图片逻辑不变
- 变更日志字段清单加入 image(图片)
- source-image 图片代理白名单放行 JST_SKUMAP_PIC,修复 DF 档案平台图 404 灰框
- 本地全量回填验证:331 批扫描 66033 failed=0;DF 有图 2281→24700;非 DF 14974 不变
2026-09-11 09:12:05 +08:00
WuYongJie
e2f211c7ac
fix(deploy): verify complete releases before switching production
2026-09-10 18:29:13 +08:00
WuYongJie
46a732d892
feat(installation-demo): add manual catalog, permanent shares and hinge binding
2026-09-10 17:59:58 +08:00
WuYongJie
aa1ca0afcf
feat(product-archive): add daily monthly yearly sales and daily sync
2026-09-10 13:15:23 +08:00
WuYongJie
a20b6cb79f
fix(product-archive): add missing POST handlers for large filter payloads
2026-09-10 12:59:03 +08:00
WuYongJie
5c7ebbe914
fix(intake): abandon permission checks creator and real designer keys
...
废弃权限白名单原读取 payload 中不存在的 appearanceDesigner 等键,导致外观/结构设计师无法废弃产品。改为按 创建人 + 外观设计师(designer 列/payload.designer) + 结构设计师(openingReference.structureDesigner,兼容顶层旧键) 判定,不再放行 SPU 负责人与采购负责人;管理员口径不变。
2026-09-10 12:32:06 +08:00
WuYongJie
17d2e1d7bb
Merge remote-tracking branch 'origin/codex/xuxiake-mainline' into codex/local-3001-integration
2026-09-10 11:52:31 +08:00
WuYongJie
351b7d7d2a
feat(product-archive): take dropship df sku cost from sales goods_cost
2026-09-10 11:52:14 +08:00
WuYongJie
1042f35090
fix(barcode-print): raise Gujia certificate fields
2026-09-10 08:44:28 +08:00
WuYongJie
eedea9f791
fix(barcode-print): raise Gujia certificate fields
2026-09-10 08:43:13 +08:00
WuYongJie
b647cc2943
fix(barcode-print): recalibrate Gujia card and disable 2026 template
2026-09-09 17:55:27 +08:00