425 Commits
Author SHA1 Message Date
Ubuntu de14fb01f0 feat: 供应商系统 2026-11 阶段成果(分公司模板/真还原预览、商品远程搜索、主系统联调、加工幂等修复)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 分公司类型模板:超管配置隐藏路由/菜单 + 中文文案覆盖,仅对挂类型的分公司生效(后端 service/routes、前端 Provider/守卫/配置页)
- 超管模板 iframe 真还原预览:28 个业务页注册、白名单点选编辑、空/示例数据 fixture、白名单漂移检测工具
- 商品/SKU 下拉远程搜索:服务端关键词搜索 + 前端 useRemoteOptionSearch/SearchableSelect 接入(订单/采购/商品等页)
- 主系统联调:子系统主动解绑主系统授权(幂等重试/本地兜底)、追加修改 price_amend 视图代理与 amend-price 转发
- 修复:仓内加工重复建单幂等(已完成需求单 guard、order 任务一商品一单 guard)
- 修复:出入库记录只取前 100 条 → 服务端分页 + 真实总数
- 其它:库存/订单若干修复、分公司管理响应式布局、i18n 文案、设计文档与回归测试
2026-11-07 20:10:48 +08:00
Ubuntu 844a576252 feat(仓内加工): 移植 BOM、原料采购、完工分配与加工页面
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
适配供应商系统:商品 BOM、按加工单自动原料采购、成品免入库回写、加工分配预览/人工分配、订单 BOM 弹窗。
2026-11-03 13:49:38 +08:00
Ubuntu 8aee4f9016 feat(库存): 支持真实删除已用完库存批次
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
方案A:available<=0 且无活动抵扣/未出库分拣引用时物理删除;流水/报告保留,关联单据 inventory_id 置空;新增真实删除入口与审计。
2026-11-02 15:44:42 +08:00
Ubuntu b8bbf21599 feat(客户商城): 下单客户账号与小程序商城二期
正常客户开户/停用/重置;order_customer 三重闸;mall-panel 商品、地址、下单;价格/客户由服务端推导;菜单与账户入口修复。
2026-10-28 21:06:36 +08:00
Ubuntu 94de4e60de feat(商城管理): 客户商品库后台一期
新增 /customers/mall 卡片管理、Excel 导入、上下架/描述/收藏/移出;复用客户销售价接口;修复共享报价单并发改价、i18n、迁移空 schema、并发计数。
2026-10-28 20:23:43 +08:00
Ubuntu 04e6d2b5a4 fix(客户列表): 列宽改百分比自适应(table-fixed + colgroup)去掉横向滚动条——12 列合计 100%、单元格可换行收缩
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-28 09:13:42 +08:00
Ubuntu 8a8cea1567 fix(价格回写): 补名称解析与商品库兜底 upsert
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
录单行只有名称时解析 SKU;syncCustomerMappings 未建客户商品库行时 upsert 兜底;避免价格静默丢失;共享报价单仍跳过。
2026-10-27 19:40:09 +08:00
Ubuntu 85a1f74ac0 feat(价格回写): 录单/改单销售价回写报价单或客户商品库
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
参考配送系统口径并适配供应商:报价单优先,共享单跳过;无报价单只更新已存在 customer_skus,不新建;加菜/0价/同值跳过;下单写全部、改单只写变价行;非阻塞+合并审计。
2026-10-27 19:04:50 +08:00
Ubuntu ce55c8648a feat(成本排行): 二期客户销售价编辑与安全护栏
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
按供应商报价单/客户商品库结构落地:迁移价格字段与手工标记;报价单/商品库改价、指定报价单与共享单409、同值不改、0/null拒绝、superadmin操作分公司、自动加成/完成回写/报价单编辑/订单改成本不覆盖人工价;录单取价新增客户商品库档;成本排行铅笔编辑。未部署。
2026-10-27 18:49:02 +08:00
雨天 a1321571d2 feat(小程序): 配送地图支持定位到当前位置
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
进页默认静默定位(已授权才执行),地图右下角加准星图标按钮

复用配送上报的授权与 gcj02 取点,只平移地图中心,不改路线拟合
2026-10-25 14:22:48 +08:00
雨天 482c7c1e89 feat(小程序): 新增仓库管理内嵌面板与授权
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
首页 Tab 内嵌仓库管理面板:批次/可用/成本价/报告/入库时间

默认仅看可用,顶部统计库存批次、可用总量、可用货值

批量上传按 Web 流程:上传→识别→候选→人工确认,编辑可直传

新增权限码 warehouse_manage,默认赋予仓管,不映射 Web 菜单

6 条移动端薄路由,全部复用 Web 同一批 service

修复首页未转发 onReachBottom 导致内嵌列表只有第 1 页

修复录单员获授权后点仓库管理回弹(漏传 permissions)
2026-10-25 13:47:33 +08:00
雨天 b32ff32f98 库存列表支持内联编辑与报告管理
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 区域/单位/分类下拉、规格文本、可用数量与成本价均可列表内直接改
- 可用数量按本批次 inventory_id;规格/单位/分类另需 product_manage
- 数字格不用 type=number,滚轮与方向键不再改值
- 点「存在报告」可按批次上传/删除报告(复用既有绑定接口)
- 工具栏「上传报告」改为「批量上传报告」
2026-10-25 10:56:55 +08:00
Ubuntu 372214c453 feat(主系统事件): 按定稿答复调整——每个 supplier_code 各拉一遍+游标/去重按(分公司,供应商)、首轮不传 since 并做初态全量对账、cursor 400 重置、批量重推建议≤100/批
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 13:51:10 +08:00
Ubuntu 0f25a92fec feat(主系统对接): 接入 5 项配合——事件补账消费(游标+去重)、备货 cursor/order_code 定向拉取、批量状态、批量撤报告;接收端确认已在生产;全量拉取降为30分钟
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 13:47:05 +08:00
Ubuntu 6ebfa93016 perf(对账): 查询超时护栏(SET+RESET) + 每轮90s预算 + 自愈补录增量窗口(最近3天/50单) + 配套索引;附需主系统配合清单(M1-M5)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 13:19:58 +08:00
Ubuntu 13efb78141 fix(报告推送): 补核查影响——分拣/出库来源也入队(否则报告最多晚 24h)、僵尸任务收口告警、队列表分公司隔离 RLS + 按分公司处理
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 13:05:30 +08:00
Ubuntu d0206ff395 perf(报告推送): 全量轮询改事件驱动队列(变化点入队+按库存行/订单号精确推送)+ 补 6 类高频索引;全量扫描降为每日兜底
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 12:45:49 +08:00
Ubuntu b18eeae8c2 fix(分拣): 零价校验排除已退回行——退货行 price 归零导致已在售订单被误拦「销售价为 0」
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 11:28:58 +08:00
Ubuntu 304f6ec831 fix(库存抵扣成本): 批次改价后补记缺失的 inventory_cover 账本行(同价重算幂等)+ 管理员补账接口,修「成本页抵扣成本恒为0」
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-24 10:49:27 +08:00
Ubuntu d55edab07d fix(导航菜单): 保存的顺序必须生效——布局加 orderCustomized 标记,只在人工排过序时保留顺序,老数据仍按模板收敛 2026-10-24 10:40:14 +08:00
Ubuntu 5c3bb2ffbb feat(小程序订单明细): 供应商列补「库存抵扣」选项——后端返回已抵扣量/可抵扣池,前端按 Web 同规则逐行判定可见性 2026-10-24 10:25:47 +08:00
Ubuntu dd0e9a8889 fix(独立加工成本): 均分总价值守恒——前端只在人工改价时提交单价,后端把舍入残差补到最后一行(损耗越多单价越高、但Σ金额=原料成本)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 17:36:20 +08:00
雨天 3dce355f66 新建商品:商品名与分类必填其余选填
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 品名、分类加红色必填标记,提交时拦空
- 分类不再默认选中第一个(-1,取参不再 || 0 兜底)
- 规格、单位、生产地区为空照常提交
2026-10-23 17:29:26 +08:00
雨天 456976df73 新建商品分类改内联并支持新建分类
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 分类不再用滚轮选择器,改成一排可点 chip(选中态高亮)
- chip 末尾「+ 新建分类」,在表单内就地输入名称创建
- 新建复用库存入库建分类接口,建完直接选中且不关表单
2026-10-23 17:27:47 +08:00
雨天 b02853d8b8 重构小程序成品搜索框并支持搜不到建品
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 输入处理器只回写用户输入的字符串,不再把候选或结果写进输入框
- 候选瘦身到 4 个字段,本地过滤优先,本地没命中再回服务端
- 搜不到时给「用该名称新建商品」入口,复用库存入库建品接口
- 建好自动加入成品行并刷新候选
2026-10-23 17:24:54 +08:00
Ubuntu 841ac4e0ca fix(小程序独立加工): 成品搜索框改回受控输入(value 绑定 + data 声明 + 事件兜底)——非受控+epoch 重建导致真机输入始终为空
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 17:18:22 +08:00
雨天 88aa85ecb8 修小程序成品搜索框回显 undefined
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 搜索框改为非受控(不再绑定 value),框架无从把异常值写回
- 打开、选中、关闭三处改变 outputSearchEpochList 重建输入框以清空
- 契约测试钉住:把 value 绑定加回去立即变红
2026-10-23 17:11:37 +08:00
雨天 308afff5ad 独立加工:修小程序成品申报与批次继承
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
- 小程序「开始加工」不再被「待完成到货验收」拦住(独立加工没有验收行)
- 成品搜索框补 data 声明并加 || '' 兜底,改为打开即载入候选 + 本地优先过滤
- 成品批次继承原料的生产日期/保质期原文/有效期/产地,入库后仍可在库存管理修改
- 两个继承开关默认勾选,选中态改绿色实心勾(小程序自绘,Web 用 accent)
- 新增两篇设计文档并同步索引
2026-10-23 17:04:20 +08:00
Ubuntu 899a363ead feat(小程序独立加工): 创建改多行原料;独立加工完工改「申报成品」(成品多行/成本自动均分/损耗自动差额/继承开关);订单与需求单加工流程保持原样
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 16:13:19 +08:00
Ubuntu a74af15b13 feat(独立加工): 填写产出后自动带出损耗(=原料投入−产出合计)与入库成本(=原料成本÷产出均分),均可人工覆盖并可一键恢复自动
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 15:56:38 +08:00
Ubuntu 10443ab30a feat(独立加工): 成品商品选择对齐录单——全量在售商品本地过滤搜索,搜不到即用搜索名新建商品
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 15:47:52 +08:00
Ubuntu 1375160b8e feat(独立加工): 成品搜索支持新增商品(复用快速新建商品);独立加工单可删除——成品未领用时退回原料、撤销成品批次与账本,仅管理员
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 15:45:05 +08:00
Ubuntu dca422e9d6 feat(独立加工Web): 创建弹窗改多行原料;独立加工完工改为「申报成品」弹窗(成品多行/成本默认均分可改/损耗/两个继承开关);订单加工与需求单完工流程保持不变
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 15:36:00 +08:00
Ubuntu b62a123a83 feat(独立加工): 后端 P0——多行原料 + 多行成品回仓(processing_in) + 损耗自动差额可覆盖 + 成品成本默认均分可设置 + 报告继承(批次只复制关联/检验复制引用) + 请求号幂等;真库跑通
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 15:30:29 +08:00
Ubuntu 5f1956e690 fix(选择抵扣商品): 实际抵扣批次恢复商品名(只隐藏 SKU 码,解析不到时留空不拿编码顶替)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 14:36:56 +08:00
Ubuntu ba2ad90e0b feat(选择抵扣商品): 隐藏 SKU 文案;改为「选中→确认」两步生效(确认与成本保存按钮分开)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 14:34:40 +08:00
Ubuntu aa28ccecb7 feat(选择抵扣商品): 被抵扣批次可就地改入库成本价(复用 applyBatchCostChangeApi,备注选填);关闭弹窗后若有改动自动刷新订单明细
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 13:50:38 +08:00
Ubuntu f7fbd910ee fix(订单明细/列表): 列表操作列可直开「抵扣批次」弹窗;cover_qty 与账本成本解耦——全额抵扣行不再要求采购成本价(批次成本为0时也一样)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 13:45:05 +08:00
Ubuntu a6b339e71f fix(批次成本): 备注改选填并从弹窗移除——空备注由服务端补中性标签(留痕不留空),保存只校验成本价
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 13:38:27 +08:00
Ubuntu 40b1abc0fc fix(库存抵扣弹窗): 显示并预填「抵扣生效成本」(账本 ¥amount ÷ 抵扣量)——批次自身成本为 0 时不再只报未设置
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 13:35:34 +08:00
Ubuntu e9927ca6dd feat(库存抵扣弹窗): 批次成本可当场设置——批次无成本时入口改「设置成本价」,编辑区加明确「保存」主按钮(复用既有写接口,备注必填)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 13:29:16 +08:00
Ubuntu 179c288ee0 feat(订单明细): 一级分组表头(主系统订单号后)展示「客户原下单:A、B」——去重、只列有差异的,行内提示保留
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 11:00:00 +08:00
Ubuntu 75e6d9f402 fix(订单明细): 「客户原下单」提示改从台账原始名取(换SKU会改写item_name)+ 独立组件 jsdom 真渲染测试,确保界面确实显示
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 10:28:35 +08:00
Ubuntu 5ca5f5bf63 fix(主系统导入): 追加补行的行也走「无库存抵扣⇒默认自采」收口(复用既有 ensureSelfPurchaseForImportedOrder,防两份口径)+ 真库验证
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 10:19:01 +08:00
Ubuntu dd8369468e feat(订单明细): 主系统分配行显示「客户原下单」商品名——映射后可反查客户原始需求(纯函数+契约测试,含注入缺陷验证)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-23 10:09:33 +08:00
雨天 8a05a13319 feat(溯源): 报告位置与订单短号对齐配送系统
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
Web 溯源详情:检验报告移到链路右侧(有报告才两列,无报告链路整宽),图片报告出缩略图可放大;订单行改为客户名称在前、短号在后,链接仍指向完整单号。小程序溯源面板:报告紧跟链路,报告附件缩略图/文档打开,公开链接改复制按钮,链路补时间。
2026-10-22 19:44:50 +08:00
Ubuntu 35cc519f30 feat(商品管理): 编辑商品弹窗打开时若税收编码为空则自动调用推荐 API 补上(编辑态只补税码、不改分类/规格;含纯函数单测+契约测试)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
2026-10-22 19:37:45 +08:00
Ubuntu 0bb3d47caf feat(自采列表): 完成口径与实收交数对齐主系统 2026-10-10 裁决(对齐 20261014-self-purchase-completed-scope)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
开发者:实收数量改了保存后仍是计划量;要求先看配送系统自采「点击确认完成」设计后对齐。
主系统仓库 docs/design/20261014-self-purchase-completed-scope.md(已实施,开发者 8 条裁决)
为唯一权威;本次只读参考主系统、未修改主系统仓库。

根因(供应商系统仍是旧的「方案 C」):
- /purchase/complete 不透传 actual_qty,purchaseOperationService 在 status=20 强制清空实收
  ⇒ 采购侧交数永远不落库(列表保存后被计划量覆盖);
- 列表「已完成」口径仍 >=30:采购员点完成后(20)行还在「进行中」、KPI 不对;
- 验收「绝不自动下调」守卫未放开,交数一旦落库会挡住验收(历史卡单风险);
- 前端实收列无可编辑/回车提交/折叠行分摊,一键完成仅当前页。

对齐后的口径(与主系统一致):
1) 进行中 = 10/32,已完成 = 20/30(列表 Tab、KPI、分配池/改挂范围同步);
2) 完成自采(10/32→20)恢复写入采购侧「交数」实收(COALESCE 保留既有;直送豁免保留);
3) 最终权威仍是验收过磅:未入库(<30)允许下调覆盖;「绝不自动下调」只在已入库(>=30)生效;
4) 前端:实收列可编辑(10/20/32;30 只读)、回车才提交、改实收即完成(被拒退化为草稿保存);
   合单折叠行按子单计划量比例分摊;行内完成直连(未匹配商品库行仍开弹窗补资料);
   工具栏绿色「一键完成」= 当前筛选跨页全部 10/32 行 → 20,未填实收按计划量补齐、
   串行、不弹二次确认、失败累计不中断;实收数量参与表脚/日分类小计合计。

后端改动:purchaseOrderQueryService(4 处谓词)、purchasePurchaserAssignService(3 处)、
purchaseOperationService(撤销 20 边实收丢弃)、inspectionComplianceService(守卫加 >=30)、
purchaseAmendService(preserveActualQtyWhenInbound)、purchaseRoutes(complete 透传 actual_qty +
amend-actual 口径)、mobilePurchaseRoutes(status 20 透传实收)。
前端改动:PurchaseManagement(上述交互)、新增 purchaseGroupQtySplit(分摊纯函数,与小程序同口径)、
purchaseListTableTotals(实收合计)、i18n completeAll=一键完成。

测试:
- 后端新增 purchaseCompletedScope 4/4、preInboundActualQtyOverride 3/3;更新 selfPurchaseActualQtySingleWriter、
  mpAdminPurchaseTodayScope、purchaseAmendCostWriteback;全量 3 failed / 582 passed
  (18 failed / 4160 passed,失败集合与改前一致:mainSystemReturnCancel/opsGuardHardening/routeLayerBoundary);
- 前端 purchaseGroupQtySplit 7/7、purchaseListTableTotals 10/10、purchaseListWebList.contract 15/15;
  全量 4 failed / 234 passed(4 failed / 1331 passed,4 个失败文件与改前一致,本次未新增);
- npm run typecheck 通过;设计门禁与之前一致(3 项既有红,未新增)。
设计文档 docs/design/20261022-自采列表完成口径与实收交数(对齐主系统20261014).md。未部署。
2026-10-22 18:36:58 +08:00
Ubuntu 0d67b2038e feat(采购列表): 行内「完成」直连 + 「一键全部完成」
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
开发者要求:
1) 采购点「完成」就直接完成,不要再弹「完成 / 编辑采购」二级界面;
2) 「复制当前清单」右侧加一个「一键全部完成」。

实现(仅前端采购列表,不改后端/状态机):
- 行内「完成」改为 handleCompletePurchaseDirectly:校验 canCompletePurchase 后直接调既有
  completePurchaseOrderApi(成本价取当前行 getCostPrice,备注/单位沿用行数据),成功 toast + 刷新;
  仅「未匹配商品库(缺商品名/分类)」「直送商品缺照片」两类列表里补不了数据的行才回落编辑弹窗;
  成本价≤0/状态已变等原样 toast 报错,不静默。
- 「一键全部完成」按钮置于顶部工具栏与表尾「复制当前清单」右侧:
  范围=当前列表(当前页+当前筛选)内所有 canCompletePurchase 行;逐条串行调同一完成接口;
  不可完成/失败行跳过并继续其它行,无二次确认;完成后刷新并汇总提示(全成功数/部分失败(成功/失败/首个原因)/全失败);
  进行中按钮显示「全部完成中…」并禁用;无可用行时提示。
- i18n 三语新增 completeAll / completingAll / completingRow + 6 条 notify 文案。

验证:
- 新增 src/pages/purchase/PurchaseManagement.completeDirectBatch.contract.test.ts 6/6;
- 采购相关 + i18n 测试 65/65;
- 前端全量 4 failed / 234 passed(4 个均为既有失败:menuCatalog.reviewMenuPermissions、
  QuoteVersionManagement.cardLayout、BidInvitationsPage.render、CustomerOrder.independentInboundOption,本次未新增);
- npm run typecheck 通过;设计门禁与之前一致(3 项既有红,未新增)。
设计文档 docs/design/20261022-采购列表完成直连与一键全部完成.md。未部署。
2026-10-22 18:12:33 +08:00
雨天 5202b241f1 fix(录单解析): 品名自带单位字时也要按空格拆行
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
「二荆条」「粉条」「油条」里的条/根/只曾被当成数量单位,导致「小白菜 苹果 二荆条」整串不拆。禁用字只保留数字/标点/货币,另以纯数量片段规则排除 2斤/两斤/根;补三条单测。
2026-10-22 17:48:19 +08:00