Browse Source

质检明细预览功能

hella_online_20240829
wangyufei 4 months ago
parent
commit
f7d08c5ea0
  1. 10
      src/components/PreviewPDF/index.vue
  2. 8
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

10
src/components/PreviewPDF/index.vue

@ -1,9 +1,11 @@
<template>
<el-dialog class="preview" v-model="showDialog" style="" @close="closeView">
<el-dialog ref="dialog" :style="{height:dialogHeight+'px'}" class="preview" :append-to-body="false" fullscreen v-model="showDialog" @close="closeView">
<iframe v-if="isPDF" ref="pdfRef" width="100%" :height="frameHeight" :src="pdfUrl" frameborder="0"></iframe>
<el-carousel justify="center" v-else indicator-position="outside">
<el-carousel :height="(dialogHeight-130)+'px'" justify="center" v-else indicator-position="outside">
<el-carousel-item class="carousel-item" v-for="url in imageArray" :key="url">
<el-image style="height:100%" fit="contain" :src="url" loading="lazy" />
<div style="height:100%;overflow: auto;display: flex;justify-content: center;align-items: center;">
<el-image fit="contain" :src="url" />
</div>
</el-carousel-item>
</el-carousel>
</el-dialog>
@ -20,6 +22,8 @@ const imageArray = ref<string[]>([]) // 图片数组
const closeView = () => {
showDialog.value = false
}
const dialogHeight = ref(window.innerHeight)
//
const openPreview = async (data:string[]|string)=>{
showDialog.value = true

8
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -92,11 +92,11 @@
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
@ -189,10 +189,12 @@ const buttonTableClick = async (val, row) => {
}
}
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
// qualityReport.value = "http://localhost/purchasereceiptReport?asnNumber=ASNS20240720-0002"
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}

Loading…
Cancel
Save