fix : 修复专项资金显示情况
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额">
|
||||
<el-form-item label="金额(元)">
|
||||
<span>{{ formData.fundAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额">
|
||||
<el-form-item label="剩余金额(元)">
|
||||
<span>{{ formData.residualAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.specialFund">
|
||||
<span>{{ changeName(fundOption, localFormData.specialFund) }}</span>
|
||||
<span>{{localFormData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -270,14 +270,9 @@ getFundOptions()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.el-table--fit) {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -138,7 +138,7 @@ const rules = reactive({
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const tableConfig = reactive({
|
||||
@@ -204,6 +204,15 @@ const handleDownload = (row) => {
|
||||
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) => {
|
||||
|
||||
@@ -9,17 +9,21 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" v-if="!route.query.id">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund" >
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="formData.isSpecialFund?(!route.query.id?6:12):6">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="formData.isSpecialFund">
|
||||
<span v-if="route.query.id">{{ getSpecialFundName(formData.specialFund) }}</span>
|
||||
<el-select v-else v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-col :span="6" v-if="route.query.id&&formData.specialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId" >
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="!route.query.id&&formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -44,7 +48,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-form-item label="结束时间" prop="endTime"
|
||||
:title="!formData.startTime?'请先选择开始时间!':''">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
@@ -209,18 +214,23 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" v-if="!route.query.id&&formData.isSpecialFund">
|
||||
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" v-if="route.query.id&&formData.specialFundAmount">
|
||||
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<el-input v-model="formData.serviceDescription" type="textarea" clearable></el-input>
|
||||
<el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" type="textarea" clearable></el-input>
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额(元)" prop="fundAmount">
|
||||
<el-input-number v-model="formData.fundAmount" placeholder="请输入金额" :controls="false"/>
|
||||
<el-input-number v-model="formData.fundAmount" placeholder="请输入金额" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
@@ -36,11 +36,11 @@
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import {addFund, resubmitFund, getFundDetail,getFundProcess} from "@/api/special-fund";
|
||||
import {addFund, resubmitFund, getFundDetail, getFundProcess} from "@/api/special-fund";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {downloadFile,deleteFile} from "@/api/project-demand";
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
@@ -92,7 +92,9 @@ const tableConfig = reactive({
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -115,28 +117,16 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
const handleDelete = (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '用户取消删除! ',
|
||||
type: 'warning'
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
@@ -236,11 +226,11 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type:'error'
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -274,7 +264,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ){
|
||||
height: 300px!important;
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user