|
|
@@ -84,6 +84,7 @@ import type { Rules } from 'async-validator';
|
|
|
import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
|
|
|
import CommonRoot from '@/components/dialog/CommonRoot.vue';
|
|
|
import { useImageSimpleUploadCo } from '@/common/components/upload/ImageUploadCo';
|
|
|
+import { injectAppConfiguration } from '@/api/system/useAppConfiguration';
|
|
|
|
|
|
const { querys } = useLoadQuerys({
|
|
|
id: 0,
|
|
|
@@ -93,6 +94,7 @@ const { querys } = useLoadQuerys({
|
|
|
});
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
|
+const appConfig = injectAppConfiguration();
|
|
|
const currentAgreement = ref<AgreementDetail | null>(null);
|
|
|
/** 甲方盖章日期(页面填写,保存时可拼为字符串提交) */
|
|
|
const partyAStampDate = ref<AgreementYmdParts>({ year: '', month: '', day: '' });
|
|
|
@@ -224,14 +226,22 @@ const loader = useSimpleDataLoader(async () => {
|
|
|
|
|
|
const submitLoading = ref(false);
|
|
|
|
|
|
-function createAgreement() {
|
|
|
+async function createAgreement() {
|
|
|
const now = new Date();
|
|
|
const u = authStore.userInfo;
|
|
|
const nick = u?.nickname || u?.diyname;
|
|
|
+ const uid = authStore.userInfo?.id ?? authStore.userId;
|
|
|
+ const basicInfo = await AssessmentContentApi.getInheritorBasic(uid);
|
|
|
const detail = new AgreementDetail();
|
|
|
detail.userId = authStore.userInfo!.id;
|
|
|
- detail.year = 2027;
|
|
|
- detail.partyA = '福建省文化和旅游厅';
|
|
|
+ detail.year = appConfig.value?.collectSignYear || now.getFullYear() + 1;;
|
|
|
+ if (basicInfo.level === 24) {
|
|
|
+ detail.partyA = '厦门市文化和旅游局';
|
|
|
+ } else if (basicInfo.level === 25) {
|
|
|
+ detail.partyA = '厦门市文化和旅游局';
|
|
|
+ } else {
|
|
|
+ detail.partyA = '福建省文化和旅游厅';
|
|
|
+ }
|
|
|
detail.partyB = nick ?? '';
|
|
|
console.log(authStore.userInfo, u, nick);
|
|
|
partyAStampDate.value = { year: now.getFullYear().toString(), month: (now.getMonth() + 1).toString(), day: now.getDate().toString() };
|