|
@@ -99,7 +99,7 @@
|
|
|
<template #footer>
|
|
|
<div class="hc-task-dialog-footer">
|
|
|
<el-button :disabled="tabsKey !== 1" @click="rejectionClick">驳回审批</el-button>
|
|
|
- <el-button type="warning" @click="rowViewPdf">查看报表</el-button>
|
|
|
+ <el-button v-if="rowInfo.meterType > 0 && rowInfo.meterType <= 3" type="warning" @click="rowViewPdf">查看报表</el-button>
|
|
|
<el-button type="primary" :loading="confirmLoading" :disabled="tabsKey !== 1" @click="confirmClick">同意审批</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -110,18 +110,18 @@
|
|
|
<HcRepealForm v-model="isRepealShow" :info="rowInfo" @finish="taskRepealFinish" />
|
|
|
<!-- 短信认证 -->
|
|
|
<HcSmsAuth :loading="SMSAuthLoading" :show="SMSAuthShow" @cancel="SMSAuthCancel" @confirm="SMSAuthConfirm" />
|
|
|
- <!-- 查看报表 -->
|
|
|
- <hc-view-report v-model="isReportDrawer" :datas="pdfList" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
+import { toPdfPage } from '~uti/btn-auth'
|
|
|
import HcTaskForm from './task-form.vue'
|
|
|
import HcTaskNotes from './task-notes.vue'
|
|
|
import HcRepealForm from './repeal-form.vue'
|
|
|
import { arrUnion, getArrValue, getObjValue, getRandom, isNullES } from 'js-fast-way'
|
|
|
import mainApi from '~api/tasks/hc-data'
|
|
|
+import certificateApi from '~api/debit-pay/admin/certificate'
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -411,10 +411,22 @@ const taskTabsClick = (key) => {
|
|
|
}
|
|
|
|
|
|
//查看报表
|
|
|
-const isReportDrawer = ref(false)
|
|
|
-const pdfList = ref([])
|
|
|
-const rowViewPdf = () => {
|
|
|
- window.$message.warning('暂无相关接口')
|
|
|
+const rowViewPdf = async () => {
|
|
|
+ const { type, reportId } = detailInfo.value
|
|
|
+ if (isNullES(reportId)) {
|
|
|
+ window.$message.warning('参数异常')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const { code, msg, data } = await certificateApi.recalculate({
|
|
|
+ reportId: reportId,
|
|
|
+ type: type,
|
|
|
+ })
|
|
|
+ if (code === 200 && !isNullES(data)) {
|
|
|
+ window.$message.success('操作成功')
|
|
|
+ toPdfPage(data)
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg ?? '操作失败')
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|