From 94f1712f53dd43914d970549b8b246fccd2a7fec Mon Sep 17 00:00:00 2001 From: yxhc <825210484@qq.com> Date: Sat, 7 Sep 2024 18:03:33 +0800 Subject: [PATCH] fix: bug --- package-lock.json | 2 +- package.json | 2 +- .../apis/projectStoreManage/annualPlanStore.js | 28 +++ .../declarePage/components/accessory.vue | 27 ++- .../declarePage/components/basicInfo.vue | 34 +--- .../projectDeclare/declarePage/index.vue | 191 ++++++++++++++------- .../purchaseResults/fillPurchasingResult/index.vue | 4 +- .../components/operationDialog.vue | 114 ++++++------ .../projectStoreManage/components/planList.vue | 42 ++++- .../projectStoreManage/components/planlist.js | 4 +- .../projectDetail/components/basicInfo.vue | 14 +- .../components/biddingRegistration.vue | 31 ++-- .../projectDetail/components/filesInfo.vue | 17 +- .../projectDetail/components/projectInfo.vue | 14 ++ .../projectDetail/components/summarizeInfo.vue | 52 ++++-- .../projectStore/projectDetail/index.vue | 2 +- vite.config.js | 2 + 17 files changed, 384 insertions(+), 196 deletions(-) diff --git a/package-lock.json b/package-lock.json index d28c206..d196423 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "pinia": "^2.0.22", "pinia-plugin-persist": "^1.0.0", "qrcode.vue": "^3.3.3", - "vue": "^3.5.1", + "vue": "^3.4.38", "vue-router": "4", "vue3-seamless-scroll": "^2.0.1", "xlsx": "^0.16.0", diff --git a/package.json b/package.json index 1f71aad..765c8f2 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "pinia": "^2.0.22", "pinia-plugin-persist": "^1.0.0", "qrcode.vue": "^3.3.3", - "vue": "^3.5.1", + "vue": "^3.4.38", "vue-router": "4", "vue3-seamless-scroll": "^2.0.1", "xlsx": "^0.16.0", diff --git a/src/http/apis/projectStoreManage/annualPlanStore.js b/src/http/apis/projectStoreManage/annualPlanStore.js index 788fe8e..3206aea 100644 --- a/src/http/apis/projectStoreManage/annualPlanStore.js +++ b/src/http/apis/projectStoreManage/annualPlanStore.js @@ -18,3 +18,31 @@ export const annualPlanModify = data => http.post('/api/v1/annualPlan/modify', data) // 年度计划-编辑 export const projectExcel = data => http.post('/api/v1/annualPlan/exportList', data, { responseType: 'blob' }) // 项目库导出 + +export const operationPackageList = data => + http.get('/api/v1/annualPlan/operationPackageList') // 查询所有的运维包 + +// api/v1/annualPlan/operationPackageSave +// 添加运维包,两个参数 +// operationPackageName运维包名称 +// operationPackageYear预算年度 +// 传参: +// { +// "operationPackageName": "", +// "operationPackageYear": 1 +// } +export const operationPackageSave = data => + http.post('/api/v1/annualPlan/operationPackageSave', data) // 添加运维包,两个参数 + +// api/v1/annualPlan/relevancyPackage +// 关联运维包 +// 传参: +// { +// "operationPackageId":1, +// "projectCodes": +// [ +// "33050000020240400003" +// ] +// } +export const relevancyPackage = data => + http.post('/api/v1/annualPlan/relevancyPackage', data) // 年度计划-编辑 diff --git a/src/pages/declareManage/projectDeclare/declarePage/components/accessory.vue b/src/pages/declareManage/projectDeclare/declarePage/components/accessory.vue index 9072475..1fa7e89 100644 --- a/src/pages/declareManage/projectDeclare/declarePage/components/accessory.vue +++ b/src/pages/declareManage/projectDeclare/declarePage/components/accessory.vue @@ -43,6 +43,7 @@ const uploadUrl = store.dictStore.uploadUrl, ], projectApplicationForm: [{ required: true, message: '请上传项目申报书' }], baseResearchReportFile: [{ required: true, message: '请上传可行性研究报告' }], + operationPlan: [{ required: true, message: '请上传运维方案' }], constructionPlanFile: [{ required: true, message: '请上传建设方案' }], mainAccusationDoc: [{ required: true, message: '请上传申报单位主要职责(单位三定方案)', trigger: 'blur' }] }, @@ -60,6 +61,9 @@ const uploadUrl = store.dictStore.uploadUrl, mainResponsibilitiesApplicantFile: data.mainResponsibilitiesApplicantFile ? reviewFileParam(JSON.parse(data.mainResponsibilitiesApplicantFile)) : [], supportingMaterialsFile: data.supportingMaterialsFile ? reviewFileParam(JSON.parse(data.supportingMaterialsFile)) : [], baseResearchReportFile: data.baseResearchReportFile ? reviewFileParam(JSON.parse(data.baseResearchReportFile)) : [], + + operationPlan: data.operationPlan ? reviewFileParam(JSON.parse(data.operationPlan)) : [], + calculationTotalInvestmentFile: data.calculationTotalInvestmentFile ? reviewFileParam(JSON.parse(data.calculationTotalInvestmentFile)) : [], projectApplicationForm: data.projectApplicationForm ? reviewFileParam(JSON.parse(data.projectApplicationForm)) : [], baseProjOtherFile: data.baseProjOtherFile ? reviewFileParam(JSON.parse(data.baseProjOtherFile)) : [], @@ -199,7 +203,7 @@ defineExpose({ validForm, formData, setFormData }) - + + + + + 选择文件 + + + + formData.value, val => { /> - - - - - - - - { - fundsAllocationRef.value.validForm((valid) => { - if (valid) resolve() - }) - })) - form.push(new Promise((resolve, reject) => { - annualPaymentPlanRef.value.validForm((valid) => { - if (valid) resolve() - }) - })) formConfig.value.isCoreBusiness && form.push(new Promise((resolve, reject) => { coreBusinessRef.value.validForm((valid) => { if (valid) resolve() @@ -130,22 +120,38 @@ const { proxy } = getCurrentInstance(), fundsInfoRef.value.validForm((valid) => { if (valid) { const total = floatAdd([fundsInfoRef.value.formData.declareHaveAmount, fundsInfoRef.value.formData.declareGovOwnFinanceAmount, fundsInfoRef.value.formData.declareGovSuperiorFinanceAmount, fundsInfoRef.value.formData.declareBankLendingAmount, fundsInfoRef.value.formData.declareOtherAmount]) - if (fundsInfoRef.value.formData.declareAmount > 0 && fundsInfoRef.value.formData.declareAmount === total) { resolve() } else { + if (fundsInfoRef.value.formData.declareAmount > 0 && fundsInfoRef.value.formData.declareAmount === total) { + resolve() + } else { reject('资金申报情况:5类资金总和必须等于申报金额') } } }) })) - form.push(new Promise((resolve, reject) => { - fundsAllocationRef.value.validForm(valid => { - if (valid) { - const total = floatAdd([fundsAllocationRef.value.formData.softwareDevelopmentAmount, fundsAllocationRef.value.formData.cloudHardwarePurchaseAmount, fundsAllocationRef.value.formData.thirdPartyAmount]) - if (fundsInfoRef.value.formData.declareAmount > 0 && fundsInfoRef.value.formData.declareAmount === total) { resolve() } else { - reject('资金分配情况:3类资金总和必须等于申报金额') + if (basicInfoRef?.value.formData.projectType !== '04' && basicInfoRef?.value.formData.projectType !== '05') { + form.push(new Promise((resolve, reject) => { + fundsAllocationRef.value.validForm((valid) => { + if (valid) resolve() + }) + })) + form.push(new Promise((resolve, reject) => { + fundsAllocationRef.value.validForm(valid => { + if (valid) { + const total = floatAdd([fundsAllocationRef.value.formData.softwareDevelopmentAmount, fundsAllocationRef.value.formData.cloudHardwarePurchaseAmount, fundsAllocationRef.value.formData.thirdPartyAmount]) + if (fundsInfoRef.value.formData.declareAmount > 0 && fundsInfoRef.value.formData.declareAmount === total) { + resolve() + } else { + reject('资金分配情况:3类资金总和必须等于申报金额') + } } - } - }) - })) + }) + })) + form.push(new Promise((resolve, reject) => { + annualPaymentPlanRef.value.validForm((valid) => { + if (valid) resolve() + }) + })) + } applicationsRef.value?.formData.includeApplication === 1 && form.push(new Promise((resolve, reject) => { hiddenAppFormRef.value.validAllAppForm((valid) => { if (valid) { @@ -271,7 +277,6 @@ const { proxy } = getCurrentInstance(), id: route.query.id * 1 || undefined, ...basicInfoRef.value.formData, ...fundsInfoRef.value.formData, - ...fundsAllocationRef.value.formData, ...planndedUseResourcesRef.value?.formData, // bizDomain: basicInfoRef.value.formData?.isDigitalReform === 1 ? basicInfoRef.value.formData.bizDomain.join(',') : undefined, baseConstructionType: basicInfoRef.value.formData?.baseConstructionType?.join(';') || '', @@ -294,21 +299,32 @@ const { proxy } = getCurrentInstance(), consultancy: fundsInfoRef.value?.formData.declareAmount > 400 && fundsInfoRef.value.formData?.consultancy || '', operationManageUnit: fundsInfoRef.value?.formData.declareAmount >= 1000 && provincialExamineRef.value.formData.operationManageUnit || undefined, ...applicationsRef.value?.formData, - ...annualPaymentPlanRef.value.formData, + ...accessoryRef.value.formData, constructionPlanFile: accessoryRef.value.formData?.constructionPlanFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.constructionPlanFile)), preliminaryPlanFile: accessoryRef.value.formData?.preliminaryPlanFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.preliminaryPlanFile)), mainResponsibilitiesApplicantFile: accessoryRef.value.formData?.mainResponsibilitiesApplicantFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.mainResponsibilitiesApplicantFile)), supportingMaterialsFile: accessoryRef.value.formData?.supportingMaterialsFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.supportingMaterialsFile)), calculationTotalInvestmentFile: accessoryRef.value.formData?.calculationTotalInvestmentFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.calculationTotalInvestmentFile)), - projectApplicationForm: basicInfoRef.value.formData?.projectType !== '03' && accessoryRef.value.formData?.projectApplicationForm && JSON.stringify(changFilesParam(accessoryRef.value.formData.projectApplicationForm)) || '', - baseResearchReportFile: basicInfoRef.value.formData?.projectType !== '03' && accessoryRef.value.formData?.baseResearchReportFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.baseResearchReportFile)) || '', + projectApplicationForm: accessoryRef.value.formData?.projectApplicationForm && JSON.stringify(changFilesParam(accessoryRef.value.formData.projectApplicationForm)) || '', + baseResearchReportFile: accessoryRef.value.formData?.baseResearchReportFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.baseResearchReportFile)) || '', + operationPlan: (basicInfoRef.value.formData.projectType === '04' || basicInfoRef.value.formData.projectType === '05') && accessoryRef.value.formData?.operationPlan && JSON.stringify(changFilesParam(accessoryRef.value.formData.operationPlan)) || '', baseProjOtherFile: accessoryRef.value.formData?.baseProjOtherFile && JSON.stringify(changFilesParam(accessoryRef.value.formData.baseProjOtherFile)), mainAccusationDoc: fundsInfoRef.value?.formData.declareAmount >= 1000 && accessoryRef.value.formData?.mainAccusationDoc && JSON.stringify(changFilesParam(accessoryRef.value.formData.mainAccusationDoc)) || '', reviewChecklist: reviewCheckRef.value?.formData?.reviewChecklist || undefined } + + if (basicInfoRef.value.formData.projectType !== '04' && basicInfoRef.value.formData.projectType !== '05') { + postData = Object.assign(postData, { + ...fundsAllocationRef?.value.formData, + ...annualPaymentPlanRef?.value.formData + }) + } if (formConfig.value.isCoreBusiness) { - postData = Object.assign(postData, { ...coreBusinessRef.value.formData, coreBusiness: coreBusinessRef.value.formData.coreBusiness && JSON.stringify(coreBusinessRef.value.formData.coreBusiness) }) + postData = Object.assign(postData, { + ...coreBusinessRef.value.formData, + coreBusiness: coreBusinessRef.value.formData.coreBusiness && JSON.stringify(coreBusinessRef.value.formData.coreBusiness) + }) } if (formConfig.value.isSafetyInput) { // ...safetyInputRef.value.formData @@ -368,7 +384,11 @@ const { proxy } = getCurrentInstance(), submitLoading.value = true try { const data = { - projectInfo: { ...postData, id: !route.query.isDraft ? postData.id : undefined, draftId: route.query.isDraft ? route.query.id * 1 : undefined } + projectInfo: { + ...postData, + id: !route.query.isDraft ? postData.id : undefined, + draftId: route.query.isDraft ? route.query.id * 1 : undefined + } } if (route.name === 'declarePage') { @@ -417,8 +437,8 @@ const { proxy } = getCurrentInstance(), basicInfoRef.value.setFormData(detailData.value) if (detailData.value?.baseProjIsConfidentiality !== '02') { fundsInfoRef.value.setFormData(detailData.value) - fundsAllocationRef.value.setFormData(detailData.value) - annualPaymentPlanRef.value.setFormData(detailData.value) + fundsAllocationRef?.value.setFormData(detailData.value) + annualPaymentPlanRef?.value.setFormData(detailData.value) formConfig.value.isCoreBusiness && coreBusinessRef.value.setFormData(detailData.value) formConfig.value.isSafetyInput && safetyInputRef.value.setFormData(detailData.value) formConfig.value.isProjectImageProgress && projectImageProgressRef.value.setFormData(detailData.value) @@ -435,13 +455,16 @@ const { proxy } = getCurrentInstance(), // 获取审核详情 flowData = ref({ processProgressVo: { - progressInfo: [ - ] + progressInfo: [] } }), lastData = ref(), getFlowData = async () => { - const res = await progressDetail({ instanceId: route.query.instanceId, projectId: route.query.id, nodeId: route.query.nodeId }) + const res = await progressDetail({ + instanceId: route.query.instanceId, + projectId: route.query.id, + nodeId: route.query.nodeId + }) flowData.value = { ...res.data, processProgressVo: { @@ -580,16 +603,23 @@ async function reuseItem (data) { const projectYear = basicInfoRef.value.formData.projectYear const annualPaymentFormData = { - annualPlanAmount: annualPaymentPlanRef.value.formData.annualPlanAmount, - annualPlanHaveAmount: annualPaymentPlanRef.value.formData.annualPlanHaveAmount, - annualPlanGovOwnFinanceAmount: annualPaymentPlanRef.value.formData.annualPlanGovOwnFinanceAmount, - annualPlanGovSuperiorFinanceAmount: annualPaymentPlanRef.value.formData.annualPlanGovSuperiorFinanceAmount, - annualPlanBankLendingAmount: annualPaymentPlanRef.value.formData.annualPlanBankLendingAmount, - annualPlanOtherAmount: annualPaymentPlanRef.value.formData.annualPlanOtherAmount + annualPlanAmount: annualPaymentPlanRef?.value.formData.annualPlanAmount, + annualPlanHaveAmount: annualPaymentPlanRef?.value.formData.annualPlanHaveAmount, + annualPlanGovOwnFinanceAmount: annualPaymentPlanRef?.value.formData.annualPlanGovOwnFinanceAmount, + annualPlanGovSuperiorFinanceAmount: annualPaymentPlanRef?.value.formData.annualPlanGovSuperiorFinanceAmount, + annualPlanBankLendingAmount: annualPaymentPlanRef?.value.formData.annualPlanBankLendingAmount, + annualPlanOtherAmount: annualPaymentPlanRef?.value.formData.annualPlanOtherAmount } detailData.value = { ...res.data, - projectType, baseHistorProjId, baseHistorProjName, baseHistorProjYear, projectYear, projectName, buildOrgName, orgCreditCode, + projectType, + baseHistorProjId, + baseHistorProjName, + baseHistorProjYear, + projectYear, + projectName, + buildOrgName, + orgCreditCode, ...annualPaymentFormData, // 新项目不应该有状态 status: undefined @@ -623,18 +653,22 @@ async function reuseItem (data) {
- + + +

流程被退回

- {{ detailData?.projectName }}的{{ flowData?.processProgressVo?.processDefName }}被退回,请根据审核记录调整项目信息 + {{ detailData?.projectName }}的{{ flowData?.processProgressVo?.processDefName + }}被退回,请根据审核记录调整项目信息 查看审核记录 + >查看审核记录 +

@@ -650,13 +684,13 @@ async function reuseItem (data) { - {{ detailData.buildOrgName||'-' }} + {{ detailData.buildOrgName || '-' }} - {{ detailData.superOrg||'-' }} + {{ detailData.superOrg || '-' }} - {{ detailData.createOn||'-' }} + {{ detailData.createOn || '-' }} @@ -697,7 +731,7 @@ async function reuseItem (data) {
- +
- +
- + @@ -833,68 +883,82 @@ async function reuseItem (data) { :is-first="basicInfoRef?.formData?.isFirst" />
- + diff --git a/src/pages/declareManage/purchaseResults/fillPurchasingResult/index.vue b/src/pages/declareManage/purchaseResults/fillPurchasingResult/index.vue index 726d22d..2b063a6 100644 --- a/src/pages/declareManage/purchaseResults/fillPurchasingResult/index.vue +++ b/src/pages/declareManage/purchaseResults/fillPurchasingResult/index.vue @@ -122,12 +122,12 @@ onMounted(async () => { - + - + diff --git a/src/pages/projectStoreManage/components/operationDialog.vue b/src/pages/projectStoreManage/components/operationDialog.vue index bb53443..5e4c0df 100644 --- a/src/pages/projectStoreManage/components/operationDialog.vue +++ b/src/pages/projectStoreManage/components/operationDialog.vue @@ -7,7 +7,7 @@ @close="closeDialog" > - +