fix : 修复项目申请/验收/结项功能
This commit is contained in:
43
src/api/project-manage/index.js
Normal file
43
src/api/project-manage/index.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
|
||||||
|
export const getProcessInfo = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/initiation/process',
|
||||||
|
method: "post"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const projectApply = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/initiation/apply',
|
||||||
|
method: "post",
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const projectCheck = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/implementation/initiation/check',
|
||||||
|
method: "post",
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getProjectCheckProcess = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/implementation/process',
|
||||||
|
method: "post",
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const projectConclusion = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/project/entry',
|
||||||
|
method: "post",
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getProjectConclusionProcess = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/process',
|
||||||
|
method: "post",
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -378,7 +378,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
.scale {
|
.scale {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
z-index: 666;
|
z-index: 666;
|
||||||
position: absolute;
|
position: static;
|
||||||
//top: -20px;
|
//top: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,26 +2,13 @@
|
|||||||
<div class="apply-block">
|
<div class="apply-block">
|
||||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="项目结项"></baseTitle>
|
<baseTitle title="项目结项"></baseTitle>
|
||||||
<el-row>
|
<AttachmentUpload label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
<el-col :span="24">
|
@getAttachment="getAttachment"
|
||||||
<el-form-item label="项目结项附件" prop="attachment">
|
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||||
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
<div class="approval-record">
|
||||||
</el-form-item>
|
<baseTitle title="流程"></baseTitle>
|
||||||
</el-col>
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
<el-col :span="24">
|
</div>
|
||||||
<el-form-item label="其他文件">
|
|
||||||
<el-card style="width: 100%">
|
|
||||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
|
||||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
|
||||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
|
||||||
<template #empty>
|
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
|
||||||
</template>
|
|
||||||
</fvTable>
|
|
||||||
</el-card>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
@@ -30,17 +17,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import FileUpload from "@/components/FileUpload.vue";
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
import {downloadFile} from "@/api/project-demand";
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import { ElNotification} from "element-plus";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getProjectConclusionProcess, projectConclusion} from "@/api/project-manage";
|
||||||
|
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
const fileList = ref(null)
|
const fileList = ref([])
|
||||||
const applyForm = ref()
|
const applyForm = ref()
|
||||||
|
const deploymentId = ref()
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -66,31 +62,35 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'oper',
|
// prop: 'oper',
|
||||||
label: '操作',
|
// label: '操作',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
currentRender: ({row, index}) => {
|
// currentRender: ({row, index}) => {
|
||||||
return (
|
// return (
|
||||||
<div>
|
// <div>
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||||
</div>
|
// </div>
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const handleDownload = (row) => {
|
const handleDownload = (row) => {
|
||||||
downloadFile(row.fileId).then(res => {
|
downloadFile(row.fileId).then(res => {
|
||||||
const blob = new Blob([res])
|
const blob = new Blob([res])
|
||||||
let a = document.createElement('a')
|
let a = document.createElement('a')
|
||||||
a.href=URL.createObjectURL(blob)
|
a.href = URL.createObjectURL(blob)
|
||||||
a.download = row.originalFileName
|
a.download = row.originalFileName
|
||||||
a.click()
|
a.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const compositeParam = (item) => {
|
const compositeParam = (item) => {
|
||||||
|
let tag = ''
|
||||||
|
if (router.currentRoute.value.name === 'Filing/conclusion') {
|
||||||
|
tag = '项目结项'
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
fileId: item.id,
|
fileId: item.id,
|
||||||
size: item.size,
|
size: item.size,
|
||||||
@@ -98,43 +98,88 @@ const compositeParam = (item) => {
|
|||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
processNodeTag: null,
|
processNodeTag: null,
|
||||||
tag: formData.value.collectType
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
console.log('上传文件', val)
|
console.log('上传文件getAttachment', val)
|
||||||
|
let fileObj = compositeParam(val, 1)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
console.log('上传文件getOtherFile', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val, 2)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
})
|
})
|
||||||
let fileObj = {}
|
|
||||||
let newFileArray = []
|
|
||||||
if (route.query.isAdd === undefined) {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj = compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
formData.value.fileList.push(fileObj)
|
|
||||||
})
|
|
||||||
fileList.value = formData.value.fileList
|
|
||||||
} else {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj = compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
})
|
|
||||||
formData.value.fileList = newFileArray
|
|
||||||
fileList.value = newFileArray
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const getOtherFile = () => {
|
|
||||||
|
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
type: item.type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
|
if (fileList.value.length === 0) {
|
||||||
|
applyForm.value.validate()
|
||||||
|
} else {
|
||||||
|
applyForm.value.clearValidate()
|
||||||
|
}
|
||||||
|
if (!valid) return
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
files: files,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await projectConclusion(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: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const init = () => {
|
||||||
|
getProjectConclusionProcess().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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -93,12 +93,12 @@ const tableIns = ref()
|
|||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'projectName',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'company',
|
prop: 'affiliatedCompany',
|
||||||
label: '所属公司',
|
label: '所属公司',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
@@ -108,31 +108,37 @@ const tableConfig = reactive({
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productMainBody',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectEffect',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'survey',
|
prop: 'economicEstimate',
|
||||||
label: '经营概况',
|
label: '经济概况',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'time',
|
prop: 'startTime',
|
||||||
label: '起止时间',
|
label: '起止时间',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
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',
|
prop: 'oper',
|
||||||
@@ -140,11 +146,11 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '结项', func: () => handleConclusion(row), type: 'primary'}]
|
||||||
if (row.state === '3') {
|
if (row.state === '3') {
|
||||||
btn.push({label: '附件', func: () => handleCheck(row), type: 'primary'})
|
btn.push({label: '附件', func: () => handleCheck(row), type: 'primary'})
|
||||||
} else if (row.state === '4') {
|
} else if (row.state === '4') {
|
||||||
btn.push({label: '结项', func: () => handleStandingBook(row), type: 'primary'})
|
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -165,7 +171,7 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/workflow/mosr/project/filing',
|
||||||
params: {},
|
params: {},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -176,11 +182,19 @@ const search = (val) => {
|
|||||||
|
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Implementation/detail',
|
name:'Filing/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleConclusion = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Filing/conclusion',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty description="暂无数据"/>
|
<el-empty description="暂无数据"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -79,10 +79,23 @@ const tableConfig = reactive({
|
|||||||
api: '',
|
api: '',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
<AttachmentUpload label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
<AttachmentUpload label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
@getAttachment="getAttachment"
|
@getAttachment="getAttachment"
|
||||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
@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">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -20,11 +24,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<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 formData = ref({})
|
||||||
const fileList = ref(null)
|
const fileList = ref([])
|
||||||
const applyForm = ref()
|
const applyForm = ref()
|
||||||
|
const deploymentId = ref()
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
const compositeParam = (item) => {
|
const compositeParam = (item) => {
|
||||||
let tag=''
|
let tag=''
|
||||||
if(router.currentRoute.value.name==='Implementation/check'){
|
if(router.currentRoute.value.name==='Implementation/check'){
|
||||||
@@ -79,24 +93,46 @@ const handleSubmit = (instance) => {
|
|||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
let params = {
|
let params = {
|
||||||
// deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
files: files
|
requirementId: route.query.id,
|
||||||
|
files: files,
|
||||||
|
projectId:route.query.projectId,
|
||||||
}
|
}
|
||||||
console.log('params',params)
|
console.log('params',params)
|
||||||
// let res = await requirementReported(params)
|
let res = await projectCheck(params)
|
||||||
// ElNotification({
|
ElNotification({
|
||||||
// title: '提示',
|
title: '提示',
|
||||||
// message: res.msg,
|
message: res.msg,
|
||||||
// type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
// })
|
})
|
||||||
// if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
// await router.push({
|
await router.push({
|
||||||
// name: 'Summary'
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const router = useRouter()
|
|||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '名称',
|
||||||
prop: 'requirementName',
|
prop: 'projectName',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入名称查询',
|
||||||
@@ -26,7 +26,7 @@ const searchConfig = reactive([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
prop: 'collectType',
|
prop: 'projectType',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择项目类型',
|
placeholder: '请选择项目类型',
|
||||||
@@ -36,7 +36,7 @@ const searchConfig = reactive([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
prop: 'projectEffect',
|
prop: 'projectImpact',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择项目影响',
|
placeholder: '请选择项目影响',
|
||||||
@@ -47,7 +47,7 @@ const searchConfig = reactive([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
prop: 'collectType',
|
prop: 'rdSubject',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择研发主体',
|
placeholder: '请选择研发主体',
|
||||||
@@ -58,7 +58,7 @@ const searchConfig = reactive([
|
|||||||
|
|
||||||
{
|
{
|
||||||
label: '起止时间',
|
label: '起止时间',
|
||||||
prop: 'time',
|
prop: 'startTime',
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择起止时间',
|
placeholder: '请选择起止时间',
|
||||||
@@ -97,12 +97,12 @@ const tableConfig = reactive({
|
|||||||
prop: 'selection'
|
prop: 'selection'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'projectName',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'company',
|
prop: 'affiliatedCompany',
|
||||||
label: '所属公司',
|
label: '所属公司',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
@@ -112,26 +112,37 @@ const tableConfig = reactive({
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productMainBody',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectEffect',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'time',
|
prop: 'economicEstimate',
|
||||||
|
label: '经济概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startTime',
|
||||||
label: '起止时间',
|
label: '起止时间',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
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',
|
prop: 'oper',
|
||||||
@@ -139,7 +150,7 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
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') {
|
if (row.state === '3') {
|
||||||
btn.push(
|
btn.push(
|
||||||
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
||||||
@@ -167,7 +178,7 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/workflow/mosr/project/implementation',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
|
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
|
||||||
@@ -191,7 +202,8 @@ const handleCheck = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/check',
|
name: 'Implementation/check',
|
||||||
query: {
|
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>
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||||
@getAttachment="getAttachment"
|
@getAttachment="getAttachment"
|
||||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
@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">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,12 +25,19 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {getProcessInfo,projectApply} from "@/api/project-manage";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const deploymentId = ref()
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const applyForm = ref()
|
const applyForm = ref()
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
@@ -71,7 +82,8 @@ const tableConfig = reactive({
|
|||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(true)
|
||||||
const compositeParam = (item, type) => {
|
const compositeParam = (item, type) => {
|
||||||
let tag = ''
|
let tag = ''
|
||||||
if (router.currentRoute.value.name === 'Initiation/apply') {
|
if (router.currentRoute.value.name === 'Initiation/apply') {
|
||||||
@@ -125,24 +137,46 @@ const handleSubmit = (instance) => {
|
|||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
let params = {
|
let params = {
|
||||||
// deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
files: files
|
requirementId: route.query.id,
|
||||||
|
files: files,
|
||||||
|
projectId:route.query.projectId,
|
||||||
}
|
}
|
||||||
console.log('params',params)
|
console.log('params',params)
|
||||||
// let res = await requirementReported(params)
|
let res = await projectApply(params)
|
||||||
// ElNotification({
|
ElNotification({
|
||||||
// title: '提示',
|
title: '提示',
|
||||||
// message: res.msg,
|
message: res.msg,
|
||||||
// type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
// })
|
})
|
||||||
// if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
// await router.push({
|
await router.push({
|
||||||
// name: 'Summary'
|
name: 'Initiation'
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const init = () => {
|
||||||
|
getProcessInfo().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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -117,6 +117,11 @@ const tableConfig = reactive({
|
|||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'economicEstimate',
|
||||||
|
label: '经济概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
label: '起止时间',
|
label: '起止时间',
|
||||||
@@ -144,7 +149,7 @@ const tableConfig = reactive({
|
|||||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
if (row.state === '3') {
|
if (row.state === '3') {
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||||
} else if (row.state === '20') {
|
} else if (row.state === '0') {
|
||||||
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@@ -195,7 +200,8 @@ const handleApply = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name:'Initiation/apply',
|
name:'Initiation/apply',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId,
|
||||||
|
projectId: row.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user