feat : 需求汇总加上"主项目"字段
This commit is contained in:
@@ -96,3 +96,10 @@ export const approvePlan= (data) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export const getProjectOption = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/master',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -371,6 +371,13 @@ const schema = computed(() => {
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" :style="{marginLeft:!formData.isSpecialFund?'-10px':'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,7 +205,18 @@
|
||||
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-option
|
||||
v-for="item in masterProjectList"
|
||||
: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;"
|
||||
@@ -326,7 +337,7 @@
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import {debounce} from 'lodash'
|
||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "@/api/project-demand/summary";
|
||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported,getProjectOption} from "@/api/project-demand/summary";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -355,6 +366,7 @@ const summaryForm = ref()
|
||||
const deploymentId = ref()
|
||||
const optionalChargeLeadershipPickerRef = ref()
|
||||
const optionalChargeLeadershipList = ref([])
|
||||
const masterProjectList = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const showTable = ref(true)
|
||||
const showSingleTable = ref(false)
|
||||
@@ -448,6 +460,14 @@ const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(formData.value.startTime).getTime();
|
||||
}
|
||||
|
||||
const getProjectList = () => {
|
||||
getProjectOption().then(res => {
|
||||
if (res.code === 1000) {
|
||||
masterProjectList.value=res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
getProjectList()
|
||||
const getIsFund = async () => {
|
||||
if (!route.query.id) return;
|
||||
// loading.value = true
|
||||
@@ -471,6 +491,15 @@ const getFundName = (id) => {
|
||||
})
|
||||
return label
|
||||
}
|
||||
const getProjectName = (id) => {
|
||||
let label = ''
|
||||
masterProjectList.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') {
|
||||
@@ -548,6 +577,9 @@ const handleSubmit = debounce(async (instance) => {
|
||||
if (formData.value.isSpecialFund && !formData.value.specialFund) {
|
||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||
}
|
||||
if (formData.value.masterProjectId) {
|
||||
formData.value.masterProjectName = getProjectName(formData.value.masterProjectId)
|
||||
}
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
@@ -602,6 +634,9 @@ const handleResubmit = debounce((instance) => {
|
||||
if (formData.value.isSpecialFund && !formData.value.specialFund) {
|
||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||
}
|
||||
if (formData.value.masterProjectId) {
|
||||
formData.value.masterProjectName = getProjectName(formData.value.masterProjectId)
|
||||
}
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
|
||||
Reference in New Issue
Block a user