From 12160d8fbc44c5c044b4ca9d617de26afb2bc947 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Tue, 3 Jan 2023 00:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E5=90=8C=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/business/process-detail.ftl | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/admin/business/process-detail.ftl b/src/main/resources/templates/admin/business/process-detail.ftl index e83459b..e589921 100644 --- a/src/main/resources/templates/admin/business/process-detail.ftl +++ b/src/main/resources/templates/admin/business/process-detail.ftl @@ -126,9 +126,9 @@ @@ -252,6 +252,19 @@ ...detail, type: computeType(detail.type) })) + const mapAttachment = attachment => { + if (hasText(attachment)) { + try { + return JSON.parse(attachment) + } catch (e) { + return [] + } + } + else { + return [] + } + } + this.process = process this.project = project this.isPrepaid = isPrepaid @@ -260,7 +273,9 @@ this.processId = processId this.projectType = projectType this.cooperationType = cooperationType - this.supplierMaterials = supplierMaterials + this.supplierMaterials = supplierMaterials.map(item => ({ + ...item, attachment: mapAttachment(item.attachment) + })) this.procurementDetails = procurementDetails this.attachments = attachments