Commit f74032b6 authored by 吴春's avatar 吴春

1

parent 86585438
......@@ -62,7 +62,8 @@
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2"
"eslint-plugin-vue": "^6.1.2",
"webpack": "^4.23.0"
},
"browserslist": [
"ie >= 11",
......
......@@ -900,7 +900,125 @@ export function GetReserveClassBalanceSheet(data) {
data
});
}
/**
* 获取小语种业绩期数分页列表
*/
export function GetLanguagePeriodPage(data) {
return request({
url: '/LanguageRule/GetPersonnelPeriodPage',
method: 'post',
data
});
}
/**
* 生成小语种业绩提成
*/
export function setLanguageCommissionInfo(data) {
return request({
url: '/LanguageRule/CreateEmpBonus',
method: 'post',
data
});
}
/**
* 业绩提成 获取提成期数 员工提成
*/
export function GetLanguageRulePeriod(data) {
return request({
url: '/LanguageRule/GetPersonnelPeriod',
method: 'post',
data
});
}
/**
* 业绩提成 获取期数提成 员工提成明细列表
*/
export function GetLanguagePeriodDetails(data) {
return request({
url: '/LanguageRule/GetPersonnelPeriodDetails',
method: 'post',
data
});
}
/**
* 业绩提成 获取提成可发放人员
*/
export function setSellLanguageSendEmployee(data) {
return request({
url: '/LanguageRule/SetSellAchievementsSendEmployee',
method: 'post',
data
});
}
/**
* 获取业绩期数分页列表
*/
export function GetLanguageRuleList(data) {
return request({
url: '/LanguageRule/GetLanguageRuleList',
method: 'post',
data
});
}
/**
* 市场顾问保存规则
*/
export function setLanguageRule(data) {
return request({
url: '/LanguageRule/SetLanguageRule',
method: 'post',
data
});
}
/**
* 市场顾问保存删除
*/
export function delLanguageRule(data) {
return request({
url: '/LanguageRule/RemoveLanguageRule',
method: 'post',
data
});
}
/**
* 业绩提成 获取期数提成 员工提成明细列表
*/
export function GetLanguageDetailListPage(data) {
return request({
url: '/LanguageRule/GetLanguageDetailListPage',
method: 'post',
data
});
}
/**
 * 获取课程科目列表
 * @param {JSON参数} data
 */
 export function getCourseSubject(data) {
  return request({
    url: "/Course/GetCourseSubjectList",
    method: 'post',
    data
  })
}
/**
* 获取下拉数据
*/
......
......@@ -731,4 +731,16 @@ export function GetBankTypeList(data) {
method: 'post',
data
});
}
/**
* 获取学员上课记录分页列表
* @param {JSON数据} data
*/
export function GetStudentCoursePage(data) {
return request({
url: '/StudentStat/GetStudentCoursePageList',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<q-dialog
v-model="persistent"
full-height
maximized
position="right"
persistent
@hide="closeCutomer"
transition-show="slide-left"
>
<div class="customMain" v-if="addMsg">
<div class="cycle_Title">小语种提成规则</div>
<div style="margin-top: 10px;">
<q-input
filled
stack-label
:dense="false"
v-model="addMsg.PlanName"
style="width: 640px;"
ref="PlanName"
class="col-12 q-pb-lg"
label="方案名称"
:rules="[val => !!val || '请填写方案名称']"
/>
</div>
<q-select
filled
stack-label
option-value="Id"
option-label="SubjectName"
v-model="addMsg.CourseList"
use-chips
use-input
:options="myCourseList"
label="科目"
:dense="false"
class="col-6 q-pr-lg q-pb-lg"
emit-value
multiple
map-options
@filter="filterFn"
@input="$forceUpdate()" />
<div style="display: flex;align-items: center;margin-bottom: 15px;">
<q-select
filled
stack-label
option-value="Id"
option-label="EmployeeName"
v-model="addMsg.EmpList"
use-chips
use-input
:options="myEmployeeList"
label="提成人员"
:dense="false"
emit-value
multiple
map-options
@filter="filterEmployee"
style="flex:1;"
@input='getpersonnel(1)'
/>
<div class="q-gutter-sm" style="margin-right: 18px;">
<q-checkbox v-model="personnel" label="全选" @input='getallpersonnel(1)'/>
</div>
</div>
<div
style="margin-bottom:80px;">
<div>业绩比例</div>
<div
v-for="(x,y) in addMsg.DetailList"
:key="y"
style="display: flex;align-items: center;margin-bottom: 10px;"
>
<q-input
clearable
filled
v-model="x.StartNum"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="初始值"
/>
<q-input
clearable
filled
v-model="x.EndNum"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="结束值"
/>
<q-input
clearable
filled
v-model="x.RatioMoney"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="提成比例(%)"
/>
<q-btn
round
size="xs"
color="deep-orange"
icon="delete"
v-if="addMsg.DetailList.length > 1"
@click="addMsg.DetailList.splice(y, 1)"
style="margin-left: 10px;"
/>
<q-btn
round
size="xs"
color="primary"
icon="add"
v-if="addMsg.DetailList.length == y + 1"
@click="addMsg.DetailList.push({ StartNum: '', EndNum: '', RatioMoney: '' })"
style="margin-left: 10px;"
/>
</div>
</div>
<div style="width: 100%;height: 50px;position: absolute;left: 0;bottom: 0;background: #FFF;display: flex;align-items: center;padding: 0 20px;justify-content: flex-end;">
<q-btn
color="accent"
size="sm"
class="q-mr-md"
label="保存"
@click="setAdd()"
></q-btn>
</div>
<div class="dialog-out-close" @click="closeCutomer">
<i class="iconfont icon-close" style="font-size:26px;" />
</div>
</div>
</q-dialog>
</template>
<script>
export default {
components: {
},
props: {
saveObj: {
type: Object,
default: null
},
isAdd: {// true新增 false修改
type: Boolean,
default: true
},
loyeeList: {//人员列表
type: Array,
default: []
},
CourseList: {//课程下拉列表
type: Array,
default: []
},
selectData:{//修改带过来的对象
type: Object,
default: {}
}
},
data() {
return {
persistent: true,
addMsg: null,
//员工列表
employeeList: [],
allCourseList: [],
myCourseList:[],
personnel:false,//人员全选
branch:false,//部门人员
myEmployeeList: [],
}
},
created() {
this.employeeList = JSON.parse(JSON.stringify(this.loyeeList))
this.myEmployeeList = JSON.parse(JSON.stringify(this.loyeeList))
this.allCourseList = JSON.parse(JSON.stringify(this.CourseList))
this.myCourseList = JSON.parse(JSON.stringify(this.CourseList))
if (this.isAdd == true) {//新增
this.addMsg = {
Id: 0,
PlanName: '',
CourseList: [],//课程列表
EmpList: [],//提现人员
LanguageIds:"",
DetailList: [
{ StartNum: '', EndNum: '', RatioMoney: '',DetailId:0 }
],
}
} else {//修改
this.addMsg = JSON.parse(JSON.stringify(this.selectData))
this.addMsg.EmpList = this.getId(this.selectData.EmpList,3)
this.addMsg.CourseList = this.getId(this.selectData.CourseSubjectList,2)
console.log("this.addMsg.CourseList",this.addMsg.CourseList);
if(this.addMsg.DetailList.length==0){
this.addMsg.DetailList.push({ StartNum: '', EndNum: '', RatioMoney: '',DetailId:0})
}
if(this.addMsg.EmpList.length== this.employeeList.length){
this.personnel=true
}else{
this.personnel=false
}
}
},
mounted() {
},
methods: {
getId(arr,type){
let list = [];
let Id = 'Id';
if(type==2){
Id = 'Id';
}
if(arr && arr.length>0){
arr.forEach(x=>{
list.push(x[Id])
})
}
return list
},
closeCutomer() {
this.$emit('close')
},
getallpersonnel(type){
if(type==1){//人员全选
if(this.personnel== true){
this.addMsg.EmpList = []
this.myEmployeeList.forEach(x=>{
this.addMsg.EmpList.push(x.Id)
})
}else{
this.addMsg.EmpList = []
}
}
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
if (val === '') {
this.myEmployeeList = this.employeeList
}
else {
const needle = val.toLowerCase();
this.myEmployeeList = this.employeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
console.log("this.myEmployeeList2",this.myEmployeeList);
},
getpersonnel(type){
if(type==1){//人员全选
if(this.addMsg.EmpList.length== this.employeeList.length){
this.personnel=true
}else{
this.personnel=false
}
}
},
filterFn(val, update) {//课程的栓选
update(() => {
if (val === '') {
this.myCourseList = this.allCourseList
}
else {
const needle = val.toLowerCase();
this.myCourseList = this.allCourseList.filter(v => v.SubjectName.toLowerCase().indexOf(needle) > -1);
}
})
},
setAdd() {
this.$refs.PlanName.validate();
if (!this.$refs.PlanName.hasError) {
let msg = JSON.parse(JSON.stringify(this.addMsg))
//msg.CourseList = this.getList(this.allCourseList,this.addMsg.CourseList,2,'Id','SubjectName')//课程
for(let i=0;i<msg.DetailList.length;i++){
let x = msg.DetailList[i]
if(x.StartNum==='' ){
this.$q.notify({
type: 'negative',
message: `请输入业绩比例初始值`,
position: 'top'
})
return
}
if(x.EndNum==''){
this.$q.notify({
type: 'negative',
message: `请输入业绩比例结束值`,
position: 'top'
})
return
}
if(x.RatioMoney<0){
this.$q.notify({
type: 'negative',
message: `请输入业绩比例不小于0的提成比例`,
position: 'top'
})
return
}
}
this.$emit('success',msg)
}
},
},
}
</script>
<style scoped>
.cycle_Title {
font-size: 20px;
font-weight: 500;
color: #1f2329;
}
.customMain {
width: 700px !important;
display: flex;
flex-direction: column;
height: 100 vh;
padding: 15px 17px 0 17px;
background-color: #fff;
}
</style>
<style lang="scss">
.stuList .q-table__bottom {
min-height: 0;
}
.stulistNum {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 23px;
border: 1px solid #2961fe;
border-radius: 50%;
cursor: pointer;
color: #2961fe;
}
.stuListTable {
width: 200px;
text-align: center;
}
.stuListTable tr td {
height: 40px;
}
.stuListTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.stulistNumber {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 22px;
border: 1px solid #2961fe;
border-radius: 50%;
cursor: pointer;
color: #2961fe;
}
.OCourseTable {
width: 600px;
text-align: center;
}
.OCourseTable tr td {
height: 40px;
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
</style>
<template>
<div class="stuList" :style="{ height: height }">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
:style="{ height: height }" class="sticky-right-column-table sticky-tow-column-table"
:class="{ 'my-sticky-header-table': height != 'unset' }" separator="none" :data="dataList" :columns="columns"
row-key="StuId" hide-bottom>
<template v-if="showHeader" v-slot:top>
<div class="col-2 q-table__title">学员信息
<template v-if="Count>0">(共{{Count}}条)</template>
</div>
<q-space />
<div class="page-option" v-if="!pushMode">
<q-btn v-if="authObj && authObj.isShowDownload&&IsDownLoadStu()" color="accent" class="q-mr-md" size="sm" icon="download"
label="下载" @click="DownLoadStuLearnChapterStatic" />
</div>
</template>
<template v-slot:body-cell-StuIcon="props">
<q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value">
<img :src="props.value" />
</q-avatar>
<q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value">
{{ props.row.StuName.substring(0, 1) }}</q-avatar>
</q-td>
</template>
<template v-slot:body-cell-StuName="props">
<q-td :props="props">
<div class="text-blue cursor-pointer" @click="getStuRight(props.row, 1)">
{{ props.value }}
</div>
</q-td>
</template>
</q-table>
<studentRight-form v-if="isShowStuRight" :BelongType="BelongType"
:checkType="checkType" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList"
@reload="referDataHandler">
</studentRight-form>
</div>
</template>
<script>
import studentRightForm from "./studentRight-form";
import {
mapGetters
} from "vuex";
import {
SetStudentAssistBatch,
BatchForwardStudent
} from "../../../api/sale/sale";
import {
EduDownLoad
} from "../../../api/common/common";
import {
queryEmployee
} from "../../../api/users/user";
import {
SetStudentSureConsult, //邀约
} from "../../../api/school/index";
import { date } from 'quasar'
export default {
props: {
Count: {
type: Number,
default: null
},
//数据列表
dataList: {
type: Array,
default: null
},
loading: {
type: Boolean,
default: false
},
//权限验证
authObj: {
type: Object,
default: null
},
//查询参数
queryMsg: {
type: Object,
default: null
},
showHeader: {
type: Boolean,
default: true
},
height: {
type: String,
default: "unset"
},
noSelect: {
type: Boolean,
default: false
}
},
components: {
studentRightForm,
},
data() {
return {
columns: [{
name: "StuIcon",
label: "",
field: "StuIcon",
align: "left"
},
{
name: "StuName",
required: true,
label: "昵称",
align: "left",
field: row => row.StuName
},
{
name: "CourseName",
label: "课程",
field: "CourseName",
align: "left"
},
{
name: "ClassName",
label: "班级",
field: "ClassName",
align: "left"
},
{
name: "OrderId",
label: "订单号",
field: "OrderId",
align: "left"
}
],
pageMsg: {
rowsPerPage: 12
},
isShowStuForm: false,
resetLoading: false,
isShowStuRight: false,
stuOption: null,
isShowAdd: false,
selection: [],
BelongType: 1,
pushMode: false, //是否显示推送按钮
pushing: false,
assistListFormat: [],
checkType: 1, //打开右侧弹窗类型
isShowAbroad: false, //是否显示转留学就业订单弹窗
userInfo: {}, //当前登录人员
isShowTrans: false,
transMsg: {
StuIds: "",
CreateBy: ""
},
//员工列表
employeeList: [],
myEmployeeList: [],
isInvite: false
};
},
watch: {
dataList: {
handler(val) {
this.selection = [];
},
deep: true
}
},
created() {
this.userInfo = this.getLocalStorage();
// 邀约功能权限
this.isInvite = false;
if (
this.userInfo &&
this.userInfo.ActionMenuList &&
this.userInfo.ActionMenuList.length > 0
) {
this.userInfo.ActionMenuList.forEach(x => {
if (x.FunctionCode == "isInvite") {
this.isInvite = true;
}
});
}
},
mounted() {
this.getEmployeeList();
},
computed: {
...mapGetters(["logo", "name"])
},
methods: {
//是否有下载客户资料权限
IsDownLoadStu() {
var isHaveAuth = false;
if (
this.userInfo &&
this.userInfo.ActionMenuList &&
this.userInfo.ActionMenuList.length > 0
) {
this.userInfo.ActionMenuList.forEach(x => {
if (x.FunctionCode == "DownLoad_Stu") {
isHaveAuth = true;
}
});
}
return isHaveAuth;
},
//下载消课统计
DownLoadStuLearnChapterStatic() {
//导出
var msg = JSON.parse(JSON.stringify(this.queryMsg));
if(msg.CourseId>0||msg.StuName){
EduDownLoad("/Scroll/DownLoadStuLearnChapterStatic", msg, "消课统计.xls", res => {
});
}
},
//刷新列表
refreshStuList() {
this.$emit("success");
this.selection = [];
},
EditStudent(obj) {
if (obj) {
this.stuOption = obj;
} else {
this.stuOption = null;
}
this.isShowAdd = true;
},
closeStuForm() {
this.isShowStuForm = false;
this.isShowStuRight = false;
this.isShowAdd = false;
this.isShowAbroad = false;
},
//点击学生姓名弹出
getStuRight(obj, type) {
if (obj) {
this.stuOption = obj;
this.BelongType = obj.BelongType;
this.checkType = type;
} else {
this.stuOption = null;
}
this.isShowStuRight = true;
},
referDataHandler() {
this.$emit("reload");
},
errorMsg(msg) {
this.$q.notify({
type: "negative",
position: "top",
message: msg
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
this.myEmployeeList = res.Data;
});
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
},
//保存批量转交
saveTransForm() {
if (this.selection.length == 0) {
this.$q.notify({
type: "negative",
position: "top",
message: "请选择推送学员"
});
return;
}
if (this.transMsg.CreateBy == "") {
this.$q.notify({
type: "negative",
position: "top",
message: "请选择接收人员!"
});
return;
}
let newArr = [];
this.selection.forEach(x => {
newArr.push(x.StuId);
});
this.transMsg.StuIds = newArr.toString();
BatchForwardStudent(this.transMsg).then(res => {
if (res.Code == 1) {
this.refreshStuList();
this.selection = [];
this.transMsg.StuIds = "";
this.transMsg.CreateBy = "";
this.pushMode = false;
this.$q.notify({
type: "iconfont icon-chenggong",
position: "top",
message: r.Message
});
}
});
}
}
};
</script>
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.CommissionDetail .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.CommissionDetail .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.CommissionDetail ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.CommissionDetail ._icon_btn i {
width: 26px;
height: 26px;
display: inline-block;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 26px;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.CommissionDetail .el-table td,
.el-table th {
padding: 5px 0;
}
</style>
<template>
<div class="page-body CommissionDetail">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-btn  color="primary"  size="11px"  label="返回"   @click="goreturn"  style="margin-left:10px" />
</div>
</div>
</div>
<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="SchoolName" label="校区" :filters='SchoolNamelist' :filter-method="filterHandler">
</el-table-column> -->
<!-- <el-table-column prop="DeptName" label="部门" :filters='DeptNamelist' :filter-method="filterHandler">
</el-table-column> -->
<el-table-column prop="EmployeeName" label="销售" :filters='UserNamelist' :filter-method="filterHandler">
</el-table-column>
<el-table-column prop="CurOrderMoney" label="订单金额" sortable :sort-method="StudentCount"> </el-table-column>
<el-table-column prop="CurGuestNum" label="客人数量" sortable :sort-method="StudentCount"> </el-table-column>
<el-table-column prop="CurRewardMoney" label="提成金额" sortable :sort-method="CurrentPeriodMoney"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo" @click="goUrl('Language/languageDetailList',scope.row.UserId)"></i>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
</template>
</div>
</template>
<script>
import {
GetClassTypePageList,
} from '../../../api/system/index';
import {
GetLanguageRulePeriod,
} from '../../../api/finance/index'
import {
getClassDropDownList,
} from "../../../api/school/index";
export default {
meta: {
title: "销售提成详情"
},
props: {},
components: {},
data() {
return {
loading: false,
//列表数据参数
msg: {
PeriodId: 0,
},
pageCount: 0,
persistent: false,
listData: {},
tableData: [],
company: [],
department: [],
see_tcdetailed: false,
SchoolNamelist: [],
DeptNamelist: [],
UserNamelist: [],
}
},
created() {
// let userinfo = this.getLocalStorage();
// userinfo.ActionMenuList.map(x => { //判断权限
// if (x.FunctionCode == "see_tcdetailed") { //判断是否可以查看其他明细
// this.see_tcdetailed = true;
// }
// })
// if (this.see_tcdetailed == false) {
// this.msg.UserId = userinfo.Id
// }
},
mounted() {
if (this.$route.query && this.$route.query.id) {
this.msg.PeriodId = this.$route.query.id
}
this.getList()
},
methods: {
getList() {
if (this.msg)
this.loading = true;
GetLanguageRulePeriod(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data;
this.SchoolNamelist = [];
this.DeptNamelist = [];
this.UserNamelist = [];
this.tableData.forEach(x => {
let obj = {
text: x.SchoolName,
value: x.SchoolName
}
let obj2 = {
text: x.DeptName,
value: x.DeptName
}
let obj3 = {
text: x.UserName,
value: x.UserName
}
this.SchoolNamelist.push(obj)
this.DeptNamelist.push(obj2)
this.UserNamelist.push(obj3)
})
this.SchoolNamelist = this.unique(this.SchoolNamelist)
this.DeptNamelist = this.unique(this.DeptNamelist)
this.UserNamelist = this.unique(this.UserNamelist)
}
})
},
unique(arr, Name) { //数组去重
const res = new Map();
return arr.filter(
(list) => !res.has(list.text) && res.set(list.text, 1)
);
},
goUrl(path, id) {
this.$router.push({
path: '/financial/' + path,
query: {
userId: id,
preriodId: this.$route.query.id,
blank: 'y',
}
})
},
filterHandler(value, row, column) {
const property = column['property'];
return row[property] === value;
},
StudentCount(a, b, c) {
return a.StudentCount - b.StudentCount;
},
CurrentPeriodMoney(a, b) {
return a.CurrentPeriodMoney - b.CurrentPeriodMoney;
},
OtherMoney(a, b) {
return a.OtherMoney - b.OtherMoney;
},
CommissionMoney(a, b) {
return a.CommissionMoney - b.CommissionMoney;
},
FinalCommission(a, b) {
return a.FinalCommission - b.FinalCommission;
},
goreturn() {
this.$router.go(-1);
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.userCommissionDetails .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.userCommissionDetails .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.userCommissionDetails ._icon_btn i.icon-sousuo {
background-color: #47bf8c;
}
.userCommissionDetails ._icon_btn i {
width: 30px;
height: 30px;
display: inline-block;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 30px;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.userCommissionDetails .el-table td,
.el-table th {
padding: 5px 0;
}
</style>
<template>
<div class="page-body userCommissionDetails">
<div class="page-search row items-center">
<div style="margin-right: 10px;">
<q-btn color="primary" size="11px" label="返回" @click="goreturn" style="margin-left:10px" />
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="getList" filled stack-label option-value="Id" option-label="EmployeeName" use-input input-debounce="0"
v-model="msg.UserId" :options="PersionList" label="销售" :dense="false"
emit-value map-options @filter="filterFn2">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div class="col-3">
<q-input filled v-model="msg.OrderId" @keyup.enter.native="getList()" label="订单号" />
</div>
</div>
</div>
<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="SchoolName" width="130" label="校区"></el-table-column>
        <el-table-column prop="DeptName" width="100" label="部门"></el-table-column>
 <el-table-column prop="AccountName" width="100"  label="销售"></el-table-column>
       <el-table-column prop="OrderId" width="80" label="订单号">
<template slot-scope="scope">
<div
style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList('/sale/orderStatistics',scope.row)"
>{{ scope.row.OrderId }}</div>
</template>
</el-table-column>
<el-table-column prop="OrderGuestNum" width="80" label="订单人数"></el-table-column>
        <el-table-column prop="OrderIncom" width="85" label="订单实收"></el-table-column>
<el-table-column prop="OrderMoney" width="85" label="提成金额">
<template slot-scope="scope">
<div style="color: rgb(233, 82, 82);">{{ scope.row.OrderMoney }}</div>
</template>
</el-table-column>
  <el-table-column prop="ClassName" width="180" label="班级"></el-table-column>
        <el-table-column prop="ClassGuestNum" width="80" label="班级人数"></el-table-column>
<el-table-column prop="Periods" width="80" label="期数"></el-table-column>
<el-table-column prop="Remarks" width="" label="备注"></el-table-column>
</el-table>
</template>
</div>
</template>
<script>
import { date } from 'quasar'
import {
GetClassTypePageList,
} from '../../../api/system/index';
import {
GetLanguagePeriodDetails,
getSellAchievementsChangeLog
} from '../../../api/finance/index'
import {
queryEmployee
} from '../../../api/users/user'
import {
getClassDropDownList,
} from "../../../api/school/index";
export default {
meta: {
title: "员工提成明细列表"
},
props: {},
components: {},
data() {
return {
loading: false,
//列表数据参数
msg: {
PeriodId: 0,
UserId: 0,
ClassId: 0,
OrderId: '',
UserIds: '',
},
pageCount: 0,
persistent: false,
listData: {},
tableData: [],
company: [],
department: [],
ClassList: [],
allClassList: [],
ChangeLog:'',
PersionList: [], //员工列表
AllemployeeList: [], //所有员工
}
},
created() { },
mounted() {
if (this.$route.query && this.$route.query.userId) {
this.msg.UserId = Number(this.$route.query.userId)
}
if (this.$route.query && this.$route.query.preriodId) {
this.msg.PeriodId = this.$route.query.preriodId
}
if (this.$route.query && this.$route.query.UserIds) {
this.msg.UserIds = this.$route.query.UserIds
}
this.getList()
this.setClass()
this.getEmployee()
},
methods: {
getList() {
if (this.msg)
this.loading = true;
GetLanguagePeriodDetails(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data
if (this.tableData.length > 0) {
this.getAskfor()
}
}
})
},
getAskfor() { //求值
let obj = {
SchoolName: '合计',
OrderMoney: 0,
}
console.log("obj",obj);
this.tableData.forEach((x) => {
obj.OrderMoney += x.OrderMoney
})
console.log("obj",obj);
this.tableData.push(obj)
},
// accAdd(arg1, arg2) { //js 加法精确计算
// var r1, r2, m;
// try {
// r1 = arg1.toString().split(".")[1].length;
// } catch (e) {
// r1 = 0;
// }
// try {
// r2 = arg2.toString().split(".")[1].length;
// } catch (e) {
// r2 = 0;
// }
// m = Math.pow(10, Math.max(r1, r2));
// return (arg1 * m + arg2 * m) / m;
// },
//选择班级
setClass(item) {
this.isShowClass = true;
getClassDropDownList({
CourseId: 0,
IsAddDefault: 1, //添加默认选项
}).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
let obj = {
ClassId: 0,
ClassName: '不限'
}
jsonData.unshift(obj)
if (jsonData && jsonData.length > 0) {
this.ClassList = JSON.parse(JSON.stringify(jsonData));
this.allClassList = JSON.parse(JSON.stringify(jsonData));;
}
}
});
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.ClassList = JSON.parse(JSON.stringify(this.allClassList))
} else {
const needle = val.toLowerCase()
this.ClassList = this.allClassList.filter(v => v.ClassName.toLowerCase().indexOf(needle) > -1)
}
})
},
//获取员工列表
getEmployee() {
var qMsg = {
EmployeeName: ""
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
let obj = {
EmployeeName: '不限',
Id: 0
}
res.Data.unshift(obj)
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.AllemployeeList = JSON.parse(JSON.stringify(jsonData));
this.PersionList = JSON.parse(JSON.stringify(jsonData));;
}
}
})
},
//筛选员工
filterFn2(val, update) {
update(() => {
if (val === '') {
this.PersionList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase()
this.PersionList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
goUrl(path, id) {
this.$router.push({
path: '/financial/' + path,
query: {
"id": id,
blank: 'y',
tab: '单据详情'
}
})
},
filterHandler(value, row, column) {
const property = column['property'];
return row[property] === value;
},
StudentCount(a, b) {
return a.StudentCount - b.StudentCount;
},
goorderUrl(row) {
this.$router.push({
path: '/financial/market/AchievementsForOrderList',
query: {
OrderId: row.OrderId,
UserId: row.UserId,
blank: 'y',
}
})
},
goreturn() {
this.$router.go(-1);
},
goUrlorderList(path, row) {//订单跳转
if(row.OrderId!=-1){
this.OpenNewUrl(path, {
OrderId: row.OrderId,
// EnterID:row.UserId
});
}else{
// row.IsDept==2
let newDate = row.Periods.split('-')
let MonthDayNum = new Date(newDate[0], newDate[1], 0).getDate(); //计算当月的天数
this.OpenNewUrl(path, {
OrderId: row.OrderId,
startTime: row.Periods+'-01',
endTime: row.Periods+'-'+MonthDayNum,
createBy: row.UserId
});
}
},
goUrlclass(path, Names) {//班级
let Name = encodeURI(Names)
this.OpenNewUrl(path, {
ClassName: Name,
});
},
goUrlkehao(path, row) {//跳转到学生课耗
let StartMonth = ''
let EndMonth = ''
if (row.IsFirstCommission == 1) {
EndMonth = row.Periods
} else {
if (row.Periods.indexOf('~') != -1) {
StartMonth = row.Periods.split('~')[0];
EndMonth = row.Periods.split('~')[1];
} else {
StartMonth = row.Periods;
EndMonth = row.Periods
}
}
this.OpenNewUrl(path, {
OrderId: row.OrderId,
StartMonth: StartMonth,
EndMonth: EndMonth,
comefrom: 1,
});
},
getmingxi(row){//明细
getSellAchievementsChangeLog({
OrderId: row.OrderId,
UserId: row.UserId,
UserType: row.UserType,
IsDept: row.IsDept,
}).then(res => {
if (res.Code == 1) {
this.ChangeLog = res.Data
}
});
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.salesCommission .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.salesCommission .text-bottom{
height: 32px;line-height: 32px; margin-bottom: 10px;
}
.salesCommission ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.salesCommission ._icon_btn .icon-add{
background-color: #47BF8C;
}
.salesCommission ._icon_btn i {
width: 26px;
height: 26px;
display: inline-block;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 26px;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.salesCommission .el-table td,.el-table th{
padding: 5px 0;
}
</style>
<template>
<div class="page-body salesCommission">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div v-if='isgenerate==true'>
<div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span>
<el-date-picker
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker>
<q-btn :loading="loading1" color="primary" size="11px" label="生成提成" @click="scCommission" style="margin-left:10px"/>
</div>
</div>
</div>
</div>
<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="Id" label="ID" ></el-table-column> -->
<el-table-column prop="Periods" label="周期" ></el-table-column>
<el-table-column prop="SumPrice" label="提成总金额" > </el-table-column>
<el-table-column prop="FrIdList" label="财务单据" >
<template slot-scope="scope">
<div style="display: flex;flex-wrap: wrap;" v-if='scope.row.FrIdList.length>0'>
<span v-for="(x,y) in scope.row.FrIdList" @click="gocaiwuxiangq(x)" style="cursor: pointer;text-decoration: underline;margin-right: 5px; color: #409EFF;">{{x}}</span>
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column prop="CreateByName" label="创建人" > </el-table-column>
<el-table-column prop="CreateTime" label="创建时间" > </el-table-column>
<el-table-column label="操作" >
<template slot-scope="scope">
<div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo"
@click="goUrl(scope.row.Id)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="制单" placement="top" v-if='iscMaker==true'>
<i class="iconfont icon-add" v-if='iscMaker==true'
@click="generalFinancacls(scope.row)"></i>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper" :current-page.sync="msg.PageIndex"
:page-size="msg.PageSize" :total='total'>
</el-pagination>
</div>
</template>
<el-dialog title="设置发放用户" width="700px"
:visible.sync="costmode" center >
<el-table
:data="SendEmployeeList"
border
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column prop="EmployeeName" label="用户" > </el-table-column>
<el-table-column prop="CurGuestNum" label="客人数量" > </el-table-column>
<el-table-column prop="CurRewardMoney" label="应发提成金额" > </el-table-column>
<el-table-column prop="IsGiveOut" label="是否已发放" >
<template slot-scope="scope">
<span v-if='scope.row.IsGiveOut==1'>已发放</span>
<span v-if='scope.row.IsGiveOut==2'>未发放</span>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 10px;">金额总额:{{totalAmount}}</div>
<div slot="footer" class="dialog-footer">
<el-button class="hollowFixedBtn" @click="costmode=false">取消</el-button>
<el-button class="normalBtn" type="primary" @click="preservetransaction()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getSchoolDropdown
} from '../../../api/school/index'
import {
GetClassTypePageList,
} from '../../../api/system/index';
import{
GetLanguagePeriodPage ,
setSellCommissionRule,
setLanguageCommissionInfo,
GetLanguageRulePeriod,
setSellLanguageSendEmployee
} from '../../../api/finance/index'
export default {
meta: {
title: "小语种销售提成列表"
},
props: {},
components: {},
data() {
return {
loading: false,
loading1: false,
value2:'',
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 15,
SchoolId:'-1'
},
pageCount: 0,
persistent: false,
listData:{},
tableData:[],
total:0,
isgenerate:false,//是否有生成的权限
iscMaker:false,//是否有制单的权限
SendEmployeeList:[],//可发放提成的用户列表
costmode:false,
multipleSelection:[],
totalAmount:0,//选中的金额总额
CheckID:0,
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x=>{//判断权限
if(x.FunctionCode == "SAGenerate_Commission"){//判断是否有生成的权限
this.isgenerate = true;
}
if(x.FunctionCode == "SACommission_maker"){//判断是否有制单的权限
this.iscMaker = true;
}
})
var myDate=new Date();
myDate.setMonth(myDate.getMonth()-1);
this.value2 = myDate.getFullYear() + "-" + (myDate.getMonth()+1)
},
mounted() {
this.getList();//获取提成周期列表
},
methods: {
getList(){
this.loading = true;
GetLanguagePeriodPage(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data.PageData
this.total = res.Data.Count
}
})
},
scCommission(){//生成提成
if(this.loading1 == false){
this.loading1= true;
setLanguageCommissionInfo({StartDate:this.value2}).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '生成提成成功',
position: 'top'
})
this.getList()
}
this.loading1= false;
}).catch(err=>{
this.loading1= false;
})
}
},
goUrl(id ) {
this.$router.push({
path: '/financial/Language/languageCommission',
query: {
"id": id,
blank: 'y',
}
})
},
gocaiwuxiangq(id){
this.OpenNewUrl("/financial/financalDocument/FinancialDocumentsDetail", {
id: id
});
},
generalFinancacls(item) {
this.CheckID = item.Id
if(item.SumPrice>0){
this.tishi(item.SumPrice,item.Id)
}else{
this.$message.error('提成总金额为0')
}
},
goaddFinancial(Money,Id,EmpIds){
let School_Id = 0;
let obj = {
CostType: 316,
Money: Money,
CurrencyId: 21,
XSTC: 1,
School_Id:this.msg.SchoolId == -1?0:this.msg.SchoolId,
OtherType:79,//业绩提成
ReFinanceId:Id,
ReFinanceId2:this.msg.SchoolId,
EduCommissionEmp:EmpIds
}
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
Name:'销售提成单',
id:143,
orderObj: JSON.stringify(obj)
}
// this.OpenNewUrl("/financial/financalDocument/addFinancialDocuments", query)
this.$router.push({
path: "/financial/financalDocument/addFinancialDocuments",
query
});
},
tishi(Money,Id){
let that = this
this.$q.dialog({
title: "销售制单",
message: "你正在进行所有销售一起制单操作?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.getcomSendEmployeeList(Id)
});
},
getcomSendEmployeeList(Id){//获取可发放提成的用户
GetLanguageRulePeriod({PeriodId:Id}).then(res => {
this.SendEmployeeList = res.Data;
this.costmode = true
}).catch(() => {
})
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
checkSelectable(row){
return row.IsGiveOut==2
},
handleSelectionChange(val) {
this.multipleSelection = val;
let zong = 0
this.multipleSelection.forEach(x=>{
zong += x.CurRewardMoney
})
this.totalAmount = zong
},
preservetransaction(){
let that = this
if( this.multipleSelection.length == 0){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择您要发放的用户`
})
return
}
this.$q.dialog({
title: "设置用户状态",
message: "确认后无法更改用户制单状态,如果需修改请联系管理员",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
let EmpIds = '';
let data = []
this.multipleSelection.forEach(x=>{
data.push(x.EmployeeId)
})
EmpIds = data.join(',')
setSellLanguageSendEmployee({PeriodId:this.CheckID,EmpIds:EmpIds}).then(res => {
this.goaddFinancial(this.totalAmount,this.CheckID,EmpIds)
this.$message.success('设置成功');
}).catch(() => {
})
});
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
<style>
@import "../css/cssReset.css";
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.salesRules .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.salesRules .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.marketRules .border-bottom {
padding-bottom: 5px;
margin-bottom: 5px;
}
.marketRules .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.marketRules .singeRowTable tr th {
border: 1px solid #d2d2d2;
}
.cycle_Title {
font-size: 20px;
font-weight: 500;
color: #1f2329;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
<template>
<div class="page-body marketRules">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"></div>
</div>
<template>
<div class="cycle_Title">
小语种提成规则
<q-btn color="accent" size="sm" icon="add" label="新增规则" @click="AddMsg()" />
</div>
<div
class="cm_content"
style="width: 100%;margin-bottom: 35px;margin-top: 10px;"
v-for=" ( item , index ) in dataList "
:key="index"
>
<table
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr>
<th width="30%" style="min-width: 100px;max-width: 100px;">方案名称</th>
<th width="60%">课程类型</th>
<th width="10%">操作</th>
</tr>
<tr>
<td>
<span>{{ item.PlanName }}</span>
</td>
<td style="padding: 0 10px;">
<span v-for="( son , sIndex ) in item.CourseSubjectList" :key="sIndex">
<span v-if="sIndex<4"> {{ son.SubjectName }}{{item.CourseSubjectList.length==sIndex+1?'':'、'}}</span>
</span>
<el-popover
v-if="item.CourseSubjectList.length>=5"
placement="top-start"
title="科目"
width="400"
trigger="click"
:content="item.CourseListtext">
<el-button slot="reference" style="border: none;" type="text">查看更多</el-button>
</el-popover>
</td>
<td>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400"
label="编辑"
@click="EditTask(item)"
/>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
style="font-weight:400"
label="删除"
@click="RemoveTask(item.Id)"
/>
</td>
</tr>
</table>
<div style="width:100%;overflow-x: auto;">
<table v-if="item.DetailList.length>0||item.SendType=='1'"
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
>
<tr>
<td rowspan="2" width="100" style="min-width: 100px;">提成比例</td>
<th style="min-width: 220px;"
v-for="( son , sIndex ) in item.DetailList"
:key="sIndex"
>{{ son.StartNum }} <span>{{son.EndNum && son.EndNum!=-1?'<人数<=':'<人数'}}</span><span v-if="son.EndNum && son.EndNum!=-1">{{ son.EndNum }}</span></th>
</tr>
<tr style="">
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.DetailList" :key="sIndex">{{ son.RatioMoney }}%</td>
</tr>
</table>
</div>
</div>
<div
v-if="dataList.length == 0"
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;"
>暂无数据</div>
</template>
<languageCommissionfrom
v-if="persistent"
:isAdd="isAdd"
:loyeeList='loyeeList'
:CourseList='CourseList'
:selectData= 'selectData'
@close="closeForm"
@success="refreshList"
></languageCommissionfrom>
</div>
</template>
<script>
import {
queryEmployee
} from '../../../api/users/user'
import {
GetLanguageRuleList,
setLanguageRule,
delLanguageRule,
getCourseSubject
} from '../../../api/finance/index'
import {
getSchoolDropdown,
} from '../../../api/school/index'
import languageCommissionfrom from "../../../components/finance/languageCommissionfrom";
export default {
meta: {
title: "销售提成规则"
},
components: {
languageCommissionfrom
},
props: {},
data() {
return {
persistent: false,
loading: false,
dataList: [], //列表数据
isSalerule_preserve: false,
isAdd: false,
CourseList:[],//科目列表
loyeeList: [],//人员列表
selectData:{},
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x => {//判断权限
if (x.FunctionCode == "Salerule_preserve") {//判断是否有保存的权限
this.isSalerule_preserve = true;
return
}
})
},
mounted() {
this.GetLanguageRuleList(); //获取规则
this.getEmployeeList();
this.getCourseList();//获取课程下拉
// this.getSchool();//校区下拉
},
methods: {
GetLanguageRuleList() {
this.loading = true;
GetLanguageRuleList({}).then(res => {
if (res.Code == 1) {
this.dataList = res.Data;
this.dataList.forEach(j=>{
if(j.CourseSubjectList.length>=5){//课程
j.CourseListtext = '';
j.CourseSubjectList.forEach(x=>{
j.CourseListtext = j.CourseListtext+x.SubjectName+'、'
})
}
})
}
this.loading = false
})
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 0
}).then(res => {
this.loyeeList = res.Data;
})
},
//获取课程
getCourseList() {
getCourseSubject({
IsQPrice: 1
}).then(res => {
if (res.Code == 1) {
this.CourseList = res.Data;
}
})
},
getSchool() {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
this.SchoolList = res.Data;
}
})
},
refreshList(data) { //保存规则
setLanguageRule(data).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.persistent = false;
this.GetLanguageRuleList(); //获取规则
}
})
},
AddMsg() {//新增
this.selectData = {}
this.persistent = true;
this.isAdd = true;
},
EditTask(item){//编辑
this.persistent = true;
this.selectData = item
this.isAdd = false;
},
RemoveTask(Id){//删除
let delMsg = {
Id: Id
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
delLanguageRule(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.GetLanguageRuleList();
}
})
}).onCancel(() => {
});
},
closeForm() {
this.persistent = false;
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.cycleOrderList .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.cycleOrderList .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.cycleOrderList ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.cycleOrderList ._icon_btn i {
width: 30px;
height: 30px;
display: inline-block;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 30px;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.cycleOrderList .el-table td,
.el-table th {
padding: 5px 0;
}
</style>
<template>
<div class="page-body cycleOrderList">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select filled stack-label @input="getDepartList(msg.School_Id),resetSearch()" option-value="SId"
option-label="SName" v-model="msg.School_Id" ref="School_Id" :options="schoolList" label="校区" :dense="false"
emit-value map-options />
</div>
<div class="col-3">
<selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"></selectTree>
</div>
<q-select @input="resetSearch" filled stack-label option-value="Id" option-label="EmployeeName" use-input
v-model="msg.UserId" ref="DeptTier" :options="PersionList" label="销售" :dense="false" class="col-3 " emit-value
map-options @filter="filterFn2">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<div class="col-3">
<q-select filled stack-label use-input input-debounce="0" option-value="ClassId" @input="getList"
option-label="ClassName" v-model="msg.ClassId" :options="ClassList" label="班级" :dense="false" emit-value
map-options @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
</div>
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select filled stack-label @input="resetSearch()" option-value="Id" option-label="Name"
v-model="msg.PeriodId" :options="PeriodsList" label="周期" :dense="false" emit-value map-options />
</div>
<div class="col-3">
<q-input filled v-model="msg.OrderId" @keyup.enter.native="resetSearch()" label="订单号" />
</div>
</div>
</div>
<div class="page-search row items-center" style="justify-content: space-between;">
<span style="font-size: 20px;font-weight: 400;">提成统计 <span
style="font-size: 16px;">(提成总计:{{TotalCommission}})</span> </span>
<q-btn  color="primary"  size="11px"  label="导出"  @click="tcexport"  style="margin-left:10px" />
</div>
<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="SchoolName" width="130" label="校区"></el-table-column>
        <el-table-column prop="DeptName" width="100" label="部门"></el-table-column>
 <el-table-column prop="AccountName" width="100"  label="销售"></el-table-column>
       <el-table-column prop="OrderId" width="80" label="订单号">
<template slot-scope="scope">
<div
style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList('/sale/orderStatistics',scope.row)"
>{{ scope.row.OrderId }}</div>
</template>
</el-table-column>
<el-table-column prop="OrderGuestNum" width="80" label="订单人数"></el-table-column>
        <el-table-column prop="OrderIncom" width="85" label="订单实收"></el-table-column>
<el-table-column prop="OrderMoney" width="85" label="提成金额">
<template slot-scope="scope">
<div style="color: rgb(233, 82, 82);">{{ scope.row.OrderMoney }}</div>
</template>
</el-table-column>
  <el-table-column prop="ClassName" width="180" label="班级"></el-table-column>
        <el-table-column prop="ClassGuestNum" width="80" label="班级人数"></el-table-column>
<el-table-column prop="Periods" width="80" label="期数"></el-table-column>
<el-table-column prop="Remarks" width="" label="备注"></el-table-column>
</el-table>
<div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper"
:current-page.sync="msg.PageIndex" :page-size="msg.PageSize" :total='total'>
</el-pagination>
</div>
</template>
</div>
</template>
<script>
import {
getSchoolDropdown
} from '../../../api/school/index'
import {
queryEmployee
} from '../../../api/users/user'
import {
getDeptTree
} from '../../../api/system/dept.js'
import {
GetLanguageDetailListPage,
getSellAchievementsPeriodsList,
getSellAchievementsChangeLog
} from '../../../api/finance/index'
import {
getClassDropDownList,
} from "../../../api/school/index";
import selectTree from '../../../components/common/select-tree'
import {
EduDownLoad,
} from '../../../api/common/common';
import {
number
} from 'echarts'
export default {
meta: {
title: "业绩提成统计"
},
props: {},
components: {
selectTree
},
data() {
return {
loading: false,
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 10,
School_Id: '-1',
Depart_Id: 0,
PeriodId: 0,
UserId: 0,
ClassId: 0,
OrderId: '',
},
pageCount: 0,
persistent: false,
listData: {},
tableData: [],
total: 0,
company: [],
department: [],
ClassList: [],
allClassList: [],
returnString: [], //默认岗位
see_tcdetailed: false,
schoolList: [],
DeptList: [], // 部门下拉
PersionList: [], //员工列表
AllemployeeList: [], //所有员工
PeriodsList: [], //周期列表
TotalCommission: 0,
ChangeLog: '',
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x => { //判断权限
if (x.FunctionCode == "see_tcdetailed") { //判断是否可以查看其他明细
this.see_tcdetailed = true;
}
})
if (this.see_tcdetailed == false) {
this.msg.UserId = userinfo.Id
}
},
mounted() {
if (this.$route.query && this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId
}
// 从业绩表跳转带参
if (this.$route.query && this.$route.query.UserId) {
this.PersionList = JSON.parse(JSON.stringify(this.AllemployeeList))
this.msg.UserId = this.$route.query.UserId - 0
}
this.getList()
this.getEmployee(); //销售
this.getPeriodList() //周期
this.setClass() //班级
this.getBranchList() //校区
this.getDepartList(0);
},
methods: {
resetSearch() {
this.msg.PageIndex = 1;
this.getList()
},
getList() {
if (this.msg)
this.loading = true;
GetLanguageDetailListPage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.tableData = res.Data.PageData.List
this.TotalCommission = res.Data.PageData.TotalCommission
this.total = res.Data.Count
}
})
},
unique(arr, Name) { //数组去重
const res = new Map();
return arr.filter(
(list) => !res.has(list.text) && res.set(list.text, 1)
);
},
handleCurrentChanges(val) {
this.msg.PageIndex = val;
this.getList()
},
//选择班级
setClass(item) {
this.isShowClass = true;
getClassDropDownList({
CourseId: 0,
IsAddDefault: 1, //添加默认选项
}).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
let obj = {
ClassId: 0,
ClassName: '不限'
}
jsonData.unshift(obj)
if (jsonData && jsonData.length > 0) {
this.ClassList = JSON.parse(JSON.stringify(jsonData));
this.allClassList = JSON.parse(JSON.stringify(jsonData));;
}
}
});
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.ClassList = JSON.parse(JSON.stringify(this.allClassList))
} else {
const needle = val.toLowerCase()
this.ClassList = this.allClassList.filter(v => v.ClassName.toLowerCase().indexOf(needle) > -1)
}
})
},
getBranchList() { //获取校区
getSchoolDropdown({}).then(res => {
this.schoolList = res.Data;
var obj = {
SName: '全部',
SId: '-1'
}
this.schoolList.unshift(obj);
}).catch(() => {
})
},
//获取部门下拉数据
getDepartList(id) {
if (id == -1) {
id = 0
}
let msg = {
School_Id: id
}
getDeptTree(msg).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
}
})
},
getChild(deptArray) {
var tempStr = "";
if (deptArray && deptArray != '') {
tempStr = deptArray;
}
if (tempStr) {
this.msg.Depart_Id = tempStr;
} else {
this.msg.Depart_Id = 0;
}
this.resetSearch();
},
//筛选员工
filterFn2(val, update) {
update(() => {
if (val === '') {
this.PersionList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase()
this.PersionList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
//获取员工列表
getEmployee() {
var qMsg = {
EmployeeName: ""
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
let obj = {
EmployeeName: '不限',
Id: 0
}
res.Data.unshift(obj)
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.AllemployeeList = JSON.parse(JSON.stringify(jsonData));
this.PersionList = JSON.parse(JSON.stringify(jsonData));;
}
}
})
},
getPeriodList() { //获取周期下拉列表
getSellAchievementsPeriodsList({}).then(res => {
if (res.Code == 1) {
this.PeriodsList = res.Data
let obj = {
Name: '不限',
Id: 0
}
this.PeriodsList.unshift(obj)
// 从业绩表跳转带参
if (this.$route.query.Periods) {
this.PeriodsList.forEach(item => {
if (item.Periods == this.$route.query.Periods) {
this.msg.PeriodId = item.Id
}
})
}
}
})
},
tcexport() { //导出
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad("/LanguageRule/GetSellAchievementsStatisticsToExcel", msg, "业绩提成统计.xls")
},
goUrlclass(path, Names) { //班级
let Name = encodeURI(Names)
this.OpenNewUrl(path, {
ClassName: Name,
});
},
goUrlorderList(path, row) { //订单跳转
if(row.OrderId!=-1){
this.OpenNewUrl(path, {
OrderId: row.OrderId,
});
}else{
// row.IsDept==2
let newDate = row.Periods.split('-')
let MonthDayNum = new Date(newDate[0], newDate[1], 0).getDate(); //计算当月的天数
this.OpenNewUrl(path, {
OrderId: row.OrderId,
startTime: row.Periods+'-01',
endTime: row.Periods+'-'+MonthDayNum,
createBy: row.UserId
});
}
},
getmingxi(row) { //明细
getSellAchievementsChangeLog({
OrderId: row.OrderId,
UserId: row.UserId,
UserType: row.UserType,
IsDept: row.IsDept,
}).then(res => {
if (res.Code == 1) {
this.ChangeLog = res.Data
}
});
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
.Sysuser_Date .el-input__inner {
background-color: transparent;
width: 100%;
border: none;
}
.Sysuser_Date .el-range-input {
background-color: transparent;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @keyup.enter="resetSearch" @clear="resetSearch" dense clearable filled v-model="msg.StuName" label="昵称" maxlength="20" />
</div>
<div class="col-3" >
<q-select @input="changeCourse" dense filled v-model="msg.CourseId" class="col-6" option-label="CourseName"
option-value="CourseId" use-input :options="CourseList" @filter="filterCourse" emit-value map-options
label="课程" clearable>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
</div>
<div class="page-content">
<stulist :dataList="data" @success="refreshPage" :loading="loading" ref="stuList" :authObj="AuthObj"
:queryMsg="msg" :Count="AuthObj.Count">
</stulist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
color="primary" :input="true">
</q-pagination>
</div>
</div>
</div>
</template>
<script>
import {
GetStudentTypeList,
GetStudentCoursePage
} from '../../api/school/index'
import {
queryEmployee
} from '../../api/users/user'
import {
resetPassword
} from '../../api/users/user.js'
import {
GetStudentAdvisorConfigList
} from "../../api/customerstudent/customerstudent";
import {
queryCourseDropdownList
} from "../../api/course/index";
import stulist from '../../components/school/student/stuCourselist'
import {
mapGetters
} from "vuex";
export default {
meta: {
title: "客户管理"
},
components: {
stulist
},
data() {
return {
currentUrl: "",
data: [],
CourseList: [],
AllCourseList:[],
loading: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseId: 0, //课程id
StuName: "",//学生
ClassScrollType:2,
},
pageCount: 0,
AuthObj: {
isShowDownload: true,
Count: 0
},
}
},
computed: {
...mapGetters(["userInfo"])
},
created() {
},
mounted() {
this.currentUrl = this.$route.path;
this.getCourseList();
this.getStudent()
},
methods: {
changeCourse(val) {
this.msg.CourseId = val;
this.getStudent();
this.resetSearch();
},
//筛选课程
filterCourse(val, update) {
update(() => {
if (val === "") {
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList));
} else {
const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(
v => v.CourseName.toLowerCase().indexOf(needle) > -1
);
}
});
},
resetSearch() {
this.msg.pageIndex = 1;
this.getStudent()
},
//获取课程
getCourseList() {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
CourseId: 0,
CourseName: "不限"
});
this.CourseList = tempArray;
this.AllCourseList = tempArray;
}
});
},
changePage(val) {
this.msg.pageIndex = val;
this.getStudent();
},
getStudent() {
this.loading = true;
GetStudentCoursePage(this.msg).then(res => {
this.loading = false;
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount
this.AuthObj.Count = res.Data.Count
}).catch(() => {
this.loading = false
})
},
refreshPage() {
this.getStudent()
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -37,6 +37,12 @@
<q-separator vertical />
<q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '下一天' : '下一周'"
@click="calendarNext" />
<q-separator vertical />
<!-- <q-btn v-if="msg.ClassType==2" dense text-color="primary" icon="download" flat unelevated label="下载排课表"
@click="DownLoadStuLearnChapterStatic" /> -->
<div style="margin-left:10px;"> <q-btn v-if="msg.ClassType==3" color="accent" class="q-mr-md" size="sm" icon="download"
label="下载排课表" @click="DownLoadStuLearnChapterStatic" /></div>
</div>
<div class="viewbox">
<q-calendar v-model="selectedDate" :view="viewType" ref="calendar" locale="zh-CN" class="calendar-container "
......@@ -251,6 +257,9 @@
getTeacherDropDownList,
queryClassRoomList
} from "../../api/school/index";
import {
EduDownLoad
} from "../../api/common/common.js";
import SubscribeForm from "../../components/stuMan/subscribe/subscribeForm";
import QCalendar from "@quasar/quasar-ui-qcalendar";
......@@ -392,6 +401,13 @@
return {
[`text-white bg-${bg}`]: true
};
},
//下载课表
DownLoadStuLearnChapterStatic() {
EduDownLoad("/TeacherClass/GetAppointmentPlanStatExcel", this.msg, "排课表统计.xls", res => {
});
},
badgeStyles(event, type, timeStartPos, timeDurationHeight, index, total) {
const s = {};
......
......@@ -53,6 +53,11 @@ const routes = [{
component: () =>
import ("pages/school/student.vue")
},
{
path: "/school/studentCourse", //学员上课记录管理
component: () =>
import ("pages/school/studentCourse.vue")
},
{
path: "/school/sysuser", //后台用户管理
component: () =>
......@@ -1983,6 +1988,31 @@ const routes = [{
path: "/stu/subscribe", //预约课程
component: () =>
import ("pages/studyAbroad/subscribe")
},
{
path: "/financial/Language/languagePeriodsList", // 小语种业绩提成 分期列表
component: () =>
import ("pages/financial/Language/languagePeriodsList.vue")
},
{
path: "/financial/Language/languageCommission", // 小语种业绩提成人员列表
component: () =>
import ("pages/financial/Language/languageCommission.vue")
},
{
path: "/financial/Language/languageDetailList", // 小语种业绩提成人员列表
component: () =>
import ("pages/financial/Language/languageDetailList.vue")
},
{
path: "/financial/Language/languageRule", // 小语种业绩提成规则页
component: () =>
import ("pages/financial/Language/languageRule.vue")
},
{
path: "/financial/Language/languageStatistics", // 小语种业绩提成统计
component: () =>
import ("pages/financial/Language/languageStatistics.vue")
}
],
......
......@@ -81,7 +81,8 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = 'http://192.168.10.214';
//let domainUrl = 'http://192.168.10.214';
let domainUrl = 'http://192.168.10.226';
let viewFileUrl = 'http://192.168.10.214:8120';
let mallUrl = "http://192.168.10.2:8088";
......
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