wupengfei
2025-04-02 c55ae1d4b32d84de6ea071ff64a6180d408ba591
src/views/Home/InsuranceOrderDetail.vue
@@ -1,15 +1,20 @@
<template>
  <LoadingLayout>
    <AppScrollContainer>
    <AppContainer>
      <ProTabs v-model="state.tabType" hasBorder>
        <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>
    </AppScrollContainer>
    </AppContainer>
  </LoadingLayout>
</template>
@@ -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>