From ff6b2db013b8afc86d26ba24fdf5e6115c2127ab Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 02 四月 2025 16:11:51 +0800 Subject: [PATCH] fix: bug --- src/views/Home/InsuranceOrderDetail.vue | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/views/Home/InsuranceOrderDetail.vue b/src/views/Home/InsuranceOrderDetail.vue index e2c745b..e737942 100644 --- a/src/views/Home/InsuranceOrderDetail.vue +++ b/src/views/Home/InsuranceOrderDetail.vue @@ -5,7 +5,12 @@ <ProTabPane lazy label="淇濆崟淇℃伅" :name="InsureOrderTabType.InsureOrderInfo"> <InsureOrderInfoView /> </ProTabPane> - <ProTabPane lazy label="鎵规敼璁板綍" :name="InsureOrderTabType.BatchOrder"> + <ProTabPane + v-if="detail?.status !== InsurancePolicyStatusEnum.WaitEffect" + lazy + label="鎵规敼璁板綍" + :name="InsureOrderTabType.BatchOrder" + > <BatchChangeRecordView /> </ProTabPane> </ProTabs> @@ -17,6 +22,9 @@ import { AppScrollContainer, ProTabs, ProTabPane } from '@bole-core/components'; import InsureOrderInfoView from './components/InsureOrderInfoView.vue'; import BatchChangeRecordView from './components/BatchChangeRecordView.vue'; +import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; +import { useQuery } from '@tanstack/vue-query'; +import { InsurancePolicyStatusEnum } from '@/constants'; defineOptions({ name: 'InsuranceOrderDetail', @@ -28,9 +36,20 @@ } const state = reactive({ - activeIndex: 1, tabType: InsureOrderTabType.InsureOrderInfo, }); + +const route = useRoute(); +const id = route.params.id as string; + +const { data: detail, isLoading } = useQuery({ + queryKey: ['insuranceOrderServices/getInsurancePolicyHeadDto', id], + queryFn: async () => { + return await insuranceOrderServices.getInsurancePolicyHeadDto({ id: id }); + }, + placeholderData: () => ({} as API.GetInsurancePageOutput), + enabled: !!id, +}); </script> <style lang="scss" scoped> -- Gitblit v1.9.1