恢复点(restore point)。别人改崩后可 git reset --hard 回到此提交。 == 此快照内容 == - 后端 oa-backend: 734 控制器 / 711 实体 (Spring Boot 3.2.5 + SQLite, 端口8091) - 前端 modern-ui/app: Vue3+Vite, 约700页 (构建产物已在 oa-backend/src/main/resources/static) - 数据库 oa-backend/data/oa.db: 含全部演示数据 (强制入库, 6.6MB) - 交接文档 go.md + go-code-reference/endpoints/entities/database.md - 多代理建设脚本 .claude/wf-*.js == 状态 == - 对 凯迪科技ERP_20260507.xlsx 合规 MET ~73.3% (PARTIAL 75: 34可建+6种子/bug+35外部硬天花板) - 安全: 5轮红队+5轮复检, default-deny分级鉴权, 连续零可利用 - W3~W7 累计补完436缺口; W8末轮(40缺口)为半成品(源码树可编译但未集成) - 运行: cd oa-backend; java -jar build/libs/oa-backend-0.1.0.jar --server.port=8091; admin/123456 == 排除(gitignore, 可再生) == node_modules / oa-backend/build / .jdks / *.log / Backup-ERP-* / 弃用的OFBiz核心(只保留modern-ui) 完整文件夹备份见同目录 Backup-ERP-20260615-191517/ (含上述全部, 仅缺 node_modules) 时间戳: 20260615-191517 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
89 lines
4.0 KiB
JavaScript
89 lines
4.0 KiB
JavaScript
#!/usr/bin/env node
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
import assert from 'node:assert/strict'
|
|
import { readFile } from 'node:fs/promises'
|
|
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const scriptPath = fileURLToPath(import.meta.url)
|
|
const appRoot = path.resolve(path.dirname(scriptPath), '..')
|
|
|
|
async function source(file) {
|
|
return readFile(path.join(appRoot, file), 'utf8')
|
|
}
|
|
|
|
const financeOperations = await source('src/components/erp/ErpFinanceOperationsWorkspace.vue')
|
|
const renderer = await source('src/components/erp/ErpPageRenderer.vue')
|
|
const previewVerifier = await source('scripts/verify-preview.mjs')
|
|
const screenshotScript = await source('scripts/capture-admin-screenshots.mjs')
|
|
const packageJson = await source('package.json')
|
|
|
|
for (const text of [
|
|
'财务运营',
|
|
'财务运营台',
|
|
'发票队列',
|
|
'发票查询',
|
|
'发票列表',
|
|
'收付款匹配',
|
|
'账龄风险',
|
|
'核销处理',
|
|
'发票详情'
|
|
]) {
|
|
assert.match(financeOperations, new RegExp(text), `custom finance operations workspace must expose ${text}`)
|
|
}
|
|
|
|
for (const text of [
|
|
'data-modern-workspace="finance-operations"',
|
|
'data-modern-finance-search="true"',
|
|
'data-modern-invoice-table="true"',
|
|
'data-modern-finance-drawer="true"'
|
|
]) {
|
|
assert.match(financeOperations, new RegExp(text), `finance operations workspace needs stable verification hook: ${text}`)
|
|
}
|
|
|
|
assert.match(financeOperations, /getEntityRows\('Invoice'/, 'finance operations workspace must load real Invoice rows from the entity API')
|
|
assert.match(financeOperations, /getEntityRows\('Payment'/, 'finance operations workspace must load real Payment rows from the entity API')
|
|
assert.match(financeOperations, /真实发票数据/, 'finance operations workspace must describe entity-backed invoice data')
|
|
assert.match(financeOperations, /真实付款数据/, 'finance operations workspace must describe entity-backed payment data')
|
|
assert.doesNotMatch(
|
|
financeOperations,
|
|
/fieldRows\.value\.map|actionRows\.value\.map\(\(action, index\)|字段来自当前 OFBiz 页面定义|个字段来自当前 OFBiz 页面定义|字段完整|发票号、往来方、状态和金额字段/,
|
|
'finance operations workspace must not synthesize invoices or payments from generated metadata'
|
|
)
|
|
|
|
assert.match(renderer, /ErpFinanceOperationsWorkspace/, 'page renderer should import the custom finance operations workspace')
|
|
assert.match(renderer, /isFinanceOperationsPage/, 'renderer should route invoice and payment pages through the finance operations workspace')
|
|
assert.match(previewVerifier, /finance-invoices-page/, 'preview verification should smoke-test the custom invoice finder')
|
|
assert.match(previewVerifier, /finance-payment-overview-page/, 'preview verification should smoke-test the custom payment overview')
|
|
assert.match(screenshotScript, /business-page-finance-invoices/, 'screenshots should capture the invoice operations page')
|
|
assert.match(packageJson, /verify:finance-operations/, 'package scripts should expose finance operations verification')
|
|
|
|
console.log(JSON.stringify({
|
|
status: 'passed',
|
|
checked: [
|
|
'ErpFinanceOperationsWorkspace.vue',
|
|
'ErpPageRenderer.vue',
|
|
'verify-preview.mjs',
|
|
'capture-admin-screenshots.mjs',
|
|
'package.json'
|
|
]
|
|
}, null, 2))
|