feat : 需求上报新增需求征集字段
This commit is contained in:
@@ -103,3 +103,11 @@ export const getProjectOption = () => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export const getRequirementOption = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/option',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable @change="changeCollectData"></el-input>
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable
|
||||
@change="changeCollectData"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
@@ -50,7 +51,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('project_type')"
|
||||
:key="item.value"
|
||||
@@ -62,7 +64,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="研发主体" prop="rdSubject">
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('rd_subject')"
|
||||
:key="item.value"
|
||||
@@ -74,7 +77,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('invest_type')"
|
||||
:key="item.value"
|
||||
@@ -86,7 +90,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="业务板块" prop="businessSegment">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('business_segment')"
|
||||
:key="item.value"
|
||||
@@ -98,7 +103,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="标准制定" prop="technicalStandard">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('technical_standard')"
|
||||
:key="item.value"
|
||||
@@ -117,12 +123,13 @@
|
||||
:formatter="(value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')" @change="changeCollectData"
|
||||
/>
|
||||
<!-- <el-input-number v-model="formData.economicEstimate" placeholder="请输入经费预算" :controls="false"/>-->
|
||||
<!-- <el-input-number v-model="formData.economicEstimate" placeholder="请输入经费预算" :controls="false"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-select v-model="formData.industryUniversityResearch" clearable placeholder="请选择产学研联合" @change="changeCollectData">
|
||||
<el-select v-model="formData.industryUniversityResearch" clearable placeholder="请选择产学研联合"
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('industry_university')"
|
||||
:key="item.value"
|
||||
@@ -134,7 +141,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-select v-model="formData.governmentDeclaration" clearable placeholder="请选择开展政府申报" @change="changeCollectData">
|
||||
<el-select v-model="formData.governmentDeclaration" clearable placeholder="请选择开展政府申报"
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('government_declaration')"
|
||||
:key="item.value"
|
||||
@@ -148,7 +156,8 @@
|
||||
|
||||
<el-col :span="6" v-if="!route.query.id">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund" required>
|
||||
<el-select v-model="formData.isSpecialFund" clearable @change="specialFundChange" placeholder="请选择是否为专项资金">
|
||||
<el-select v-model="formData.isSpecialFund" clearable @change="specialFundChange"
|
||||
placeholder="请选择是否为专项资金">
|
||||
<el-option label="是" :value="true"/>
|
||||
<el-option label="否" :value="false"/>
|
||||
</el-select>
|
||||
@@ -162,7 +171,8 @@
|
||||
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund"
|
||||
:style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="所属专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -181,18 +191,20 @@
|
||||
:formatter="(value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||
:parser="(value) => value.replace(/\$\s?|(,*)+[^0-9.]/g, '')" @change="changeCollectData"
|
||||
/>
|
||||
<!-- <el-input-number v-model="formData.specialFundAmount" placeholder="请输入申请总部专项资金" :controls="false"/>-->
|
||||
<!-- <el-input-number v-model="formData.specialFundAmount" placeholder="请输入申请总部专项资金" :controls="false"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':'-40px'}">
|
||||
<el-form-item label="是否在预算内" prop="isWithinBudget" required >
|
||||
<el-select v-model="formData.isWithinBudget" clearable placeholder="请选择是否在预算内" @change="changeCollectData">
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':'-40px'}">
|
||||
<el-form-item label="是否在预算内" prop="isWithinBudget" required>
|
||||
<el-select v-model="formData.isWithinBudget" clearable placeholder="请选择是否在预算内"
|
||||
@change="changeCollectData">
|
||||
<el-option label="是" :value="true"/>
|
||||
<el-option label="否" :value="false"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?route.query.id?'0':'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-col :span="6"
|
||||
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'0':'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="部门分管领导" prop="">
|
||||
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
|
||||
{{ optionalChargeLeadershipList.length !== 0 ? '更改' : '请选择' }}
|
||||
@@ -205,9 +217,11 @@
|
||||
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOkOrCancel"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
|
||||
<el-form-item label="主项目" prop="masterProjectId" >
|
||||
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目" @change="changeCollectData">
|
||||
<el-col :span="6"
|
||||
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
|
||||
<el-form-item label="主项目" prop="masterProjectId">
|
||||
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目"
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in masterProjectList"
|
||||
:key="item.value"
|
||||
@@ -217,6 +231,20 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- :style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="需求征集" prop="requirementId">
|
||||
<el-select v-model="formData.requirementId" clearable placeholder="请选择需求征集"
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in requirementList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="预期知识产权"></baseTitle>
|
||||
<el-row gutter="30" style="margin-bottom: -18px;"
|
||||
@@ -224,7 +252,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm"
|
||||
:style="{marginRight:!formData.isSpecialFund?'0':route.query.id?'':'40px'}">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple @change="changeCollectData">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('result_form')"
|
||||
:key="item.value"
|
||||
@@ -236,7 +265,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable @change="changeCollectData">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable
|
||||
@change="changeCollectData">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('intellectual_property')"
|
||||
:key="item.value"
|
||||
@@ -248,28 +278,33 @@
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利数量" :controls="false" @change="changeCollectData"/>
|
||||
<el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利数量" :controls="false"
|
||||
@change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="新型专利(项)" prop="newPatent">
|
||||
<el-input-number v-model="formData.newPatent" placeholder="请输入实用性新型专利数量" :controls="false" @change="changeCollectData"
|
||||
<el-input-number v-model="formData.newPatent" placeholder="请输入实用性新型专利数量" :controls="false"
|
||||
@change="changeCollectData"
|
||||
style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'0':route.query.id?'':'-40px'}">
|
||||
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||
<el-input-number v-model="formData.softwareCopyright" placeholder="请输入软件著作权数量" :controls="false" @change="changeCollectData"/>
|
||||
<el-input-number v-model="formData.softwareCopyright" placeholder="请输入软件著作权数量" :controls="false"
|
||||
@change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':route.query.id?'-40px':'0'}">
|
||||
<el-form-item label="著作权(项)" prop="copyright">
|
||||
<el-input-number v-model="formData.copyright" placeholder="请输入著作权数量" :controls="false" @change="changeCollectData"/>
|
||||
<el-input-number v-model="formData.copyright" placeholder="请输入著作权数量" :controls="false"
|
||||
@change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'-40px'}">
|
||||
<el-form-item label="其他(项)" prop="other">
|
||||
<el-input-number v-model="formData.other" placeholder="请输入其他数量" :controls="false" @change="changeCollectData"/>
|
||||
<el-input-number v-model="formData.other" placeholder="请输入其他数量" :controls="false"
|
||||
@change="changeCollectData"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -285,7 +320,8 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="建设目标描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4"
|
||||
type="textarea"
|
||||
:style="{marginRight:!formData.isSpecialFund?'20px':'80px'}" @change="changeCollectData"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
@@ -326,7 +362,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="staging">保存</el-button>
|
||||
<el-button color="#DED0B2" @click="staging">保存</el-button>
|
||||
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit(summaryForm)">重新发布</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
@@ -337,7 +373,14 @@
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import {debounce} from 'lodash'
|
||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported,getProjectOption} from "@/api/project-demand/summary";
|
||||
import {
|
||||
getDetail,
|
||||
getProcessInfo,
|
||||
requirementReported,
|
||||
resubmitReported,
|
||||
getProjectOption,
|
||||
getRequirementOption
|
||||
} from "@/api/project-demand/summary";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -368,6 +411,7 @@ const optionalChargeLeadershipPickerRef = ref()
|
||||
const optionalChargeLeadershipList = ref([])
|
||||
const masterProjectList = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const requirementList = ref([])
|
||||
const showTable = ref(true)
|
||||
const showSingleTable = ref(false)
|
||||
const otherFileList = ref([])
|
||||
@@ -417,7 +461,7 @@ watch(() => singleList.value, (newVal) => {
|
||||
}, {deep: true})
|
||||
localStorage.removeItem('originallySelectedList')
|
||||
if (name.value === 'Summary/edit') {
|
||||
}else {
|
||||
} else {
|
||||
if (localStorage.getItem('collectData')) {
|
||||
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
||||
if (collectData.fileList) {
|
||||
@@ -429,17 +473,17 @@ if (name.value === 'Summary/edit') {
|
||||
formData.value = collectData
|
||||
}
|
||||
}
|
||||
const changeCollectData=()=>{
|
||||
const changeCollectData = () => {
|
||||
if (name.value === 'Summary/edit') {
|
||||
// params.fileList= attachment.value.allFileList
|
||||
}else {
|
||||
} else {
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: [],
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
requirementId: route.query.id ? route.query.id : formData.value.requirementId ? formData.value.requirementId : '-1'
|
||||
}
|
||||
params.fileList= otherFileList.value
|
||||
params.fileList = otherFileList.value
|
||||
localStorage.setItem('collectData', JSON.stringify(params))
|
||||
}
|
||||
}
|
||||
@@ -460,14 +504,22 @@ const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(formData.value.startTime).getTime();
|
||||
}
|
||||
|
||||
const getProjectList = () => {
|
||||
getProjectOption().then(res => {
|
||||
const getProjectList = () => {
|
||||
getProjectOption().then(res => {
|
||||
if (res.code === 1000) {
|
||||
masterProjectList.value=res.data
|
||||
masterProjectList.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
getProjectList()
|
||||
const getRequirementList = () => {
|
||||
getRequirementOption().then(res => {
|
||||
if (res.code === 1000) {
|
||||
requirementList.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
getRequirementList()
|
||||
const getIsFund = async () => {
|
||||
if (!route.query.id) return;
|
||||
// loading.value = true
|
||||
@@ -500,6 +552,15 @@ const getProjectName = (id) => {
|
||||
})
|
||||
return label
|
||||
}
|
||||
const getRequirementName = (id) => {
|
||||
let label = ''
|
||||
requirementList.value.forEach(item => {
|
||||
if (item.value == id) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||
@@ -544,7 +605,7 @@ const getOtherFile = (val) => {
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
changeCollectData()
|
||||
changeCollectData()
|
||||
}
|
||||
|
||||
const getFileParam = (item) => {
|
||||
@@ -580,6 +641,9 @@ const handleSubmit = debounce(async (instance) => {
|
||||
if (formData.value.masterProjectId) {
|
||||
formData.value.masterProjectName = getProjectName(formData.value.masterProjectId)
|
||||
}
|
||||
if (formData.value.requirementId) {
|
||||
formData.value.requirementName = getRequirementName(formData.value.requirementId)
|
||||
}
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
@@ -595,7 +659,7 @@ const handleSubmit = debounce(async (instance) => {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
requirementId: route.query.id ? route.query.id : formData.value.requirementId ? formData.value.requirementId : '-1'
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await requirementReported(params)
|
||||
@@ -637,6 +701,9 @@ const handleResubmit = debounce((instance) => {
|
||||
if (formData.value.masterProjectId) {
|
||||
formData.value.masterProjectName = getProjectName(formData.value.masterProjectId)
|
||||
}
|
||||
if (formData.value.requirementId) {
|
||||
formData.value.requirementName = getRequirementName(formData.value.requirementId)
|
||||
}
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
@@ -652,7 +719,7 @@ const handleResubmit = debounce((instance) => {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
requirementId: route.query.id ? route.query.id : formData.value.requirementId ? formData.value.requirementId : '-1'
|
||||
}
|
||||
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
|
||||
resubmitReported(params).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user