|
@@ -44,9 +44,16 @@
|
|
|
<e-desc-item label="项目类别">{{ dataForm.typeName }}</e-desc-item>
|
|
|
<e-desc-item label="备注" span="3">{{ dataForm.remark }}</e-desc-item>
|
|
|
|
|
|
- <e-desc-item label="关联BOM物料清单">{{
|
|
|
+ <e-desc-item label="关联BOM物料清单" span="3">{{
|
|
|
dataForm.productName
|
|
|
}}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item v-if="dataForm.attachList" label="附件" span="3">
|
|
|
+ <div v-for="(item, index) in dataForm.attachList" style="display: inline">
|
|
|
+ <span v-if="index > 0">,</span>
|
|
|
+ <a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
+ </div>
|
|
|
+ </e-desc-item>
|
|
|
</e-desc>
|
|
|
<div class="desc">
|
|
|
<h1 class="desc-title">BOM物料明细报价</h1>
|
|
@@ -311,6 +318,8 @@
|
|
|
</span>
|
|
|
|
|
|
<attach-detail-dialog ref="attachDetail" @onChose="onChose" />
|
|
|
+ <!-- 文件预览 -->
|
|
|
+ <preview-component v-if="previewVisible" ref="preview"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -329,13 +338,15 @@ import {
|
|
|
taskTypeOption,
|
|
|
rankTypeOption
|
|
|
} from '@/utils/enums'
|
|
|
+import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
export default {
|
|
|
name: 'cus-quoted-detail',
|
|
|
- components: { EDesc, EDescItem, UploadComponent, AttachDetailDialog, ApproveComponent },
|
|
|
+ components: { PreviewComponent, EDesc, EDescItem, UploadComponent, AttachDetailDialog, ApproveComponent },
|
|
|
props: {},
|
|
|
data () {
|
|
|
return {
|
|
|
isFlow: false,
|
|
|
+ previewVisible: false,
|
|
|
id: 0,
|
|
|
productTypeOption: productTypeOption,
|
|
|
taskTypeOption: taskTypeOption,
|
|
@@ -501,6 +512,13 @@ export default {
|
|
|
approveFinished () {
|
|
|
this.onChose()
|
|
|
this.$emit('approveFinished')
|
|
|
+ },
|
|
|
+ // 预览
|
|
|
+ previewFile (fileName, url) {
|
|
|
+ this.previewVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.preview.init(fileName, url)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|