修复:项目组分类仅补齐未分类并在完成后刷新列表

This commit is contained in:
2026-10-31 20:04:24 +08:00
parent cbe7fc17bb
commit 572873c6b8
21 changed files with 257 additions and 64 deletions
@@ -51,3 +51,9 @@ test('legacy twelve-column workbooks preserve the existing unclassified-only res
const tables=configurationTables(base,'matchRules');tables[0].headers.pop();tables[0].rows.forEach(row=>row.pop());
for(const mode of ['MERGE','REPLACE'])assert.equal(importConfigurationTables(base,tables,'matchRules',mode).definition.matchRules[0].onlyUnclassified,true);
});
test('project unclassified-only rules retain their scope and customer codes through Excel',async()=>{
const projectRule={...rule,target:'projectGroup',conditions:[{field:'客户代码',operator:'EQUALS',value:'00001'},{field:'@group',operator:'EQUALS',value:'G'}]};const source={matchRules:[projectRule]};
const workbook=await createConfigurationWorkbook(source,'matchRules');const tables=await readConfigurationWorkbook(await workbook.xlsx.writeBuffer());
assert.deepEqual(importConfigurationTables(source,tables,'matchRules','REPLACE').definition,source);
});