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