|
|
@@ -214,16 +214,11 @@ const loader = useSimpleDataLoader(async () => {
|
|
|
partyBSignDate.value = { year: '', month: '', day: '' };
|
|
|
return currentAgreement.value;
|
|
|
}
|
|
|
- const list = await AssessmentContentApi.getAgreementList({
|
|
|
- userId: authStore.userInfo?.id,
|
|
|
- year: new Date().getFullYear(),
|
|
|
- });
|
|
|
- const currentYear = new Date().getFullYear();
|
|
|
- if (list.data.length > 0) {
|
|
|
- const currentYearItem = list.data.find((item) => item.year === currentYear);
|
|
|
+ const basicInfo = await AssessmentContentApi.getInheritorBasic(authStore.userInfo?.id);
|
|
|
+ if (basicInfo.agreementId > 0) {
|
|
|
const detail = await AssessmentContentApi.getAgreementDetail(
|
|
|
- currentYearItem?.id || list.data[0].id,
|
|
|
- currentYearItem?.userId || authStore.userInfo?.id
|
|
|
+ basicInfo.agreementId,
|
|
|
+ authStore.userInfo?.id
|
|
|
);
|
|
|
currentAgreement.value = detail;
|
|
|
partyAStampDate.value = { year: '', month: '', day: '' };
|