Commit 96f52008 authored by 耿迪迪's avatar 耿迪迪

采购查询权限

parent 0d4ed904
......@@ -3,6 +3,7 @@ package com.zehong.web.controller.transaction;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.exception.BusinessException;
import com.zehong.common.core.page.TableDataInfo;
......@@ -22,7 +23,9 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* 外部采购(报销)申请Controller
......@@ -49,7 +52,8 @@ public class TPurchaseController extends BaseController
{
// 获取当前用户
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
if (StringUtils.isNotNull(user) && !user.isAdmin()) {
List<SysRole> calculator = user.getRoles().stream().filter(item ->item.getRoleKey() == "calculator").collect(Collectors.toList());
if (StringUtils.isNotNull(user) && !user.isAdmin() && !CollectionUtils.isEmpty(calculator)) {
tPurchase.setPurchaseDeptId(user.getDeptId());
}
startPage();
......
<template>
<div>
<div style="display: inline-block;width: 50px">
<el-button type="text" @click="open=true" size="mini">{{getOperatorName()}}</el-button>
<el-dialog :title="getOperatorName()" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
<component :is="currentTabComponent" :purchaseData="purchaseData" ref="currentCom" v-if="open"></component>
......
......@@ -141,7 +141,7 @@
<span>{{ parseTime(scope.row.approvedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
<template slot-scope="scope">
<!-- <el-button-->
<!-- size="mini"-->
......
<template>
<div>
<div style="display: inline-block;width: 50px">
<el-button type="text" @click="open=true" size="mini">{{getOperatorName()}}</el-button>
<el-dialog :title="getOperatorName()" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
<component :is="currentTabComponent" :tradeData="tradeData" ref="currentCom" v-if="open"></component>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment