Commit Graph
589 Commits
Author SHA1 Message Date
Ubuntu a20debbd73 feat(迁移): 同一原单只允许一张未完结补送单(orders 部分唯一索引)——从数据库层防重复建单
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-20 21:17:20 +08:00
Ubuntu 881d8f5211 fix(退回补送): 打通租户上下文/RLS/必填列——改用官方 acquireTenantSessionClient、补 branch_code 与 amount、显式 numeric 转换;本地端到端验证通过(退回→补送单已到45待分拣→原单折减→台账映射)
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-20 17:31:51 +08:00
Ubuntu 54511665ed feat(退回对接): 退回通知复用既有 webhook(X-Signature)新增事件 preparations.returned——对方零新增凭据/端点,落售后+生成补送单
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-20 17:13:09 +08:00
Ubuntu c4b3a547cf fix(退回对接): ingest 接口复用既有 supplier_integration 对接令牌鉴权,不再要求用户账号/权限——部署后主系统用现有凭据即可调用
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-20 16:57:21 +08:00
Ubuntu e178af35e7 docs(handoff): 主系统「商品退回」对接提示词(可直接转发对方 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
2026-10-20 16:25:35 +08:00
Ubuntu 4c30bfde8b 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-20 16:03:55 +08:00
Ubuntu b9be5b70cc feat(退回补送): 接通入口——主系统推送接口 POST /after-sales/returns/ingest + 台账 last_return_code 轮询兜底(挂到对账链路);对接契约写入设计文档
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-20 15:57:20 +08:00
Ubuntu e284cbad04 feat(退回补送): 台账记录补送单指向(保留原单追溯)+ 回写优先取补送单并重置回写状态——补送完成即可按原 prep 重新回写主系统
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-20 15:49:40 +08:00
Ubuntu 88fe717581 feat(退回补送): 退回货处置接口——重新入库(待检不可用)/丢弃(scrap) + 质量确认(合格转可用/不合格记废弃),方案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-20 15:46:38 +08:00
Ubuntu 75e77ba67c feat(退回补送): 原单按实供量折减——order_items.returned_qty 累加 + orders 金额/重量按 (quantity-returned_qty) 重算(统计/结算自动按净供货,避免与补送单双计)
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-20 15:42:08 +08:00
Ubuntu bdb4fbea98 feat(退回补送): 主系统退回即生成售后记录 + 补送单(普通订单 source=return_resupply,幂等,提交后复用既有分配/库存抵扣链路)
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-20 15:37:02 +08:00
Ubuntu 239c1c3bc0 feat(迁移): 主系统退回/补送数据层——orders.source+linked_order_code、after_sale_returns 退回处置列与幂等唯一索引(纯附加)
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-20 15:35:38 +08:00
Ubuntu 535a164a53 docs(设计): 主系统「商品退回」与补送方案确认稿(退回即生成补送单/独立作业/原prep回写/退回货待检再转可用)
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-20 15:30:03 +08:00
Ubuntu 8dc94a5fcb fix(库存): 移除误插入到 adjustItem 声明前的重复 effect(修 a24ff11 的 TS2448,typecheck 已通过)
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-20 14:39:44 +08:00
Ubuntu a24ff111a3 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-20 14:39:01 +08:00
Ubuntu a196401614 fix(dev): devServer.allowedHosts 改为显式白名单(默认含 deepseek.xdjchuanhui.com)——修经 nginx 域名访问 dev 报 Invalid Host header,同时保持不用 'all'
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-20 14:33:49 +08:00
Ubuntu 54c9a0671d 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-20 14:05:36 +08:00
Ubuntu 87f8529625 feat(产地): 新增公开查询接口 GET /api/public/order-origin(主系统按订单号+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
用户设计:不做主系统批次映射,改成主系统来问供应商。
- 入参 main_order_code + main_sku;用本地镜像 main_system_sku_mappings 换成我方 SKU
- 取该订单出库批次 picking_items.outbound_batches → inventory.origin(批次优先)→ skus.origin(兜底)
- 免鉴权;只返回 { origin },不泄漏 SKU/批次/订单等其它字段
- 查不到 / 异常一律 200 { origin: null },不 5xx、不影响调用方
- 冒烟:GET /api/public/order-origin?... 返回 200(本地无对应数据时为 null)
2026-10-20 13:23:30 +08:00
Ubuntu 5a54480bdc 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
- 供应商 SKU → 主系统 SKU:默认读本地只读镜像 main_system_sku_mappings(active),
  抽成可注入 resolveMainSku(测试用纯函数,避免依赖租户上下文)
- 未映射 ⇒ 跳过不上报(仅日志),不影响取货/到仓主流程
- preparations/status body 增 order_code + sku_code(主系统可据此直接定位订单行)
- 测试:16 passed(注入解析器后原两条用例恢复)
2026-10-20 13:13:14 +08:00
Ubuntu 7f48d5e9a8 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-20 12:57:45 +08:00
Ubuntu 09554c6491 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-20 12:55:08 +08:00
Ubuntu 57934332ce 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-20 12:50:35 +08:00
Ubuntu 7c86539eeb 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-20 12:48:57 +08:00
Ubuntu e0b55a8948 fix(履约推进): 推进前自动补「库存履约」行 + 履约/入库统计排除退货行——修全额库存抵扣单卡在待备货(订单已实测 30→45 待分拣)
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-20 12:38:05 +08:00
Ubuntu fe4e1d70a6 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
开发者报障:弹窗打开默认高亮当前绑定行,点它只关闭不保存 ⇒ 要确认同一行必须
先点别的再点回来。

· 打开时无选中态;当前绑定行改为弱提示(左侧 2px 靛蓝细条 + aria-current);
· 点任意一行(含当前绑定行)都立即保存(后端同 SKU 走幂等分支,不重复改明细);
· 不可抵扣行仍禁用,搜索/过滤/展示/文案不变;两个入口共用同一组件,一处修复覆盖两处;
· 新增 render 测试 7 条(含"点当前已绑定且不可抵扣那行"场景与连点幂等)+ 契约测试更新;
· 设计文补 2026-10-20 修订说明。

验证:tsc 0 错;src/components/order + src/i18n 181 条、orderManagement 124 条全过;变异校验可抓住原 bug。
2026-10-20 12:29:36 +08:00
Ubuntu d52415cb78 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-20 11:23:26 +08:00
Ubuntu 81b69e31a8 feat(库存): 列表列改名「存在报告」并显示该批次已绑定报告数量(后端返回 batch_report_count)
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-20 11:02:32 +08:00
Ubuntu 2bce30150a feat(产地): 批次级产地可录入(inventory.origin)
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 步:修改可用库存 →「批次属性」新增产地输入,只影响本批次。
- 后端 UpdateInventoryBatchInput 增 batchOrigin(批次级写 inventory.origin,'' 清空,≤200 字)
- 路由透传 batch_origin;商品档案 origin 仍写 skus(默认值)
- 前端弹窗批次区新增「产地(本批次)」,三语文案
- typecheck 前后端各 0 错;库存单测未跑(下一步补)
2026-10-20 10:47:08 +08:00
Ubuntu 13d3645cfb feat(产地): 批次级产地迁移(inventory.origin + quality_reports.origin)
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 行;「商品档案」区写 skus(含 origin)。
批次报告在 quality_reports。故批次级产地加在 inventory,批次报告携带 quality_reports.origin;
skus.origin 保留为默认值。已在本地库执行(inventory/quality_reports/skus 三处 origin 均存在)。
2026-10-20 10:44:42 +08:00
Ubuntu 57e2576b21 fix(库存): 上传报告弹窗多报告选中串选——选中状态改为按「报告id::批次id」复合键(此前只按批次id,两个报告会互相联动)
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-20 10:35:06 +08:00
Ubuntu d56c4a8bb1 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-20 10:32:55 +08:00
Ubuntu 65649fe941 feat(库存): 批次报告上传改为「上传报告」并支持选择报告类型(批次/农残/检疫/年度),后端 report_type 透传
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-20 10:32:34 +08:00
Ubuntu 1264d0c039 fix(回写): C5 门禁恢复原始契约(无已审核价=不发价),修回归测试 —— 零价跳过保持不变
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-20 10:26:59 +08:00
Ubuntu 0fd45f6ef8 feat(主系统单): 无库存抵扣/无厂商的商品默认落自采(标记 INTERNAL + 建自采采购单,仅主系统分配单,幂等)
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-20 10:26:10 +08:00
Ubuntu bccbab34d1 fix(订单): 取消库存抵扣改用应用内对话框,去掉浏览器默认 confirm
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-20 10:23:25 +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
Ubuntu d7a9b717bd fix(订单范围): 子表归属谓词去掉写死别名 t0(修录单员详情「暂无明细」)
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
真机:录单员列表有单、详情「暂无明细」。根因是子表谓词写成
EXISTS(... o.order_code = t0.order_code ...),而网关给 order_items 的别名是 t5
⇒ PG 报 missing FROM-clause entry for table "t0" ⇒ 前端 fetchOrderItems 吞错返回 []。

· orderOwnerScope 新增别名无关的父单谓词:
  order_code IN (SELECT order_code FROM orders WHERE created_by::text = $val);
· order_items / order_item_fulfillments / picking_items 三张子表统一走父单归属(不按自身字段过滤);
  orders 本身仍按 created_by;
· 新增真库回归单测(事务造数 + ROLLBACK):自己单 头+明细+履约+分拣可见、他人单全 0、admin 不过滤;
· 设计文补 7.1 真机回归与修正。

验证:根/server tsc 0 错;orderOperatorScope* 37 条 + 相关子集 75 条全过;
全量后端 557 文件通过,1 文件(mainSystemWriteback 2 条)为 HEAD 既有失败。
设计门禁 6 通过/3 红(check-migrations、check-ai-cost、check-env-coverage,均为既有基线)。
2026-10-20 09:44:20 +08:00
Ubuntu 658506f3d6 feat(库存抵扣): 弹窗展示本行实际抵扣批次(含已扣光批次)——手动指定/FIFO分拣/出库流水三级取数,后端只读接口 + 三语文案
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-20 09:34:58 +08:00
Ubuntu 3fe891e769 feat(订单范围): 录单员(operator)只能看到/操作自己录的订单
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-19:录单员只能看自己录的单,看不到其他人订单。

· 唯一口径 orderOwnerScope.ts:isOperatorScoped(非超管、非 admin、含 operator)
  + assertOperatorOwnOrder(403 order_scope_forbidden)+ assertOrderAccess(分公司边界 + operator 归属,
  合并原先 orderWorkflowService / orderDeleteService 两份重复实现);
· 三层收口:① 订单列表 SQL(stats/count/list 共用同一 where)② 详情/写入单点
  assertOrderAccess(覆盖 Web 25 处 + 小程序 + MCP + 状态推进)③ /api/data 通用网关
  (Web 详情/明细/导出走 supabase:orders/order_items 的 select/update/delete 注入可信表达式);
· 补上原先没有 assert 的入口:散客确认、分享链接、主系统核货事实、批量动作、批量重新分配(SQL 层收窄)、
  删单/恢复/彻底删除、回收站列表、小程序录单/管理端、MCP 订单详情与改单;
· 历史 created_by 为空的单:operator 看不到;不做参与过就放行(参与制另立需求);
· 未动状态链/分配/财务口径/表结构;未加索引与迁移。

验证:根与 server tsc 0 错;orderOperatorScope 31 条 + 相关 6 文件 67 条全过;
全量后端 556 文件通过、2 条失败为 mainSystemWriteback 既有失败(HEAD 同样失败);
本地真库 CTE + PREPARE/EXPLAIN 验证三视角可见数(operator 1/4、admin 4/4、finance 4/4)。
2026-10-20 09:32:07 +08:00
Ubuntu 298d3f0393 feat(权限): 供需变更审核/待报价/验收图片复核 改为管理员按需开启(默认仅 admin)
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
· 新增三个专用码 price_qty_review / bid_quote / inspection_review(默认只授 admin),
  三个菜单项改挂专用码;inspection-review 删除写死的 roles:['operator','admin'];
· 权限目录/模块元数据登记(角色权限页可见、可勾选、有对应功能描述);
· operator 收敛白名单加这三个码:**不默认授予**,但管理员勾选后不会被下次迁移删掉(实测通过);
· 订单垃圾桶弹窗加宽(max-w-4xl → 6xl),列不再挤成竖排。
· 契约测试 19 条:三菜单项用新码、operator 默认不可见、admin 可见、只授单码可见、角色页可展示。

未动后端接口权限(避免突然 403);直连 URL 仍可达(本次只隐藏菜单)。
2026-10-20 09:31:19 +08:00
Ubuntu 6b799ff13d feat(分拣): 销售价为 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-20 09:08:38 +08:00
Ubuntu d7bf5bbb2e revert(回写): 恢复「销售价≤0 不发送」(主系统成本价 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-20 08:12:03 +08:00
Ubuntu 39a5dd749b 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-20 08:08:52 +08:00
Ubuntu de15530ddd feat(回写): 销售价为 0 也照常回写备货完成(方案A)——分拣完成必须让主系统知道,价格是否接受由主系统判断,被拒进台账按轮重试
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-20 08:04:10 +08:00
Ubuntu 56fe7de7a2 feat(客户列表): 主系统绑定客户隐藏「上门取货」开关;后端改该开关返回 409(待取货只由主系统免入库决定)
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-19 20:42:45 +08:00
Ubuntu dac43897bb fix(回写): 回写价格永不省略——有审核价用审核价,否则用本行销售价(=配送系统采购价),修待取货单被拒「供货价格必须大于 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-19 20:31:36 +08:00
Ubuntu 2c5e6c9a6b fix(回写): 无可审核价时按本行销售价(=供货价)回写主系统——修待取货单被拒「供货价格必须大于 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-19 20:30:36 +08:00