diff --git a/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue b/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue
index 055bae6..12534ed 100644
--- a/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue
+++ b/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue
@@ -589,7 +589,7 @@ watch(() => formData.value, val => {
:empty-temp="false"
>
- 复用信息
+ 复用信息
删除
@@ -606,7 +606,7 @@ watch(() => formData.value, val => {
:empty-temp="false"
>
- 复用信息
+ 复用信息
删除
diff --git a/src/pages/declareManage/projectDeclare/declarePage/index.vue b/src/pages/declareManage/projectDeclare/declarePage/index.vue
index a368db9..0d2b560 100644
--- a/src/pages/declareManage/projectDeclare/declarePage/index.vue
+++ b/src/pages/declareManage/projectDeclare/declarePage/index.vue
@@ -276,7 +276,7 @@ const { proxy } = getCurrentInstance(),
// bizDomain: basicInfoRef.value.formData?.isDigitalReform === 1 ? basicInfoRef.value.formData.bizDomain.join(',') : undefined,
baseConstructionType: basicInfoRef.value.formData?.baseConstructionType?.join(';') || '',
baseProvManDeprtType: basicInfoRef.value.formData.baseProvManDeprtType * 1 || undefined,
- projectYear: fundsInfoRef.value.formData?.projectYear * 1,
+ projectYear: basicInfoRef.value.formData?.projectYear * 1,
beginTime: basicInfoRef.value.formData?.buildDuration?.length && basicInfoRef.value.formData.buildDuration[0],
endTime: basicInfoRef.value.formData?.buildDuration?.length && basicInfoRef.value.formData.buildDuration[1],
buildDuration: undefined,
@@ -563,6 +563,58 @@ onMounted(async () => {
})
}
})
+
+async function reuseItem (data) {
+ const projectId = data.baseProjId
+ const res = await projectDetail(projectId)
+
+ // 取出不复用的字段
+ const projectType = basicInfoRef.value.formData.projectType
+ const projectName = basicInfoRef.value.formData.projectName
+ const baseHistorProjId = basicInfoRef.value.formData?.baseHistorProjs?.map(i => i.baseProjId)?.join(';') || ''
+ const baseHistorProjName = basicInfoRef.value.formData?.baseHistorProjs?.map(i => i.baseProjName)?.join(';') || ''
+ const baseHistorProjYear = basicInfoRef.value.formData?.baseHistorProjs?.map(i => i.baseProjSetYear)?.join(';') || ''
+ 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
+ }
+ detailData.value = {
+ ...res.data,
+ projectType, baseHistorProjId, baseHistorProjName, baseHistorProjYear, projectYear, projectName,
+ ...annualPaymentFormData,
+ // 新项目不应该有状态
+ status: undefined
+ }
+
+ const safetyInputModular = res.data.safetyInputModular && JSON.parse(res.data.safetyInputModular).map(i => {
+ return {
+ ...i,
+ formList: i.formList.map(j => {
+ return {
+ ...j,
+ value: !j.value ? undefined : j.props.type === '文件上传' ? reviewFileParam(j.value) : j.value
+ }
+ })
+ }
+ })
+ formConfig.value = {
+ isCoreBusiness: res.data.isOpenCoreBusiness,
+ isProjectImageProgress: res.data.isEngineeringSpeed,
+ isRemark: res.data.isRemark,
+ isSafetyInput: res.data.isOpenSafetyInput,
+ safetyInputModular: safetyInputModular || []
+ }
+ nextTick(() => {
+ setData()
+ })
+}
+