Commit f2ddc27e authored by 黄媛媛's avatar 黄媛媛

修改OP提成规则

parent 13735b0f
<template>
<div class="Feedback">
<div class="Feedback OPRules">
<ul style="overflow: initial!important">
<li>
<span>
......@@ -36,17 +36,22 @@
@click="addRule"
>
</li>
<li style="float:right;color:red;font-weight:700">{{tips}}</li>
</ul>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>公司名称</th>
<th>线路名称</th>
<th>公司名称</th>
<th style="width:20%">线路名称</th>
<th>系列名称</th>
<th>参与人员</th>
<th>线控</th>
<th>助理</th>
<th>分负责OP</th>
<th>分助理</th>
<th>部门</th>
<th>负责人金额</th>
<th>助理金额</th>
<th>分负责人金额</th>
<th>分助理金额</th>
<th>描述</th>
<th>操作时间</th>
<th>操作人</th>
......@@ -54,13 +59,17 @@
</tr>
<tr v-for="(item,i) in dataList" :key="i">
<td>{{item.BranchName}}</td>
<td>{{item.LineName}}</td>
<td>{{item.LtName}}</td>
<td>{{item.XKEmployeeName}}</td>
<td>{{item.ZLEmployeeName}}</td>
<td>{{item.EmployeeName}}</td>
<td>{{item.FZLEmployeeName}}</td>
<td>{{item.DepartmentName}}</td>
<td>{{item.ManagerMoney}}</td>
<td>{{item.InternMoney}}</td>
<td>{{item.FManagerMoney}}</td>
<td>{{item.FInternMoney}}</td>
<td>{{item.Description}}</td>
<td>{{item.UpdateDate}}</td>
<td>{{item.UpdateBy}}</td>
......@@ -71,27 +80,20 @@
</tr>
<tr v-if="dataList.length==0">
<td colspan="12" align="center">暂无数据</td>
<td colspan="16" align="center">暂无数据</td>
</tr>
</table>
<el-dialog
title="提成规则"
:visible.sync="ruleVisible"
width="400px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
width="800px">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="公司" prop="BranchId">
<el-select filterable v-model="form.BranchId" @change='linkageDepartment()'>
<el-option v-for="item in companyList" :label='item.BName' :value='item.Id' :key='item.Id'>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="参与人员">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.EmployeeIdList" >
<el-option label='全部' :value='-1'></el-option>
<el-option v-for="item in EmployeeList" :label="item.EmName"
:value="item.EmployeeId" :key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="部门">
<el-select filterable v-model="form.DepartmentId" @change='getDepart(form.DepartmentId)'>
<el-option label='全部' :value='-1'></el-option>
......@@ -99,7 +101,6 @@
:value="item.DepartmentID" :key="item.DepartmentID"></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路" prop="LineIdList">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.LineIdList" @change="getLineTeamList">
<el-option label='全线' :value='-1' :key='-1'></el-option>
......@@ -111,15 +112,48 @@
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'></el-option>
</el-select>
</el-form-item>
<el-form-item label="描述">
<el-input class="w220" v-model="form.Description"></el-input>
</el-form-item>
<el-form-item label="线控" prop="XKEmployeeIdList">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.XKEmployeeIdList" >
<el-option v-for="item in EmployeeList" :label="item.EmName"
:value="item.EmployeeId" :key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="助理" prop="ZLEmployeeIdList">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.ZLEmployeeIdList" >
<el-option v-for="item in EmployeeList" :label="item.EmName"
:value="item.EmployeeId" :key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-show="stateShow" label="分负责OP">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.EmployeeIdList" >
<el-option v-for="item in EmployeeList" :label="item.EmName"
:value="item.EmployeeId" :key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-show="stateShow" label="分助理">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.FZLEmployeeIdList" >
<el-option v-for="item in EmployeeList" :label="item.EmName"
:value="item.EmployeeId" :key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="负责人金额" prop="ManagerMoney">
<el-input class="w220" @keyup.native="checkInteger(form,'ManagerMoney')" v-model="form.ManagerMoney"></el-input>
</el-form-item>
<el-form-item label="助理金额" prop="InternMoney">
<el-input class="w220" @keyup.native="checkInteger(form,'InternMoney')" v-model="form.InternMoney"></el-input>
</el-form-item>
<el-form-item label="描述">
<el-input class="w220" v-model="form.Description"></el-input>
<el-form-item v-show="stateShow" label="分负责人金额">
<el-input class="w220" @keyup.native="checkInteger(form,'FManagerMoney')" v-model="form.FManagerMoney"></el-input>
</el-form-item>
<el-form-item v-show="stateShow" label="分助理金额">
<el-input class="w220" @keyup.native="checkInteger(form,'FInternMoney')" v-model="form.FInternMoney"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleVisible = false">取 消</el-button>
......@@ -153,8 +187,14 @@ export default {
EmployeeIdList:[],
LineIdList:[],
LtIdList:[],
InternMoney:'',
ManagerMoney:'',
XKEmployeeIdList:[],
ZLEmployeeName:[],
FZLEmployeeIdList:[],
FManagerMoney:0,
FInternMoney:0,
},
departmentMsg: {
RB_Group_Id: '0',
......@@ -169,16 +209,24 @@ export default {
BranchId: [
{ required: true, message: '请选择公司', trigger: 'change' }
],
XKEmployeeIdList:[
{ required: true, message: '请选择线控', trigger: 'change' }
],
ZLEmployeeIdList:[
{ required: true, message: '请选择助理', trigger: 'change' }
],
EmployeeIdList: [
{ required: true, message: '请选择参与人员', trigger: 'change' }
],
LineIdList: [
{ required: true, message: '请选择线路', trigger: 'change' }
],
ManagerMoney: [{ required: true, message: this.$t('rule.qsrjxmingcheng'), trigger: "blur" }],
InternMoney: [{ required: true, message: this.$t('rule.qsrjxmingcheng'), trigger: "blur" }],
ManagerMoney: [{ required: true, message:"请输入负责人金额", trigger: "blur" }],
InternMoney: [{ required: true, message: "请输入助理金额", trigger: "blur" }],
},
departmentList:[]
departmentList:[],
stateShow:true,
tips:'',
}
},
created(){
......@@ -220,6 +268,11 @@ export default {
LtIdList:[],
InternMoney:'',
ManagerMoney:'',
XKEmployeeIdList:[],
ZLEmployeeIdList:[],
FZLEmployeeIdList:[],
FManagerMoney:0,
FInternMoney:0,
}
},
SetRules(item){
......@@ -233,15 +286,39 @@ export default {
LtIdList:item.LtIdList,
InternMoney:item.InternMoney,
ManagerMoney:item.ManagerMoney,
DepartmentId:item.DepartmentId
DepartmentId:item.DepartmentId,
XKEmployeeIdList:item.XKEmployeeIdList,
ZLEmployeeIdList:item.ZLEmployeeIdList,
FZLEmployeeIdList:item.FZLEmployeeIdList,
FManagerMoney:item.FManagerMoney,
FInternMoney:item.FInternMoney,
}
this.departmentMsg.RB_Branch_Id=item.BranchId;
this.getDepartment();
this.getLineTeamList();
},
RulesOk(formName){
if(this.form.EmployeeIdList.length==0){
this.form.EmployeeIdList.push(-1)
// if(this.form.EmployeeIdList.length==0){
// this.form.EmployeeIdList.push(-1)
// }
// 公司选择成都
if(this.departmentMsg.RB_Branch_Id!=0){
if(this.form.EmployeeIdList.length==0){
this.Error("请选择分负责OP!")
return;
}
if(this.form.FZLEmployeeIdList.length==0){
this.Error("请选择分助理!")
return;
}
if(this.form.FInternMoney==0){
this.Error("请填写分负责人金额!")
return;
}
if(this.form.FManagerMoney==0){
this.Error("请填写分助理金额!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
......@@ -336,11 +413,22 @@ export default {
});
},
linkageDepartment(){
linkageDepartment(val){
this.departmentMsg.RB_Branch_Id=this.form.BranchId;
this.departmentList=[];
this.form.DepartmentId=-1;
this.getDepartment();
if(this.departmentMsg.RB_Branch_Id==0){
this.stateShow=false;
this.form.EmployeeIdList=[];
this.form.FZLEmployeeIdList=[];
this.form.FManagerMoney=0;
this.form.FInternMoney=0;
}
else{
this.stateShow=true;
}
},
getDepart(id){
this.form.DepartmentId= id;
......@@ -358,7 +446,8 @@ export default {
this.apipost("sellcommission_GetOPCommissionRuleList", this.obj, res => {
this.loading=false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.tips= res.data.data.msg;
this.dataList = res.data.data.list;
}
});
},
......@@ -367,6 +456,9 @@ export default {
</script>
<style>
.OPRules .el-form-item{
display: inline-block;
}
.Feedback ul>li{
display: inline-block;
font-size: 12px;
......
......@@ -882,17 +882,12 @@ export default {
that.$router.push({ name: "TeamRevenueReport",query:{"StartTime":startDate,"EndTime":endDate,BranchId:BranchId,blank:'y',tab:"营收报表"} })
}
}else{
console.log("rowIndex",rowIndex)
console.log("column",column)
console.log("year",this.year)
console.log("rowData",rowData);
if(rowData.ZhaiYao=="员工提成"){
if(Number(this.year)==2019){
if(column.title=="七月" || column.title=="八月" || column.title=="九月" || column.title=="十月" || column.title=="十一月" || column.title=="十二月"){
let CostIds="";
CostIds=rowData.CostIds.replace('112,', '');
console.log("CostIds",CostIds)
that.GoUrlFan('JumpReport',month,rowData.Year,rowData.BranchId,CostIds)
}
else{
......
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