Merge pull request 'dj' (#212) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/212
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 {
|
||||
margin-top: 10px;
|
||||
z-index: 666;
|
||||
position: absolute;
|
||||
position: static;
|
||||
//top: -20px;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,20 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="label" prop="attachment">
|
||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" @delete="deleteAttachment"/>
|
||||
<template v-if="preview">
|
||||
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 18px">{{ singleFile?.originalFileName }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :maxSize="0" @delete="deleteAttachment"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他文件">
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="false"/>
|
||||
<file-upload @getFile="getOtherFile"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
:data="allFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
@@ -75,6 +80,8 @@ const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传附件', trigger: ['blur','change']}],
|
||||
})
|
||||
const applyForm=ref()
|
||||
const singleFile=ref()
|
||||
const allFileList=ref([])
|
||||
const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
@@ -85,16 +92,32 @@ const props = defineProps({
|
||||
}, showTable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}, preview: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},otherFileList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
watch(() => props.showTable, (newVal) => {
|
||||
props.showTable = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.otherFileList, (newVal) => {
|
||||
props.otherFileList = newVal
|
||||
newVal.forEach(item=>{
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
newVal.forEach(item=>{
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.singleFile, (newVal) => {
|
||||
singleFile.value = newVal
|
||||
}, {deep: true})
|
||||
const getAttachment = (val) => {
|
||||
emit('getAttachment', val)
|
||||
@@ -140,7 +163,9 @@ defineExpose({
|
||||
},
|
||||
clearValidate(){
|
||||
return applyForm.value.clearValidate()
|
||||
}
|
||||
},
|
||||
allFileList,
|
||||
singleFile
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<baseTitle title="各流程信息"></baseTitle>
|
||||
<div class="steps-box">
|
||||
<el-steps :active="localActive" finish-status="success">
|
||||
<el-step
|
||||
v-for="(item, index) in localSteps"
|
||||
:key="item.key"
|
||||
:title="item.title"
|
||||
<el-step
|
||||
v-for="(item, index) in localSteps"
|
||||
:key="item.key"
|
||||
:title="item.title"
|
||||
:class="stepClass(index)"
|
||||
@click="handleStep(item.key, index)"
|
||||
|
||||
@click="handleStep(item.key, index)"
|
||||
|
||||
/>
|
||||
</el-steps>
|
||||
</div>
|
||||
@@ -91,7 +91,7 @@ const schema = computed(()=>{
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
@@ -99,7 +99,7 @@ const schema = computed(()=>{
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '截止时间',
|
||||
@@ -107,7 +107,7 @@ const schema = computed(()=>{
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '需求名称',
|
||||
@@ -115,7 +115,7 @@ const schema = computed(()=>{
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
// component:
|
||||
},
|
||||
]
|
||||
})
|
||||
@@ -241,6 +241,7 @@ getBaseInfo()
|
||||
watchEffect(() => {
|
||||
console.log(props.active, 'props.active');
|
||||
localActive.value = props.active
|
||||
getBaseInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -256,4 +257,4 @@ watchEffect(() => {
|
||||
.step-error {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<el-input v-model="formData.economicEstimate" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||
<el-input v-model="formData.specialFundAmount" clearable></el-input>
|
||||
</el-form-item>
|
||||
@@ -221,24 +221,27 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="router.currentRoute.value.name === 'Summary/edit'"/>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新发布</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getProcessInfo, requirementReported} from "./api";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "../../../api/user/user";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
@@ -246,10 +249,8 @@ const attachment = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
specialFund: null
|
||||
})
|
||||
const file = ref({})
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
@@ -278,29 +279,29 @@ const rules = reactive({
|
||||
})
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Summary/add') {
|
||||
if ( name.value=== 'Summary/add'||name.value === 'Summary/edit') {
|
||||
tag = '需求上报'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
type: type,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getEditOtherFile=(val)=>{
|
||||
console.log('getEditOtherFile',val)
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
let fileObj = compositeParam(val, 1)
|
||||
fileList.value.push(fileObj)
|
||||
file.value = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val, 2)
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
@@ -308,14 +309,31 @@ const getOtherFile = (val) => {
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
fileId: item.fileId
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
// if (!instance) return
|
||||
// instance.validate(async (valid, fields) => {
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
// if (!valid) return
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
"specialFund": "2",
|
||||
"projectName": "3",
|
||||
"projectName": "重新提交全流程测试",
|
||||
"startTime": "2024-05-24 00:00:00",
|
||||
"endTime": "2024-05-29 00:00:00",
|
||||
"projectType": "3",
|
||||
@@ -338,65 +356,104 @@ const handleSubmit = async (instance) => {
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
"deploymentId": "e75b2040-15b4-11ef-8cdf-f268fc747b04",
|
||||
"files": [
|
||||
{
|
||||
"fileId": 207,
|
||||
"type": 1
|
||||
},
|
||||
],
|
||||
deploymentId: deploymentId.value,
|
||||
"singleFile": singleFile,
|
||||
"files": otherFiles,
|
||||
// "requirementId":route.query.id,
|
||||
"requirementId": 102
|
||||
}
|
||||
// if (!instance) return
|
||||
// instance.validate(async (valid, fields) => {
|
||||
// if (fileList.value.length === 0) {
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
// if (!valid) return
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// files: files,
|
||||
// requirementId:102
|
||||
// }
|
||||
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'
|
||||
})
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// files: files,
|
||||
// requirementId:102
|
||||
// }
|
||||
let res = await requirementReported(params)
|
||||
}
|
||||
// })
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Summary/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
let params={
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
files: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: 102
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
resubmitReported(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getDetail(route.query.projectId).then(res => {
|
||||
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'
|
||||
})
|
||||
formData.value = res.data.formData
|
||||
}
|
||||
// })
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
}
|
||||
})
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.id) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
const staging = async () => {
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,9 +24,17 @@ export const getProcessInfo = () => {
|
||||
method: "post"
|
||||
});
|
||||
};
|
||||
export const getDetail = (requirementId) => {
|
||||
export const getDetail = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/requirement/collect/info/${requirementId}`,
|
||||
url: `/workflow/mosr/requirement/collect/info/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
export const resubmitReported = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,47 +1,32 @@
|
||||
<template>
|
||||
<steps :active="active" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<span v-show="showActive == '00'">需求征集</span>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"/>
|
||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" @getInfo="getDemandCollectionInfo"/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer"/>
|
||||
</template>
|
||||
</steps>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import SummaryDetail from '../../../components/DetailComponent/SummaryDetail.vue';
|
||||
import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getDetail} from "./api";
|
||||
import { markRaw, reactive, ref, shallowRef } from 'vue';
|
||||
import { getMapProjectStateInfo } from '../../../components/steps/api';
|
||||
import {markRaw, reactive, ref, shallowRef} from 'vue';
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const active = route.query.state
|
||||
const active = ref(route.query.state)
|
||||
const showActive = ref()
|
||||
const getDemandSummaryInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
// await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
getDetail(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
summaryData.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(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
// getDemandSummaryInfo()
|
||||
|
||||
const getInfo = async (state) => {
|
||||
const projectId = route.query.projectId
|
||||
const { code, data } = await getMapProjectStateInfo(projectId, state)
|
||||
const {code, data} = await getMapProjectStateInfo(projectId, state)
|
||||
summaryProcessViewer.value = false
|
||||
summaryData.value = data;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -58,6 +43,7 @@ const getInfo = async (state) => {
|
||||
}
|
||||
|
||||
const setDetail = (active) => {
|
||||
console.log('active', active)
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
}
|
||||
@@ -65,6 +51,7 @@ const setDetail = (active) => {
|
||||
const stepChange = (data) => {
|
||||
console.log(data)
|
||||
showActive.value = data.active
|
||||
getInfo(data.active)
|
||||
}
|
||||
|
||||
const summaryDetailRef = ref()
|
||||
|
||||
@@ -121,12 +121,12 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
} else if (row.state === '0') {
|
||||
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
}
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '编辑', func: () => handleEdit(row), type: 'primary'},{label: '上报', func: () => handleAdd(row), type: 'primary'}]
|
||||
// if (row.state === '3') {
|
||||
// btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
// } else if (row.state === '0') {
|
||||
// btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -165,18 +165,22 @@ const search = (val) => {
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const handleAdd = () => {
|
||||
const handleAdd = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/add',
|
||||
query: {}
|
||||
query: {
|
||||
isAdd: 1,
|
||||
id:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/edit',
|
||||
query: {
|
||||
id:row.requirementId,
|
||||
projectId:row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
|
||||
@@ -2,26 +2,13 @@
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="项目结项"></baseTitle>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目结项附件" prop="attachment">
|
||||
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<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>
|
||||
<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>
|
||||
</el-form>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
@@ -30,17 +17,28 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
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 tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
||||
})
|
||||
const fileList = ref(null)
|
||||
const file = 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 tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -66,31 +64,35 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
// {
|
||||
// prop: 'oper',
|
||||
// label: '操作',
|
||||
// align: 'center',
|
||||
// currentRender: ({row, index}) => {
|
||||
// return (
|
||||
// <div>
|
||||
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
]
|
||||
})
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Filing/conclusion') {
|
||||
tag = '项目结项'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -98,43 +100,91 @@ const compositeParam = (item) => {
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: formData.value.collectType
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件', val)
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value=compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
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) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// } else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
if(file.value.fileId!==undefined){
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
singleFile: singleFile,
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -93,12 +93,12 @@ const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'projectName',
|
||||
label: '名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'company',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
@@ -108,31 +108,37 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productMainBody',
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectEffect',
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
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',
|
||||
@@ -140,11 +146,11 @@ 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: () => handleConclusion(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '附件', func: () => handleCheck(row), type: 'primary'})
|
||||
} else if (row.state === '4') {
|
||||
btn.push({label: '结项', func: () => handleStandingBook(row), type: 'primary'})
|
||||
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -165,7 +171,7 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/workflow/mosr/project/filing',
|
||||
params: {},
|
||||
})
|
||||
|
||||
@@ -176,11 +182,19 @@ const search = (val) => {
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Implementation/detail',
|
||||
name:'Filing/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleConclusion = (row) => {
|
||||
router.push({
|
||||
name:'Filing/conclusion',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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,23 @@
|
||||
</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';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const fileList = ref(null)
|
||||
const file = 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'){
|
||||
@@ -42,13 +58,12 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
let fileObj = compositeParam(val, 1)
|
||||
fileList.value.push(fileObj)
|
||||
file.value=compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val, 2)
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
@@ -65,38 +80,64 @@ const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
if(fileList.value.length===0){
|
||||
applyForm.value.validate()
|
||||
}else {
|
||||
applyForm.value.clearValidate()
|
||||
}
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// }else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if (!valid) return
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let singleFile={}
|
||||
if(file.value.fileId!==undefined){
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
// deploymentId: deploymentId.value,
|
||||
files: files
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
singleFile: singleFile,
|
||||
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>
|
||||
@@ -13,21 +13,34 @@
|
||||
<AttachmentUpload ref="attachment" 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>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {ElMessage, 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 router = useRouter()
|
||||
const route = useRoute()
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||
})
|
||||
const fileList = ref([])
|
||||
const processStore = useProcessStore()
|
||||
const deploymentId = ref()
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
@@ -71,7 +84,8 @@ const tableConfig = reactive({
|
||||
// }
|
||||
]
|
||||
})
|
||||
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Initiation/apply') {
|
||||
@@ -90,13 +104,12 @@ const compositeParam = (item, type) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
let fileObj = compositeParam(val, 1)
|
||||
fileList.value.push(fileObj)
|
||||
file.value=compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val, 2)
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
@@ -111,38 +124,77 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if(fileList.value.length===0){
|
||||
applyForm.value.validate()
|
||||
}else {
|
||||
applyForm.value.clearValidate()
|
||||
}
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// applyForm.value.validate()
|
||||
// }else {
|
||||
// applyForm.value.clearValidate()
|
||||
// }
|
||||
if (!valid) return
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let singleFile={}
|
||||
if(file.value.fileId!==undefined){
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
// deploymentId: deploymentId.value,
|
||||
files: files
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
singleFile: singleFile,
|
||||
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 projectApply(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: 'Initiation'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
resubmit(submitParam(formData.value)).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -117,6 +117,11 @@ const tableConfig = reactive({
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
@@ -144,7 +149,7 @@ const tableConfig = reactive({
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
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'})
|
||||
}
|
||||
return (
|
||||
@@ -196,7 +201,9 @@ const handleApply = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/apply',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
isAdd: 1,
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user