修复四项新版开单和恢复差异,核验三项已确认行为
This commit is contained in:
1 parent
fdaa6afad5
commit
c29ea45ec4
25 files changed
+617
-171
No files matched your search
@@ -321,18 +321,50 @@ try {
|
||||
continue;
|
||||
}
|
||||
const [old, next] = results.map(rs => rs.value);
|
||||
const diffs = compare(old.result, next.result);
|
||||
const raw = compare(old.result, next.result);
|
||||
let expected = old.result;
|
||||
let control;
|
||||
if (!old.failure && !next.failure) {
|
||||
if (['issue', 'issue-pool-date', 'issue-reopen'].includes(group)) {
|
||||
const { expectedIssueResult } = await import('./writes/issue-contract.mjs');
|
||||
if (group === 'issue-pool-date') {
|
||||
// 同一固定旧版、相同初始库存与成本。显式选择订单日料池,
|
||||
// 由真实业务事务产生新版的预期账本,不在比对器里重算成本或忽略账表。
|
||||
control = await run(browser, group, ctx => scenario({ ...ctx, selectOrderDatePool: true }), 'old');
|
||||
assert.ok(!control.failure, '显式选择订单日料池的旧版对照失败:' + control.failure);
|
||||
}
|
||||
expected = expectedIssueResult(group, old.result, control?.result);
|
||||
} else if (group === 'funds' || group === 'funds-transfer') {
|
||||
// 双方页面已各自断言历史单数地址的反馈,只调整已批准的两项期望值。
|
||||
expected = structuredClone(old.result);
|
||||
const singular = expected.feedback.历史团队转账反馈.transfer;
|
||||
singular.toast = '原操作已确认';
|
||||
singular.orderReads = [];
|
||||
}
|
||||
}
|
||||
const diffs = expected === old.result ? raw : compare(expected, next.result);
|
||||
const approved = expected === old.result ? [] : compare(old.result, expected).diffs;
|
||||
console.log(
|
||||
group,
|
||||
Object.keys(old.result.steps).length + ' 步',
|
||||
old.hits.length + '/' + next.hits.length + ' 次 POST',
|
||||
diffs.diffs.length + ' 处差异',
|
||||
diffs.diffs.length + ' 处未预期差异,' + approved.length + ' 处已确认字段差异',
|
||||
);
|
||||
outcomes[group] = {
|
||||
readOnly: { old: old.verifiedReads, new: next.verifiedReads },
|
||||
steps: { old: Object.keys(old.result.steps), new: Object.keys(next.result.steps) },
|
||||
failures: { old: old.failure, new: next.failure },
|
||||
diffs: diffs.diffs,
|
||||
...(control
|
||||
? {
|
||||
legacyOrderDateControl: {
|
||||
reference,
|
||||
steps: Object.keys(control.result.steps),
|
||||
hits: control.hits.length,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(approved.length ? { approved, rawDiffs: raw.diffs } : {}),
|
||||
};
|
||||
for (const [side, rs] of [
|
||||
['old', old],
|
||||
|
||||
@@ -109,11 +109,9 @@ async function recoverTeamTransfer(context, owner, path) {
|
||||
export async function teamTransfers(context, owner) {
|
||||
const feedback = {};
|
||||
for (const path of ['transfer', 'transfers']) feedback[path] = await recoverTeamTransfer(context, owner, path);
|
||||
if (context.version === 'old')
|
||||
assert.deepEqual(
|
||||
feedback,
|
||||
{
|
||||
transfer: {
|
||||
const singular =
|
||||
context.version === 'old'
|
||||
? {
|
||||
heading: '订单',
|
||||
toast: '订单不存在',
|
||||
orderReads: [
|
||||
@@ -122,11 +120,18 @@ export async function teamTransfers(context, owner) {
|
||||
['/change', 404],
|
||||
['/ownership', 404],
|
||||
],
|
||||
},
|
||||
transfers: { heading: '团队账目', toast: '实际转账已保存,待转金额已重新核对', orderReads: [] },
|
||||
},
|
||||
'历史团队转账两个兼容地址的恢复反馈',
|
||||
);
|
||||
}
|
||||
: { heading: '订单', toast: '原操作已确认', orderReads: [] };
|
||||
assert.deepEqual(feedback.transfer, singular, '旧单数地址应显示本版本确认的反馈');
|
||||
assert.deepEqual(
|
||||
feedback.transfers,
|
||||
{
|
||||
heading: '团队账目',
|
||||
toast: '实际转账已保存,待转金额已重新核对',
|
||||
orderReads: [],
|
||||
},
|
||||
'复数地址恢复后应返回团队账目并确认实际转账',
|
||||
);
|
||||
return { 历史团队转账反馈: feedback };
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
// 已确认的 D2 / D7 只生成预期请求副本。实际抓包和每个时点的原始账本均由 runner 保留。
|
||||
import assert from 'node:assert/strict';
|
||||
|
||||
const poolStep = '撤销退回现货选择并切换日期后按料池实际开单';
|
||||
const cancelStockStep = '取消退回现货选择后按原输入开单';
|
||||
const issueSteps = {
|
||||
issue: new Set(['多件公式识别后实际开单', '毫克克重与含前导零的分位金额实际开单', cancelStockStep, '整批退回现货沿用原工费再次销售']),
|
||||
'issue-reopen': new Set(['首笔普通两件商品完成销售', '新标签页从首页录入第二笔销售']),
|
||||
'issue-pool-date': new Set([poolStep]),
|
||||
};
|
||||
|
||||
// 固定旧页面把部分可见控件值额外平铺在行上。每项须能从同一个请求的业务字段还原。
|
||||
function duplicateInputs(line) {
|
||||
const pool = line.costMaterial.mode === 'pool';
|
||||
const inputs = {
|
||||
'cost-materialSource': pool ? 'pool' : 'manual',
|
||||
'cost-materialPoolId': line.materialPoolDraft.poolId,
|
||||
'cost-materialMode': pool ? 'total' : line.costMaterial.mode,
|
||||
'cost-materialRate': pool ? (line.materialPool.averageRate / 100).toFixed(2) : line.costMaterial.rate,
|
||||
'cost-material': line.costParts.material,
|
||||
'cost-materialPayer': line.costPayers.material,
|
||||
'cost-laborMode': line.costLabor.mode,
|
||||
'cost-laborRate': line.costLabor.rate ?? '',
|
||||
'cost-labor': line.costParts.labor,
|
||||
'cost-laborPayer': line.costPayers.labor,
|
||||
'cost-accessories': line.costParts.accessories,
|
||||
'cost-other': line.costParts.other,
|
||||
};
|
||||
if (pool) {
|
||||
assert.equal(line.costPayers.material, 'owner', '本组两个单料池样本由麦麦垫付');
|
||||
inputs['cost-materialPoolPayer'] = '麦麦';
|
||||
}
|
||||
if (!line.returnedStockId) inputs.returnedStockId = '';
|
||||
return inputs;
|
||||
}
|
||||
|
||||
export function assertIssueInputs(version, payload) {
|
||||
for (const line of payload.lines) {
|
||||
for (const [key, expected] of Object.entries(duplicateInputs(line))) {
|
||||
if (version === 'old') assert.equal(line[key], expected, '旧页面控件须与实际业务输入一致 ' + key);
|
||||
else assert.ok(!Object.hasOwn(line, key), '新版应仅提交业务输入 ' + key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function expectedIssueResult(group, oldResult, explicitPoolResult) {
|
||||
if (!Object.hasOwn(issueSteps, group)) return oldResult;
|
||||
let reference = oldResult;
|
||||
if (group === 'issue-pool-date') {
|
||||
// 使用同一固定旧版本、相同初始账本的另一笔真实 UI 写入,仅将用户选中的料池改为订单日期。
|
||||
// 该请求的写后数据库、步骤后数据库及终态均是完整的旧版账本,不能屏蔽其金额、版本或流水字段。
|
||||
assert.ok(explicitPoolResult, '缺少旧版实际选用订单日期的账本');
|
||||
assert.deepEqual(Object.keys(explicitPoolResult.steps), [poolStep]);
|
||||
assert.deepEqual(explicitPoolResult.steps[poolStep].before, oldResult.steps[poolStep].before, '两个独立旧账本起点不一致');
|
||||
reference = explicitPoolResult;
|
||||
}
|
||||
const expected = structuredClone(reference);
|
||||
for (const label of issueSteps[group]) {
|
||||
const capture = expected.steps[label];
|
||||
if (!capture) continue; // 未执行的用例由 runner 的 failures 和步骤比较报告。
|
||||
assert.equal(capture.requests.length, 1, label);
|
||||
const [request] = capture.requests;
|
||||
assert.equal(request.endpoint, '/api/orders/issue', label);
|
||||
assert.equal(request.status, 200, label);
|
||||
assertIssueInputs('old', request.payload);
|
||||
for (const line of request.payload.lines) {
|
||||
for (const key of Object.keys(duplicateInputs(line))) delete line[key];
|
||||
}
|
||||
if (label === cancelStockStep || label === poolStep) {
|
||||
assert.equal(request.payload.lines.length, 1, label);
|
||||
const draft = request.payload.lines[0].materialPoolDraft;
|
||||
assert.equal(draft.defaultDate, false, label);
|
||||
assert.equal(draft.poolId, request.payload.date, label);
|
||||
draft.defaultDate = true;
|
||||
}
|
||||
}
|
||||
return expected;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { newUi, oldUi } from '../parity-create-order.mjs';
|
||||
import { assertIssueInputs } from './issue-contract.mjs';
|
||||
|
||||
async function seedReturnedLot(session, day) {
|
||||
const post = async (path, params) => {
|
||||
@@ -93,6 +94,7 @@ export default async function issue({ version, base, day, pageFor, session, step
|
||||
assert.equal(response.status(), 200, await response.text());
|
||||
assert.ok(shown.paper);
|
||||
const saved = await response.json();
|
||||
assertIssueInputs(version, response.request().postDataJSON());
|
||||
result = {
|
||||
payload: response.request().postDataJSON(),
|
||||
order: await session.get('owner', '/api/orders/' + saved.id),
|
||||
@@ -185,6 +187,7 @@ export default async function issue({ version, base, day, pageFor, session, step
|
||||
assert.equal(await control('cost-labor').inputValue(), '3.25');
|
||||
const ordinarySale = await issueSale('取消退回现货选择后按原输入开单');
|
||||
assert.ok(!ordinarySale.order.lines[0].returnedStockId);
|
||||
assert.equal(ordinarySale.payload.lines[0].materialPoolDraft.defaultDate, version === 'new');
|
||||
assert.equal(ordinarySale.order.lines[0].costParts.labor, 325);
|
||||
assert.equal((await lots()).lots[0].id, lot.id);
|
||||
await start('完好退回现货再次销售');
|
||||
@@ -229,6 +232,7 @@ export async function exerciseIssueReopen({ version, base, day, session, pageFor
|
||||
ui.submit(page),
|
||||
]);
|
||||
assert.equal(response.status(), 200);
|
||||
assertIssueInputs(version, response.request().postDataJSON());
|
||||
const { id } = await response.json(),
|
||||
saved = await session.get('owner', '/api/orders/' + id);
|
||||
assert.equal(saved.paper_number, shown.paper);
|
||||
@@ -400,11 +404,17 @@ export async function exerciseIssuePoolDate({
|
||||
ui.submit(page),
|
||||
]);
|
||||
assert.equal(response.status(), 200);
|
||||
assertIssueInputs(version, response.request().postDataJSON());
|
||||
const { id } = await response.json(),
|
||||
order = await session.get('owner', '/api/orders/' + id);
|
||||
assert.equal(order.paper_number, shown.paper);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const requestLine = response.request().postDataJSON().lines[0];
|
||||
assert.equal(requestLine.costMaterial.poolId, order.lines[0].costMaterial.poolId);
|
||||
assert.equal(order.lines[0].quantity, 1250);
|
||||
assert.equal(order.lines[0].costParts.labor, 325);
|
||||
return {
|
||||
defaultDate: requestLine.materialPoolDraft.defaultDate,
|
||||
poolId: order.lines[0].costMaterial?.poolId,
|
||||
sale: order.total,
|
||||
material: order.lines[0].costParts.material,
|
||||
@@ -425,24 +435,25 @@ export async function exerciseIssuePoolDate({
|
||||
await ui.step(page, ['line', 0, 'materialSource', 'pool']);
|
||||
await toggleDate();
|
||||
assert.equal(await selectedPoolDate(), day, version + ' 未经退回现货时料价日期应跟随业务日期');
|
||||
await page.evaluate(() => {
|
||||
for (const key of Object.keys(localStorage))
|
||||
if (key.startsWith('mm-draft-') || key.startsWith('mm-next-draft-')) localStorage.removeItem(key);
|
||||
});
|
||||
await ui.step(page, ['line', 0, 'materialSource', 'manual']);
|
||||
|
||||
// 1.250g × 当日加权料价 814.29 元/克 = 1,017.86 元;前一天料池为 500 元/克,即 625.00 元。
|
||||
await ui.open(page, base);
|
||||
await fillSale('退回现货切换日期');
|
||||
const select = ui.line(page, 0).locator('[name=returnedStockId]');
|
||||
await select.selectOption(lot.id);
|
||||
await select.selectOption('');
|
||||
await ui.step(page, ['line', 0, 'materialSource', 'pool']);
|
||||
await toggleDate();
|
||||
if (selectOrderDatePool) {
|
||||
assert.equal(version, 'old');
|
||||
await ui.line(page, 0).locator('[name="cost-materialPoolId"]').selectOption(day);
|
||||
}
|
||||
await step('撤销退回现货选择并切换日期后按料池实际开单', async () => {
|
||||
const result = await issue(),
|
||||
evidence = JSON.stringify(result);
|
||||
assert.equal(result.sale, 122500, evidence);
|
||||
if (version === 'old') {
|
||||
assert.equal(result.defaultDate, version === 'new', evidence);
|
||||
if (version === 'old' && !selectOrderDatePool) {
|
||||
// 登记的旧版缺陷仍可复现:仅因选过又取消退回现货,订单被钉在前一天料池。
|
||||
assert.equal(result.poolId, yesterday, '旧版缺陷 D2 未复现:' + evidence);
|
||||
assert.equal(result.material, 62500, evidence);
|
||||
|
||||
@@ -82,6 +82,7 @@ export async function exerciseOrderConflicts({
|
||||
assert.deepEqual(attempts[1], attempts[0]);
|
||||
assert.deepEqual(attempts[2], attempts[0]);
|
||||
assert.equal(await field(form, 'amount').inputValue(), '2.50');
|
||||
assert.equal(await field(form, 'verified').isChecked(), true, '待恢复时保留原来的核对勾选');
|
||||
assert.equal(await form.locator('button.primary').isDisabled(), true, '结果待确认时仍可再次保存');
|
||||
});
|
||||
} finally {
|
||||
|
||||
@@ -28,6 +28,12 @@ export default async function recoveryQuote(ctx) {
|
||||
await owner.locator('[data-action=recovery-mode][data-mode=exchange]').click();
|
||||
const form = owner.locator('#recovery-form');
|
||||
const field = name => form.locator('[name="' + name + '"]');
|
||||
let original;
|
||||
function captureQuote(request) {
|
||||
if (new URL(request.url()).pathname === '/api/recoveries/quote' && request.method() === 'POST')
|
||||
original = request.postDataJSON();
|
||||
}
|
||||
owner.on('request', captureQuote);
|
||||
await ctx.step('置换试算列出个人和公共料各自的用量、成本与前后余额', async () => {
|
||||
await field('customer').fill('核对两种扣料来源');
|
||||
await form.locator('[name=customer_type][value=new]').check();
|
||||
@@ -55,4 +61,65 @@ export default async function recoveryQuote(ctx) {
|
||||
'实际置换料池试算:' + shown,
|
||||
);
|
||||
});
|
||||
owner.off('request', captureQuote);
|
||||
const status = owner.locator('#recovery-quote-status');
|
||||
const note = owner.locator('#recovery-material-note');
|
||||
await ctx.step('余额读取失败时继续展示扣料来源和已核对的结算', async () => {
|
||||
const balanceUrl = ctx.base + '/api/material-pools/quote';
|
||||
const unavailable = route => route.fulfill({ status: 503, json: { error: '对照余额暂不可用' } });
|
||||
await owner.route(balanceUrl, unavailable);
|
||||
try {
|
||||
await field('new_quantity').fill('3.200');
|
||||
await note.getByText(/个人与公共余量暂未读到,请刷新核对/).waitFor();
|
||||
await status.getByText(/结算已核对/).waitFor();
|
||||
const shown = await note.innerText();
|
||||
assert.ok(shown.includes('个人回收料 0.400g · ¥320.00') && shown.includes('公共料 0.800g · ¥720.00'), shown);
|
||||
} finally {
|
||||
await owner.unroute(balanceUrl, unavailable);
|
||||
}
|
||||
});
|
||||
await ctx.step('分来源成本合计与服务端总额不符时提示重新核对', async () => {
|
||||
const quoteUrl = ctx.base + '/api/recoveries/quote';
|
||||
const inconsistent = async route => {
|
||||
const res = await route.fetch();
|
||||
try {
|
||||
const reply = await res.json();
|
||||
assert.ok(Number.isSafeInteger(reply.materialCost));
|
||||
await route.fulfill({ json: { ...reply, materialCost: reply.materialCost + 1 } });
|
||||
} finally {
|
||||
await res.dispose();
|
||||
}
|
||||
};
|
||||
await owner.route(quoteUrl, inconsistent);
|
||||
try {
|
||||
await field('new_quantity').fill('3.500');
|
||||
await status.getByText(/置换用料来源与当前归属不一致,请重新核对/).waitFor();
|
||||
} finally {
|
||||
await owner.unroute(quoteUrl, inconsistent);
|
||||
}
|
||||
});
|
||||
await session.post('owner', '/api/stock', {
|
||||
date: day,
|
||||
kind: 'increase',
|
||||
grams: '3',
|
||||
pocket: '现货',
|
||||
note: '原置换的出货库存',
|
||||
});
|
||||
const historical = await session.post('owner', '/api/recoveries', { ...original, verified: true });
|
||||
assert.deepEqual(session.problems, []);
|
||||
await section(owner, ctx, 'recoveries');
|
||||
await owner
|
||||
.locator('[data-action=recovery-open][data-id="' + historical.id + '"]')
|
||||
.first()
|
||||
.click();
|
||||
await owner.locator('#recovery-dialog[open] [data-action=recovery-edit-open]').click();
|
||||
await ctx.step('修改已有置换单时排除原单耗用并列出扣料前后结余', async () => {
|
||||
await field('change_reason').fill('复核原料池');
|
||||
await field('new_quantity').fill('3.200');
|
||||
await note.getByText(/原单耗用已排除/).waitFor();
|
||||
const shown = await note.innerText();
|
||||
assert.ok(shown.includes('个人回收料 0.400g · ¥320.00') && shown.includes('公共料 0.800g · ¥720.00'), shown);
|
||||
assert.ok(shown.includes('本次前可用:个人 0.400g,公共 8.000g'), shown);
|
||||
assert.ok(shown.includes('本次后余:个人回收料 0.000g,公共料 7.200g'), shown);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# 旧版取消退回现货后,料池日期仍被固定
|
||||
|
||||
**状态为已复现,待项目负责人决定是否修复线上旧版。** 固定参照为 `f1a4e69` 的根路径。负责人已确认新版按订单日期取料价的行为。
|
||||
|
||||
## 复现条件
|
||||
|
||||
1. 准备一批可再次销售的退回现货,以及 11 月 19 日和 20 日两份料价不同的料池。
|
||||
2. 以店主身份开 11 月 20 日的销售单,商品重量填 1.250g。选中该批退回现货,再取消选择。
|
||||
3. 将料费来源改为每日料池,业务日期先改成 11 月 19 日,再改回 20 日,提交销售单。
|
||||
|
||||
| 实际入账 | 旧版 | 新版确认行为 |
|
||||
| --- | ---: | ---: |
|
||||
| 料池日期 | 11 月 19 日 | 11 月 20 日 |
|
||||
| 销售金额 | ¥1,225.00 | ¥1,225.00 |
|
||||
| 料费 | ¥625.00 | ¥1,017.86 |
|
||||
| 利润 | ¥596.75 | ¥203.89 |
|
||||
|
||||
旧界面选中退回现货时把 `controls.dataset.defaultDate` 设为 `false`。取消选择会还原字段清单中的值,其中有料池 ID,缺少日期是否跟随订单的状态。订单日期从 19 日调回 20 日时,旧表单继续沿用 19 日料池。复现用例核对了实际销售单与料池记账。[选择与取消退回现货](../public/order-after-sales-ui.js) · [料池日期选择规则](../public/material-pools-ui.js)
|
||||
|
||||
## 为什么判定为旧版缺陷
|
||||
|
||||
同一用例先做一次只读对照:同样的商品和日期往返,但不选退回现货,只读取表单选中的料价日期,不提交。两版都回到 20 日。可见旧版自身的规则同样是料价日期跟随订单日期,只有手动选过料价日期才固定;19 日是取消退回现货后残留的固定状态,用户从未手动选择。
|
||||
|
||||
用例在两版分别断言:
|
||||
|
||||
| 检查 | 旧版 | 新版 |
|
||||
| --- | --- | --- |
|
||||
| 只读对照(未选退回现货) | 20 日 | 20 日 |
|
||||
| 选过又取消退回现货后实际开单 | 19 日料池、料费 ¥625.00、利润 ¥596.75(缺陷仍可复现) | 20 日料池、料费 ¥1,017.86、利润 ¥203.89 |
|
||||
|
||||
固定参照始终从 `f1a4e69` 检出,保留 19 日断言。若负责人另行决定修复线上旧版,修复版本应另对 20 日的预期行为验收。
|
||||
|
||||
测试还从相同初始库存启动第三个独立旧账本,显式选择 20 日料池后实际开单。它给出新版写入的逐表预期,因而成本、利润、库存分配和单据关联都有真实交易可逐字段比较。
|
||||
|
||||
## 回归入口
|
||||
|
||||
```sh
|
||||
node e2e/parity-writes.mjs --only issue-pool-date
|
||||
```
|
||||
|
||||
该命令使用临时账本,分别验证固定旧版的历史结果与新版的预期结果。本条登记用于跟踪旧界面;线上发布和历史单据处理由项目负责人另行决定。
|
||||
+15
-3
@@ -1,6 +1,6 @@
|
||||
# React 迁移前的逐笔写入对照
|
||||
|
||||
本轮对照的旧界面取自 `f1a4e69` 的根路径,候选 React 界面的业务代码取自 `00dd683`。之后的两个方案提交未更改运行时。所有请求均使用临时账本。本轮状态为**发现差异,等待项目负责人逐项决定**。各项目前保留旧版期望值和新版真实结果。
|
||||
本轮对照的旧界面取自 `f1a4e69` 的根路径,候选 React 界面的业务代码取自 `00dd683`。之后的两个方案提交未更改运行时。所有请求均使用临时账本。下列七项是修复前的实测记录。项目负责人已逐项确认处理方式。
|
||||
|
||||
## 差异清单
|
||||
|
||||
@@ -11,9 +11,21 @@
|
||||
| 3 | 店员在订单详情补记 ¥2.50 费用。服务端已落账,浏览器连续三次收不到回执。旧版锁住保存键,在原弹窗可用同一操作号恢复,仅有一笔费用。新版仍显示可保存,弹窗内缺少提示所指的恢复按钮。 | 新版操作入口和待确认状态有差异。该用例已观察到一次入账,尚无重复入账证据。 | `orders` |
|
||||
| 4 | 置换补金从两类料池合计取 1g。旧版展示个人料 0.400g/¥320、公共料 0.600g/¥540,以及双方用前用后余额。新版只展示差重 1g、料费 ¥860,提示余额已核对。 | 保存前无法复核个人与公共料分别扣了多少,两个报价合计相同。 | `recovery-quote` |
|
||||
| 5 | 在订单页恢复复数地址 `/api/team-funds/transfers` 的历史转账。旧版进入团队账目,提示实际转账已保存;新版留在订单页,提示原操作已确认。 | 请求、操作号、收付款方向及入账结果一致,两端均只记一笔。 | `funds` |
|
||||
| 6 | 用更早的单数地址 `/api/team-funds/transfer` 恢复。旧版误以转账 ID 查订单及三类申请,产生四个 404,提示订单不存在。新版留在订单页,提示原操作已确认。 | 两端均已成功入账一次。建议保留新版的正确反馈,等负责人确认。 | `funds` |
|
||||
| 6 | 用更早的单数地址 `/api/team-funds/transfer` 恢复。旧版误以转账 ID 查订单及三类申请,产生四个 404,提示订单不存在。新版留在订单页,提示原操作已确认。 | 两端均已成功入账一次。负责人已确认保留新版的正确反馈。 | `funds` |
|
||||
| 7 | 显式继续开单的四笔测试中,旧版多发送空的 `returnedStockId` 及 `cost-*` 原始表单字段,共 65 个字段差异。新版发送整理后的成本结构。这四笔的业务结果和数据库终态一致。 | 仍按原始请求逐字段报告。另有一处 `materialPoolDraft.defaultDate` 差异,其记账影响由第 2 项独立覆盖。 | `issue` |
|
||||
|
||||
## 项目负责人确认结果
|
||||
|
||||
| 编号 | 决定 | 复验依据 |
|
||||
| --- | --- | --- |
|
||||
| 1 | 修新版,成交后清除已提交草稿 | 新标签打开后第二单只有录入的 ¥1 |
|
||||
| 2 | 保留新版随订单日期取价 | 同一场景分别核对旧版 19 日、新版 20 日的料池及成本、利润和相关账表。旧版问题已[单独登记](旧版缺陷-取消退回现货后料池日期仍被固定.md),线上处理待负责人决定。 |
|
||||
| 3 | 修新版,在原弹窗恢复 | 断线后保留原输入、禁用再次保存,恢复使用同一操作号和请求体,只记一笔费用 |
|
||||
| 4 | 修新版,恢复料池来源和余额明细 | 分别核对个人料、公共料用量和成本,以及两者使用前后的余额 |
|
||||
| 5 | 修新版,恢复后返回团队账目 | 复数地址两版均提示实际转账已保存,均只入账一次 |
|
||||
| 6 | 保留新版成功提示 | 单数地址新版显示成功且不查不存在的订单。旧版仍断言四个 404 和错误提示,两端账本一致 |
|
||||
| 7 | 保留新版请求形状 | 逐项核对已确认的旧表单冗余字段、对应结构化成本值以及实际入账 |
|
||||
|
||||
## 业务清单与核销方法
|
||||
|
||||
`writes/routes.json` 固定列出 69 项 POST 声明,58 项带服务端写入标记。`write-coverage.mjs` 按服务端实际匹配顺序解析浏览器流量、枚举批准/驳回和员工管理等操作,并检查订单分发器及改单请求的动作。`writes/orders-coverage.mjs` 对无法由界面直接提交的订单动作给出依据。浏览器才算命中,建账夹具单独执行。人数登记、服务端草稿、旧购料结算及两个历史团队转账地址还通过浏览器的待确认操作入口验证。团队模式下旧式「完整对外支出」的恢复请求应返回 409,账本保持一致。
|
||||
@@ -53,4 +65,4 @@ node e2e/parity-writes.mjs --only settings --prove
|
||||
|
||||
逐笔运行记录写入 `e2e/out/write-parity/`。全套产出 `all.json`,含双方提交号、逐组步骤、场景失败信息、字段级差异、逐路由和动作的角色、响应及命中记录。未决差异会让全套命令返回非零。金额负控只把新版临时账本的新增成本从 3.21 改为 3.22,必须在「新增成本配置」步骤的业务表检出相应数值,正常运行仍须通过该组。
|
||||
|
||||
已独立复核原有黄金对照(559 条记录,76 张表)、旧库兼容、57 个旧版浏览器快照、12 个开单对照、64 组跨页交互、React 浏览器检查、1,407 个项目测试、34 个前端测试、前端类型检查、ESLint 以及构建产物一致性。以上通过项与本页记录的新失败同时成立。负责人对每项差异的决定、修复提交及复验结果待补。
|
||||
已独立复核原有黄金对照(559 条记录,76 张表)、旧库兼容、57 个旧版浏览器快照、12 个开单对照、64 组跨页交互、React 浏览器检查、1,407 个项目测试、34 个前端测试、前端类型检查、ESLint 以及构建产物一致性。以上通过项与本页记录的新失败同时成立。修复前的失败保留在测试提交 `340100c` 及其验收记录中。
|
||||
Reference in new issue
Block a user