diff --git a/src/components/DetailComponent/SpecialFundDetail.vue b/src/components/DetailComponent/SpecialFundDetail.vue
index 8fa6135..f8d6a6a 100644
--- a/src/components/DetailComponent/SpecialFundDetail.vue
+++ b/src/components/DetailComponent/SpecialFundDetail.vue
@@ -9,12 +9,12 @@
-
+
{{ formData.fundAmount }}
-
+
{{ formData.residualAmount }}
diff --git a/src/components/DetailComponent/SummaryDetail.vue b/src/components/DetailComponent/SummaryDetail.vue
index 0b1f73f..9673ff6 100644
--- a/src/components/DetailComponent/SummaryDetail.vue
+++ b/src/components/DetailComponent/SummaryDetail.vue
@@ -9,7 +9,7 @@
- {{ changeName(fundOption, localFormData.specialFund) }}
+ {{localFormData.specialFund }}
@@ -270,14 +270,9 @@ getFundOptions()
diff --git a/src/views/expense-management/share/add.vue b/src/views/expense-management/share/add.vue
index 955a20d..5e222c9 100644
--- a/src/views/expense-management/share/add.vue
+++ b/src/views/expense-management/share/add.vue
@@ -159,7 +159,7 @@ const rules = reactive({
const processStore = useProcessStore()
const processInstanceData = ref()
const processDiagramViewer = ref(false)
-const loading = ref(true)
+const loading = ref(false)
const showTable = ref(true)
const route = useRoute()
const router = useRouter()
@@ -365,7 +365,6 @@ const handleBack = () => {
onMounted(async () => {
await init()
if (route.query.id) {
- loading.value = true
await getDetailInfo()
}
})
diff --git a/src/views/project-demand/requirement/add.vue b/src/views/project-demand/requirement/add.vue
index e19d616..db0359f 100644
--- a/src/views/project-demand/requirement/add.vue
+++ b/src/views/project-demand/requirement/add.vue
@@ -39,8 +39,8 @@
-
-
+
+
{
a.click()
})
}
+const getSpecialFundName = (val) => {
+ let label
+ specialFundOption.value.forEach(item => {
+ if (item.value == val) {
+ label = item.label
+ }
+ })
+ return label
+}
const compositeParam = (item) => {
let tag = ''
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
@@ -284,7 +293,8 @@ const submitParam = (item) => {
fileList: files,
deploymentId: processInstanceData.value.deploymentId,
isSpecialFund: item.isSpecialFund,
- specialFund: item.specialFund
+ specialFundId: item.specialFundId,
+ specialFund: getSpecialFundName(item.specialFundId)
}
}
const handleSubmit = async (instance) => {
diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue
index 2e05f5c..c38483c 100644
--- a/src/views/project-demand/summary/add.vue
+++ b/src/views/project-demand/summary/add.vue
@@ -9,17 +9,21 @@
-
+
是
否
-
-
- {{ getSpecialFundName(formData.specialFund) }}
-
+
+
+ {{ formData.specialFund }}
+
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
@@ -277,7 +287,7 @@ const formData = ref({
const rules = reactive({
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
- specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
+ specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
@@ -313,19 +323,21 @@ const getIsFund = async () => {
loading.value = false
formData.value.isSpecialFund = res.data.isSpecialFund
if (res.data.isSpecialFund) {
- formData.value.specialFund = Number(res.data.specialFund)
+ res.data.specialFundId = getSpecialFundId(res.data.specialFund)
+ formData.value.specialFundId = res.data.specialFundId
+ formData.value.specialFund = res.data.specialFund
}
}
})
}
-const getSpecialFundName = (val) => {
- let label
+const getSpecialFundId = (val) => {
+ let value
specialFundOption.value.forEach(item => {
- if (item.value == val) {
- label = item.label
+ if (item.label == val) {
+ value = item.value
}
})
- return label
+ return value
}
const compositeParam = (item, type) => {
let tag = ''
@@ -383,44 +395,15 @@ const handleSubmit = debounce(async (instance) => {
otherFileList.value.forEach(item => {
otherFiles.push(getFileParam(item))
})
- // let params = {
- // "specialFund": "2",
- // "projectName": "测试全流程功能-上报",
- // "startTime": "2024-05-24 00:00:00",
- // "endTime": "2024-05-29 00:00:00",
- // "projectType": "3",
- // "investmentType": "3",
- // "businessSegment": "2",
- // "technicalStandard": "2",
- // "governmentDeclaration": 0,
- // "inventionPatent": "3",
- // "newPatent": "3",
- // "economicEstimate": "3",
- // "other": "3",
- // "copyright": "3",
- // "softwareCopyright": "3",
- // "industryUniversityResearch": 0,
- // "intellectualProperty": "00",
- // "resultForm": "3",
- // "projectImpact": "3",
- // "rdSubject": "3",
- // "serviceDescription": "3",
- // "contentDescription": "3",
- // "specialFundAmount": "3",
- // deploymentId: deploymentId.value,
- // "singleFile": singleFile,
- // "fileList": otherFiles,
- // "requirementId":route.query.id
- // }
let params = {
...formData.value,
- isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
+ // isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,
requirementId: route.query.id ? route.query.id : '-1'
}
- console.log('params', params)
+ console.log('params', params, formData.value)
if (JSON.stringify(singleFile) === "{}") {
attachment.value.validate()
ElNotification({
@@ -432,18 +415,18 @@ const handleSubmit = debounce(async (instance) => {
} else {
attachment.value.clearValidate()
}
- let res = await requirementReported(params)
- ElNotification({
- title: '提示',
- message: res.msg,
- type: res.code === 1000 ? 'success' : 'error'
- })
- if (res.code === 1000) {
- tagsViewStore.delVisitedViews(router.currentRoute.value.path)
- await router.push({
- name: 'Summary'
- })
- }
+ // let res = await requirementReported(params)
+ // ElNotification({
+ // title: '提示',
+ // message: res.msg,
+ // type: res.code === 1000 ? 'success' : 'error'
+ // })
+ // if (res.code === 1000) {
+ // tagsViewStore.delVisitedViews(router.currentRoute.value.path)
+ // await router.push({
+ // name: 'Summary'
+ // })
+ // }
})
})
const handleResubmit = debounce(() => {
@@ -469,12 +452,14 @@ const handleResubmit = debounce(() => {
//todo requirementId
let params = {
...formData.value,
- isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
+ // isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,
requirementId: route.query.id ? route.query.id : '-1'
}
+
+ console.log('重新提交params', params, formData.value)
if (JSON.stringify(singleFile) === "{}") {
attachment.value.validate()
ElNotification({
@@ -486,7 +471,6 @@ const handleResubmit = debounce(() => {
} else {
attachment.value.clearValidate()
}
- console.log('重新提交params', params)
resubmitReported(params).then(res => {
ElNotification({
title: '提示',
@@ -503,6 +487,7 @@ const handleResubmit = debounce(() => {
})
const getDetailInfo = async () => {
+ loading.value = true
getDetail(route.query.projectId).then(res => {
ElNotification({
title: '提示',
@@ -510,26 +495,22 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
- // if(res.data.formData.specialFund===null&&res.data.formData.isSpecialFund===null){
- // res.data.formData.isSpecialFund=false
- // }else if(res.data.formData.specialFund&&res.data.formData.isSpecialFund===null){
- // res.data.formData.isSpecialFund=true
- // }
formData.value = res.data.formData
loading.value = false
}
})
}
const init = async () => {
+ loading.value = true
const resFund = await getFundOption()
specialFundOption.value = resFund.data
- await getIsFund()
const res = await getSubCompOpt()
companyOption.value = res.data
getProcessInfo().then(res => {
if (res.code === 1000) {
let data = res.data
deploymentId.value = data.deploymentId
+ loading.value = false
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
@@ -539,6 +520,7 @@ const init = async () => {
nextTick(() => {
processDiagramViewer.value = true
})
+ getIsFund()
} else {
ElNotification({
title: '提示',
@@ -551,7 +533,6 @@ const init = async () => {
onMounted(async () => {
await init()
if (route.query.projectId) {
- loading.value = true
await getDetailInfo()
}
})
diff --git a/src/views/special-fund/add.vue b/src/views/special-fund/add.vue
index 437f901..49bba56 100644
--- a/src/views/special-fund/add.vue
+++ b/src/views/special-fund/add.vue
@@ -6,7 +6,7 @@
-
+
@@ -36,11 +36,11 @@