|
@@ -165,6 +165,8 @@
|
|
<el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '4')" type="text" size="small" @click="todo(scope.row)">驳回调整</el-button>
|
|
<el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '4')" type="text" size="small" @click="todo(scope.row)">驳回调整</el-button>
|
|
<el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '2')" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
<el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '2')" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
<el-button v-if="hasPermission('zsReimbursement:info:del') && scope.row.createId === $store.state.user.id && (scope.row.type === '1')" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
<el-button v-if="hasPermission('zsReimbursement:info:del') && scope.row.createId === $store.state.user.id && (scope.row.type === '1')" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
|
+ <el-button v-if="checkIsAudit(scope.row)" type="text" size="small" @click="todo(scope.row)">审核</el-button>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
</vxe-table>
|
|
</vxe-table>
|
|
@@ -552,6 +554,18 @@
|
|
console.log(err.response)
|
|
console.log(err.response)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ // 查询当前登录人是否是数据的审核人
|
|
|
|
+ checkIsAudit (row) {
|
|
|
|
+ let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
|
|
+ if (this.commonJS.isNotEmpty(row.auditUserIds)) {
|
|
|
|
+ for (const userId of row.auditUserIds) {
|
|
|
|
+ if (userId === loginUserId) { // 当数据的审核人中包含当前登录人id时,返回true
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|