优化合同详情查看

master
Harry Yang 2023-01-03 00:14:01 +08:00
parent dd0c111ebf
commit 12160d8fbc
1 changed files with 19 additions and 4 deletions

View File

@ -126,9 +126,9 @@
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
<el-table-column prop="attachment" label="附件" align="center" width="150">
<template slot-scope="scope">
<el-tag size="small" v-if="scope.row.attachment">
<a :href="scope.row.attachment.uri">
<i class="el-icon-document"></i> {{scope.row.attachment.name}}
<el-tag size="small" v-for="attachment in scope.row.attachment">
<a :href="attachment.uri" target="_blank">
<i class="el-icon-document"></i> {{attachment.name}}
</a>
</el-tag>
</template>
@ -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