feat : 需求上报,项目立项,验收加上分管领导选择

This commit is contained in:
2024-07-25 19:36:06 +08:00
parent 15689dfbc1
commit 8901053fd6
3 changed files with 97 additions and 31 deletions

View File

@@ -35,7 +35,6 @@
<el-form-item label="项目负责人" :required="true" prop=""
label-width="125">
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
<!-- {{ localFormData.projectChargePerson ? '更改' : '请选择' }}-->
{{ projectChargePersonUserList.length !== 0 ? '更改' : '请选择' }}
</el-button>
<div v-for="item in projectChargePersonUserList" :key="item.id" style="margin-right: 5px">
@@ -49,7 +48,6 @@
<el-form-item label="项目成员" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
<!-- {{ localFormData.projectPersonIds ? '更改' : '请选择' }}-->
{{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getProjectPerson(projectPersonUserList)" :key="item.id" style="margin-right: 5px">
@@ -59,6 +57,19 @@
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="title==='apply'||title==='check'">
<el-form-item label="分管领导" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
{{ optionalChargeLeadershipList.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id" style="margin-right: 5px">
{{ item.name }}
</div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择分管领导"
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="preProcessShow === 'EDIT'">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
@@ -303,13 +314,23 @@ const deploymentId = ref()
const selectRows = ref([])
const projectId = ref(route.query.projectId)
const sessionParams = ref({})
const optionalChargeLeadershipPickerRef = ref()
const optionalChargeLeadershipList = ref([])
const filePreviewParam = ref({
fileUrl: '',
fileName: '',
fileType: 'pdf'
})
const filePreviewShow = ref(false)
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
}
const optionalChargeLeaderPickerOk = (userList) => {
optionalChargeLeadershipList.value = userList
localStorage.setItem('optionalChargeLeadershipList', JSON.stringify(optionalChargeLeadershipList.value))
}
const clickToPreview=(row)=>{
filePreviewShow.value = false
filePreviewParam.value = {
@@ -322,6 +343,17 @@ const clickToPreview=(row)=>{
})
}
const getOptionalChargeLeadershipList = (list) => {
if (!list || list && list.length === 0) {
if (localStorage.getItem('optionalChargeLeadershipList')) {
let param = JSON.parse(localStorage.getItem('optionalChargeLeadershipList'))
optionalChargeLeadershipList.value = param
return optionalChargeLeadershipList.value
}
} else {
return list
}
}
const getProjectPerson = (list) => {
if (!list || list && list.length === 0) {
if (localStorage.getItem('projectPersonUserList')) {
@@ -615,12 +647,14 @@ const handleSubmit = async () => {
}
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
params.projectPersonIds = projectPersonIds
params.optionalChargeLeadership = optionalChargeLeadershipList.value
if (props.mode === 'resubmit') {
res = await resubmitApply(params)
} else {
res = await projectApply(params)
}
} else if (props.step === '40') {
params.optionalChargeLeadership = optionalChargeLeadershipList.value
if (props.mode === 'resubmit') {
res = await resubmitCheck(params)
} else {
@@ -745,6 +779,12 @@ watchEffect(() => {
localProjectPerson.value = param
localStorage.setItem('projectPersonUserList', JSON.stringify(param))
}
if (localStorage.getItem('optionalChargeLeadershipList')) {
let param = JSON.parse(localStorage.getItem('optionalChargeLeadershipList'))
optionalChargeLeadershipList.value = param
// localProjectPerson.value = param
localStorage.setItem('optionalChargeLeadershipList', JSON.stringify(param))
}
return flag
})

View File

@@ -128,7 +128,7 @@
<el-row gutter="15">
<el-col :span="8">
<el-form-item label="开展政府申报" prop="governmentDeclaration" label-width="125">
<!-- :label-width="route.query.id && formData.isSpecialFund?145:!formData.isSpecialFund?145:145">-->
<!-- :label-width="route.query.id && formData.isSpecialFund?145:!formData.isSpecialFund?145:145">-->
<el-radio-group v-model="formData.governmentDeclaration">
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
:key="item.value"
@@ -165,30 +165,33 @@
</el-form-item>
</el-col>
<el-col :span="8" style="margin-bottom: -18px">
<!-- :label-width="!formData.isSpecialFund?!route.query.id?125:125:125">-->
<el-form-item label="知识产权状况" prop="intellectualProperty" :label-width="route.query.id && formData.isSpecialFund?135:formData.isSpecialFund?125:route.query.id?145:135">
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
<el-option
v-for="item in cacheStore.getDict('intellectual_property')"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="route.query.id && formData.isSpecialFund?24:formData.isSpecialFund?16:24" style="margin-bottom: -18px">
<el-form-item label="预期成果形式" prop="resultForm" :label-width="route.query.id && formData.isSpecialFund?125:formData.isSpecialFund?145:125">
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple>
<el-option
v-for="item in cacheStore.getDict('result_form')"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- :label-width="!formData.isSpecialFund?!route.query.id?125:125:125">-->
<el-form-item label="知识产权状况" prop="intellectualProperty"
:label-width="route.query.id && formData.isSpecialFund?135:formData.isSpecialFund?125:route.query.id?145:135">
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
<el-option
v-for="item in cacheStore.getDict('intellectual_property')"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="route.query.id && formData.isSpecialFund?24:formData.isSpecialFund?16:24"
style="margin-bottom: -18px">
<el-form-item label="预期成果形式" prop="resultForm"
:label-width="route.query.id && formData.isSpecialFund?125:formData.isSpecialFund?145:125">
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable multiple>
<el-option
v-for="item in cacheStore.getDict('result_form')"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="15">
@@ -242,6 +245,19 @@
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="分管领导" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
{{ optionalChargeLeadershipList.length !== 0 ? '更改' : '请选择' }}
</el-button>
<div v-for="item in optionalChargeLeadershipList" :key="item.id" style="margin-right: 5px">
{{ item.name }}
</div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择分管领导"
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOk"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" v-model:otherFileList="otherFileList"
@@ -278,6 +294,7 @@ import {getSubCompOpt} from "@/api/user/user";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getFormInfo} from "@/api/project-demand";
import {getFundOption} from "@/api/special-fund";
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
const changeDiagram = ref(false)
const cacheStore = useCacheStore()
@@ -292,6 +309,8 @@ const tagsViewStore = useTagsView()
const companyOption = ref([])
const summaryForm = ref()
const deploymentId = ref()
const optionalChargeLeadershipPickerRef = ref()
const optionalChargeLeadershipList = ref([])
const specialFundOption = ref([])
const showTable = ref(true)
const showSingleTable = ref(false)
@@ -329,6 +348,13 @@ const rules = reactive({
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
})
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
}
const optionalChargeLeaderPickerOk = (userList) => {
optionalChargeLeadershipList.value = userList
}
const handleBack = () => {
history.back()
@@ -435,6 +461,7 @@ const handleSubmit = debounce(async (instance) => {
otherFileList.value.forEach(item => {
otherFiles.push(getFileParam(item))
})
formData.value.optionalChargeLeadership=optionalChargeLeadershipList.value
if (formData.value.singleFile !== undefined) {
formData.value.singleFile = getFileParam(formData.value.singleFile)
}
@@ -447,7 +474,6 @@ const handleSubmit = debounce(async (instance) => {
})
return;
} else {
// formData.value.resultForm=JSON.stringify(formData.value.resultForm)
attachment.value.clearValidate()
}
let params = {
@@ -489,6 +515,7 @@ const handleResubmit = debounce((instance) => {
otherFiles.push(getFileParam(item))
})
}
formData.value.optionalChargeLeadership=optionalChargeLeadershipList.value
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
formData.value.specialFund = getFundName(formData.value.specialFundId)
}
@@ -501,7 +528,6 @@ const handleResubmit = debounce((instance) => {
})
return;
} else {
// formData.value.resultForm=JSON.stringify(formData.value.resultForm)
attachment.value.clearValidate()
}
let params = {
@@ -537,7 +563,6 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId
// res.data.formData.resultForm = JSON.parse(res.data.formData.resultForm)
formData.value = res.data.formData
loading.value = false
}

View File

@@ -86,6 +86,7 @@ localStorage.removeItem('otherFileList')
localStorage.removeItem('preProcess')
localStorage.removeItem('projectChargePersonUserList')
localStorage.removeItem('projectPersonUserList')
localStorage.removeItem('optionalChargeLeadershipList')
const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true})
detailData.value = {