| | |
| | | <LoadingLayout> |
| | | <AppContainer> |
| | | <PageFormLayout title="申报详情"> |
| | | <DetailView :form="state.detail"> |
| | | <template #table> |
| | | <DeclareEnterpriseTableView ref="tableRef"></DeclareEnterpriseTableView> |
| | | </template> |
| | | <DetailView :form="form"> |
| | | <DeclareEnterpriseTableView ref="tableRef"></DeclareEnterpriseTableView> |
| | | </DetailView> |
| | | <template #footer> |
| | | <el-button @click="handleBack">关闭</el-button> |
| | |
| | | import DetailView from '@/components/commonView/DetailView.vue'; |
| | | import DeclareEnterpriseTableView from '@/components/commonView/DeclareEnterpriseTableView.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as informationServices from '@/services/api/Information'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import { convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { useRouteView } from '@/hooks'; |
| | | |
| | |
| | | const route = useRoute(); |
| | | const { closeViewPush } = useRouteView(); |
| | | const id = route.params?.id as string; |
| | | const state = reactive({ |
| | | detail: { |
| | | categoryName: '', |
| | | amount: 0, |
| | | url: [] as UploadUserFile[], |
| | | }, |
| | | const form = reactive({ |
| | | searchKeyWord: '', |
| | | batchNo: '', |
| | | parkName: '', |
| | | parkTypeName: '', |
| | | applyMonth: '', |
| | | applySumAmount: 0, |
| | | enterpriseTaxSubFileUrl: [] as UploadUserFile[], |
| | | enterpriseOperateFileUrl: [] as UploadUserFile[], |
| | | bountyAssignFileUlr: [] as UploadUserFile[], |
| | | bountyCollectFileUrl: [] as UploadUserFile[], |
| | | }); |
| | | |
| | | const tableRef = ref<InstanceType<typeof DeclareEnterpriseTableView>>(); |
| | | |
| | | const { data: detail, isLoading } = useQuery({ |
| | | queryKey: ['informationServices/getInformationShowDetail', id], |
| | | queryKey: ['parkBountyApplyServices/getParkBountyApplyDetail', id], |
| | | queryFn: async () => { |
| | | return await informationServices.getInformationShowDetail( |
| | | { id: id }, |
| | | return await parkBountyApplyServices.getParkBountyApplyDetail( |
| | | { parkBountyApplyId: id, searchKeyWord: form.searchKeyWord }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.InformationShowDetailDto), |
| | | placeholderData: () => ({} as API.GetParkBountyApplyInfoOutput), |
| | | onSuccess(data) { |
| | | state.detail.categoryName = data.categoryName; |
| | | state.detail.amount = data.attentionCount; |
| | | state.detail.url = convertApi2FormUrlOnlyOne(data.avatarUrl); |
| | | form.batchNo = data.parkBountyApplyBaseInfo.batchNo; |
| | | form.parkName = data.parkBountyApplyBaseInfo.parkName; |
| | | form.parkTypeName = data.parkBountyApplyBaseInfo.parkTypeName; |
| | | form.applyMonth = data.parkBountyApplyBaseInfo.applyMonth; |
| | | form.applySumAmount = data.parkBountyApplyBaseInfo.applySumAmount; |
| | | form.enterpriseTaxSubFileUrl = convertApi2FormUrlOnlyOne( |
| | | data.parkBountyApplyBaseInfo?.enterpriseTaxSubFileUrl |
| | | ); |
| | | form.enterpriseOperateFileUrl = convertApi2FormUrlOnlyOne( |
| | | data.parkBountyApplyBaseInfo?.enterpriseOperateFileUrl |
| | | ); |
| | | form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne( |
| | | data.parkBountyApplyBaseInfo?.bountyAssignFileUlr |
| | | ); |
| | | form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne( |
| | | data.parkBountyApplyBaseInfo?.bountyCollectFileUrl |
| | | ); |
| | | |
| | | tableRef.value?.getList(); |
| | | }, |