fix: 修复真实验收中的企业范围与草稿复制问题

显式企业身份核验只访问指定企业,避免回退到全量查询。
复制只清空源单存在的发票与附件字段,避免通用模板拒绝未知属性。
补充隔离回归与指定测试企业验收记录,测试数据已清理。

验证:929 项测试通过,类型检查及版本一致性检查通过。
This commit is contained in:
gitea committed 2026-10-29 22:04:36 +08:00
1 parent 6249feee23
commit 613fe3476c
8 files changed
+108 -14

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ test("DataLink 公共 SDK 的 README 示例与实际导出一同编译", () => {
const options: ts.CompilerOptions = { noEmit: true, strict: true, skipLibCheck: true, module: ts.ModuleKind.ESNext, moduleResolution: ts.ModuleResolutionKind.Bundler, target: ts.ScriptTarget.ESNext, types: ["bun"] };
const host = ts.createCompilerHost(options);
const original = host.getSourceFile;
host.getSourceFile = (name, ...args) => name === file ? ts.createSourceFile(file, source, ts.ScriptTarget.ESNext, true) : original(name, ...args);
host.getSourceFile = (name, ...args) => resolve(name) === file ? ts.createSourceFile(file, source, ts.ScriptTarget.ESNext, true) : original(name, ...args);
const diagnostics = ts.getPreEmitDiagnostics(ts.createProgram([file], options, host));
expect(diagnostics.map(d => ts.flattenDiagnosticMessageText(d.messageText, "\n"))).toEqual([]);
}, 15000);