Merge pull request 'master' (#963) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/963
This commit is contained in:
@@ -514,6 +514,65 @@ const getFileParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
|
if(props.step==50){
|
||||||
|
let files = []
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
attachment.value.allFileList.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// console.info("🚀 ~method:handleSubmit -----", files,attachment.value.isHaveOneFile)
|
||||||
|
if (!attachment.value.isHaveOneFile) {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
let projectPersonIds = []
|
||||||
|
for (const item of projectPersonUserList.value) {
|
||||||
|
projectPersonIds.push(parseInt(item.id))
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
// singleFile: attachment.value.singleFile,
|
||||||
|
projectId: projectId.value,
|
||||||
|
actualEconomicEstimate: parseFloat(localFormData.value.actualEconomicEstimate),
|
||||||
|
specialFundAmount: parseFloat(localFormData.value.specialFundAmount),
|
||||||
|
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||||
|
}
|
||||||
|
if (sessionParams.value.preProcess && !localFormData.value.preProcess) {
|
||||||
|
params.preProcess = JSON.stringify(sessionParams.value.preProcess)
|
||||||
|
}
|
||||||
|
console.log('params',params)
|
||||||
|
let res
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitConclusion(params)
|
||||||
|
} else {
|
||||||
|
res = await projectConclusion(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: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
@@ -597,12 +656,6 @@ const handleSubmit = async (instance) => {
|
|||||||
} else {
|
} else {
|
||||||
res = await projectCheck(params)
|
res = await projectCheck(params)
|
||||||
}
|
}
|
||||||
} else if (props.step === '50') {
|
|
||||||
if (props.mode === 'resubmit') {
|
|
||||||
res = await resubmitConclusion(params)
|
|
||||||
} else {
|
|
||||||
res = await projectConclusion(params)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -619,13 +672,10 @@ const handleSubmit = async (instance) => {
|
|||||||
await router.push({
|
await router.push({
|
||||||
name: 'Implementation'
|
name: 'Implementation'
|
||||||
})
|
})
|
||||||
} else if (props.step === '50') {
|
|
||||||
await router.push({
|
|
||||||
name: 'Filing'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
let id = projectId.value
|
let id = projectId.value
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
<el-form-item label="需求征集" prop="" required>
|
<el-form-item label="需求征集" prop="" required>
|
||||||
<template v-if="formData.requirementDefaultName">{{ formData.requirementDefaultName }}</template>
|
<template v-if="formData.requirementDefaultName">{{ formData.requirementDefaultName }}</template>
|
||||||
<el-select v-else v-model="formData.requirementId" clearable placeholder="请选择需求征集"
|
<el-select v-else v-model="formData.requirementId" clearable placeholder="请选择需求征集"
|
||||||
@change="changeCollectData">
|
@change="changeCollectData();changeRequirement()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in requirementList"
|
v-for="item in requirementList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -388,7 +388,7 @@ import {useCacheStore} from '@/stores/cache.js'
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getSubCompOpt} from "@/api/user/user";
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
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 {getFundOption} from "@/api/special-fund";
|
||||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
|
|
||||||
@@ -473,6 +473,19 @@ if (name.value === 'Summary/edit') {
|
|||||||
formData.value = collectData
|
formData.value = collectData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const changeRequirement=async ()=>{
|
||||||
|
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 = () => {
|
const changeCollectData = () => {
|
||||||
if (name.value === 'Summary/edit') {
|
if (name.value === 'Summary/edit') {
|
||||||
// params.fileList= attachment.value.allFileList
|
// params.fileList= attachment.value.allFileList
|
||||||
|
|||||||
Reference in New Issue
Block a user