黄健铭
7d2007955f
补齐固定旧版的浏览器逐笔写入对照并记录账务差异
2026-12-05 02:33:01 -08:00
黄健铭
e77588b337
明确验收差异的确认责任及首屏分包策略
2026-12-05 02:14:45 -08:00
黄健铭
6c91f3b3a9
记录新版前端整改范围、执行顺序与验收标准
2026-12-05 02:06:00 -08:00
黄健铭
00dd683116
将账本业务页面、表单与审批迁移到 React,并加入旧版对照验收
2026-12-04 22:43:40 -08:00
黄健铭
f1a4e69f0d
完善新版开单交互与移动布局,修复纸单号复制反馈
2026-12-04 21:52:39 -08:00
黄健铭 and Claude Opus 5.5
c594bf296f
browser-next:补充登录页、首屏与两行示例单的新旧对照截图(选择器与断言不变)
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 20:11:34 -08:00
黄健铭 and Claude Opus 5.5
581048ba44
重新构建新版界面 web/dist
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 20:07:46 -08:00
黄健铭 and Claude Opus 5.5
91bd9d662d
新版登录页与开单成功页:居中品牌卡片、演示身份卡片、纸单号与合计突出显示
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 20:07:46 -08:00
黄健铭 and Claude Opus 5.5
700bc82609
新版开单页:编号分区卡片、内部区域金色标识、响应式网格、常用成本勾选卡片、底部常驻合计栏与校验定位
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 20:07:46 -08:00
黄健铭 and Claude Opus 5.5
eeea870963
新版界面:品牌主题(深绿、暖纸色、金色强调)与应用外壳(顶栏、左侧导航、手机抽屉)
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 20:07:46 -08:00
黄健铭 and Claude Opus 5.5
4a00b8f3fc
新版界面说明与功能对照表
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 19:15:24 -08:00
黄健铭 and Claude Opus 5.5
6949b23d35
新旧开单对照与新版界面浏览器检查;verify.sh 增加 --with-next
...
parity-create-order.mjs:12 个场景各起两台相同时钟与种子的服务,旧界面与新界面同样输入后逐表比较数据库,
并核对成交合计与纸单号;browser-next.mjs:演示、初始化、密码登录,桌面与 390px 开单,CSP 与请求检查,
新旧开单页对照截图。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 19:15:24 -08:00
黄健铭 and Claude Opus 5.5
03155ca33a
提交新版界面生产构建 web/dist;/next/ 的 HTTP 测试改为必跑
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 19:15:24 -08:00
黄健铭 and Claude Opus 5.5
698a0a84e0
开单模型:已改类附加项目的保留成本行显示来源说明
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 19:15:24 -08:00
黄健铭 and Claude Opus 5.5
ec5889075f
新版界面(React + TypeScript + Vite + Ant Design):登录页与开单页
...
共用计算经构建插件直接导入 public/ 下的 UMD 源文件;请求客户端沿用旧界面的重试、
同一操作号自动确认、恢复原操作与账号切换约定;附 vitest 单元与组件测试。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 18:58:31 -08:00
黄健铭 and Claude Opus 5.5
bdffbcab85
抽出开单表单纯数据模型 order-entry-model.js(旧界面不加载,行为不变)
...
把旧页面依附 DOM 的商品行同步、附加项目报价、进货成本、费用行、常用成本勾选、
日购料选择、收款人联动、合计与开单校验整理为纯函数,输出与旧页面 collectDraft 相同的请求体,供新版界面使用。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 18:56:01 -08:00
黄健铭 and Claude Opus 5.5
40bff0be94
新版界面挂载:/next/ 提供 web/dist 构建,单页回退并限制在目录内
...
试用、演示模式默认开启,云端需设置 WEB_NEXT=1;其余地址行为不变。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 18:36:57 -08:00
黄健铭 and Claude Opus 5.5
33fedc2e68
当前操作者改用AsyncLocalStorage,异步调用不再串号
...
- ledger.scope() 改为 AsyncLocalStorage.run,store 按台账实例区分;actor/memberFilter 改为读写当前作用域的访问器,作用域外读写实例默认值,仍为可枚举自有属性
- asActor() 对外行为不变,仍由 Proxy 把每次方法调用包进 scope
- 新增 test/actor-scope.test.js:嵌套、抛错恢复、作用域内赋值、多实例隔离,以及旧实现下会失败的交错异步流程
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 13:04:33 -08:00
黄健铭 and Claude Opus 5.5
9ec37196d4
目录重组:后端按core/domains分领域存放(仅移动与更新引用)
...
- 50个后端模块用git mv移入core/与domains/<领域>/,入口server.js、launch.js、restore.js及server/原位不动
- 所有require路径由脚本按新旧位置统一换算(后端、server/、测试)
- 新增test/app-paths.test.js,锁定默认数据目录、public目录与飞书配置文件的绝对位置
- 维护与部署.md补充目录说明并更新模块路径
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 13:01:19 -08:00
黄健铭 and Claude Opus 5.5
95c481c74a
更新验证基线:新增安全审计记录
...
golden:audit 新增 27 行安全审计(登录成功15、登出4、导出库存流水Excel2、初始化账号、登录失败、
修改本人密码失败、修改本人密码、导出库存CSV、下载备份各1),原有 228 行 audit 的 id 随之顺延、内容不变,
sqlite_sequence 中 audit 序号 230→257;全部 559 条请求的响应不变。
legacy:三次演示登录新增 3 行 audit,audit 与 sqlite_sequence 的计数和哈希随之变化;接口响应哈希不变。
browser:无变化。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:50:19 -08:00
黄健铭 and Claude Opus 5.5
f9d217022c
修复静态资源查找命中原型属性
...
白名单查找改为只认自有属性(Object.hasOwn),constructor、__proto__、toString 等名称按未知地址 404「地址不存在」,
不再落到 Object.prototype 上抛出类型错误。
经 HTTP 进入时路径恒以 / 开头,原代码对 /constructor 等本已返回 404;原型命中只在不带 / 的名称直接调用时出现,
因此本修复对现有 HTTP 响应无可见变化,测试同时覆盖 HTTP 与直接调用两种情形。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:46:24 -08:00
黄健铭 and Claude Opus 5.5
e68e08b524
修复请求体按块拼接导致的中文乱码
...
readBody 原先逐块转成字符串拼接,跨块的多字节汉字被拆坏为替换字符(约72KB中文请求体即可复现),
替换字符还会虚增字节数,使接近上限的合法请求被误判为过大。
改为收集 Buffer、按累计字节数检查上限(仍超限即抛 413「内容过大」),收齐后一次性 UTF-8 解码;
同时去掉每块重新计算整段字节长度的平方级开销。非JSON与空请求体的处理不变。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:45:27 -08:00
黄健铭 and Claude Opus 5.5
a965becde3
安全审计:登记登录、登出、登录失败、修改本人密码、初始化、导出与备份下载
...
- 新增 server/security-audit.js:统一写入 {ip, userAgent(≤200字)} 及少量说明,写入失败只打印错误、不改变响应
- 登录失败用合成身份“未登录”(role=system),记录登录名(≤50字)与原因 unknown_user / password_not_set / wrong_password;判断顺序与原条件一致,未知账号照常计算哈希
- 修改本人密码失败会整体回滚:分发器新增 ctx.afterRollback,回滚后另行写入失败记录
- 导出库存流水Excel记录实际使用的筛选条件;下载备份记录文件名
- 员工业务数据判定忽略 auth:*、export、backup 审计,登录不影响员工删除资格
- 两处“只读不改库”测试改为忽略安全审计行
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:44:30 -08:00
黄健铭 and Claude Opus 5.5
2305900178
路由表化:迁移登录/会话、报表/备份/同步路由,删除旧路由链,server.js 收为入口
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:35:49 -08:00
黄健铭 and Claude Opus 5.5
d5c015f826
路由表化:迁移锁价、购料、库存与回收路由
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:31:26 -08:00
黄健铭 and Claude Opus 5.5
babb914c59
路由表化:迁移订单及订单修改/归属/作废/售后审批路由
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:29:25 -08:00
黄健铭 and Claude Opus 5.5
900fc2f527
路由表化:迁移资金/人数/报销与打印路由
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:28:18 -08:00
黄健铭 and Claude Opus 5.5
e082069f55
路由表化:新增路由匹配器、中间件与表驱动分发,迁移店铺设置/员工/货盘路由
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 12:26:22 -08:00
黄健铭 and Claude Opus 5.5
2b9cb825be
修复ESLint发现的问题:重复定义、无效代码
...
- recoveries-ui.js:删除较早的 recoveryCardRate(与后一份逐字相同,运行时生效的本就是后一份)
- server.js:删除不可达的重复 GET /api/shop-settings 处理与重复的店主校验;删除从未被读取的初始值
- 订单取消/归属表单:去掉每个分支都会覆盖的变量初始值
- 去掉无效转义;测试夹具中的重复键保留实际生效的值
- 浏览器脚本的 no-unused-vars 只检查局部变量(顶层声明为跨文件全局名字)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 09:02:52 -08:00
黄健铭 and Claude Opus 5.5
ac143d73ce
git blame忽略格式化提交
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 08:58:54 -08:00
黄健铭 and Claude Opus 5.5
28c64814f0
格式化:Prettier统一代码风格(仅格式,无逻辑变化)
...
仅为 npm run format 的输出;黄金对照、旧库兼容、浏览器流程与单元测试全部通过且零差异。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 08:58:53 -08:00
黄健铭 and Claude Opus 5.5
3743d687e7
工程化:增加package.json、Prettier与ESLint配置,修复测试连接未关闭导致挂起
...
- 新账系统/package.json:仅开发依赖(prettier、eslint、@eslint/js、globals),运行时仍零依赖
- Prettier 只处理 .js/.mjs/.cjs/.css;ESLint 扁平配置区分后端、浏览器脚本、测试与 e2e
- scripts/gen-browser-globals.js 生成浏览器脚本间共享的全局变量清单
- 测试 after 钩子关闭服务前先 closeAllConnections(),避免未读完的响应让 server.close() 永久等待
- 4 处读取源码文本的测试断言改为不依赖空白写法(格式化前后均通过),断言含义不变
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 08:55:46 -08:00
黄健铭 and Claude Opus 5.5
91479fd13f
验证基线:端到端黄金对照、浏览器流程与旧库兼容检查
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-12-04 08:37:28 -08:00