diff --git a/src/views/business/components/contract-attachment-section.vue b/src/views/business/components/contract-attachment-section.vue index 2c5b424..d595931 100644 --- a/src/views/business/components/contract-attachment-section.vue +++ b/src/views/business/components/contract-attachment-section.vue @@ -203,11 +203,11 @@ export const resolveAttachmentTypeDictCode = (location, fallback = CONTRACT_ATTA export const defaultContractAttachmentTypeOptions = [ { label: '用印材料', value: '用印材料' }, { label: '双章归档文件', value: '双章归档文件' }, - // 高风险/黑名单客商合同必传,后端按 fileType=特批说明 校验与转传特批(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐) - { label: '特批说明', value: '特批说明' }, { label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER }, ]; +// 特批附件归口附件(佐证材料等)区上传:高风险/黑名单客商合同必传,后端按 fileType=特批附件 校验并挂特批面板(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐) export const defaultContractSupportingAttachmentTypeOptions = [ + { label: '特批附件', value: '特批附件' }, { label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER }, ]; /** @deprecated 兼容旧引用,实际选项由业务字典动态加载 */ @@ -301,6 +301,8 @@ export const resolveContractAttachmentType = ( item => String(item.label) === aliasedFileType || String(item.label) === rawFileType ); if (matchedByLabel) return matchedByLabel.value; + // 行已带类型但字典未命中(如历史保存值、字典缺失)时保留原值,避免重开页面时被降级为其他文件 + if (rawFileType) return aliasedFileType; const fileName = normalizeAttachmentTypeText(attachmentName(row)); if (!fileName) return otherType; const matched = list @@ -643,7 +645,7 @@ export default { this.contractAttachmentTypeOptions ); } else { - this.uploadDialogType = this.defaultAttachmentType; + this.uploadDialogType = this.uploadDialogType || this.defaultAttachmentType; } this.$message.success('上传成功'); },