|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const datePickerKey = ref(1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { form, isLoading, claimDetail, disabledReportedDate, queryClaimDetailByOrderId, resetForm } = | 
|---|
|  |  |  | useInsuranceClaimDetail({ | 
|---|
|  |  |  | insuranceOrderId, | 
|---|
|  |  |  | fromRoute, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | form, | 
|---|
|  |  |  | isLoading, | 
|---|
|  |  |  | claimDetail, | 
|---|
|  |  |  | disabledReportedDate, | 
|---|
|  |  |  | queryClaimDetailByOrderId, | 
|---|
|  |  |  | resetForm, | 
|---|
|  |  |  | resetFormWithNotOrder, | 
|---|
|  |  |  | } = useInsuranceClaimDetail({ | 
|---|
|  |  |  | insuranceOrderId, | 
|---|
|  |  |  | fromRoute, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // const { existedInsuranceOrderList } = useInsuranceOrderListByOrderRelevance({ | 
|---|
|  |  |  | //   params: computed(() => ({ | 
|---|
|  |  |  | 
|---|
|  |  |  | idIdNumber: form.idNumber, | 
|---|
|  |  |  | reportedTime: form.reportedTime, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let existedInsuranceOrderList = await queryClient.ensureQueryData({ | 
|---|
|  |  |  | queryKey: ['insuranceOrderServices/getInsuranceOrderListByOrderRelevance', params], | 
|---|
|  |  |  | queryFn: async () => { | 
|---|
|  |  |  | return await insuranceOrderServices.getInsuranceOrderListByOrderRelevance(params, { | 
|---|
|  |  |  | showLoading: false, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | let existedInsuranceOrderList = | 
|---|
|  |  |  | await insuranceOrderServices.getInsuranceOrderListByOrderRelevance(params, { | 
|---|
|  |  |  | showLoading: false, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | if (existedInsuranceOrderList.length == 1) { | 
|---|
|  |  |  | form.insuranceOrderId = existedInsuranceOrderList[0].id; | 
|---|
|  |  |  | } else if (existedInsuranceOrderList.length > 1) { | 
|---|
|  |  |  | 
|---|
|  |  |  | insuranceOrderList: existedInsuranceOrderList, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | resetFormWithNotOrder(); | 
|---|
|  |  |  | Message.errorMessage('未找到匹配的保单信息'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|