Commit 021b4496 authored by 罗超's avatar 罗超

调整返佣显示和修改服务人员BUG

parent cac8dfc1
<style> <style>
.delAssist { .delAssist {
position: absolute; position: absolute;
right: -16px; right: -16px;
top: -12px; top: -12px;
...@@ -12,58 +12,129 @@ ...@@ -12,58 +12,129 @@
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
cursor: pointer; cursor: pointer;
} }
.studentAssitTable { .studentAssitTable {
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.studentAssitTable td { .studentAssitTable td {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
} }
.studentAssitTable th { .studentAssitTable th {
height: 40px; height: 40px;
background-color: #f2f2f2; background-color: #f2f2f2;
} }
</style> </style>
<template> <template>
<div> <div>
<!--课程顾问 或有教师权限--> <!--课程顾问 或有教师权限-->
<template v-if="userInfo.IsCourseConsultant == 1||isHaveTeacherEdit||isHaveXueManager"> <template
<q-btn label="新增" color="accent q-mb-lg" size="sm" @click="isShowAdd = true" /> v-if="
userInfo.IsCourseConsultant == 1 ||
isHaveTeacherEdit ||
isHaveXueManager
"
>
<q-btn
label="新增"
color="accent q-mb-lg"
size="sm"
@click="isShowAdd = true"
/>
</template> </template>
<template v-else> <template v-else>
<span class="text-grey-4">抱歉,你没有权限邀请其他服务人员</span> <span class="text-grey-4">抱歉,你没有权限邀请其他服务人员</span>
</template> </template>
<q-btn label="取消" style="margin-left:20px;" v-if="isShowAdd" flat color="grey-10 q-mb-lg" size="sm" <q-btn
@click="isShowAdd = false" /> label="取消"
style="margin-left:20px;"
v-if="isShowAdd"
flat
color="grey-10 q-mb-lg"
size="sm"
@click="isShowAdd = false"
/>
<template v-if="isShowAdd"> <template v-if="isShowAdd">
<div class="row wrap"> <div class="row wrap">
<q-select filled stack-label option-label="Name" @input="changeData" v-model="AssitMsg.AssistType" <q-select
option-value="Id" :options="AssistDropList" label="角色" dense class="col-6 q-pb-lg q-pr-lg" emit-value filled
map-options /> stack-label
<q-select filled dense v-if="AssitMsg.AssistType == 2" v-model="AssitMsg.AssistId" :options="RoleListData" option-label="Name"
option-label="EmployeeName" class="col-6 q-pb-lg" option-value="Id" emit-value map-options /> @input="changeData"
<q-select filled dense v-if="AssitMsg.AssistType == 4" v-model="AssitMsg.AssistId" v-model="AssitMsg.AssistType"
:options="TeacherList" option-label="EmployeeName" class="col-6 q-pb-lg" option-value="Id" emit-value option-value="Id"
map-options /> :options="AssistDropList"
<q-select filled dense v-else v-model="AssitMsg.AssistId" @filter="filterEmployee" use-input label="角色"
:options="myEmployeeList" option-label="EmployeeName" class="col-6 q-pb-lg" option-value="Id" emit-value dense
map-options /> use-input
class="col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
dense
v-if="AssitMsg.AssistType == 2"
v-model="AssitMsg.AssistId"
:options="RoleListData"
option-label="EmployeeName"
class="col-6 q-pb-lg"
option-value="Id"
emit-value
use-input
map-options
/>
<q-select
filled
dense
v-else-if="AssitMsg.AssistType == 4"
v-model="AssitMsg.AssistId"
:options="TeacherList"
option-label="EmployeeName"
class="col-6 q-pb-lg"
option-value="Id"
emit-value
use-input
map-options
/>
<q-select
filled
dense
v-else
v-model="AssitMsg.AssistId"
@filter="filterEmployee"
use-input
:options="myEmployeeList"
option-label="EmployeeName"
class="col-6 q-pb-lg"
option-value="Id"
emit-value
map-options
/>
<i class="iconfont icon-close delAssist"></i> <i class="iconfont icon-close delAssist"></i>
</div> </div>
<div class="row wrap" style="margin-bottom:10px;float:right;"> <div class="row wrap" style="margin-bottom:10px;float:right;">
<q-btn label="保存" color="accent q-mb-lg" size="md" @click="saveAssit()" /> <q-btn
label="保存"
color="accent q-mb-lg"
size="md"
@click="saveAssit()"
/>
</div> </div>
</template> </template>
<div v-if="dataList.length > 0"> <div v-if="dataList.length > 0">
<table class="studentAssitTable" style="border:1px solid #f2f2f2;border-collapse:collapse;" cellspacing="0" <table
cellpadding="0"> class="studentAssitTable"
style="border:1px solid #f2f2f2;border-collapse:collapse;"
cellspacing="0"
cellpadding="0"
>
<tr> <tr>
<th style="width:180px;">角色</th> <th style="width:180px;">角色</th>
<th style="width:180px;">人员</th> <th style="width:180px;">人员</th>
...@@ -73,18 +144,57 @@ ...@@ -73,18 +144,57 @@
<td>{{ item.AssistTypeName }}</td> <td>{{ item.AssistTypeName }}</td>
<td>{{ item.AssistName }}</td> <td>{{ item.AssistName }}</td>
<td> <td>
<template v-if="userInfo.IsCourseConsultant == 1||isHaveTeacherEdit||isHaveXueManager"> <template
<div v-if="userInfo.IsCourseConsultant == 1&&(item.AssistType == 2 ||item.AssistType == 3)"> v-if="
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" userInfo.IsCourseConsultant == 1 ||
@click="getEditInfo(item)"></q-btn> isHaveTeacherEdit ||
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除" isHaveXueManager
@click="deleteAssits(item.Id)" /> "
>
<div
v-if="
userInfo.IsCourseConsultant == 1 &&
(item.AssistType == 2 || item.AssistType == 3)
"
>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400"
label="修改"
@click="getEditInfo(item)"
></q-btn>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
style="font-weight:400"
label="删除"
@click="deleteAssits(item.Id)"
/>
</div> </div>
<div v-if="isHaveTeacherEdit &&item.AssistType ==4"> <div v-if="isHaveTeacherEdit && item.AssistType == 4">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" <q-btn
@click="getEditInfo(item)"></q-btn> flat
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除" size="xs"
@click="deleteAssits(item.Id)" /> icon="edit"
color="accent"
style="font-weight:400"
label="修改"
@click="getEditInfo(item)"
></q-btn>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
style="font-weight:400"
label="删除"
@click="deleteAssits(item.Id)"
/>
</div> </div>
</template> </template>
</td> </td>
...@@ -94,20 +204,16 @@ ...@@ -94,20 +204,16 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
GetAssistTypeList, GetAssistTypeList,
SetStudentAssist, SetStudentAssist,
GetStudentAssistList, GetStudentAssistList,
RemoveStudentAssist RemoveStudentAssist
} from "../../../api/sale/sale"; } from "../../../api/sale/sale";
import { import { queryEmployee } from "../../../api/users/user";
queryEmployee import { mapState } from "vuex";
} from "../../../api/users/user";
import {
mapState
} from "vuex";
export default { export default {
meta: { meta: {
title: "" title: ""
}, },
...@@ -169,8 +275,7 @@ ...@@ -169,8 +275,7 @@
} }
} }
return false; return false;
}, }
}), }),
mounted() { mounted() {
this.getList(); this.getList();
...@@ -206,7 +311,7 @@ ...@@ -206,7 +311,7 @@
var queryObj = { var queryObj = {
IsLeave: 1, IsLeave: 1,
UserRole: 0, UserRole: 0,
AccountTypeStr: "", AccountTypeStr: ""
}; };
if (this.AssitMsg.AssistType == 2) { if (this.AssitMsg.AssistType == 2) {
queryObj.UserRole = 2; queryObj.UserRole = 2;
...@@ -215,7 +320,7 @@ ...@@ -215,7 +320,7 @@
}); });
} }
if (this.AssitMsg.AssistType == 4) { if (this.AssitMsg.AssistType == 4) {
queryObj.AccountTypeStr = "2" queryObj.AccountTypeStr = "2";
queryEmployee(queryObj).then(res => { queryEmployee(queryObj).then(res => {
this.TeacherList = res.Data; this.TeacherList = res.Data;
}); });
...@@ -303,6 +408,7 @@ ...@@ -303,6 +408,7 @@
this.AssitMsg.AssistId = obj.AssistId; this.AssitMsg.AssistId = obj.AssistId;
this.AssitMsg.AssistType = obj.AssistType; this.AssitMsg.AssistType = obj.AssistType;
this.isShowAdd = true; this.isShowAdd = true;
this.changeData();
}, },
getGuwenEditInfo(obj) { getGuwenEditInfo(obj) {
this.getRole(); this.getRole();
...@@ -312,5 +418,5 @@ ...@@ -312,5 +418,5 @@
this.isShowAdd = true; this.isShowAdd = true;
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>
@import "../css/cssReset.css"; @import "../css/cssReset.css";
.January{ .January {
background-color: #B3E5FC; background-color: #b3e5fc;
} }
.February{ .February {
background-color: #C8E6C9; background-color: #c8e6c9;
} }
.March{ .March {
background-color: #FFCCD2; background-color: #ffccd2;
} }
.April{ .April {
background-color: #F8DDE0; background-color: #f8dde0;
} }
.May{ .May {
background-color: #E1BEE7; background-color: #e1bee7;
} }
.June{ .June {
background-color: #D1C4E9; background-color: #d1c4e9;
} }
.July{ .July {
background-color: #C5CAE9; background-color: #c5cae9;
} }
.August{ .August {
background-color: #F0F4C3; background-color: #f0f4c3;
} }
.September{ .September {
background-color: #FFF9C4; background-color: #fff9c4;
} }
.October{ .October {
background-color: #FFECB3; background-color: #ffecb3;
} }
.November{ .November {
background-color: #FFE0B2; background-color: #ffe0b2;
} }
.December{ .December {
background-color: #FFCCBC; background-color: #ffccbc;
} }
.singeRowTable tr:nth-child(2n + 1) { .singeRowTable tr:nth-child(2n + 1) {
background: none; background: none;
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
} }
.SubtotalBj { .SubtotalBj {
background-color: #A5A5A5; background-color: #a5a5a5;
} }
.stulistNumber { .stulistNumber {
...@@ -121,8 +121,15 @@ ...@@ -121,8 +121,15 @@
<div class="col-3"> <div class="col-3">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="dateArray[0]" style="width:100%" value-format="yyyy-MM" @change="resetSearch()" <el-date-picker
size="small" type="month" placeholder="选择开始年月"> v-model="dateArray[0]"
style="width:100%"
value-format="yyyy-MM"
@change="resetSearch()"
size="small"
type="month"
placeholder="选择开始年月"
>
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
...@@ -130,20 +137,35 @@ ...@@ -130,20 +137,35 @@
<div class="col-3"> <div class="col-3">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="dateArray[1]" style="width:100%" value-format="yyyy-MM" @change="resetSearch()" <el-date-picker
size="small" type="month" placeholder="选择结束年月"> v-model="dateArray[1]"
style="width:100%"
value-format="yyyy-MM"
@change="resetSearch()"
size="small"
type="month"
placeholder="选择结束年月"
>
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
</div> </div>
</div> </div>
<div class="page-search row items-center" style="justify-content: space-between;"> <div
class="page-search row items-center"
style="justify-content: space-between;"
>
<div></div> <div></div>
<q-btn  color="primary" size="11px" label="导出" @click="tcexport" style="margin-left:10px"/> <q-btn
color="primary"
size="11px"
label="导出"
@click="tcexport"
style="margin-left:10px"
/>
</div> </div>
<div style="width: 100%;margin-top: 20px"> <div style="width: 100%;margin-top: 20px">
<div style="width: 100%;overflow-x: auto;"> <div style="width: 100%;overflow-x: auto;">
<table <table
...@@ -171,18 +193,33 @@ ...@@ -171,18 +193,33 @@
style="min-width: 500px;" style="min-width: 500px;"
v-for="(item, index) in RListlength" v-for="(item, index) in RListlength"
:key="index" :key="index"
:class="item.Month.slice(6)==1?'January': :class="
(item.Month.slice(6)==2?'February': item.Month.slice(6) == 1
(item.Month.slice(6)==3?'March': ? 'January'
(item.Month.slice(6)==4?'April': : item.Month.slice(6) == 2
(item.Month.slice(6)==5?'May': ? 'February'
(item.Month.slice(6)==6?'June': : item.Month.slice(6) == 3
(item.Month.slice(6)==7?'July': ? 'March'
(item.Month.slice(6)==7?'August': : item.Month.slice(6) == 4
(item.Month.slice(6)==7?'September': ? 'April'
(item.Month.slice(5)==10?'October': : item.Month.slice(6) == 5
(item.Month.slice(5)==11?'November': ? 'May'
(item.Month.slice(5)==12?'December':'')))))))))))" : item.Month.slice(6) == 6
? 'June'
: item.Month.slice(6) == 7
? 'July'
: item.Month.slice(6) == 7
? 'August'
: item.Month.slice(6) == 7
? 'September'
: item.Month.slice(5) == 10
? 'October'
: item.Month.slice(5) == 11
? 'November'
: item.Month.slice(5) == 12
? 'December'
: ''
"
> >
<span v-if="item.Month.slice(5) < 10">{{ <span v-if="item.Month.slice(5) < 10">{{
item.Month.slice(6) item.Month.slice(6)
...@@ -208,7 +245,7 @@ ...@@ -208,7 +245,7 @@
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
:key="index" :key="index"
v-if="dataList && dataList.length > 0" v-if="dataList && dataList.length > 0"
:class="item.RoleName=='小计'? 'SubtotalBj' : ''" :class="item.RoleName == '小计' ? 'SubtotalBj' : ''"
> >
<td style=" border: 1px solid #d2d2d2;"> <td style=" border: 1px solid #d2d2d2;">
{{ item.DeptName }} {{ item.DeptName }}
...@@ -219,14 +256,16 @@ ...@@ -219,14 +256,16 @@
<td> <td>
{{ item.EmpName }} {{ item.EmpName }}
</td> </td>
<td v-for="(x, y) in titlelist" :key="y" <td v-for="(x, y) in titlelist" :key="y">
>
<div v-if="item.MonthList[x.index]"> <div v-if="item.MonthList[x.index]">
<div v-if="x.Id == 1"> <div v-if="x.Id == 1">
<span>{{ item.MonthList[x.index].Achievement }}</span> <span>{{ item.MonthList[x.index].Achievement }}</span>
</div> </div>
<div v-if="x.Id == 2" style="padding: 7px;"> <div v-if="x.Id == 2" style="padding: 7px;">
<span>{{ item.MonthList[x.index].Rate }}</span> <span
>{{ item.MonthList[x.index].Rate
}}{{ item.MonthList[x.index].Rate ? "%" : "" }}</span
>
</div> </div>
<div v-if="x.Id == 3" style="padding: 3px;"> <div v-if="x.Id == 3" style="padding: 3px;">
<span>{{ item.MonthList[x.index].Rebate }}</span> <span>{{ item.MonthList[x.index].Rebate }}</span>
...@@ -295,7 +334,7 @@ export default { ...@@ -295,7 +334,7 @@ export default {
dataList: [], //列表数据 dataList: [], //列表数据
dateArray: [], //日期数组 dateArray: [], //日期数组
RListlength: 0, RListlength: 0,
titlelist: [], titlelist: []
}; };
}, },
created() {}, created() {},
...@@ -309,18 +348,23 @@ export default { ...@@ -309,18 +348,23 @@ export default {
this.getList(); //获取数据 this.getList(); //获取数据
}, },
methods: { methods: {
tcexport(){//导出 tcexport() {
//导出
var msg = JSON.parse(JSON.stringify(this.msg)); var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad("/SellAchievements/GetSellAchievementsRankStatToExcel", msg, "业绩提成排名.xls") EduDownLoad(
"/SellAchievements/GetSellAchievementsRankStatToExcel",
msg,
"业绩提成排名.xls"
);
}, },
resetSearch() { resetSearch() {
if(!this.dateArray[0]||!this.dateArray[1]){ if (!this.dateArray[0] || !this.dateArray[1]) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: "negative",
position: "top", position: "top",
message: `请选择开始和结束时间` message: `请选择开始和结束时间`
}) });
return return;
} }
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList(); this.getList();
...@@ -379,27 +423,27 @@ export default { ...@@ -379,27 +423,27 @@ export default {
for (let i = 0; i < this.RListlength.length; i++) { for (let i = 0; i < this.RListlength.length; i++) {
let obj = [ let obj = [
{ {
Name: "业绩", Name: "一般业绩",
Id: 1, Id: 1,
index: i index: i
}, },
{ {
Name: "业绩比例", Name: "返佣总额",
Id: 2, Id: 3,
index: i index: i
}, },
{ {
Name: "订单返佣", Name: "业绩比例",
Id: 3, Id: 2,
index: i index: i
}, },
{ {
Name: "提成", Name: "销售提成",
Id: 4, Id: 4,
index: i index: i
}, },
{ {
Name: "返佣金额", Name: "销售佣金",
Id: 5, Id: 5,
index: i index: i
}, },
...@@ -409,7 +453,7 @@ export default { ...@@ -409,7 +453,7 @@ export default {
index: i index: i
}, },
{ {
Name: "合计", Name: "销售收入合计",
Id: 7, Id: 7,
index: i index: i
} }
...@@ -420,7 +464,7 @@ export default { ...@@ -420,7 +464,7 @@ export default {
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}, }
} }
}; };
</script> </script>
......
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