Merge pull request 'master' (#311) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/311
This commit is contained in:
@@ -18,9 +18,10 @@ export const requirementReported = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getProcessInfo = () => {
|
||||
//获取需求上报 流程信息
|
||||
export const getProcessInfo = (specialFund) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/process',
|
||||
url: `/workflow/mosr/requirement/collect/process/${specialFund}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -37,6 +37,32 @@ import FileUpload from '@/components/FileUpload.vue'
|
||||
import {deleteFile, downloadFile} from "@/api/project-demand";
|
||||
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '项目附件'
|
||||
},
|
||||
showTable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
preview: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
otherFileList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
const formData = ref({})
|
||||
const tableConfig = reactive({
|
||||
@@ -72,9 +98,9 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'})
|
||||
if (row.newFile){
|
||||
btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
|
||||
}
|
||||
// if (row.newFile){
|
||||
// btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -88,6 +114,12 @@ const tableConfig = reactive({
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
{
|
||||
row.newFile||props.preview||!props.preview ? <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -101,39 +133,13 @@ const applyForm = ref()
|
||||
const singleFile = ref()
|
||||
const isSingleFile = ref(false)
|
||||
const allFileList = ref([])
|
||||
const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '项目附件'
|
||||
},
|
||||
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) => {
|
||||
console.log('newotherFileList', newVal)
|
||||
if (props.preview) {
|
||||
if (props.formData.fileList.length===0) {
|
||||
if (props.formData.fileList===null||props.formData.fileList.length===0) {
|
||||
allFileList.value = newVal
|
||||
} else {
|
||||
newVal?.forEach(item => {
|
||||
@@ -156,6 +162,21 @@ watch(() => props.formData.singleFile, (newVal) => {
|
||||
console.log('singleFile', newVal)
|
||||
singleFile.value = newVal
|
||||
}, {deep: true})
|
||||
watch(() => isSingleFile.value, (newVal) => {
|
||||
isSingleFile.value = newVal
|
||||
}, {deep: true})
|
||||
const handleDelete = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
allFileList.value.splice(allFileList.value.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
isSingleFile.value = true
|
||||
emit('getAttachment', val)
|
||||
@@ -172,11 +193,12 @@ const deleteAttachment = (val) => {
|
||||
type: 'success'
|
||||
})
|
||||
isSingleFile.value = false
|
||||
singleFile.value=null
|
||||
}
|
||||
});
|
||||
}
|
||||
const deleteSingleFile = (row, type) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的文件吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -190,7 +212,7 @@ const deleteSingleFile = (row, type) => {
|
||||
if (res.code === 1000) {
|
||||
isSingleFile.value=false
|
||||
if (type === 1) {
|
||||
singleFile.value = {}
|
||||
singleFile.value = null
|
||||
} else {
|
||||
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
@@ -221,7 +243,8 @@ defineExpose({
|
||||
return applyForm.value.clearValidate()
|
||||
},
|
||||
allFileList,
|
||||
singleFile
|
||||
singleFile,
|
||||
isSingleFile
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
|
||||
<process-diagram-viewer v-if="processViewer" :id-name="idName?idName:type"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,6 +67,10 @@ const props = defineProps({
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
idName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
@@ -224,7 +228,7 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
watchEffect(() => {
|
||||
Object.keys(props.formData).length && (form.value.setValues(props.formData))
|
||||
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||
})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser} from "@/api/expense-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -47,6 +49,13 @@ const searchConfig = reactive([
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
@@ -55,7 +64,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'researchPersonnel',
|
||||
label: '研发人员',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{getResearchName(row.researchPersonnel)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'wagesPayable',
|
||||
@@ -99,6 +111,21 @@ const tableConfig = reactive({
|
||||
}
|
||||
})
|
||||
const tableIns = ref()
|
||||
const researchOptions = ref([])
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const getResearchName=(id)=>{
|
||||
if(!id)return;
|
||||
let label=''
|
||||
researchOptions.value.forEach(item=>{
|
||||
if(item.value==id){
|
||||
label=item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId:route.query.id,
|
||||
@@ -106,6 +133,7 @@ const search = (val) => {
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
@@ -70,9 +70,9 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'})
|
||||
if (row.newFile) {
|
||||
btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
|
||||
}
|
||||
// if (row.newFile) {
|
||||
// btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -85,6 +85,12 @@ const tableConfig = reactive({
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
{
|
||||
row.newFile ? <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -132,28 +138,16 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
const handleDelete = (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
_value.value.splice(_value.value.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '用户取消删除! ',
|
||||
type: 'warning'
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
_value.value.splice(_value.value.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
|
||||
267
src/components/DetailComponent/ProjectApply.vue
Normal file
267
src/components/DetailComponent/ProjectApply.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="前置流程">
|
||||
<el-input v-model="formData.requirementName" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" :label="title+'附件'" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="route.query.state==3"/>
|
||||
<div v-if="route.query.state==3">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processDiagramViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
</div>
|
||||
</div>
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<div class="approval-record">
|
||||
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="route.query.state==0" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElNotification} from "element-plus";
|
||||
import {
|
||||
getApplyProcess,
|
||||
projectApply,
|
||||
resubmitApply,
|
||||
getApplyDetail,
|
||||
getProjectCheckProcess,
|
||||
projectCheck,
|
||||
resubmitCheck,
|
||||
getCheckDetail,
|
||||
projectConclusion,
|
||||
resubmitConclusion,
|
||||
getConclusionDetail,
|
||||
getProjectConclusionProcess
|
||||
} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '项目立项'
|
||||
},
|
||||
showTable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
const rules = reactive({
|
||||
// requirementName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
})
|
||||
const tagsViewStore = useTagsView()
|
||||
const processStore = useProcessStore()
|
||||
const otherFileList = ref([])
|
||||
const formData = ref({})
|
||||
const attachment = ref()
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const formRef = ref()
|
||||
const deploymentId = ref()
|
||||
const projectId = ref(route.query.projectId)
|
||||
const step = ref(route.query.step)
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
newFile: false,
|
||||
tag: props.title
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit =async () => {
|
||||
// if (!formRef.value) return
|
||||
// formRef.value.validate(async (valid) => {
|
||||
// if (!valid) return
|
||||
let files = []
|
||||
if (route.query.state === '3') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// if (formData.value.singleFile !== undefined) {
|
||||
// formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
// }
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
}
|
||||
console.log('params', params)
|
||||
let res
|
||||
if (step.value === '20') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
} else if (step.value === '40') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (step.value === '50') {
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
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)
|
||||
if (step.value === '20') {
|
||||
await router.push({
|
||||
name: 'Initiation'
|
||||
})
|
||||
}else if (step.value === '40') {
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}else if (step.value === '50') {
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}
|
||||
// })
|
||||
}
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
processDiagramViewer.value = false
|
||||
let res
|
||||
if (step.value === '20') {
|
||||
res = await getApplyProcess(id)
|
||||
} else if (step.value === '40') {
|
||||
res = await getProjectCheckProcess(id)
|
||||
}else if (step.value === '50') {
|
||||
res = await getProjectConclusionProcess(id)
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
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
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
let res
|
||||
loading.value = true
|
||||
if (step.value === '20') {
|
||||
res = await getApplyDetail(id)
|
||||
} else if (step.value === '40') {
|
||||
res = await getCheckDetail(id)
|
||||
}else if (step.value === '50') {
|
||||
res = await getConclusionDetail(id)
|
||||
}
|
||||
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.state == 3) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -9,13 +9,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额">
|
||||
<span>{{ formData.fundAmount }}</span>
|
||||
<el-form-item label="金额(元)">
|
||||
<span>{{ toThousands(formData.fundAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额">
|
||||
<span>{{ formData.residualAmount }}</span>
|
||||
<el-form-item label="剩余金额(元)">
|
||||
<span>{{ toThousands(formData.residualAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
@@ -50,7 +50,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="formData.taskId">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
@@ -72,17 +72,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId"></opinion>
|
||||
|
||||
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId"
|
||||
v-model:value="formData.auditOpinion"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['getInfo',"update:formData"])
|
||||
const emit = defineEmits(['getInfo', "update:formData"])
|
||||
const form = ref()
|
||||
|
||||
const props = defineProps({
|
||||
@@ -123,7 +124,10 @@ const projectTable = reactive({
|
||||
{
|
||||
prop: 'specialFundAmount',
|
||||
label: '项目金额',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.specialFundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -202,7 +206,7 @@ watch(() => props.showTable, (newVal) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ){
|
||||
height: 300px!important;
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.specialFund">
|
||||
<span>{{ changeName(fundOption, localFormData.specialFund) }}</span>
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.isSpecialFund">
|
||||
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -105,13 +105,13 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经济概算(元)" prop="economicEstimate">
|
||||
<span>{{ localFormData.economicEstimate }}</span>
|
||||
<span>{{toThousands( localFormData.economicEstimate )}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount"
|
||||
v-if="localFormData.specialFundAmount">
|
||||
<span>{{ localFormData.specialFundAmount }}</span>
|
||||
v-if="localFormData.isSpecialFund">
|
||||
<span>{{ toThousands(localFormData.specialFundAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@@ -163,6 +163,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
@@ -270,14 +271,9 @@ getFundOptions()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.el-table--fit) {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -93,12 +93,11 @@ const baseForm = ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
@@ -106,7 +105,13 @@ const schema = computed(() => {
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '截止时间',
|
||||
@@ -114,16 +119,8 @@ const schema = computed(() => {
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
},
|
||||
{
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
// component:
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
})
|
||||
|
||||
@@ -278,6 +275,16 @@ const getBaseInfo = async () => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
console.log('data.procedure',data.procedure,route.query.step)
|
||||
if(route.query.step==='40'){
|
||||
if(data.procedure.indexOf('40')==-1){
|
||||
data.procedure.push('40')
|
||||
}
|
||||
}else if(route.query.step==='50'){
|
||||
if(data.procedure.indexOf('50')==-1){
|
||||
data.procedure.push('50')
|
||||
}
|
||||
}
|
||||
localStepSuccess.value = formatProcedure(data.procedure)
|
||||
baseForm.value.setValues(data)
|
||||
emits('setDetail', formatActive(localActive.value))
|
||||
|
||||
8
src/utils/changePrice.js
Normal file
8
src/utils/changePrice.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export const toThousands = (num) => {
|
||||
if(num==undefined||num==null)return '--';
|
||||
const options = {
|
||||
style: 'currency',
|
||||
currency: 'CNY',
|
||||
};
|
||||
return (num).toLocaleString('zh-CN', options)
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = reactive([
|
||||
@@ -122,16 +122,26 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'digest',
|
||||
label: '摘要',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'afterTax',
|
||||
label: '税后余额(元)',
|
||||
align: 'center'
|
||||
}
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.afterTax)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'source',
|
||||
label: '来源',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.source&&row.source !== null&&row.source!==undefined) {
|
||||
return (<Tag dictType={'ledger_source'} value={row.source}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
api: '/workflow/mosr/expense/ledger',
|
||||
params: {}
|
||||
|
||||
@@ -159,7 +159,7 @@ const rules = reactive({
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(false)
|
||||
const loading = ref(true)
|
||||
const loading = ref(false)
|
||||
const showTable = ref(true)
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -365,7 +365,6 @@ const handleBack = () => {
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.id) {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {ElNotification} from "element-plus";
|
||||
@@ -104,12 +105,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'afterTax',
|
||||
label: '分摊金额',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'digest',
|
||||
label: '摘要',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.afterTax)}</span>
|
||||
}
|
||||
}
|
||||
],
|
||||
api:'/workflow/mosr/cost/allocation/collect',
|
||||
@@ -117,6 +116,7 @@ const tableConfig = reactive({
|
||||
allocationId:route.query.id
|
||||
}
|
||||
})
|
||||
|
||||
const getDetail = async () => {
|
||||
const id = route.query.id
|
||||
shareProcessViewer.value = false
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -138,7 +138,7 @@ const rules = reactive({
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const tableConfig = reactive({
|
||||
@@ -204,6 +204,15 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getSpecialFundName = (val) => {
|
||||
let label
|
||||
specialFundOption.value.forEach(item => {
|
||||
if (item.value == val) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||
@@ -284,7 +293,8 @@ const submitParam = (item) => {
|
||||
fileList: files,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
isSpecialFund: item.isSpecialFund,
|
||||
specialFund: item.specialFund
|
||||
specialFundId: item.specialFundId,
|
||||
specialFund: getSpecialFundName(item.specialFundId)
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
|
||||
@@ -9,17 +9,21 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" v-if="!route.query.id">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund" >
|
||||
<el-radio-group v-model="formData.isSpecialFund">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="formData.isSpecialFund?(!route.query.id?6:12):6">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="formData.isSpecialFund">
|
||||
<span v-if="route.query.id">{{ getSpecialFundName(formData.specialFund) }}</span>
|
||||
<el-select v-else v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-col :span="6" v-if="route.query.id && formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
@@ -44,7 +48,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-form-item label="结束时间" prop="endTime"
|
||||
:title="!formData.startTime?'请先选择开始时间!':''">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
@@ -208,19 +213,21 @@
|
||||
<el-input-number v-model="formData.economicEstimate" placeholder="请输入经济概算" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" v-if="formData.isSpecialFund">
|
||||
<el-col :span="12" v-if="formData.isSpecialFund!==false">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount">
|
||||
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<el-input v-model="formData.serviceDescription" type="textarea" clearable></el-input>
|
||||
<el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" type="textarea" clearable></el-input>
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -237,6 +244,7 @@
|
||||
<!-- <el-button type="info" @click="staging">存为草稿</el-button>-->
|
||||
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -268,7 +276,6 @@ const deploymentId = ref()
|
||||
const specialFundOption = ref([])
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const file = ref({})
|
||||
const formData = ref({
|
||||
isSpecialFund: false,
|
||||
industryUniversityResearch: '0',
|
||||
@@ -277,7 +284,7 @@ const formData = ref({
|
||||
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
// specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
||||
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
||||
@@ -301,32 +308,28 @@ const rules = reactive({
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||
})
|
||||
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(formData.value.startTime).getTime();
|
||||
}
|
||||
|
||||
const getIsFund = async () => {
|
||||
if (!route.query.id) return;
|
||||
loading.value = true
|
||||
// loading.value = true
|
||||
await getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
loading.value = false
|
||||
// loading.value = false
|
||||
formData.value.isSpecialFund = res.data.isSpecialFund
|
||||
if (res.data.isSpecialFund) {
|
||||
formData.value.specialFund = Number(res.data.specialFund)
|
||||
formData.value.specialFundId = res.data.specialFundId
|
||||
formData.value.specialFund = res.data.specialFund
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const getSpecialFundName = (val) => {
|
||||
let label
|
||||
specialFundOption.value.forEach(item => {
|
||||
if (item.value == val) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||
@@ -345,7 +348,6 @@ const compositeParam = (item, type) => {
|
||||
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
@@ -358,6 +360,8 @@ const getOtherFile = (val) => {
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
console.log('item', item)
|
||||
if (item === undefined) return;
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
@@ -373,55 +377,21 @@ const handleSubmit = debounce(async (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
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": "测试全流程功能-上报",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
let params = {
|
||||
...formData.value,
|
||||
isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
console.log('params', params)
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -447,35 +417,13 @@ const handleSubmit = debounce(async (instance) => {
|
||||
})
|
||||
})
|
||||
const handleResubmit = debounce(() => {
|
||||
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
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params = {
|
||||
...formData.value,
|
||||
isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -486,6 +434,12 @@ const handleResubmit = debounce(() => {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -503,6 +457,7 @@ const handleResubmit = debounce(() => {
|
||||
})
|
||||
|
||||
const getDetailInfo = async () => {
|
||||
loading.value = true
|
||||
getDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -515,13 +470,23 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const specialFundChange = () => {
|
||||
processInfo()
|
||||
}
|
||||
const init = async () => {
|
||||
await getIsFund()
|
||||
loading.value = true
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
await getIsFund()
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
await processInfo()
|
||||
loading.value = false
|
||||
}
|
||||
const processInfo = () => {
|
||||
processStore.setDesign(null)
|
||||
processDiagramViewer.value=false
|
||||
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
@@ -544,11 +509,10 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
await init()
|
||||
})
|
||||
const staging = async () => {
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="name==='Filing/conclusion'" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -92,6 +93,9 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Filing/conclusion' || name.value === 'Filing/edit') {
|
||||
@@ -109,7 +113,6 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
@@ -130,23 +133,20 @@ const getFileParam = (item) => {
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -154,7 +154,7 @@ const handleSubmit = async () => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
@@ -172,34 +172,13 @@ const handleSubmit = async () => {
|
||||
}
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (attachment.value.singleFile !== null && name.value === 'Filing/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
|
||||
if (name.value === 'Filing/edit') {
|
||||
attachment.value.allFileList?.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (attachment.value.singleFile==null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -207,9 +186,16 @@ const handleResubmit = () => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
} else{
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitConclusion(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -254,7 +240,7 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {reactive, shallowRef} from "vue";
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
@@ -192,7 +192,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概算(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -125,7 +126,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'afterTax',
|
||||
label: '税后余额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.afterTax)}</span>
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/expense/ledger',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<el-form :model="attachment" inline style="margin-top: 15px">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||
@@ -29,7 +31,9 @@
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {searchFileList} from "@/api/project-manage/attachment.js";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -37,6 +41,39 @@ const uploadState = ref(true)
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
const tagsOption = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
@@ -80,6 +117,16 @@ const tableConfig = reactive({
|
||||
})
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Implementation/edit'"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Implementation/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
@@ -20,24 +21,25 @@
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="name==='Implementation/check'" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit(applyForm)">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getProjectCheckProcess, projectCheck,getCheckDetail,resubmitCheck} from "@/api/project-manage";
|
||||
import {getProjectCheckProcess, projectCheck, getCheckDetail, resubmitCheck} 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 router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
@@ -45,10 +47,13 @@ const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
if(name.value==='Implementation/check'||name.value === 'Implementation/edit'){
|
||||
tag='项目验收'
|
||||
let tag = ''
|
||||
if (name.value === 'Implementation/check' || name.value === 'Implementation/edit') {
|
||||
tag = '项目验收'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -62,7 +67,6 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value=compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
@@ -86,32 +90,20 @@ const handleSubmit = (instance) => {
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
let fileArray
|
||||
if(name.value === 'Implementation/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 => {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -119,10 +111,10 @@ const handleSubmit = (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params-提交',params)
|
||||
console.log('params-提交', params)
|
||||
let res = await projectCheck(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -141,34 +133,13 @@ const handleResubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/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
|
||||
if (name.value === 'Implementation/edit') {
|
||||
attachment.value.allFileList?.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (attachment.value.singleFile==null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -176,9 +147,16 @@ const handleResubmit = (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
} else{
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitCheck(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -204,16 +182,16 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
const init = () => {
|
||||
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value=data.deploymentId
|
||||
deploymentId.value = data.deploymentId
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -224,7 +202,7 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -235,8 +213,8 @@ const init = () => {
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (name.value === 'Implementation/edit'){
|
||||
loading.value=true
|
||||
if (name.value === 'Implementation/edit') {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" >
|
||||
{{ modelValue || '请选择抄送人员' }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
// const emit = defineEmits('update: modelValue')
|
||||
|
||||
const localText = ref('')
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -7,23 +7,27 @@
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
:processViewer="commonProvessViewer" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'&&!showCheck" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'&&!showFiling" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply v-if="showApply&&showActive == '20'" :data="commonForm"/>
|
||||
<project-apply title="项目验收" v-if="showCheck&&showActive == '40'" :data="commonForm"/>
|
||||
<project-apply title="项目结项" v-if="showFiling&&showActive == '50'" :data="commonForm"/>
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -36,7 +40,9 @@ import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const showApply = ref(false)
|
||||
const showCheck = ref(false)
|
||||
const showFiling = ref(false)
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
@@ -54,18 +60,15 @@ const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
loading.value = false
|
||||
} else {
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if(msg==='查询结果为空'){
|
||||
commonForm.value=[]
|
||||
if (msg === '查询结果为空') {
|
||||
commonForm.value = []
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
@@ -79,7 +82,7 @@ const getAllInfo = async (state) => {
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
commonProvessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
@@ -88,41 +91,75 @@ const getAllInfo = async (state) => {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
|
||||
const changeModel = (active) => {
|
||||
if (route.query.step === '20' && active === '20') {
|
||||
if (route.query.state === '0') {
|
||||
showApply.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showApply.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showApply.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else if (route.query.step === '40' && active === '40') {
|
||||
if (route.query.state === '0') {
|
||||
showCheck.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showCheck.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showCheck.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else if (route.query.step === '50' && active === '50') {
|
||||
if (route.query.state === '0') {
|
||||
showFiling.value = true
|
||||
} else if (route.query.state === '3') {
|
||||
showFiling.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showFiling.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
} else {
|
||||
getAllInfo(active)
|
||||
}
|
||||
}
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getAllInfo(active)
|
||||
changeModel(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
getAllInfo(data.active)
|
||||
changeModel(data.active)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
background-color: #DED0B2;
|
||||
}
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
//.is-active {
|
||||
// color: black;
|
||||
// //background-color: #DED0B2;
|
||||
//}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {reactive, shallowRef} from "vue";
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
@@ -210,7 +210,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概算(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -242,6 +245,7 @@ const tableConfig = reactive({
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
@@ -360,7 +364,7 @@ const handleShare = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/share',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<el-form-item label="抄送人员">
|
||||
<Ttsup :modelValue="chooseUserInfo()" @click="chooseUser"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList" @ok="selected"/>
|
||||
<AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Phase/edit'"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Phase/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
@@ -16,7 +23,9 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getPhaseProcess,submitPhaseChange,getPhaseForm,resubmitPhaseForm} from "@/api/project-manage";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
import Ttsup from './components/ToolToShowUserPicker.vue'
|
||||
import {getPhaseProcess, submitPhaseChange, getPhaseForm, resubmitPhaseForm} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -25,6 +34,7 @@ const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const userPicker = ref()
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
@@ -34,6 +44,7 @@ const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const userList = ref([])
|
||||
const processStore = useProcessStore()
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
@@ -52,7 +63,7 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
@@ -70,39 +81,111 @@ const getFileParam = (item) => {
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit =async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
|
||||
const chooseUser = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const chooseUserInfo = () => {
|
||||
if (userList.value.length > 0) {
|
||||
return userList.value.map(item => {
|
||||
return item.name
|
||||
}).join(',')
|
||||
} else {
|
||||
return "请选择抄送人员"
|
||||
}
|
||||
}
|
||||
const selected = (select) => {
|
||||
let userInfoList = []
|
||||
for (let val of select) {
|
||||
let userInfo = {
|
||||
id: val.id,
|
||||
name: val.name,
|
||||
avatar: val.avatar,
|
||||
}
|
||||
fileArray = otherFileList.value
|
||||
fileArray.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
userInfoList.push(userInfo)
|
||||
}
|
||||
userList.value = userInfoList
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
otherFileList.value?.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let userIds = []
|
||||
if (userList.value.length > 0) {
|
||||
userIds = userList.value?.map(item => {
|
||||
return item.id
|
||||
})
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params-提交', params)
|
||||
let res = await submitPhaseChange(params)
|
||||
}
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
userIds: userIds
|
||||
}
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let res = await submitPhaseChange(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 handleResubmit = (instance) => {
|
||||
let otherFiles = []
|
||||
if (name.value === 'Phase/edit') {
|
||||
attachment.value.allFileList?.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
let userIds = []
|
||||
if (userList.value.length > 0) {
|
||||
userIds = userList.value?.map(item => {
|
||||
return item.id
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
userIds: userIds
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitPhaseForm(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -110,67 +193,14 @@ const handleSubmit =async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleResubmit = (instance) => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Phase/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))
|
||||
})
|
||||
//todo requirementId
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitPhaseForm(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const {msg, code,data} = await getPhaseProcess()
|
||||
const {msg, code, data} = await getPhaseProcess()
|
||||
processDiagramViewer.value = false
|
||||
if (code === 1000) {
|
||||
deploymentId.value = data.deploymentId
|
||||
@@ -184,11 +214,11 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type:'error'
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -201,21 +231,21 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (name.value === 'Phase/edit'){
|
||||
loading.value=true
|
||||
if (name.value === 'Phase/edit') {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.apply-block{
|
||||
.apply-block {
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="阶段变更详情"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px">抄送人:{{copyName}}</div>
|
||||
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" v-model:value="auditOpinion"></opinion>
|
||||
@@ -16,6 +17,7 @@ const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
@@ -25,6 +27,7 @@ const getInfo = async () => {
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList.map(item=>item.name).join(',')
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
@@ -9,7 +11,44 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {getResearchUser} from "@/api/expense-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '关键词',
|
||||
@@ -55,14 +94,17 @@ const tableConfig = reactive({
|
||||
width:'80'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'time',
|
||||
label: '时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'researchPersonnel',
|
||||
label: '研发人员',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{getResearchName(row.researchPersonnel)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'wagesPayable',
|
||||
@@ -78,32 +120,63 @@ const tableConfig = reactive({
|
||||
prop: 'reserveFund',
|
||||
label: '公积金',
|
||||
align: 'center'
|
||||
},{
|
||||
},
|
||||
{
|
||||
prop: 'socialSecurity',
|
||||
label: '社保',
|
||||
align: 'center'
|
||||
},{
|
||||
},
|
||||
{
|
||||
prop: 'annuity',
|
||||
label: '年金',
|
||||
align: 'center'
|
||||
},{
|
||||
},
|
||||
{
|
||||
prop: 'workday',
|
||||
label: '工作日(天)',
|
||||
align: 'center'
|
||||
},{
|
||||
},
|
||||
{
|
||||
prop: 'researchDuration',
|
||||
label: '研发工时(天)',
|
||||
align: 'center'
|
||||
},{
|
||||
prop: 'survey',
|
||||
},
|
||||
{
|
||||
prop: 'subtotal',
|
||||
label: '小计',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/cost/allocation/usr',
|
||||
params: {},
|
||||
api: '/workflow/mosr/project/implementation/allocation/info',
|
||||
params: {
|
||||
projectId: route.query.id
|
||||
}
|
||||
})
|
||||
const researchOptions = ref([])
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const getResearchName=(id)=>{
|
||||
if(!id)return;
|
||||
let label=''
|
||||
researchOptions.value.forEach(item=>{
|
||||
if(item.value==id){
|
||||
label=item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getResearchOptions()
|
||||
getBaseInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<baseTitle title="上传费用"></baseTitle>
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<el-form :model="tableForm" ref="form" class="query-form">
|
||||
<el-form-item label="项目名称">
|
||||
<span>{{projectName}}</span>
|
||||
</el-form-item>
|
||||
<el-table :data="tableForm.tableData" style="width: 100%">
|
||||
<el-table-column prop="time" label="时间">
|
||||
<template #default="scope">
|
||||
@@ -85,6 +83,8 @@ import {addLedger} from "@/api/project-manage";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useRoute} from "vue-router";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "../../../components/steps/api";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
@@ -92,7 +92,40 @@ const router = useRouter()
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const form = ref()
|
||||
const projectName=ref(localStorage.getItem('projectName'))
|
||||
const projectName=ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
const rules = reactive({
|
||||
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
|
||||
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
|
||||
@@ -112,6 +145,16 @@ const tableForm = reactive({
|
||||
}
|
||||
]
|
||||
})
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
|
||||
const handleAdd = () => {
|
||||
let row = {
|
||||
projectId: route.query.id,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
<AttachmentUpload ref="attachment" label="项目立项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="name === 'Initiation/edit'"/>
|
||||
@@ -21,13 +21,14 @@
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="name==='Initiation/apply'" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import { ElNotification} from "element-plus";
|
||||
import {ElNotification} from "element-plus";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
@@ -43,7 +44,6 @@ const rules = reactive({
|
||||
const processStore = useProcessStore()
|
||||
const deploymentId = ref()
|
||||
const attachment = ref()
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
@@ -88,6 +88,9 @@ const loading = ref(false)
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
@@ -114,7 +117,6 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
@@ -137,16 +139,20 @@ const handleSubmit = (instance) => {
|
||||
instance.validate(async (valid) => {
|
||||
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))
|
||||
})
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -157,13 +163,6 @@ const handleSubmit = (instance) => {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await projectApply(params)
|
||||
ElNotification({
|
||||
@@ -181,32 +180,12 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
const handleResubmit = async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/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
|
||||
if (name.value === 'Initiation/edit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
if (attachment.value.singleFile==null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -214,10 +193,17 @@ const handleResubmit = async () => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
} else{
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
console.log('params', params, attachment.value.isSingleFile)
|
||||
let res = await resubmitApply(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
{
|
||||
@@ -191,7 +191,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概算(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
|
||||
@@ -6,12 +6,17 @@
|
||||
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额(元)" prop="fundAmount">
|
||||
<el-input-number v-model="formData.fundAmount" placeholder="请输入金额" :controls="false"/>
|
||||
<el-input-number v-model="formData.fundAmount" placeholder="请输入金额" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce"
|
||||
v-model:value="formData.introduce"/>
|
||||
<el-input
|
||||
v-model="formData.introduce"
|
||||
style="width:100%"
|
||||
:rows="5"
|
||||
type="textarea"
|
||||
placeholder="请输入介绍"
|
||||
/>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable"
|
||||
@@ -35,11 +40,12 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElNotification} from "element-plus";
|
||||
import {addFund, resubmitFund, getFundDetail,getFundProcess} from "@/api/special-fund";
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import {addFund, resubmitFund, getFundDetail, getFundProcess} from "@/api/special-fund";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
@@ -91,6 +97,9 @@ const tableConfig = reactive({
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -103,7 +112,27 @@ const rules = reactive({
|
||||
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
|
||||
introduce: [{required: true, message: '请输入介绍', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const handleDelete = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (routerName.value === 'Fund/add' || routerName.value === 'Fund/edit') {
|
||||
@@ -202,11 +231,11 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type:'error'
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -240,7 +269,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ){
|
||||
height: 300px!important;
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { ElNotification} from "element-plus";
|
||||
import {deleteFund} from "@/api/special-fund";
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -75,12 +75,18 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'fundAmount',
|
||||
label: '资金金额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.fundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'residualAmount',
|
||||
label: '剩余金额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.residualAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectNumber',
|
||||
@@ -153,6 +159,7 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const tableIns = ref()
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {fileURLToPath, URL} from 'node:url'
|
||||
import {defineConfig} from 'vite'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { defineConfig } from 'vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
import IconsResolver from 'unplugin-icons/resolver'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
@@ -17,7 +17,7 @@ export default defineConfig({
|
||||
vueJsx(),
|
||||
AutoImport({
|
||||
//自动导入vue相关函数
|
||||
imports: ['vue', 'vue-router'],
|
||||
imports: ['vue','vue-router'],
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
//自动导入图标组件
|
||||
@@ -69,8 +69,8 @@ export default defineConfig({
|
||||
open: true,
|
||||
proxy: {
|
||||
// '/api/workflow': {
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
// // target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://frp.feashow.cn:31800/',
|
||||
// target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://192.168.31.175:8000',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
@@ -80,19 +80,19 @@ export default defineConfig({
|
||||
// target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://192.168.31.175:8000',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/summary/, '')
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
// },
|
||||
'/api': {
|
||||
target: 'http://mosr.feashow.cn',
|
||||
// target: 'http://clay.frp.feashow.cn/',
|
||||
// target: 'http://mosr.feashow.cn/',
|
||||
target: 'http://10.7.127.57:8000',
|
||||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
// '/summary/notice-ws': {
|
||||
// target: 'ws://mosr.feashow.cn/summary/notice-ws',
|
||||
// ws: true,
|
||||
// changeOrigin: true,
|
||||
// }
|
||||
'/api/notice-ws': {
|
||||
target: 'ws://mosr.feashow.cn/api/notice-ws',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user