修复合同到期时间与终止恢复规则
- 合同动作中文化并将到期时间设为必填\n- 隐藏修订记录无业务意义的删除时间\n- 禁止已终止合同直接启用,统一三端状态规则\n- 补充回归测试、模拟数据回填和中文文档
This commit is contained in:
@@ -17,6 +17,7 @@ const ruleSource = readFileSync(resolve(root, 'src/api/resource-page-rules.ts'),
|
||||
const listSource = readFileSync(resolve(root, 'src/views/shared/CrudListPage.vue'), 'utf8');
|
||||
const detailSource = readFileSync(resolve(root, 'src/views/resource/ResourceDetailContent.vue'), 'utf8');
|
||||
const displaySource = readFileSync(resolve(root, 'src/api/resource-display.ts'), 'utf8');
|
||||
const resourceSource = readFileSync(resolve(root, 'src/api/resources.ts'), 'utf8');
|
||||
const treeResources = new Set(['ec_category', 'platform_menu']);
|
||||
const listResources = contract.resources.filter((item) => !treeResources.has(item.name));
|
||||
const createModes = new Set(['writable', 'editable', 'append_only', 'managed']);
|
||||
@@ -59,9 +60,18 @@ for (const marker of [
|
||||
"product_info_identity: '气瓶唯一标识'",
|
||||
"product_code: '气瓶编码'",
|
||||
"if (key === 'contract_status') return contractStatusLabel(Number(value))",
|
||||
"terminate: '终止合同'",
|
||||
"key === 'expired_at'",
|
||||
"return '待补录'",
|
||||
]) {
|
||||
if (!displaySource.includes(marker)) fail(`合同详情中文展示缺少 ${marker}`);
|
||||
}
|
||||
if (!resourceSource.includes("visibleFor: { field: 'contract_status', values: [0] }")) {
|
||||
fail('合同启用动作未限制为草稿状态');
|
||||
}
|
||||
if (!detailSource.includes("!['deleted_at', 'DeletedAt'].includes(column)")) {
|
||||
fail('聚合详情表未隐藏公共软删除字段');
|
||||
}
|
||||
for (const marker of [
|
||||
"Number(row.contract_status) !== 0",
|
||||
"![0, 1].includes(Number(row.status))",
|
||||
|
||||
Reference in New Issue
Block a user