优化合同详情查看
parent
dd0c111ebf
commit
12160d8fbc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue