带出甲乙方数据,下载权限控制

This commit is contained in:
2026-07-13 13:47:19 +08:00
parent a6e4e74ad1
commit c36003db2f
7 changed files with 472 additions and 1340 deletions
@@ -1090,21 +1090,24 @@ function splitFilesByCategory(source = {}) {
return {
contractBodyFileName:
getFileNameFromDetail(source, "body") || bodyFile.fileName || "",
source.contractBodyFileName ||
bodyFile.fileName ||
getFileNameFromDetail(source, "body") ||
"",
contractBodyFilePath:
source.contractBodyFilePath ||
source.contractTextFilePath ||
bodyFile.filePath ||
source.contractTextFilePath ||
"",
contractBodyFileType:
source.contractBodyFileType ||
source.contractTextFileType ||
bodyFile.fileType ||
source.contractTextFileType ||
"",
contractBodyFileSize:
source.contractBodyFileSize ??
source.contractTextFileSize ??
bodyFile.fileSize ??
source.contractTextFileSize ??
null,
otherAttachmentList: source.otherAttachmentList?.length
? source.otherAttachmentList.map(normalizeFileItem)
@@ -1181,6 +1184,9 @@ function createEmptyParty(roleCode, index = 0) {
oppositeId: "",
companyName: "",
companyType: "",
companyNature: "",
orgNature: "",
orgNatureLevel: "",
oppositeCharacter: "",
oppCharacter: "",
contactName: "",
@@ -1190,6 +1196,8 @@ function createEmptyParty(roleCode, index = 0) {
registeredAddress: "",
legalRepresentative: "",
creditCode: "",
registeredCapitalText: "",
countryName: "",
naturalPersonIdType: "",
naturalPersonIdNumber: "",
isGroupInternal: false,
@@ -1731,6 +1739,9 @@ function mapPartnerToParty(raw = {}, roleKey, companyName) {
oppositeId: raw.oppositeId || "",
companyName: raw.customerNameC || companyName || "",
companyType: getRelativeTypeLabel(raw.relativeType),
companyNature: raw.oppositeCharacter || "",
orgNature: raw.natureOfEnterpriseOrg || "",
orgNatureLevel: raw.natureOfEnterpriseOrgLev || "",
oppositeCharacter: raw.oppositeCharacter || "",
oppCharacter: raw.oppositeCharacter || "",
creditCode: raw.customerTaxno || "",
@@ -1740,6 +1751,8 @@ function mapPartnerToParty(raw = {}, roleKey, companyName) {
contactPhone: firstContact.contactPhone || raw.officephone || "",
contactEmail: firstContact.email || raw.emailAddress || "",
contactAddress: firstContact.postalAddress || raw.customerAddress || "",
registeredCapitalText: raw.regCapital || raw.registeredCapital || "",
countryName: raw.countryName || raw.country || "",
naturalPersonIdType: raw.certificateType || "",
naturalPersonIdNumber: raw.certificateNum || "",
isGroupInternal: raw.groupFlag === "Y" || raw.isJtn === "1",
@@ -1754,12 +1767,19 @@ function mapOrgNodeToParty(raw = {}) {
...createEmptyParty(PARTY_ROLE_OUR),
subjectCode: raw.orgId == null ? "" : String(raw.orgId),
companyName: raw.orgName || "",
companyNature: raw.companyNature || "1",
orgNature: raw.orgNature || "QY",
orgNatureLevel: raw.orgNatureLevel || "",
contactPhone: raw.contactPhone || "",
contactEmail: raw.contactEmail || "",
contactAddress: raw.contactAddress || "",
registeredAddress: raw.registeredAddress || "",
legalRepresentative: raw.legalRepresentative || "",
creditCode: raw.creditCode || "",
registeredCapitalText: raw.regCapital || raw.registeredCapital || "",
countryName: raw.countryName || raw.country || "",
isGroupInternal: true,
isHongKongMacaoTaiwan: false,
roleCode: PARTY_ROLE_OUR,
roleName: "我方",
};