Commit b7bccc9c authored by zhengke's avatar zhengke

修改了相关权限,管理员和用户权限

parent c22d013d
......@@ -154,6 +154,9 @@
import {
EduDownLoad
} from "../../../api/common/common";
import {
mapState
} from "vuex";
export default {
meta: {
title: "销售提成详情"
......@@ -169,7 +172,7 @@
SchoolId: '-1',
Status: '-2',
OrderSourceType: '-1',
OrderSourceId: 0,
OrderSourceId: '',
Q_SelectNormal: '2',
UserDept: "",
},
......@@ -207,6 +210,21 @@
DepartmentList: [], //部门列表
}
},
computed: mapState({
//是否有下载权限
isReturnperiods(state) {
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length >
0) {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Edit_Returnperiods") {
return x;
}
});
return action && action.FunctionCode;
}
return false;
}
}),
created() {
this.getCustomFrom();
this.queryDeptList();
......@@ -214,6 +232,9 @@
this.getStudentDorpDown()
this.GetCustomerList()
this.getStudentList(); //学员下拉
if(! this.isReturnperiods){
this.msg.OrderSourceType = 2;
}
},
mounted() {
if (this.$route.query && this.$route.query.id) {
......@@ -289,8 +310,19 @@
Name: '不限',
Id: '-1'
}
this.customFromList = res.Data;
this.customFromList.unshift(obj);
if(this.isReturnperiods){
this.customFromList = res.Data;
this.customFromList.unshift(obj);
}else{
res.Data.forEach(data=>{
if(data.Id ==2){
this.customFromList.push(data);
}
})
}
}
})
},
......
......@@ -66,15 +66,16 @@
<template>
<el-table ref="filterTable" :data="tableData" v-loading='loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column prop="BatchName" label="周期"></el-table-column>
<el-table-column prop="TotalMoney" label="累计金额"> </el-table-column>
<el-table-column prop="TotalEmployee" label="个人直客累计金额"> </el-table-column>
<el-table-column v-if="isReturnperiods" prop="TotalMoney" label="累计金额"> </el-table-column>
<el-table-column v-if="isReturnperiods"prop="TotalEmployee" label="个人直客累计金额"> </el-table-column>
<el-table-column prop="TotalCustomer" label="同业录入累计金额"> </el-table-column>
<el-table-column prop="TotalInternal" label="内部介绍累计金额"> </el-table-column>
<el-table-column prop="TotalTrans" label="学员转介绍累计金额"> </el-table-column>
<el-table-column prop="CreateByName" label="创建人"> </el-table-column>
<el-table-column prop="CreateDate" label="创建时间"> </el-table-column>
<el-table-column label="财务单据">
<el-table-column v-if="isReturnperiods" prop="TotalInternal" label="内部介绍累计金额"> </el-table-column>
<el-table-column v-if="isReturnperiods" prop="TotalTrans" label="学员转介绍累计金额"> </el-table-column>
<el-table-column v-if="isReturnperiods" prop="CreateByName" label="创建人"> </el-table-column>
<el-table-column v-if="isReturnperiods" prop="CreateDate" label="创建时间"> </el-table-column>
<el-table-column v-if="isReturnperiods" label="财务单据">
<template slot-scope="scope">
<template v-if="scope.row.FinanceIdList" v-for="item in scope.row.FinanceIdList">
<a @click="goDetails(item)" style="cursor:pointer;color:blue;text-decoration:underline;display:inline-block;margin-right:10px;">{{item}}</a>
......@@ -87,10 +88,13 @@
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo" @click="goUrl(scope.row.Id)"></i>
</el-tooltip>
<templat v-if="isReturnperiods">
<el-tooltip class="item" effect="dark" v-if="scope.row.FinanceIds==''||scope.row.FinanceIds==null"
content="生成财务单据" placement="top">
<i class="iconfont icon-add" @click="setCommissionFinanace(scope.row.Id)"></i>
</el-tooltip>
</templat>
</div>
</template>
</el-table-column>
......@@ -116,6 +120,9 @@
getSellAchievementsSendEmployeeList,
setSellAchievementsSendEmployee
} from '../../../api/finance/index'
import {
mapState
} from "vuex";
export default {
meta: {
title: "返佣期数列表"
......@@ -158,6 +165,21 @@
CheckID: 0,
}
},
computed: mapState({
//是否有下载权限
isReturnperiods(state) {
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length >
0) {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Edit_Returnperiods") {
return x;
}
});
return action && action.FunctionCode;
}
return false;
}
}),
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x => { //判断权限
......
......@@ -285,9 +285,14 @@
</el-table-column>
<el-table-column prop="OrderId" label="订单号">
<template slot-scope="scope">
<div
<div v-if="scope.row.OrderType == 1"
style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList('/sale/orderStatistics', scope.row)"
>{{ scope.row.OrderId }}</div>
<div v-else-if="scope.row.OrderType == 2"
style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList('/sale/orderStatistics', scope.row)"
@click="goUrlorderList('/sale/studyOrderStatistics', scope.row)"
>{{ scope.row.OrderId }}</div>
</template>
</el-table-column>
......
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