fix : 修复项目申请/验收/结项功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
@@ -79,10 +79,23 @@ const tableConfig = reactive({
|
||||
api: '',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '上传费用', key: '_export', color: '#DED0B2',auth: ''}
|
||||
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
|
||||
]
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleUploadFee()
|
||||
break;
|
||||
}
|
||||
}
|
||||
const handleUploadFee = () => {
|
||||
router.push({
|
||||
name: 'Implementation/uploadFee',
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
<AttachmentUpload label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
</div>
|
||||
@@ -20,11 +24,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getProjectCheckProcess, projectCheck} from "@/api/project-manage";
|
||||
import { ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
const formData = ref({})
|
||||
const fileList = ref(null)
|
||||
const fileList = ref([])
|
||||
const applyForm = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
if(router.currentRoute.value.name==='Implementation/check'){
|
||||
@@ -79,24 +93,46 @@ const handleSubmit = (instance) => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
// deploymentId: deploymentId.value,
|
||||
files: files
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
// 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 projectCheck(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: 'Implementation'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess().then(res => {
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value=data.deploymentId
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -15,7 +15,7 @@ const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'requirementName',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
@@ -26,7 +26,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'collectType',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
@@ -36,7 +36,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectEffect',
|
||||
prop: 'projectImpact',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目影响',
|
||||
@@ -47,7 +47,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'collectType',
|
||||
prop: 'rdSubject',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
@@ -58,7 +58,7 @@ const searchConfig = reactive([
|
||||
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'time',
|
||||
prop: 'startTime',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择起止时间',
|
||||
@@ -97,12 +97,12 @@ const tableConfig = reactive({
|
||||
prop: 'selection'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'projectName',
|
||||
label: '名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'company',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
@@ -112,26 +112,37 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productMainBody',
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectEffect',
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||
currentRender: ({row, index}) =>{
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
@@ -139,7 +150,7 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '验收', func: () => handleCheck(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push(
|
||||
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
||||
@@ -167,7 +178,7 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/workflow/mosr/project/implementation',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
|
||||
@@ -191,7 +202,8 @@ const handleCheck = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/check',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
84
src/views/project-management/implementation/uploadFee.vue
Normal file
84
src/views/project-management/implementation/uploadFee.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="demandForm" label-width="auto">
|
||||
<baseTitle title="上传费用"></baseTitle>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目负责人">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目开始时间">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目预计持续时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目开展方式">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目预算">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="date" label="时间" width="180" >
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.uqName" placeholder="请输入时间" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="项目费用" width="180" />
|
||||
<el-table-column prop="address" label="研发阶段" />
|
||||
<el-table-column prop="address" label="摘要" />
|
||||
<el-table-column prop="address" label="税后余额(元)" />
|
||||
<el-table-column prop="address" label="操作" >
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="mini" @click="handleDelete(scope.row)" link>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
const formData = ref({})
|
||||
const tableData = [
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-04',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
{
|
||||
date: '2016-05-01',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user