<!-- 易耗物资供方评价表详情 -->
<script name="ConsumableEvaluateDetailApproved" lang="ts" setup>
import { ElMessage } from 'element-plus'
// 从路由中传过来的参数
const type = ref<string>('')
const id = ref<string>('')
const route = useRoute()
const router = useRouter()
const title = ref('')
// 逻辑
// 关闭
const resetForm = () => {
router.go(-1)
}
// 打印
const printClickedHandler = () => {
ElMessage.success('打印成功')
}
// 打印Word
const printToWord = () => {
// exportFile({ id: noticeInfo.value.id, pdf: false })
}
// 打印PDF
const printToPDF = () => {
}
const initDialog = (params: any) => {
// 从路由中获取参数
type.value = params.type !== undefined ? params.type : ''
id.value = params.id !== undefined ? params.id : ''
switch (type.value) {
case 'evaluate':
title.value = '易耗物资供方评价表'
break
case 'apply' :
title.value = '易耗物资申请单'
break
case 'use':
title.value = '易耗物资使用记录'
break
case 'check':
title.value = '物资验收记录'
break
case 'store':
title.value = '物资入库单'
break
}
}
onMounted(() => {
initDialog(route.query)
})
</script>
<template>
<app-container>
<detail-page :title="title">
<template #btns>
<el-button type="primary" @click="printToWord">
导出Word
</el-button>
<el-button type="primary" @click="printToPDF">
导出PDF
</el-button>
<el-button type="primary" @click="printClickedHandler">
打印
</el-button>
<el-button type="info" @click="resetForm()">
关闭
</el-button>
</template>
</detail-page>
</app-container>
</template>