wupengfei
2025-03-31 b697737f281023871227b26b6c9d6c309cd3e899
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template>
  <LoadingLayout>
    <AppScrollContainer>
      <ProTabs v-model="state.tabType" hasBorder>
        <ProTabPane lazy label="保单信息" :name="InsureOrderTabType.InsureOrderInfo">
          <InsureOrderInfoView />
        </ProTabPane>
        <ProTabPane
          v-if="detail?.status !== InsurancePolicyStatusEnum.WaitEffect"
          lazy
          label="批改记录"
          :name="InsureOrderTabType.BatchOrder"
        >
          <BatchChangeRecordView />
        </ProTabPane>
      </ProTabs>
    </AppScrollContainer>
  </LoadingLayout>
</template>
 
<script setup lang="ts">
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',
});
 
enum InsureOrderTabType {
  InsureOrderInfo = 1,
  BatchOrder = 2,
}
 
const state = reactive({
  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>
@use '@/style/common.scss' as *;
</style>