refactor(project-demand): 优化需求变更时特殊基金逻辑

This commit is contained in:
dj
2025-04-02 23:26:01 +08:00
parent e54db551a6
commit 69aa6aa0fb

View File

@@ -388,7 +388,7 @@ import {useCacheStore} from '@/stores/cache.js'
import {useProcessStore} from '@/stores/processStore.js';
import {getSubCompOpt} from "@/api/user/user";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getFormInfo} from "@/api/project-demand";
import {getFormInfo, getInfo} from "@/api/project-demand";
import {getFundOption} from "@/api/special-fund";
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
@@ -474,18 +474,17 @@ if (name.value === 'Summary/edit') {
}
}
const changeRequirement=async ()=>{
console.log('formData.requirementId',formData.requirementId)
// await getFormInfo(route.query.id).then(res => {
// if (res.code === 1000) {
// formData.value.requirementDefaultName = res.data.requirementName
// // loading.value = false
// formData.value.isSpecialFund = res.data.isSpecialFund
// if (res.data.isSpecialFund) {
// formData.value.specialFundId = res.data.specialFundId
// formData.value.specialFund = res.data.specialFund
// }
// }
// })
await getInfo(formData.value.requirementId).then(res => {
if (res.code === 1000) {
console.log('formData.requirementId',formData.value.requirementId,res)
formData.value.isSpecialFund = res.data.formData.isSpecialFund
if ( res.data.formData.isSpecialFund) {
formData.value.specialFundId = res.data.formData.specialFundId
formData.value.specialFund = res.data.formData.specialFund
}
}
})
}
const changeCollectData = () => {
if (name.value === 'Summary/edit') {