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
})