Commit 66a803f3 authored by youjie's avatar youjie

no message

parent f0511935
......@@ -64,7 +64,7 @@
v-for="( son , sIndex ) in item.AwardRuleList"
:key="sIndex"
>
{{ son.StartValue }} ~ {{son.EndValue&&son.EndValue!=-1?son.EndValue:'以上'}}
{{ son.StartValue }}{{son.EndValue&&son.EndValue!=-1?' ~ '+son.EndValue+' 人 ':' 人以上'}}
</th>
</tr>
<tr>
......@@ -105,7 +105,7 @@
<th style="min-width: 220px;"
v-for="( son , sIndex ) in item.EuropeAwardRuleList"
:key="sIndex"
>{{ son.StartValue }} ~ {{son.EndValue&&son.EndValue!=-1?son.EndValue:'以上'}}
>{{ son.StartValue }}{{son.EndValue&&son.EndValue!=-1?' ~ '+son.EndValue+' 人 ':' 人以上'}}
</th>
</tr>
<tr>
......@@ -158,7 +158,7 @@
<div v-if="dataList.length==0"
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;margin-top: 30px;"
>暂无数据</div>
<el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px" @close="resetForm('form')">
<el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="ImpressionTicketing-msgbox bottom0">
<el-form-item label="规则名称" prop="Name">
......@@ -172,7 +172,7 @@
</el-form-item>
</div>
<el-form-item class="ImpressionTicketing-OuterFrame" label-width="0px">
<p class="ImpressionTicketing-title">日本人头奖励(人)</p>
<p class="ImpressionTicketing-title">日本及其他人头奖励</p>
<div class="ImpressionTicketing-msgbox"
v-for="(item,index) in form.AwardRuleList" :key="index">
<div>
......@@ -215,7 +215,7 @@
</div>
</el-form-item>
<el-form-item class="ImpressionTicketing-OuterFrame" label-width="0px">
<p class="ImpressionTicketing-title">日本提成比例</p>
<p class="ImpressionTicketing-title">日本及其他提成比例</p>
<div class="ImpressionTicketing-msgbox" v-for="(item,index) in form.ProfitRuleList" :key="index">
<div>
<el-form-item
......@@ -260,7 +260,7 @@
</div>
</el-form-item>
<el-form-item class="ImpressionTicketing-OuterFrame" label-width="0px">
<p class="ImpressionTicketing-title">欧洲人头奖励(人)</p>
<p class="ImpressionTicketing-title">欧洲及其他人头奖励</p>
<div class="ImpressionTicketing-msgbox"
v-for="(item,index) in form.EuropeAwardRuleList" :key="index">
<div>
......@@ -303,7 +303,7 @@
</div>
</el-form-item>
<el-form-item class="ImpressionTicketing-OuterFrame" label-width="0px">
<p class="ImpressionTicketing-title">欧洲提成比例</p>
<p class="ImpressionTicketing-title">欧洲及其他提成比例</p>
<div class="ImpressionTicketing-msgbox"
v-for="(item,index) in form.EuropeProfitRuleList" :key="index">
<div>
......@@ -354,7 +354,7 @@
<div class="ImpressionTicketing-msgbox" v-for="(item,index) in form.BonusRuleList" :key="index">
<div>
<el-form-item
:label="form.BonusRuleList.length>0?`连续 ${index+1} `:` ` "
:label="form.BonusRuleList.length>0?`连续达标 ${index+1} `:` ` "
:prop="`BonusRuleList.${index}.StartValue`"
:rules="rules.StartValue"
label-width="100px"
......@@ -385,7 +385,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleVisible = false,resetForm('form')">取 消</el-button>
<el-button size="small" @click="ruleVisible = false">取 消</el-button>
<el-button size="small" type="danger" @click="RulesOk('form')" :loading="ruleLoading">确 定</el-button>
</span>
</el-dialog>
......@@ -496,7 +496,6 @@
BonusRuleList:
{
StartValue:0,
// EndValue:null,
Rate:null
}
,
......@@ -536,7 +535,6 @@
BonusRuleList:[
{
StartValue:0,
// EndValue:null,
Rate:null
}
],
......@@ -773,34 +771,44 @@
this.ruleVisible = false;
// 重置表单
this.form = {
id:0,
Name:'',//规则名称
EmpType:'',//类型 1销售 2引流
EmployeeId:'',
EmpList:[//参与人
{EmployeeId:''}
Id:0,
Name:'',
SalesRate: 0,
BonusMinPNum: 0,
AwardRuleList:[
{
StartValue:0,
EndValue:null,
Rate:null
}
],
AwardRuleList:[//工资阶梯列表
ProfitRuleList:[
{
StartValue:0,
EndValue:null,
Rate:null
}
],
ProfitRuleList:[//提成阶梯列表
EuropeAwardRuleList:[
{
StartValue:0,
EndValue:null,
Rate:null
}
],
BonusRuleList:[//年终奖阶梯列表
EuropeProfitRuleList:[
{
StartValue:0,
EndValue:null,
Rate:null
}
],
BonusRuleList:[
{
StartValue:0,
Rate:null
}
],
};
this.$refs[formName].resetFields();
this.getList()
......
<style scoped>
.CM_look {
padding: 4px !important;
position: relative;
top: 1px;
}
.opUl li {
display: inline-block;
margin: 10px 15px 10px 0;
}
.domesticCommission .singeRowTable tr td {
padding: 8px 5px;
}
.domesticCommission .hoverSpan span:hover {
cursor: pointer;
text-decoration: underline;
color: red;
}
/deep/.el-checkbox__input.is-checked .el-checkbox__inner{
background-color: #E95252!important;
border-color:#E95252!important;
}
/deep/.el-checkbox__input.is-indeterminate .el-checkbox__inner{
background-color: #E95252!important;
border-color:#E95252!important;
}
</style>
<template>
<div class="flexOne domesticCommission">
<div>
<ul class="opUl">
<li>
<em>选择月份</em>
<el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月">
</el-date-picker>
</li>
<li v-show="btnShow">
<el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading"
@click="generateTable">生成提成</el-button>
</li>
</ul>
</div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>期数</th>
<th>总追加工资</th>
<th>总提成</th>
<th>公司提成</th>
<th>财务单据</th>
<th>操作信息</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.Periods}}</td>
<td>
<p>+ {{item.SumWage}}</p>
</td>
<td>{{item.SumPrice}}</td>
<td>{{item.BranchCommission}}</td>
<td>
<template v-if="item.FinanceIdList.length>0">
<span v-for="(x,y) in item.FinanceIdList">
<span style="cursor: pointer;text-decoration: underline;" @click='gofinancialdetail(x)'>
{{x}}
</span>
{{item.FinanceIdList.length == y+1 ?'':'、'}}
</span>
</template>
</td>
<td>
<div>{{item.CreateByStr}}</div>
<div>{{item.CreateStr}}</div>
</td>
<td>
<el-tooltip class="item" effect="dark" content="查看明细" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('ImpressionTicketUserDetails',item.Id)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
<el-tooltip v-if="cMaker==true" class="item" effect="dark" content="提成制单" placement="top">
<el-button @click="YijianZD(item,1)" type="danger" class="CM_look" v-if="cMaker==true"
icon="iconfont icon-mui-icon-add" circle></el-button>
</el-tooltip>
<el-tooltip v-if="cMaker==true" class="item" effect="dark" content="工资制单" placement="top">
<el-button @click="YijianZD(item,2)" type="danger" class="CM_look" v-if="cMaker==true"
icon="iconfont icon-mui-icon-add" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="当期利润" placement="top">
<el-button @click="goUrl('ImpressionCurrentProfit',item.Id,1)" type="danger" class="CM_look"
icon="iconfont icon-money" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="7">暂无数据</td>
</tr>
</table>
<!-- 分页 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'>
</el-pagination>
<!-- 制单人员选择 -->
<el-dialog custom-class='w1006' title="选择制单人员" :visible.sync="outerVisible" center :before-close="closeChangeMachie">
<template>
<div
class="cm_content"
style="width: 100%;margin-bottom: 35px;margin-top: 30px;"
>
<el-table
v-loading="BillMakingLoading"
ref="orderMakerList"
:data="orderMakerList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
:selectable="checkSelectable"
type="selection"
width="55">
</el-table-column>
<el-table-column
label="公司"
width="120">
<template slot-scope="scope">{{ scope.row.BranchName }}</template>
</el-table-column>
<el-table-column
prop="DeptName"
label="部门">
</el-table-column>
<el-table-column
prop="EmName"
label="姓名"
show-overflow-tooltip>
</el-table-column>
<el-table-column
v-if="BillMakingMsg.Type==1"
prop="Commission"
label="提成金额"
show-overflow-tooltip>
</el-table-column>
<el-table-column
v-else
label="追加工资"
show-overflow-tooltip>
<template slot-scope="scope"> + {{ scope.row.WageMoney }}</template>
</el-table-column>
<el-table-column
label="是否已发放"
show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.IsGiveOut==2? '否':'是' }}</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 10px">金额总额:{{ totalAmount }}</div>
</template>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="BillMaking">确定</button>
</div>
</el-dialog>
</div>
</template>
<script>
import moment from "moment"
export default {
data() {
return {
orderMakerList:[],//制单人列表
outerVisible: false,
Month: moment().subtract(1, 'months').format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
OutBranchId: -1
},
loading: false,
//数据源
dataList: [],
total: 0,
btnShow: false,
btnLoading: false,
cMaker: true,//是否可以制单
BillMakingLoading: false,
totalAmount:0,
multipleSelection:[],
BillMakingMsg:{
PeroidsId: null,
Type: null,
EmpIds:''
}
}
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
this.msg.OutBranchId = userInfo.RB_Branch_id
if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) {
this.btnShow = true;
}
this.getList()
},
methods: {
// 是否已发放
checkSelectable (row){
return row.IsGiveOut != 1
},
// 已选可制单人员
handleSelectionChange(val){
this.multipleSelection = val;
let zong = 0;
this.multipleSelection.forEach((x) => {
if(this.BillMakingMsg.Type==1){
zong += x.Commission;
}else{
zong += x.WageMoney;
}
});
this.totalAmount = zong;
},
closeChangeMachie(done){//弹出框关闭初始化弹框内表单
done();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, id,type) {
let title = ''
if(type==1){
title = '当期利润差额'
}else{
title = '期数详情'
}
this.$router.push({
path: path,
query: {
PeriodsId: id,
blank: 'y',
tab: title
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
'sellcommission_GetTYSaleCommissionPageList', this.msg,
res => {
if (res.data.resultCode == 1) {
this.loading = false;
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.loading = false;
this.Error(res.data.message)
}
},
err => {}
)
},
//生成提成报表
generateTable() {
if (!this.Month || this.Month == "") {
this.Error("请选择月份!")
return;
}
this.btnLoading = true;
this.apipost(
"sellcommission_SetTYSaleCommissionSend", { Month: this.Month },
res => {
this.btnLoading = false;
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('报表生成成功')
} else {
this.Error(res.data.message);
}
}
);
},
// 保存制单人员
BillMaking(){
if(this.multipleSelection.length==0){
this.Error("请选择需要制单的人员!")
return
}
if(this.totalAmount<=0){
this.Error("金额总额必须大于0!")
return
}
let data = []
this.multipleSelection.map(item=>{
data.push(item.EmpId)
})
this.BillMakingMsg.EmpIds = data.join(',')
this.$confirm("是否制单? 制单后无法更改制单状态,如需修改请联系管理员", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.BillMakingFun()
})
.catch(() => {});
},
BillMakingFun(){
this.crmapipost(
'/api/Commission/SetCommissionSendEmployee', this.BillMakingMsg,
res => {
if (res.data.resultCode == 1) {
this.BillMakingMsg.totalAmount = this.totalAmount
this.BillMakingMsg.OtherType = this.BillMakingMsg.Type==1?'56':'57'
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
commissionObj: JSON.stringify(this.BillMakingMsg)
}
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
this.Success('制单人员保存成功')
this.outerVisible = false
this.BillMakingMsg = {
PeroidsId: null,
Type: null,
EmpIds:''
}
} else {
this.Error(res.data.message)
}
},
err => {}
)
},
// 点击制单
YijianZD(item,type) {
this.outerVisible = true
this.GetCommissionSendEmployeeList(item,type)
},
// 获取可制单人员
GetCommissionSendEmployeeList(item,type){
this.BillMakingMsg.PeroidsId = item.Id
this.BillMakingMsg.Type = type
let msg = {
PeroidsId: this.BillMakingMsg.PeroidsId,
Type: this.BillMakingMsg.Type
}
this.BillMakingLoading = true
this.crmapipost(
'/api/Commission/GetCommissionSendEmployeeList', msg,
res => {
if (res.data.resultCode == 1) {
this.BillMakingLoading = false;
this.orderMakerList = res.data.data;
} else {
this.BillMakingLoading = false;
this.Error(res.data.message)
}
},
err => {}
)
},
gofinancialdetail(id) {
this.$router.push({
name: 'FinancialDocumentsDetail',
query: {
id: id,
blank: 'y',
tab: '单据详情'
}
})
}
}
}
</script>
\ No newline at end of file
<style>
.CM_look {
padding: 4px !important;
position: relative;
top: 1px;
}
.opUl li {
display: inline-block;
margin: 10px 15px 10px 0;
}
.domesticCommissiondetails .opUl li input {
height: 34px !important;
}
.domesticCommissiondetails .singeRowTable tr td {
padding: 8px 5px;
}
.domesticCommissiondetails .hoverSpan span:hover {
cursor: pointer;
text-decoration: underline;
color: red;
}
.cursor-p{
cursor: pointer;
}
.cursor-p:hover{
color: #409EFF;
}
</style>
<template>
<div class="flexOne domesticCommissiondetails">
<div style="min-height: 70px;">
<ul class="opUl">
<li>
<em>订单号</em>
<el-input maxlength="50" v-model="msg.OrderId" class="permiss-input w200"
@keyup.native.enter="handleCurrentChange(1)" :placeholder="$t('pub.pleaseImport')"></el-input>
</li>
<li>
<em>类型</em>
<el-select v-model="msg.EmpType" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option v-for="(item,index) in titleList" :key="item.index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.EmpId" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option label="不限" :value="-1"></el-option>
<el-option label="微途" :value="-2"></el-option>
<el-option v-for="(item,index) in searchList" :key="item.index" :label="item.name"
:value="item.empId"></el-option>
</el-select>
</li>
<li>
<em>期数</em>
<el-select v-model="msg.PeriodsId" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in PeroidsList" :key="item.index" :label="item.Periods"
:value="item.Id"></el-option>
</el-select>
</li>
</ul>
</div>
<div style="display: flex;align-items: center;height: 50px;justify-content: space-between;">
<div style="display: flex;align-items: center;">
</div>
<input type="button" class="normalBtn" value="导出" @click="exportExcel">
</div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0"
style="margin-top: 10px;">
<tr>
<th>类型</th>
<th>公司</th>
<th>部门</th>
<th>岗位</th>
<th>姓名</th>
<th>订单号</th>
<th>订单利润</th>
<th>应发</th>
<th>当期提成</th>
<th>未达标提成</th>
<th>提成比例</th>
<th>依据类型</th>
<th>年终</th>
<th>年终比例</th>
<th>期数</th>
<th width='300'>备注</th>
<!-- <th>操作</th> -->
</tr>
<tr v-for="item in dataList">
<td>{{item.EmpType==1?'销售':item.EmpType==2?'引流':'-'}}</td>
<td>{{item.BranchName}}</td>
<td>{{item.DeptName}}</td>
<td>{{item.PostName?item.PostName:'-'}}</td>
<td>{{item.EmName}}</td>
<td><span class="cursor-p" @click="clickUrl(item,1)">{{item.OrderId}}</span></td>
<td>{{item.OrderProfit}}</td>
<td>{{item.YCommission}}</td>
<td>{{item.Commission}}</td>
<td>{{item.LimitCommission != 0?item.LimitCommission:'-'}}</td>
<td>{{item.CommissionRate}}%</td>
<td @click="GenerateScale(item)">
<span
:class="item.WageReId?'cursor-p':''">{{item.WageType==1?'新员工比例':item.WageType==2?'上季度定档':'-'}}</span>
</td>
<td>{{item.EmName!='微途'?item.BonusMoney:'-'}}</td>
<td>{{item.EmName!='微途'?item.BonusRate+'%':'-'}}</td>
<td>{{item.Month}}</td>
<td>{{item.Remark?item.Remark:'-'}}</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="16">暂无数据</td>
</tr>
</table>
<!-- 分页 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'>
</el-pagination>
<!-- 查看生成比例 -->
<el-dialog custom-class='w1006' title="员工生成比例" :visible.sync="outerVisible" center>
<inAccordanceWith v-if="objNew" :msgNew="objNew"></inAccordanceWith>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="outerVisible = false">确定</button>
</div>
</el-dialog>
</div>
</template>
<script>
import inAccordanceWith from "./inAccordanceWithDialog"
import moment from "moment"
export default {
components:{
inAccordanceWith
},
data() {
return {
objNew:{},
outerVisible:false,
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
EmpId: -1,
PeriodsId: -1,
EmpType: '-1',
OrderId:''
},
loading: false,
//数据源
dataList: [],
total: 0,
btnShow: false,
PeroidsList:[],
searchList: [],
TotalMoney: 0,
TotalNum: 0,
disabled: true,
titleList:[
{name:'不限',id:'-1'},
{name:'引流',id:'2'},
{name:'销售',id:'1'}
],
}
},
mounted() {
let userInfo = this.getLocalStorage();
this.getEmployee() //人员
this.GetCommissionPeroidsList()//期数
let ActionMenuCode = userInfo.ActionMenuCode;
if (this.$route.query) { //不大于0的话用默认值
if (this.$route.query.PeriodsId && this.$route.query.PeriodsId > 0) {
this.msg.PeriodsId = Number(this.$route.query.PeriodsId)
}
if (this.$route.query.EmpType) {
this.msg.EmpType = this.$route.query.EmpType
}
}
},
methods: {
clickUrl(item,type){
if(type==2){//线索
}else{
this.OrderStatistics(item)
}
},
// 订单统计
OrderStatistics(item){
let data = [
{
path: "customerOrder",
OrderId: item.OrderId
},
];
let href = this.domainManager().crmRoutingUrl +
"automaticLogin?token=" +
this.getLocalStorage().token +
"&data=" +
JSON.stringify(data);
window.open(href);
},
GenerateScale(item){
if(!item.WageReId){
return
}
this.objNew = item
this.outerVisible = true
},
GetCommissionPeroidsList() { //期数下拉
this.crmapipost(
"/api/Commission/GetCommissionPeroidsList",{},res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
} else {
this.Error(res.data.message);
}
}
);
},
getEmployee() { //所有人员下拉
let employeeMsg = {
RB_Group_id: "0",
RB_Branch_id: "-1",
departmentId: "0",
IsLeave: "-1"
}
this.apipost(
"app_get_company_employee",
employeeMsg,
res => {
if (res.data.resultCode == 1) {
this.searchList = res.data.data;
if (this.$route.query.EmpId) {
this.msg.EmpId = Number(this.$route.query.EmpId)
this.getList()
}
}
},
err => {}
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, id) {
this.$router.push({
path: path,
query: {
PeriodsId: id,
blank: 'y',
tab: '期数详情'
}
});
},
//获取数据
getList() {
let msg = JSON.parse(JSON.stringify(this.msg))
if (msg.OrderId == '') {
msg.OrderId = 0
}
this.loading = true;
this.crmapipost(
"/api/Commission/GetCommissionOrderDetialPageList",
msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Error(res.data.message);
}
}
);
},
exportExcel() { //导出
var fileName = "印象票务提成人员表.xls";
this.crmGetLocalFile("/api/Commission/GetCommissionOrderDetialToExcel", this.msg, fileName);
}
}
}
</script>
\ No newline at end of file
<style scoped>
.CM_look {
padding: 4px !important;
position: relative;
top: 1px;
}
.opUl li {
display: inline-block;
margin: 10px 15px 10px 0;
}
.domesticCommissionUser .opUl li input{
height: 34px !important;
}
.domesticCommissionUser .singeRowTable{
/* position: absolute; */
}
.domesticCommissionUser .singeRowTable tr td {
padding: 8px 5px;
}
.domesticCommissionUser .hoverSpan span:hover {
cursor: pointer;
text-decoration: underline;
color: red;
}
.text-fixed{
/* height: 100%;
position: absolute;
left: 0;
top: 0; */
}
.cursor-p{
cursor: pointer;
}
.cursor-p:hover{
color: #409EFF;
}
.ITUDWageMoney-box{
margin-top: 20px;
margin-bottom: 10px;
}
.ITUDschedule-Box-box{
display: flex;
flex-direction: row;
justify-content: space-between;
}
.ITUDschedule-box{
flex: 1;
display: flex;
flex-direction: column;
}
.ITUD-title{
margin-top: 10px;
margin-bottom: 10px;
}
.progress-box{
flex: 1;
display: flex;
flex-direction: row;
}
.relative-position{
flex: 1;
margin-right: 0;
position: relative;
}
/deep/.relative-position .el-progress-bar__outer{
border-radius: 0 !important;
}
/deep/.relative-position .el-progress-bar__inner{
border-radius: 0 !important;
}
.ITUD-text-box{
position: relative;
}
.ITUD-text{
position: absolute;
z-index: 999;
color: red;
}
.rate-box {
position: absolute;
top: 30px;
left: 50%;
transform: translateX(-50%);
color: #000;
z-index: 9;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.sanjiao {
width: 0;
height: 0;
margin-left: 5%;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
border-bottom: 3px solid #CACACA;
}
.rate {
min-width: 20px;
padding: 2px 6px;
background-color: #CACACA !important;
display: flex;
justify-content: center;
align-items: center;
color: #666666;
font-size: 0.62vw;
font-family: PingFang SC;
border-radius: 7px;
line-height:12px;
white-space:nowrap;
}
.active-rate{
background-color: #FF7262 !important;
color: #FFFFFF !important;
}
.clickCp{
cursor: pointer;
color: #2961fe;
}
</style>
<template>
<div class="flexOne domesticCommissionUser">
<div>
<ul class="opUl">
<li>
<em>类型</em>
<el-select v-model="msg.EmpType" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option v-for="(item,index) in titleList" :key="item.index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.EmpId" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option label="不限" :value="-1"></el-option>
<el-option label="微途" :value="-2"></el-option>
<el-option v-for="(item,index) in searchList" :key="item.index" :label="item.name"
:value="item.empId"></el-option>
</el-select>
</li>
<li>
<em>期数</em>
<el-select v-model="msg.PeriodsId" size="mini" @change="handleCurrentChange(1)" filterable>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in PeroidsList" :key="item.index" :label="item.Periods"
:value="item.Id"></el-option>
</el-select>
</li>
</ul>
</div>
<div style="display: flex;align-items: center;height: 50px;justify-content: space-between;">
<div style="display: flex;align-items: center;">
</div>
<input type="button" class="normalBtn" value="导出" @click="exportExcel">
</div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>类型</th>
<th>公司</th>
<th>部门</th>
<th>岗位</th>
<th>员工姓名</th>
<th>当月利润</th>
<th>引流数量</th>
<th>成交订单</th>
<th>当月追加工资</th>
<th>依据类型</th>
<th>当期提成</th>
<th>未达标提成</th>
<th>提成比例</th>
<th>年终</th>
<th>年终比例</th>
<th>期数</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.EmpType==1?'销售':item.EmpType==2?'引流':'-'}}</td>
<td>{{item.BranchName}}</td>
<td>{{item.DeptName}}</td>
<td>{{item.PostName?item.PostName:'-'}}</td>
<td>{{item.EmName}}</td>
<td>
<span @click="item.ProfitMoney>0?clickUrl(item,1):''" :class="item.ProfitMoney>0&&item.EmName!='微途'?'clickCp':''">{{item.ProfitMoney}}</span>
</td>
<td>
<span @click="item.LureNum>0?clickUrl(item,2):''" :class="item.LureNum>0&&item.EmName!='微途'?'clickCp':''">{{item.EmpType==2?item.LureNum:'-'}}</span>
</td>
<td>
<span @click="item.OrderNum>0?clickUrl(item,3):''" :class="item.OrderNum>0&&item.EmName!='微途'?'clickCp':''">{{item.EmpType==2?item.OrderNum:'-'}}</span></td>
<td>{{item.EmpType>0 ? '+ ' + item.WageMoney : '-'}}</td>
<td @click="GenerateScale(item)">
<span
:class="item.WageReId?'cursor-p':''">{{item.WageType==1?'新员工比例':item.WageType==2?'上季度定档':'-'}}</span>
</td>
<td>{{item.Commission}}</td>
<td>{{item.LimitCommission != 0?item.LimitCommission:'-'}}</td>
<td>{{item.CommissionRate}}%</td>
<td>{{item.EmName!='微途'?item.BonusMoney:'-'}}</td>
<td>{{item.EmName!='微途'?item.BonusRate+'%':'-'}}</td>
<td>{{item.Month}}</td>
<td>
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('ImpressionTicketDetails',item)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="15">暂无数据</td>
</tr>
</table>
<!-- 分页 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'>
</el-pagination>
<!-- 查看生成比例 -->
<el-dialog custom-class='w1006' title="员工生成比例" :visible.sync="outerVisible" center>
<inAccordanceWith v-if="objNew" :msgNew="objNew"></inAccordanceWith>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="outerVisible = false">确定</button>
</div>
</el-dialog>
</div>
</template>
<script>
import inAccordanceWith from "./inAccordanceWithDialog"
import moment from "moment"
export default {
components:{
inAccordanceWith
},
data() {
return {
objNew:{},
outerVisible:false,//提成比例弹窗
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
EmpId: -1,
PeriodsId: -1,
EmpType: '-1',
},
loading: false,
//数据源
dataList: [],
total: 0,
disabled: true,
PeroidsList:[],
searchList: [],
departMentList:[],
titleList:[
{name:'不限',id:'-1'},
{name:'引流',id:'2'},
{name:'销售',id:'1'}
],
}
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
if (this.$route.query && this.$route.query.PeriodsId) {
this.msg.PeriodsId = Number(this.$route.query.PeriodsId)
}
if (this.$route.query && this.$route.query.EmpIds) {
this.msg.EmpIds = this.$route.query.EmpIds
}
this.getList()
this.getEmployee()//人员
this.GetCommissionPeroidsList()//期数
},
methods: {
clickUrl(item,type){
if(type==2){//线索
this.clueManagement(item)
}else{//当月利润成交订单
this.planeTicketOrder(item)
}
},
// crm核算统计
planeTicketOrder(item){
let data = [
{
path: "planeTicketOrder",
EmpType: item.EmpType,
PeriodsId: item.Month,
EmName: item.EmName,
EmpId: item.EmpId,
},
];
let href = this.domainManager().crmRoutingUrl +
"automaticLogin?token=" +
this.getLocalStorage().token +
"&data=" +
JSON.stringify(data);
window.open(href);
},
// crm线索
clueManagement(item){
let data = [
{
path: "clueManagement",
EmpType: item.EmpType,
PeriodsId: item.Month,
EmName: item.EmName,
EmpId: item.EmpId,
},
];
let href = this.domainManager().crmRoutingUrl +
"automaticLogin?token=" +
this.getLocalStorage().token +
"&data=" +
JSON.stringify(data);
window.open(href);
},
// 获取员工生成比例
GenerateScale(item){
if(!item.WageReId){
return
}
this.objNew = item
this.outerVisible = true
},
GetCommissionPeroidsList() { //期数下拉
this.crmapipost(
"/api/Commission/GetCommissionPeroidsList",{},res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
} else {
this.Error(res.data.message);
}
}
);
},
getEmployee() {//所有人员下拉
let employeeMsg = {
RB_Group_id: "0",
RB_Branch_id: "-1",
departmentId: "0",
IsLeave: "-1"
}
this.apipost(
"app_get_company_employee",
employeeMsg,
res => {
if (res.data.resultCode == 1) {
this.searchList = res.data.data;
}
},
err => { }
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, item) {
this.$router.push({
path: path,
query: {
PeriodsId: this.$route.query.PeriodsId,
EmpType:this.msg.EmpType,
EmpId: item.EmpId,
blank: 'y',
tab: '票务提现详情'
}
});
},
//获取数据
getList() {
this.loading = true;
this.crmapipost(
"/api/Commission/GetCommissionEmpPageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Error(res.data.message);
}
},
null
);
},
exportExcel() { //导出
var fileName = "印象票务提成明细表.xls";
this.crmGetLocalFile("/api/Commission/GetCommissionEmpStatisticsToExcel", this.msg, fileName);
}
}
}
</script>
\ No newline at end of file
......@@ -4927,6 +4927,14 @@ export default {
title: '同业提成规则'
}
},
{
path: '/TradeTicketCommission',
name: 'TradeTicketCommission',
component: resolve => require(['@/components/FinancialModule/TradeCommission/TicketCommission'], resolve),
meta: {
title: '同业提成'
}
},
{
path: '/ServiceTheRules',
name: 'ServiceTheRules',
......
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