fix : 修复费用分摊复制功能、数字框默认值为null、项目归档显示是哪个流程的上传附件

This commit is contained in:
2024-06-14 13:04:37 +08:00
parent 6d56c4702b
commit f240016e44
11 changed files with 523 additions and 75 deletions

View File

@@ -125,8 +125,14 @@
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
</div>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
<div style="display: flex;align-items: center;margin-bottom: 20px">
<baseTitle title="流程图"></baseTitle>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px"
/>
</div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="routerName==='Share/add'" @click="handleSubmit(form)">提交</el-button>
@@ -143,6 +149,7 @@ import {addAllocation, getAllocationDetail, getAllocationProcess, getResearchUse
import {useProcessStore} from '@/stores/processStore.js';
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
const changeDiagram = ref(false)
const rules = reactive({
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}],
@@ -171,13 +178,13 @@ const formData = ref({
projectId:'',
projectName: '',
researchPersonnel:'',
wagesPayable:'',
performance:'',
reserveFund:'',
socialSecurity:'',
annuity:'',
workday:'',
researchDuration:''
wagesPayable:null,
performance:null,
reserveFund:null,
socialSecurity:null,
annuity:null,
workday:'21.75',
researchDuration:null,
}
]
})
@@ -207,19 +214,30 @@ const handleAdd = () => {
projectId: '',
projectName: '',
researchPersonnel: '',
wagesPayable: '',
performance: '',
reserveFund: '',
socialSecurity: '',
annuity: '',
workday: '',
researchDuration: '',
// subtotal: '',
wagesPayable:null,
performance:null,
reserveFund:null,
socialSecurity:null,
annuity:null,
workday:'21.75',
researchDuration:null,
}
formData.value.tableData.push(row)
}
const handleCopy = (row) => {
formData.value.tableData.push(row)
let copyObj = {
projectId: row.projectId,
projectName: '',
researchPersonnel: row.researchPersonnel,
wagesPayable: row.wagesPayable,
performance: row.performance,
reserveFund: row.reserveFund,
socialSecurity: row.socialSecurity,
annuity: row.annuity,
workday:'21.75',
researchDuration: row.researchDuration,
}
formData.value.tableData.push(copyObj)
}
const handleDelete = (index) => {
formData.value.tableData.splice(index, 1)
@@ -243,7 +261,7 @@ const handleSubmit = (instance) => {
usrAllocations: formData.value.tableData,
deploymentId: processInstanceData.value.deploymentId,
}
console.log('params',params)
// console.log('params',params)
const {code, msg} = await addAllocation(params)
ElNotification({
title: '提示',
@@ -279,7 +297,7 @@ const handleResubmit = (instance) => {
usrAllocations: formData.value.tableData,
deploymentId: processInstanceData.value.deploymentId,
}
console.log('params',params)
// console.log('params',params)
const {code, msg} = await editAllocation(params)
ElNotification({
title: '提示',
@@ -321,7 +339,6 @@ const getDetailList = async () => {
item.researchPersonnel = Number(item.researchPersonnel)
})
formData.value.tableData = data.rows
console.log('formData.value.tableData',formData.value.tableData)
nextTick(() => {
showTable.value = true
})

View File

@@ -34,7 +34,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
<!-- <el-button @click="showCompany">请选择</el-button>-->
<!-- <el-button @click="showCompany">请选择</el-button>-->
<el-tree-select v-model="formData.companyIds" :data="companyOption"
filterable clearable :check-strictly="true" multiple/>
</el-form-item>
@@ -79,8 +79,14 @@
</template>
</fvTable>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
<div style="display: flex;align-items: center;margin-bottom: 20px">
<baseTitle title="流程图"></baseTitle>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px"
/>
</div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
@@ -109,6 +115,7 @@ import {getSubCompOpt} from '@/api/user/user.js'
import {useTagsView} from '@/stores/tagsview.js'
import {getFundOption} from "@/api/special-fund";
const changeDiagram = ref(false)
const tagsViewStore = useTagsView()
const authStore = useAuthStore()
const router = useRouter()
@@ -389,7 +396,8 @@ onMounted(async () => {
:deep(.el-empty__description) {
margin-top: 0;
}
.tree-select{
.tree-select {
:deep(.el-form-item__content .el-select__wrapper ) {
width: 750px;
}

View File

@@ -237,8 +237,14 @@
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="name === 'Summary/edit'"/>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
<div style="display: flex;align-items: center;margin-bottom: 20px">
<baseTitle title="流程图"></baseTitle>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px"
/>
</div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
</div>
<div class="oper-page-btn">
<!-- <el-button type="info" @click="staging">存为草稿</el-button>-->
@@ -261,6 +267,7 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
import {getFormInfo} from "@/api/project-demand";
import {getFundOption} from "@/api/special-fund";
const changeDiagram = ref(false)
const cacheStore = useCacheStore()
const processStore = useProcessStore()
const router = useRouter()

View File

@@ -1,7 +1,7 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="上传附件"></baseTitle>
<baseTitle :title="getName()+'-上传附件'"></baseTitle>
<el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getFile" />
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"
@@ -102,25 +102,21 @@ const getBaseInfo = async () => {
}
getBaseInfo()
const compositeParam = (item) => {
let tag=''
const getName=()=>{
switch (route.query.name) {
case '00':
tag='需求征集'
break
return '需求征集'
case '10':
tag='需求上报'
break
return '需求上报'
case '20':
tag='项目立项'
break
return '项目立项'
case '40':
tag='项目实施'
break
return '项目实施'
case '50':
tag='项目归档'
break
return '项目归档'
}
}
const compositeParam = (item) => {
return {
fileId: item.id,
size: item.size,
@@ -128,7 +124,7 @@ const compositeParam = (item) => {
fileType: item.fileType,
url: item.url,
newFile: true,
tag: tag,
tag: getName(),
}
}
const getFile = (val) => {

View File

@@ -13,8 +13,14 @@
@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"/>
<div style="display: flex;align-items: center;margin-bottom: 20px">
<baseTitle title="流程图"></baseTitle>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px"
/>
</div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="name==='Phase/change'" @click="handleSubmit">提交</el-button>
@@ -34,6 +40,7 @@ import {useTagsView} from '@/stores/tagsview.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const changeDiagram = ref(false)
const tagsViewStore = useTagsView()
const router = useRouter()
const route = useRoute()

View File

@@ -1,7 +1,7 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="标签名称"></baseTitle>
<baseTitle title="项目实施-上传附件"></baseTitle>
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
<el-form-item label="标签名称" prop="tagName">
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
@@ -87,9 +87,10 @@ const tableConfig = reactive({
align: 'center'
},
{
prop: 'tag',
prop: 'size',
label: '文件大小',
align: 'center'
align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
prop: 'oper',

View File

@@ -27,8 +27,14 @@
</template>
</fvTable>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
<div style="display: flex;align-items: center;margin-bottom: 20px">
<baseTitle title="流程图"></baseTitle>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px"
/>
</div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="routerName === 'Fund/add'" @click="handleSubmit(fundForm)">提交</el-button>
@@ -47,6 +53,7 @@ import {useTagsView} from '@/stores/tagsview.js'
import {useProcessStore} from '@/stores/processStore.js';
import {downloadFile, deleteFile} from "@/api/project-demand";
const changeDiagram = ref(false)
const tagsViewStore = useTagsView()
const router = useRouter()
const route = useRoute()
@@ -58,7 +65,7 @@ const fundForm = ref()
const processDiagramViewer = ref(false)
const formData = ref({
name: '',
fundAmount: '',
fundAmount: null,
introduce: '',
files: []
})