fix : 矩阵审批选择自己时可以跳过自己审批

This commit is contained in:
clay
2024-07-06 15:05:19 +08:00
parent 8f3d97ec1c
commit bd57a54931
4 changed files with 51 additions and 47 deletions

View File

@@ -2,46 +2,45 @@
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
<el-table ref="reportTable" :data="tableData" style="width: 100%;height: 479px"
:span-method="objectSpanMethod" v-loading="loading">
<!-- <el-table-column label="四川省国有资产经营投资管理有限责任公司-->
<!-- 科技创新项目人工成本分摊明细表" align="center">-->
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center"
:fixed="(!column.children) ? ((column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 'right' : 'left') : false"
:width="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 160:130">
<template #default="scope">
<template v-if="column.children">
<el-table-column v-for="childColumn in column.children"
:prop="column.prop + '.'+ childColumn.prop"
:label="childColumn.label"
:width="childColumn.prop === 'subtotal' ? 160 : 130">
<template #default="columnScope">
<template v-if="(tableData.length -1) !== columnScope.$index">
{{
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
}}
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表" align="center">
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center"
:fixed="(!column.children) ? ((column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 'right' : 'left') : false"
:width="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 160:130">
<template #default="scope">
<template v-if="column.children">
<el-table-column v-for="childColumn in column.children"
:prop="column.prop + '.'+ childColumn.prop"
:label="childColumn.label"
:width="childColumn.prop === 'subtotal' ? 160 : 130">
<template #default="columnScope">
<template v-if="(tableData.length -1) !== columnScope.$index">
{{
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
}}
</template>
<template v-else>
{{ columnScope.row[column.prop][childColumn.prop] }}
</template>
</template>
<template v-else>
{{ columnScope.row[column.prop][childColumn.prop] }}
</template>
</template>
</el-table-column>
</template>
<template v-else>
<!--分摊金额合计与分摊金额总计计算-->
<template
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
{{ getTotalSeparation(scope.row, column.prop) }}
</template>
<template
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
{{ getTotalSummary(scope.row, column.prop) }}
</el-table-column>
</template>
<template v-else>
{{ scope.row[column.prop] }}
<!--分摊金额合计与分摊金额总计计算-->
<template
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
{{ getTotalSeparation(scope.row, column.prop) }}
</template>
<template
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
{{ getTotalSummary(scope.row, column.prop) }}
</template>
<template v-else>
{{ scope.row[column.prop] }}
</template>
</template>
</template>
</template>
</el-table-column>
</el-table-column>
<!-- </el-table-column>-->
</el-table>
</template>
@@ -160,7 +159,7 @@ const concatColumn = (columnIndex, length, rowIndex) => {
const init = () => {
loading.value = true
getAllocationDetails(route.query.id).then(res => {
if(res.code!==1000){
if (res.code !== 1000) {
ElNotification({
title: '提示',
message: res.msg,

View File

@@ -9,6 +9,7 @@ export const APPROVAL_PROPS = {
assignedUser: [] //审批人列表
},
matrixApproval: true,
skipSelf: true,
timeLimit: { //边界事件
timeout: { //超时提醒时间
unit: "H",

View File

@@ -7,12 +7,12 @@
</el-icon>
<span>审批人</span>
</div>
<div @click="addCcNode">
<el-icon style="color:rgb(50, 150, 250);">
<Promotion/>
</el-icon>
<span>抄送人</span>
</div>
<!-- <div @click="addCcNode">-->
<!-- <el-icon style="color:rgb(50, 150, 250);">-->
<!-- <Promotion/>-->
<!-- </el-icon>-->
<!-- <span>抄送人</span>-->
<!-- </div>-->
<div @click="addConditionsNode">
<el-icon style="color:rgb(21, 188, 131);">
<Share/>
@@ -25,12 +25,12 @@
</el-icon>
<span>并行分支</span>
</div>
<div @click="addDelayNode">
<el-icon style="color:#f25643;">
<Clock/>
</el-icon>
<span>延迟等待</span>
</div>
<!-- <div @click="addDelayNode">-->
<!-- <el-icon style="color:#f25643;">-->
<!-- <Clock/>-->
<!-- </el-icon>-->
<!-- <span>延迟等待</span>-->
<!-- </div>-->
<!-- <div @click="addTriggerNode">-->
<!-- <el-icon style="color:#15BC83;">-->
<!-- <SetUp/>-->

View File

@@ -102,6 +102,10 @@
<el-form-item label="是否使用矩阵审批" prop="text">
<el-switch inactive-text="不用" active-text="使用" v-model="nodeProps.matrixApproval"></el-switch>
</el-form-item>
<el-form-item v-if="nodeProps.matrixApproval && nodeProps.assignedType === 'SELF'" label="是否跳过自己" prop="text">
<!-- {{nodeProps.skipSelf}}-->
<el-switch inactive-text="不跳过" active-text="跳过" v-model="nodeProps.skipSelf"></el-switch>
</el-form-item>
<!-- <el-form-item label="审批期限(为 0 则不生效)" prop="timeLimit">-->
<!-- <el-input style="width: 180px;" placeholder="时长" type="number"-->
<!-- v-model="nodeProps.timeLimit.timeout.value">-->