From 19a8db459571b14bb828ef6016b09dd4a1f5cbd6 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 11 Sep 2024 18:25:51 +0800 Subject: [PATCH] =?UTF-8?q?HL-5940SCP=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7=EF=BC=8C=E5=8F=91=E7=A5=A8=E9=99=84?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=BC=A0=E5=8F=AA=E8=83=BD=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 17 ++++++++++++++++- .../supplierinvoiceRequestMain/index.vue | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) 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'] }, {