Commit a3de8c39 authored by 黄奎's avatar 黄奎

页面修改

parents f109db85 3922da37
......@@ -47,9 +47,9 @@ module.exports = function (ctx) {
vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? {
// API: 'https://localhost:5001/api',
API: 'http://localhost:5001/api',
// API: 'http://192.168.20.24:8300/api',
API: 'http://192.168.10.46:8300/api',
//API: 'http://192.168.10.46:8300/api',
// API: 'http://192.168.20.17:8017/api',
......
......@@ -798,7 +798,47 @@ export function GetPersonnelPeriodDetails(data) {
data
});
}
/**
* 返佣和幸福存折 获取期数分页列表
*/
export function getCommissionPeriodsPageList(data) {
return request({
url: '/CustomerCommission/GetCommissionPeriodsPageList',
method: 'post',
data
});
}
/**
* 返佣和幸福存折 生成期数
*/
export function setUserReturnCommission(data) {
return request({
url: '/finance/SetUserReturnCommission',
method: 'post',
data
});
}
/**
* 返佣和幸福存折 获取周期下 用户分组统计列表
*/
export function getCommissionUserList(data) {
return request({
url: '/CustomerCommission/GetCommissionUserList',
method: 'post',
data
});
}
/**
* 返佣和幸福存折 获取周期下 用户分组统计列表
*/
export function getCommissionPeriodsList(data) {
return request({
url: '/CustomerCommission/GetCommissionPeriodsList',
method: 'post',
data
});
}
/**
* 获取收支明细数据
......@@ -810,4 +850,15 @@ export function GetReserveClassBalanceSheet(data) {
method: 'post',
data
});
}
/**
* 返佣和幸福存折 获取用户返佣/存折明细
*/
export function getCommissionStatistics(data) {
return request({
url: '/CustomerCommission/GetCommissionStatistics',
method: 'post',
data
});
}
\ No newline at end of file
......@@ -234,6 +234,17 @@ export function getCustomerCommissionPassbook(data) {
})
}
/**
* 同行详情里 返佣/幸福存折统计
*
*/
export function getCustomerCommissionStat(data) {
return request({
url: '/CustomerCommission/GetCustomerCommissionStat',
method: 'post',
data
})
}
/**
* 同业转交
*
*/
......
......@@ -3,19 +3,19 @@
<div class="row wrap q-gutter-xs q-my-xs">
<div class="stics">
<span class="stics-name">累计</span>
<span>{{ data.TotalMoney }}</span>
<span>{{ data.SttlementMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">已提现</span>
<span style="color: #F72E52">{{ data.RemitMoney }}</span>
<span style="color: #F72E52">{{ data.CashOutMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">可提现</span>
<span style="color:#2961FE;">{{ data.SurplusMoney }}</span>
<span style="color:#2961FE;">{{ data.CanCashOutMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">未结算</span>
<span>{{ data.NotSettlementMoney }}</span>
<span>{{ data.UnSettlementMoney }}</span>
</div>
</div>
<q-tabs
......@@ -62,8 +62,12 @@
<script>
import {
getCustomerCommissionPassbook,
getCustomerCommissionStat,
GetCustomerBalanceDetailPage
} from "../../../api/sale/peemanagement";
import {
getCommissionStatistics,
} from '../../../api/finance/index'
import withdraw from './withdraw'
export default {
components:{
......@@ -79,12 +83,20 @@ export default {
return {
loading: false,
msg: {
CustomerId: 0,
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
RebateType: 2,
Description: ""
BatchId:0,
SchoolId:'-1',
Status:'-2',
OrderSourceType:0,
OrderSourceId:0,
Q_SelectNormal:0,
CommissionType:2,
ClassId:0,
OrderId:'',
},
pageCount: 0,
data:{},
......@@ -155,22 +167,23 @@ export default {
methods: {
getData() {
const msg = {
CustomerId: this.Id,
Type: 2,// 1返佣 2幸福存折
OrderSourceType:2,
OrderSourceId: this.Id,
CommissionType: 2,// 1返佣 2幸福存折
};
getCustomerCommissionPassbook(msg).then(res => {
getCustomerCommissionStat(msg).then(res => {
this.data=res.Data
});
},
//获取数据
getList() {
this.msg.CustomerId=this.Id
this.msg.OrderSourceId=this.Id
this.loading = true;
GetCustomerBalanceDetailPage(this.msg)
getCommissionStatistics(this.msg)
.then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.dataList = res.Data.PageData.List;
this.pageCount = res.Data.PageCount;
}
})
......
......@@ -3,19 +3,19 @@
<div class="row wrap q-gutter-xs q-my-xs ">
<div class="stics">
<span class="stics-name">累计</span>
<span>{{ data.TotalMoney }}</span>
<span>{{ data.SttlementMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">已提现</span>
<span style="color: #F72E52">{{ data.RemitMoney }}</span>
<span style="color: #F72E52">{{ data.CashOutMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">可提现</span>
<span style="color:#2961FE;">{{ data.SurplusMoney }}</span>
<span style="color:#2961FE;">{{ data.CanCashOutMoney }}</span>
</div>
<div class=" stics">
<span class="stics-name">未结算</span>
<span>{{ data.NotSettlementMoney }}</span>
<span>{{ data.UnSettlementMoney }}</span>
</div>
</div>
<q-tabs
......@@ -62,8 +62,12 @@
<script>
import {
getCustomerCommissionPassbook,
getCustomerCommissionStat,
GetCustomerBalanceDetailPage
} from "../../../api/sale/peemanagement";
import {
getCommissionStatistics,
} from '../../../api/finance/index'
import withdraw from './withdraw'
export default {
components:{
......@@ -80,12 +84,19 @@ export default {
return {
loading: false,
msg: {
CustomerId: 0,
pageIndex: 1,
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
RebateType: 1,
Description: ""
BatchId:0,
SchoolId:'-1',
Status:'-2',
OrderSourceType:0,
OrderSourceId:0,
Q_SelectNormal:0,
CommissionType:1,
ClassId:0,
OrderId:'',
},
pageCount: 0,
data: {},
......@@ -156,22 +167,23 @@ export default {
methods: {
getData() {
const msg = {
CustomerId: this.Id,
Type: 1,
OrderSourceType:2,
OrderSourceId: this.Id,
CommissionType: 1,
};
getCustomerCommissionPassbook(msg).then(res => {
getCustomerCommissionStat(msg).then(res => {
this.data = res.Data;
});
},
//获取数据
getList() {
this.msg.CustomerId=this.Id
this.msg.OrderSourceId=this.Id
this.loading = true;
GetCustomerBalanceDetailPage(this.msg)
getCommissionStatistics(this.msg)
.then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.dataList = res.Data.PageData.List;
this.pageCount = res.Data.PageCount;
}
})
......
......@@ -81,8 +81,9 @@
<div class="stage_value">
<div class="stuHeadImg">
<el-upload :before-upload="uploadFile" :multiple="false" action='' :show-file-list="false">
<q-avatar size="80px" font-size="36px" style="background:#C9F7F5" text-color="white">
<q-avatar size="80px" font-size="36px" text-color="white">
<img :src="customObj.StuIcon" v-if="customObj.StuIcon">
<img v-else src="../../../assets/images/administration/litheader.png" alt="" />
</q-avatar>
</el-upload>
</div>
......
......@@ -14,11 +14,11 @@
<q-btn label="选择试听课" style="margin-left:50px;" color="accent q-mb-lg" size="sm" @click="isShowTeacher=true" />
</div>
<template v-if="isShowAdd">
<div class="row wrap studentDate">
<div class="row studentDate">
<q-field filled class="q-pb-lg q-pr-lg" dense>
 <template v-slot:control>
<el-date-picker v-model="addMsg.ClassDate" ref="ClassDate" :rules="[val => !!val || '请选择预约日期']"
style="width:230px" size="mini" type="date" placeholder="预约日期">
style="width:228px" size="mini" type="date" placeholder="预约日期">
</el-date-picker>
</template>
</q-field>
......
......@@ -590,11 +590,11 @@ export default {
this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) {
this.OrderMsg.DiscountMoney +=
this.OrderMsg.Class_Price * this.OrderMsg.B2CRatio;
this.OrderMsg.DiscountMoney =this.accAdd( this.OrderMsg.DiscountMoney,this.accMul(this.OrderMsg.Class_Price , this.OrderMsg.B2CRatio))
} else {
this.OrderMsg.DiscountMoney +=
this.OrderMsg.Class_Price * this.OrderMsg.B2CReNewRatio;
this.OrderMsg.DiscountMoney =this.accAdd( this.OrderMsg.DiscountMoney,this.accMul(this.OrderMsg.Class_Price , this.OrderMsg.B2CReNewRatio))
}
});
},
......
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.ReturnperiodsList .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.ReturnperiodsList .text-bottom{
height: 32px;line-height: 32px; margin-bottom: 10px;
}
.ReturnperiodsList ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.ReturnperiodsList ._icon_btn .icon-add{
background-color: #47BF8C;
}
.ReturnperiodsList ._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;
}
.ReturnperiodsList .el-table td,.el-table th{
padding: 5px 0;
}
</style>
<template>
<div class="page-body ReturnperiodsList">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<!-- <div style="margin-right: 20px;" v-if='iscMaker==true'>
<div class="block">
<span style="margin-right: 5px;">校区</span>
<el-select v-model="msg.SchoolId" filterable @change="handleCurrentChanges(1)">
<el-option value="-1" label="不限"></el-option>
<el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'></el-option>
</el-select>
</div>
</div> -->
<div v-if='isgenerate==true'>
<div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span>
<el-date-picker
v-model="msg.Month"
value-format="yyyy-MM"
type="month"
placeholder="选择月"
@change="handleCurrentChanges(1)"
>
</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="BatchName" label="周期" ></el-table-column>
<el-table-column prop="TotalMoney" 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="操作" >
<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>
</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>
</div>
</template>
<script>
import {
getSchoolDropdown
} from '../../../api/school/index'
import{
getCommissionPeriodsPageList,
setSellCommissionRule,
setUserReturnCommission,
getSellAchievementsSendEmployeeList,
setSellAchievementsSendEmployee
} from '../../../api/finance/index'
export default {
meta: {
title: "幸福存折期数列表"
},
props: {},
components: {},
data() {
return {
loading: false,
loading1: false,
value2:'',
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 15,
SchoolId:'-1',
Month:'',
CommissionType:2,
},
pageCount: 0,
persistent: false,
listData:{},
tableData:[],
total:0,
CompanyList:[],
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.msg.Month = myDate.getFullYear() + "-" + (myDate.getMonth()+1)
},
mounted() {
this.getList();//获取提成周期列表
// this.getBranchList()
},
methods: {
getList(){
this.loading = true;
getCommissionPeriodsPageList(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;
setUserReturnCommission({type:2}).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;
})
}
},
getBranchList(){//获取校区
getSchoolDropdown({}).then(res => {
this.CompanyList = res.Data;
}).catch(() => {
})
},
goUrl(id ) {
this.$router.push({
path: '/financial/returnPassbook/ReturnUserList',
query: {
"id": id,
"CommissionType": 2,
blank: 'y',
}
})
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
},
}
</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;
}
.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 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
filled
stack-label
use-input
input-debounce="0"
option-value="SId"
@input="getList"
option-label="SName"
v-model="msg.SchoolId"
:options="CompanyList"
label="校区"
:dense="false"
emit-value
map-options
></q-select>
</div>
<div class="col-3">
<q-select
filled
stack-label
input-debounce="0"
option-value="Id"
@input="getList"
option-label="Name"
v-model="msg.Status"
:options="StatusList"
label="状态"
:dense="false"
emit-value
map-options
></q-select>
</div>
<div class="col-3">
<q-select
filled
stack-label
input-debounce="0"
option-value="Id"
@input="getlaiyuan"
option-label="Name"
v-model="msg.OrderSourceType"
:options="customFromList"
label="来源"
:dense="false"
emit-value
map-options
></q-select>
</div>
<div class="col-3" v-if="msg.OrderSourceType == 1 || msg.OrderSourceType == 3">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
:dense="false"
:options="myEmployeeList"
use-input
@input="getList"
label="人员"
@filter="filterEmployee"
option-label="EmployeeName"
option-value="Id"
emit-value
map-options
>
<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" v-if="msg.OrderSourceType == 2">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
:dense="false"
:options="customList"
use-input
@input="getList"
label="关联同行"
@filter="filterFn"
option-label="CustomerName"
option-value="CustomerId"
emit-value
map-options
>
<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" v-if="msg.OrderSourceType == 4">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
:dense="false"
:options="InvitationList"
use-input
@input="getList"
label="转介人"
@filter="filterFnStudent"
option-label="StuName"
option-value="StuId"
emit-value
map-options
>
<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>
<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="校区"></el-table-column>
<el-table-column
prop="UserName"
label="人员"
:filters="UserNamelist"
:filter-method="filterHandler"
></el-table-column>
<el-table-column prop="OrderSourceType" label="类型"></el-table-column>
<el-table-column
prop="StudentCount"
label="学生数量"
sortable
:sort-method="StudentCount"
></el-table-column>
<el-table-column
prop="CommissionMoeny"
label="提成金额"
sortable
:sort-method="CommissionMoeny"
></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('returnPassbook/returnpassbookStatistics', scope.row)"
></i>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
</template>
</div>
</template>
<script>
import {
GetClassTypePageList,
} from '../../../api/system/index';
import {
GetStudentList,
} from '../../../api/course/class';
import {
getCommissionUserList,
} from '../../../api/finance/index'
import {
getSchoolDropdown,
getStudentDorpDownList
} from "../../../api/school/index";
import {
queryEmployee
} from '../../../api/users/user'
import {
CreateTypeList,
GetCustomerList
} from '../../../api/sale/sale'
export default {
meta: {
title: "销售提成详情"
},
props: {},
components: {},
data() {
return {
loading: false,
//列表数据参数
msg: {
BatchId: 0,
SchoolId: '-1',
Status: '-2',
OrderSourceType: '-1',
OrderSourceId: 0,
Q_SelectNormal: '0'
},
pageCount: 0,
persistent: false,
tableData: [],
CompanyList: [],
StatusList: [
{ Id: '-2', Name: '不限' }, { Id: '-1', Name: '不返佣' }, { Id: '0', Name: '待返佣' }, { Id: '1', Name: '已返佣到账户' }, { Id: '2', Name: '佣金已提现' },
],
see_tcdetailed: false,
customFromList: [],
UserNamelist: [],
employeeList: [],
myEmployeeList: [],
TransListData: [], //转介人数据
MyTransListData: [],
customList: [], //同行列表
allCustomList: [], //所有同行列表
InvitationList: [], //学员下拉数据
AllInvitationList: [],
}
},
created() {
},
mounted() {
if (this.$route.query && this.$route.query.id) {
this.msg.BatchId = this.$route.query.id
}
this.getList()
this.getBranchList()
this.getCustomFrom()
this.getEmployeeList()
this.getStudentDorpDown()
this.GetCustomerList()
this.getStudentList();//学员下拉
},
methods: {
getList() {
this.loading = true;
let msg = JSON.parse(JSON.stringify(this.msg))
if (msg.OrderSourceId == '') {
msg.OrderSourceId = 0
}
getCommissionUserList(msg).then(res => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data;
this.UserNamelist = [];
this.tableData.forEach(x => {
let obj3 = {
text: x.UserName,
value: x.UserName
}
this.UserNamelist.push(obj3)
})
this.UserNamelist = this.unique(this.UserNamelist)
}
})
},
getlaiyuan() {
if (this.msg.OrderSourceType == -1) {
this.msg.OrderSourceId = 0
this.getList()
} else {
this.msg.OrderSourceId = ''
}
},
getBranchList() {//获取校区
getSchoolDropdown({}).then(res => {
let obj = {
SName: '不限',
SId: '-1'
}
this.CompanyList = res.Data;
this.CompanyList.unshift(obj);
}).catch(() => {
})
},
//获取客户来源
getCustomFrom() {
CreateTypeList({}).then(res => {
if (res.Code == 1) {
let obj = {
Name: '不限',
Id: '-1'
}
this.customFromList = res.Data;
this.customFromList.unshift(obj);
}
})
},
//筛选转介人
filterStudent(val, update, abort) {
update(() => {
this.MyTransListData = this.TransListData.filter(
v => v.StuName.indexOf(val) > -1
);
});
},
unique(arr, Name) { //数组去重
const res = new Map();
return arr.filter(
(list) => !res.has(list.text) && res.set(list.text, 1)
);
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
this.myEmployeeList = res.Data;
})
},
//获取转介人下拉
getStudentDorpDown() {
getStudentDorpDownList().then(res => {
if (res.Code == 1) {
this.TransListData = res.Data;
this.MyTransListData = res.Data;
}
})
},
//获取客户下拉数据
GetCustomerList() {
let msg = {
QCreateBy: 0
}
GetCustomerList(msg).then(res => {
if (res.Code == 1) {
this.customList = res.Data;
this.allCustomList = res.Data;
}
})
},
//筛选客户
filterFn(val, update) {
update(() => {
if (val === "") {
this.customList = JSON.parse(JSON.stringify(this.allCustomList));
} else {
const needle = val.toLowerCase();
this.customList = this.allCustomList.filter(
(v) => v.CustomerName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取学员下拉信息
getStudentList() {
var qMsg = {
SchoolId: this.msg.SchoolId
};
GetStudentList(qMsg).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.AllInvitationList = JSON.parse(JSON.stringify(jsonData));
this.InvitationList = JSON.parse(JSON.stringify(jsonData));
}
}
})
},
filterFnStudent(val, update) {
update(() => {
if (val === '') {
this.InvitationList = JSON.parse(JSON.stringify(this.AllInvitationList))
} else {
const needle = val.toLowerCase()
this.InvitationList = this.AllInvitationList.filter(v => v.StuName.toLowerCase().indexOf(needle) > -1)
}
})
},
goUrl(path, id) {
this.$router.push({
path: '/financial/' + path,
query: {
preriodId: this.$route.query.id,
CommissionType: this.$route.query.CommissionType,
blank: 'y',
}
})
},
filterHandler(value, row, column) {
const property = column['property'];
return row[property] === value;
},
StudentCount(a, b, c) {
return a.StudentCount - b.StudentCount;
},
CommissionMoeny(a, b) {
return a.CommissionMoeny - b.CommissionMoeny;
},
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;
}
.ReturnperiodsList .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.ReturnperiodsList .text-bottom{
height: 32px;line-height: 32px; margin-bottom: 10px;
}
.ReturnperiodsList ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.ReturnperiodsList ._icon_btn .icon-add{
background-color: #47BF8C;
}
.ReturnperiodsList ._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;
}
.ReturnperiodsList .el-table td,.el-table th{
padding: 5px 0;
}
</style>
<template>
<div class="page-body ReturnperiodsList">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<!-- <div style="margin-right: 20px;" v-if='iscMaker==true'>
<div class="block">
<span style="margin-right: 5px;">校区</span>
<el-select v-model="msg.SchoolId" filterable @change="handleCurrentChanges(1)">
<el-option value="-1" label="不限"></el-option>
<el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'></el-option>
</el-select>
</div>
</div> -->
<div v-if='isgenerate==true'>
<div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span>
<el-date-picker
v-model="msg.Month"
value-format="yyyy-MM"
type="month"
placeholder="选择月"
@change="handleCurrentChanges(1)"
>
</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="BatchName" label="周期" ></el-table-column>
<el-table-column prop="TotalMoney" 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="操作" >
<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>
</div>
</template>
<script>
import {
getSchoolDropdown
} from '../../../api/school/index'
import{
getCommissionPeriodsPageList,
setSellCommissionRule,
setUserReturnCommission,
getSellAchievementsSendEmployeeList,
setSellAchievementsSendEmployee
} from '../../../api/finance/index'
export default {
meta: {
title: "返佣期数列表"
},
props: {},
components: {},
data() {
return {
loading: false,
loading1: false,
value2:'',
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 15,
SchoolId:'-1',
Month:'',
CommissionType:1,
},
pageCount: 0,
persistent: false,
listData:{},
tableData:[],
total:0,
CompanyList:[],
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.msg.Month = myDate.getFullYear() + "-" + (myDate.getMonth()+1)
},
mounted() {
this.getList();//获取提成周期列表
// this.getBranchList()
},
methods: {
getList(){
this.loading = true;
getCommissionPeriodsPageList(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;
setUserReturnCommission({type:1}).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;
})
}
},
getBranchList(){//获取校区
getSchoolDropdown({}).then(res => {
this.CompanyList = res.Data;
}).catch(() => {
})
},
goUrl(id ) {
this.$router.push({
path: '/financial/returnPassbook/ReturnUserList',
query: {
"id": id,
"CommissionType": 1,
blank: 'y',
}
})
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
},
}
</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;
}
.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="resetSearch()"
option-value="SId"
option-label="SName"
v-model="msg.SchoolId"
ref="SchoolId"
:options="schoolList"
label="校区"
dense
emit-value
map-options
/>
</div>
<q-select
@input="resetSearch"
filled
stack-label
option-value="Id"
option-label="Name"
use-input
v-model="msg.Status"
:options="StatusList"
label="状态"
dense
class="col-3"
emit-value
map-options
></q-select>
<div class="col-3" v-if="!isNormal">
<q-select
filled
stack-label
@input="resetSearch()"
option-value="Id"
option-label="BatchName"
v-model="msg.BatchId"
:options="PeriodsList"
label="周期"
dense
emit-value
map-options
/>
</div>
<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
emit-value
map-options
@filter="filterFnbanji"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">未找到相关数据</q-item-section>
</q-item>
</template>
</q-select>
</div>
<q-select
v-if="!isNormal"
@input="resetSearch"
filled
stack-label
option-value="Id"
option-label="Name"
use-input
v-model="msg.CommissionType"
:options="CommissionList"
label="类型"
dense
class="col-3"
emit-value
map-options
></q-select>
<q-select
@input="resetSearch"
filled
stack-label
option-value="Id"
option-label="Name"
use-input
v-model="msg.Q_SelectNormal"
:options="SelectNormal"
label="返佣情况"
dense
class="col-3"
emit-value
map-options
></q-select>
<q-select
class="col-3"
filled
stack-label
input-debounce="0"
option-value="Id"
@input="getlaiyuan"
option-label="Name"
v-model="msg.OrderSourceType"
:options="customFromList"
label="来源"
dense
emit-value
map-options
></q-select>
<div class="col-3" v-if="msg.OrderSourceType == 1 || msg.OrderSourceType == 3">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
dense
:options="myEmployeeList"
use-input
@input="getList"
label="人员"
@filter="filterEmployee"
option-label="EmployeeName"
option-value="Id"
emit-value
map-options
>
<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" v-if="msg.OrderSourceType == 2">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
dense
:options="customList"
use-input
@input="getList"
label="关联同行"
@filter="filterFn"
option-label="CustomerName"
option-value="CustomerId"
emit-value
map-options
>
<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" v-if="msg.OrderSourceType == 4">
<q-select
filled
stack-label
v-model="msg.OrderSourceId"
dense
:options="InvitationList"
use-input
@input="getList"
label="转介人"
@filter="filterFnStudent"
option-label="StuName"
option-value="StuId"
emit-value
map-options
>
<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
dense
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
v-if="!isNormal"
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" label="校区" width="150"></el-table-column>
<el-table-column prop="OrderSourceType" label="来源">
<template slot-scope="scope">
{{getOrderSourceType(scope.row.OrderSourceType)}}
</template>
</el-table-column>
<el-table-column prop="UserName" label="人员"></el-table-column>
<el-table-column prop="ClassNo" label="班号"></el-table-column>
<el-table-column width="170" prop="ClassName" label="班级信息">
<template slot-scope="scope">
<div>
<span
style="cursor: pointer;text-decoration: underline;"
@click="goUrlclass('/course/classManage', scope.row.ClassName)"
>{{ scope.row.ClassName }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="OrderId" 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="StuName" label="学生"></el-table-column>
<el-table-column prop="CommissionType" label="类型">
<template slot-scope="scope">
<span v-if="scope.row.CommissionType == 1">返佣</span>
<span v-if="scope.row.CommissionType == 2">幸福存折</span>
</template>
</el-table-column>
<el-table-column width="130" prop="CommissionMoeny" label="返佣/存折金额">
<template slot-scope="scope">
<div>{{ scope.row.CommissionMoeny ? scope.row.CommissionMoeny : '-' }}</div>
</template>
</el-table-column>
<el-table-column prop="Status" label="状态">
<template slot-scope="scope">
<span v-if="scope.row.Status == -1">不返佣</span>
<span v-if="scope.row.Status == 0">待返佣</span>
<span v-if="scope.row.Status == 1">已返佣到账户</span>
<span v-if="scope.row.Status == 2">佣金已提现</span>
</template>
</el-table-column>
<el-table-column prop="BatchName" label="期数"></el-table-column>
<el-table-column prop="Remark" width="200" 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,
getClassDropDownList,
getStudentDorpDownList
} from '../../../api/school/index'
import {
queryEmployee
} from '../../../api/users/user'
import {
GetStudentList,
} from '../../../api/course/class';
import {
CreateTypeList,
GetCustomerList
} from '../../../api/sale/sale'
import {
getCommissionStatistics,
getCommissionPeriodsList,
} from '../../../api/finance/index'
import {
EduDownLoad,
} from '../../../api/common/common';
export default {
meta: {
title: "业绩提成统计"
},
props: {},
components: {
},
data() {
return {
loading: false,
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 10,
SchoolId: '-1',
BatchId: '0',
Status: '-2',
OrderSourceType: '-1',
OrderSourceId: 0,
Q_SelectNormal: '-1',
CommissionType: '-1',
ClassId: 0,
OrderId: '',
},
StatusList: [
{ Id: '-2', Name: '不限' }, { Id: '-1', Name: '不返佣' }, { Id: '0', Name: '待返佣' }, { Id: '1', Name: '已返佣到账户' }, { Id: '2', Name: '佣金已提现' },
],
SelectNormal: [
{ Id: '-1', Name: '不限' }, { Id: '1', Name: '非不返佣的' }, { Id: '2', Name: '已返佣' },
],
CommissionList: [
{ Id: '-1', Name: '不限' }, { Id: '1', Name: '返佣' }, { Id: '2', Name: '幸福存折' },
],
pageCount: 0,
listData: {},
tableData: [],
total: 0,
company: [],
department: [],
ClassList: [],
allClassList: [],
returnString: [], //默认岗位
see_tcdetailed: false,
schoolList: [],
DeptList: [], // 部门下拉
PeriodsList: [],//周期列表
TotalCommission: 0,
ChangeLog: '',
customFromList: [],
TransListData: [], //转介人数据
MyTransListData: [],
customList: [], //同行列表
allCustomList: [], //所有同行列表
InvitationList: [], //学员下拉数据
AllInvitationList: [],
isNormal: false,
}
},
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.preriodId) {
this.msg.BatchId = (this.$route.query.preriodId).toString()
}
if (this.$route.query && this.$route.query.CommissionType) {
this.msg.CommissionType = this.$route.query.CommissionType
this.isNormal = true
}
this.getList()
this.setClass()
this.getBranchList()
this.getPeriodList()
this.getCustomFrom()//来源
this.getEmployeeList()
this.getStudentDorpDown()
this.GetCustomerList()
this.getStudentList();//学员下拉
},
methods: {
resetSearch() {
console.log(this.msg)
this.msg.PageIndex = 1;
this.getList()
},
getList() {
this.loading = true;
let msg = JSON.parse(JSON.stringify(this.msg))
if (msg.OrderSourceId == '') {
msg.OrderSourceId = 0
}
getCommissionStatistics(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false;
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)
);
},
getlaiyuan() {
if (this.msg.OrderSourceType == -1) {
this.msg.OrderSourceId = 0
this.getList()
} else {
this.msg.OrderSourceId = ''
}
},
getOrderSourceType(Id){
let Name = ''
this.customFromList.forEach(x=>{
if(x.Id == Id){
Name = x.Name
}
})
return Name
},
//获取客户来源
getCustomFrom() {
CreateTypeList({}).then(res => {
if (res.Code == 1) {
let obj = {
Name: '不限',
Id: '-1'
}
this.customFromList = res.Data;
this.customFromList.unshift(obj);
}
})
},
//筛选转介人
filterStudent(val, update, abort) {
update(() => {
this.MyTransListData = this.TransListData.filter(
v => v.StuName.indexOf(val) > -1
);
});
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
this.myEmployeeList = res.Data;
})
},
//获取转介人下拉
getStudentDorpDown() {
getStudentDorpDownList().then(res => {
if (res.Code == 1) {
this.TransListData = res.Data;
this.MyTransListData = res.Data;
}
})
},
//获取客户下拉数据
GetCustomerList() {
let msg = {
QCreateBy: 0
}
GetCustomerList(msg).then(res => {
if (res.Code == 1) {
this.customList = res.Data;
this.allCustomList = res.Data;
}
})
},
//筛选客户
filterFn(val, update) {
update(() => {
if (val === "") {
this.customList = JSON.parse(JSON.stringify(this.allCustomList));
} else {
const needle = val.toLowerCase();
this.customList = this.allCustomList.filter(
(v) => v.CustomerName.toLowerCase().indexOf(needle) > -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));;
}
}
});
},
//筛选班级
filterFnbanji(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(() => {
})
},
//获取学员下拉信息
getStudentList() {
var qMsg = {
SchoolId: this.msg.SchoolId
};
GetStudentList(qMsg).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.AllInvitationList = JSON.parse(JSON.stringify(jsonData));
this.InvitationList = JSON.parse(JSON.stringify(jsonData));
}
}
})
},
filterFnStudent(val, update) {
update(() => {
if (val === '') {
this.InvitationList = JSON.parse(JSON.stringify(this.AllInvitationList))
} else {
const needle = val.toLowerCase()
this.InvitationList = this.AllInvitationList.filter(v => v.StuName.toLowerCase().indexOf(needle) > -1)
}
})
},
getPeriodList() {//获取周期下拉列表
getCommissionPeriodsList({}).then(res => {
if (res.Code == 1) {
this.PeriodsList = res.Data
let obj = {
BatchName: '不限',
Id: '0'
}
this.PeriodsList.unshift(obj)
}
})
},
tcexport() {//导出
var msg = JSON.parse(JSON.stringify(this.msg));
let text = '用户返佣/存折明细.xls'
if(msg.CommissionType==1){
text = '用户返佣.xls'
}
if(msg.CommissionType==2){
text = '幸福存折明细.xls'
}
EduDownLoad("/CustomerCommission/GetCommissionStatisticsToExcel", msg, text)
},
goUrlclass(path, Names) {//班级
let Name = encodeURI(Names)
this.OpenNewUrl(path, {
ClassName: Name,
});
},
goUrlorderList(path, row) {//订单跳转
this.OpenNewUrl(path, {
OrderId: row.OrderId,
// EnterID:row.UserId
});
},
},
}
</script>
<style lang="sass">
@import url('~assets/
@import url('~assets/css/table.sass')
......@@ -759,6 +759,27 @@ const routes = [{
component: () =>
import("pages/financial/market/empBonusDetail.vue")
},
{
path: "/financial/returnPassbook/ReturnperiodsList", // 返佣期数列表
component: () =>
import("pages/financial/returnPassbook/ReturnperiodsList.vue")
},
{
path: "/financial/returnPassbook/ReturnUserList", // 返佣 用户分组列表
component: () =>
import("pages/financial/returnPassbook/ReturnUserList.vue")
},
{
path: "/financial/returnPassbook/returnpassbookStatistics", // 返佣 幸福存折明细
component: () =>
import("pages/financial/returnPassbook/returnpassbookStatistics.vue")
},
{
path: "/financial/returnPassbook/PassbookperiodsList", // 幸福存折期数列表
component: () =>
import("pages/financial/returnPassbook/PassbookperiodsList.vue")
},
{
path: "/administration/document", //行政公告
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