90 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 b789aea353 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/成品预览;分拣任务标准商品名优先。
2026-11-04 13:05:40 +08:00
Ubuntu 63a268c0f6 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/成品预览;移动端加工完成支持人工分配;订单完结后人工发起主系统 price-qty 申请。
2026-11-04 13:03:56 +08:00
Ubuntu 4e0cf2e217 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-28 21:38:19 +08:00
Ubuntu 41d66aca6f feat(客户商城): 下单客户商品溯源模块
order_customer 只能看自己 customer_portal_users 绑定订单;首页内嵌 customer-trace-panel;不返回内部字段。
2026-10-28 21:34:09 +08:00
Ubuntu b8bbf21599 feat(客户商城): 下单客户账号与小程序商城二期
正常客户开户/停用/重置;order_customer 三重闸;mall-panel 商品、地址、下单;价格/客户由服务端推导;菜单与账户入口修复。
2026-10-28 21:06:36 +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
雨天 f9ae5a642e chore(小程序): 品牌更名为安惟衡
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
登录页名称/副标题、全局导航标题、A4 与热敏打印抬头统一为

安惟衡 / 供应商进销存配送系统
2026-10-25 14:01:00 +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
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
雨天 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
雨天 8213c17166 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 规格冲突确认后带 confirm_spec_conflict
重提(移动端路由本次补上该参数转发与 spec_conflicts 透传)。

失败行按 rowNumber 留在列表、成功行移除;报告随行绑定,绑定失败只提示
去 Web 补挂。逐行与一键共用 _submitInFlight 在途锁,防双击重复入库。
2026-10-21 19:15:00 +08:00
雨天 1de0c69ba5 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
问题:哨兵客户 __RETAIL__ 会出现在小程序客户列表,但小程序走普通下单
(服务层无 RETAIL 分支),而自动推进又显式排除散客 ⇒ 单子容易卡在流程里。

新增 POST /mobile/order-entry/retail-orders:录单角色 + 客户范围校验,
与 Web 同源调 submitRetailOrder(entryChannel=MP,不校验下单时间窗口)。

小程序选中散客后:不要求配送日期、不做预算校验、只允许已建档商品,
成功后提示到「订单管理」点「确认扣除并完结」;界面加「只扣库存」提示。
普通录单行为逐字不变。
2026-10-21 18:59:50 +08:00
雨天 a837a1bd96 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
自审发现四处问题:
- 绑定环节任何异常都可能把入库变成失败 → 整体 try/catch,只进 report_bindings
- 一份报告挂多行时各行分别入库会建出重复报告 → 同文件+类型+编号复用
  已有报告行,只补关联(经真库验证:1 条报告 + 2 条关联)
- 归属断言移出事务,避免共享连接下在事务内做 legacy key 反查
- 小屏下报告弹层 scroll-view 只有 max-height 不滚动、底部按钮可能被裁
  → 固定高度 + 弹层可滚动
2026-10-21 18:52:28 +08:00
雨天 791071cb16 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
「待审核」卡片加「上传报告」:文件进 quality-reports 桶后走新增的只解析
接口(复用 quality.report.meta + productNamesMatch,不写表),返回报告品名
与待入库行的匹配建议;勾选后报告挂在行上(按行 key、增量 setData,
重识别不丢)。

入库时随行提交 reports;服务端在 bulkStockInbound 提交成功后按
inventory_id 建报告行(status=30 + match_source=manual),逐份 SAVEPOINT。
绑定失败不阻断入库,返回 report_bindings 让小程序提示去 Web 补挂。
2026-10-21 18:44:51 +08:00
雨天 e29caf5f7b 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
批次行原先只有「区域 · 入库 · 效期 · 可用」。后端早已返回 production_date、
loadBatchInfo 也已映射,但两个弹窗行构造器丢了该字段、模板也没渲染。

补上三处,并在「入库」后、「效期」前显示「生产」(空值 —,不拿入库日
顶替);batch-row-meta 由 nowrap+ellipsis 改为允许换行,否则多一段会把
尾部「可用」截掉。
2026-10-21 18:26:50 +08:00
雨天 ea58103df9 fix(delivery-note): 生产时间列移到备注之后
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
列序改为 编号/产品/单位/总数量/单价/金额/备注/生产时间;
列宽 130/150 对调,合计仍 920。
2026-10-20 10:09:51 +08:00
雨天 84b69c1b1b fix(delivery-note): 无生产时间数据时整列不渲染
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
后端未下发 batch_production_dates 或整单没有日期 ⇒ 退回原 7 列
版式(列宽恢复 70/300/70/110/110/130/130);部分行有日期时
才出该列,无日期的行留空。
2026-10-20 10:09:21 +08:00
雨天 2613b8f800 fix(delivery-note): 生产时间列移到金额之后
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
列序改为 编号/产品/单位/总数量/单价/金额/生产时间/备注;列宽合计仍 920。
2026-10-20 10:07:53 +08:00
雨天 072d02b687 feat(delivery-note): 送货单图片增加生产时间列
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.production_date,跨批逐行
显示;未出库不猜批次、该格留空。订单详情只新增
batch_production_dates 字段,取数下沉到 service。
2026-10-20 10:05:12 +08:00
雨天 f08792f773 小程序配置示例改指供应商系统域名
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
miniprogram/config.example.js 的 apiBase/webBase 原指向主系统域名
www.xdjchuanhui.com,而本仓库(供应商系统)站点为 supplier.xdjchuanhui.com
⇒ 模板改对,避免复制为 config.js 后误连主系统。
本地 config.js(gitignored)不受影响;模板注释与结构未动。
2026-10-16 18:29:14 +08:00
雨天 19a964ccde 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
① Web 验收拍照/拖入后自动 AI 识别(复用库存入库识别,预填
规格/生产日期/保质期/产地,只补空、切单丢弃过期响应,零新增文案)。
② 修「拍照后上传失败」:根因是照片 dataURL 内联在提交体,而全局
express.json 仅 2mb 且照片不降尺寸/质量 0.92 ⇒ 大图必 413。
甲:照片先降尺寸再画水印(≤1600px / q0.8,对齐小程序);
丙:仅把 /api/workflow/inspection/submit 体上限放宽到 20mb。
③ 小程序逐张上传单张失败不中断整批 + 汇总提示。
新增契约测试;门禁与全量回归对基线。
2026-10-16 18:15:08 +08:00
雨天 e86c6f58de 订单入库拍照: 免拍照也识别 + 每批9张
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
跟进开发者「可以」:① 识别触发条件由 row.photoRequired && photoCount>0 改为
只看 photoCount>0 ⇒ 免拍照行拍照后同样走识别预填(截图那两行正是免拍照);
② wx.chooseImage count 3 → 9(微信单次上限)。
不改上传/门槛/入库写路径/文案;停用的 resetAiResult 未动。
契约测试补「触发不再含 photoRequired + count 9」断言,设计文档升 v2。
2026-10-16 18:04:36 +08:00
雨天 ae818d14f7 订单入库拍照: 多拍一次识别全部照片
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
小程序订单入库「拍照」原来 count:3 可多选,但 uploadPhoto 每张都覆盖单一
缓存 ⇒ AI 只读最后一张(不同角度照片信息分散时其余白拍)。现新增本批 base64
数组,一次提交全部照片给 recognizeStockInboundLines,结果跨行按字段合并
(规格/产地/生产日期取第一个非空、保质期取第一个可解析的)后仍只补空。
不改上传/门槛/入库写路径/文案,count 仍 3/次;免拍照行仍不自动识别
(触发条件 photoRequired,待裁决)。
同步 inspectionInboundFields 契约测试里钉住「单图」的两处断言。
2026-10-16 18:01:26 +08:00
雨天 65a6fdce20 订单入库: 区域/产月选择器做成「选择框」(加边框与 ▾)
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
开发者:「区域这块要做得像一个选择框,当前还以为是纯文字」。.rate-pick 此前无边框/背景(与旁边实收 .r2-field 的灰底框不一致)⇒ 补 边框+圆角+灰底+width:100%,并在 区域/产月 后加 ▾ 箭头。
2026-10-16 17:43:12 +08:00
雨天 de9be9e398 订单入库: 修保质期单位选择器为空(template 需显式传 shelfLifeUnits)
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
卡片是 WXML <template>,只能看到调用处 data= 传入的变量,组件 data 里的 shelfLifeUnits 进不去 ⇒ 单位选择器弹出来是空的。两处 <template is="inboundCard"> 的 data 补上 shelfLifeUnits;契约测试加断言钉住(两处都要带)。
2026-10-16 17:42:26 +08:00
雨天 d938246e5c 订单入库: 保质期改为数值输入 + 年/月/日 单位选择
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
开发者:「保质期应该是一个数字输入框加一个年月日选择」(参考库存入库)⇒ 复用 miniprogram/utils/shelfLife.js:SHELF_LIFE_UNITS / applyShelfLifeFromAi / shelfLifeTextFromLine;提交时合成原文(如 6个月)落 inventory.shelf_life。识别预填也改为数值+单位。
2026-10-16 17:41:19 +08:00
雨天 deeaf2c3d5 订单入库: 补规格/生产日期/保质期/产地 + 拍照改识别 + 去 AI 判定
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
开发者:入库要填规格(商品有就带过去)/生产日期/保质期/生产地区,让仓库侧数据全;「拍照鉴别是否合格」去掉但代码别删;照片改为识别商品信息(复用库存入库那套);结果默认为合格、前端隐式。

- 卡片新增 card-r3:规格/生产日期/保质期/产地(选填);规格由商品库 skus.spec 预填(列表带出)
- 拍照改走 recognizeStockInboundLines(/mobile/inventory/recognize-lines)预填四字段(只补空)
- 去掉 AI 判定:不再调 analyzeInspectionQuality(代码/prompt 保留);去掉 ai-verdict 与结果 picker;移除 !aiDone 入库闸门
- 入库写 inventory.shelf_life + expiry_date(deriveExpiryDate);人工改过的规格/产地才回写 product_catalog.spec/skus.origin(applyArchiveWriteback,同事务)
- 新增契约测试 inspectionInboundFields

注:『合格才入库/须拍照/退回』门槛未动;SQL 无迁移(inventory.shelf_life/expiry_date 既有列)。
2026-10-16 17:37:02 +08:00
雨天 6db5eb9e77 小程序自采列表: 规格整行显示 + 单价预填去 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
① 规格从商品名列(被单位/数量/单价挤到极窄、规格与商品名都折行)移到卡片行下方独占一行;
② 单价输入预填去 0:0 视为未定价 ⇒ 留空(点击即可直接填,无需先删 0),>0 才预填;pickCostPriceHint 的「0 合法」语义不变。
均只改自采列表卡片,新增两条契约测试。
2026-10-16 17:21:56 +08:00
雨天 289aaa4613 规格口径: 自采/备货与订单详情一致(取消商品库兜底)
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
开发者口径:「订单详情展示规格 ⇒ 自采/备货一样;订单详情不展示规格 ⇒ 自采与供应商备货也不展示」⇒ 规格列只认订单行录单规格 order_items.spec,空 ⇒ 不显示。

- 撤销 v3 的商品库 skus.spec 兜底:formatPrepSpec = order_spec、formatPurchaseSpec = order_item_spec(采购 remark 手工规格兜底一并撤掉)
- 小程序自采列表(purchase-today-panel)接入:共享 PURCHASE_ORDER_DISPLAY_SELECT 增 order_spec(只取 oi.spec,无 s.spec 兜底)+ 卡片商品名下一行灰字「规格:xxx」(有值才渲染)
- 更新三份设计文档与 README 索引为「与订单详情一致」;契约测试随之更新

注:SQL 引用 order_items.spec ⇒ 需先跑迁移 20261050。
2026-10-16 17:15:40 +08:00
雨天 d3e8cdfe0e 订单入库: 批次报告上传把「拍照」「相册」拆开
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
动作菜单原为「拍照/相册」合并项,改为三项分开:拍照 / 相册 / 聊天文件(PDF)。pickReportImages 按来源传 sourceType(camera / album),相册仍可多选;附契约断言与设计文档更新。
2026-10-16 15:23:20 +08:00
雨天 6597f58ac8 订单入库: 免拍照与数量单位紧贴商品名(不再顶到最右)
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
.task-title 由 flex:1 1 auto 改 flex:0 1 auto(不再撑满整行)⇒ 标题行的「须/免拍照」与数量单位左移到商品名后面、间隔仅 8rpx;附契约断言并记入任务卡文档 v3。
2026-10-16 15:18:03 +08:00
雨天 30e96df1c0 订单入库: 退回与确认入库按钮间距拉大(防误触)
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
真机反馈两按钮挨太近。给 .btn-pass 加 margin-left:32rpx(配合行内 gap 12rpx ≈ 22px),只拉开退回↔确认入库这一处;附契约断言并记入任务卡文档 v2。
2026-10-16 15:16:11 +08:00
雨天 1332cb7b1d 订单入库: 上传批次报告按钮改为竖排(修并排一行)
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
微信 button[size=mini] 默认 inline-block ⇒ 两个按钮并排一行。把 .batch-btn-wrap 改为 column flex(align-items:flex-start),两按钮上下排列;提测试钉住,防再并排。
2026-10-16 15:14:36 +08:00
雨天 5232c27d21 订单入库: 退回前弹二次确认
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
退回是不可逆动作(按不合格退回、不入库),此前点一下即提交。现改为先弹 wx.showModal 确认:确定才置不合格并退供,取消则原地不动。退回语义、门槛、状态链一字未动;附契约测试与设计文档。Web 验收页同位置未在本次范围。
2026-10-16 15:13:37 +08:00
雨天 8ef4677f0f 订单入库: 一键上传批次报告并把生产日期随入库落库
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
订单入库页「一键全部合格入库」下方新增「一键上传批次报告」:多张图/PDF → 复用既有 AI-29 OCR 抽品名+生产日期 → 按商品名匹配当前待验收行 → 弹核对表(日期可改)→ 关闭后照旧合格入库 ⇒ 生产日期随该行进 inventory.production_date,报告关联到新建批次。

关键变更: 验收普通行的 inventory.production_date 由「今天」改为报告的真实日期(该列本就在写、INSERT 与 COALESCE 兜底未动,只多一个取值来源:逐行 production_date > 预包装 production_date_month > null)。

- 服务: InspectionComplianceInput 增 production_date/batch_report_id;COMMIT 后 best-effort 关联报告
- 路由: complete 映射两字段;新增 POST /mobile/inspection/batch-reports(复用既有 OCR 服务)
- 小程序: 按钮+核对表+两个提交路径带字段;loadRows 保留(刷新不丢)
- 无迁移、无新表、无新提示词;契约测试 13 例
2026-10-16 15:09:41 +08:00
雨天 c5a3550545 订单入库: 退回与品名换位(防误触拍照)
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-16 14:53:36 +08:00
雨天 8fdcc723ff 小程序: 「智能入库」改名「订单入库」
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 的同名字样(inspection.ts modal.smartTitle)不在本次范围,未改。
2026-10-16 14:47:16 +08:00
雨天 15682b859c 小程序分拣: 出库照可点击预览大图
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
分拣行内出库照缩略图此前没有点击事件(只其它面板有预览),只能看 88rpx 小图。

给 .row-photo-item 加 bindtap → wx.previewImage 看大图(用会话内 tempFilePath —— photo.path 是对象存储 key,不能直接预览);删除按钮仍 catchtap,点「×」只删除、不误触预览。不改拍照/上传/落库链路,零新增文案。
2026-10-16 14:21:08 +08:00
雨天 b85f7c04aa 小程序分拣: 已确认的行即时移出列表
未完成单(pick_status < 30)此前展示全部行(含已确认),大量待拣时已拣完的持续占视野。

改为只展示待分拣行(确认保存后 loadRows → 重算即移出);已完成单(≥30)的复核视图与 KPI 统计不变。口径抽到 miniprogram/utils/pickingAssembly.js#visibleItemsForStatus 并加单测。

docs/design/README.md 顺带补本批与上一批(批量入库回写)两份索引。
2026-10-16 14:13:34 +08:00
雨天 1cd4b2c89f 批量入库: 人工改过的规格回写商品档案
inventory 无 spec 列 ⇒「上次入库的规格」唯一落点是商品档案,而批量入库对已匹配老商品从不回写,导致下次选同一商品带不出规格。

按方案 A 扩已批准的「档案回写」:只回写人工改过的字段(AI/预填值绝不覆盖),在入库同事务内写 product_catalog.spec。
- 服务端: StockImportRowInput/BatchInboundRowInput 增 archive,透传到 writeStockImportRow 调 applyArchiveWriteback
- 前端: 行上脏标记(选商品/点候选/新建商品预填即清),只对已匹配且被改过的行发 archive;Web 与小程序两端一致
- 新增 buildBatchRowArchive + 单测/契约测试 + 设计文档
2026-10-16 14:13:34 +08:00
雨天 57ce3b64a1 分拣: 拍包装读生产日期匹配出库批次(AI-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
复用行内「拍照」按钮,上传出库照后用第 1 张照片让 AI 只读生产日期(不认商品名),按 production_date 匹配本行候选批次:唯一命中则先取该批次、余量按 FIFO 补,并在同一个「调整批次」弹窗里高亮该行;多命中/无命中/日期为 null 回退 FIFO。无论是否匹配都打开同一弹窗,未配多模态或识别失败静默降级为手动选批次,不阻断分拣。

- 后端: 提示词 picking.batch.production_date、解析纯函数 parseProductionDateJson、服务 pickingBatchDateService、路由 POST /mobile/picking/recognize-production-date
- 小程序: request.recognizePickingProductionDate;抽出 buildEditorState 与 openBatchEditor 共用;新增 .batch-row-ai 高亮
- 零新增界面文案;登记 AI-30;补设计文档与契约测试
2026-10-16 13:48:30 +08:00