diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 0ed34afe9..d45d3054e 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -589,10 +589,25 @@ const getAnnexFileList = async (row) => { const annexData = annexTableData.value.find(annex=>annex.label === item.label) let subDetailTableData = null if(annexData){ + // HL-5940 maxLength 是限制的列表最大数量 + let hiddenUpload = false + if(item.maxLength&&annexList.length>=item.maxLength){ + hiddenUpload = true + let findAnnex = annexTableData.value.find(item1=>item1.label==item.label) + if(findAnnex){ + findAnnex.hiddenUpload = hiddenUpload || item.hiddenUpload || false // 是否展示上传按钮 + } + } annexData.annexList = annexList subDetailTableData = annexData.subDetailTableData }else{ subDetailTableData = item?.subDetailTableData + // HL-5940 maxLength 是限制的列表最大数量 + let hiddenUpload = false + if(item.maxLength&&annexList.length>=item.maxLength){ + hiddenUpload = true + } + annexTableData.value.push({ align:item.align, label: item.label, @@ -606,7 +621,7 @@ const getAnnexFileList = async (row) => { showPreview:item.showPreview||false, // 是否展示预览按钮 showDownload:item.showDownload||false, // 是否展示下载按钮 hiddenDelete:item.hiddenDelete || false, // 是否展示删除按钮 - hiddenUpload:item.hiddenUpload || false, // 是否展示上传按钮 + hiddenUpload:hiddenUpload || item.hiddenUpload || false, // 是否展示上传按钮 }) } if(subDetailTableData){ diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index da494d026..944cf8d97 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -933,6 +933,7 @@ const detailAnnexTable = ref([ showPreview: true, showDownload:true, fileSize: 20, + maxLength:1, fileType:['pdf'] }, {