Commit 62798c7e authored by 沈良进's avatar 沈良进
parents 85b6fd93 21a23da8
......@@ -1791,6 +1791,16 @@
tab: "同业提成详情"
}
});
} else if (GetDetail.OtherType == 73) {//OP提成详情
this.$router.push({
name: 'OpComPersonDetails',
query: {
PeriodId: GetDetail.ReFinanceId,
OutBranchId: GetDetail.RB_Branch_Id,
blank: "y",
tab: "同业提成明细"
}
});
} else {
this.$router.push({
name: 'CommissionDetail',
......
......@@ -114,14 +114,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="团签奖励" prop="TravelVisaMoney">
<div class="Impression-ratio-box">
<el-input type="Number" v-model="form.TravelVisaMoney" clearable></el-input>
<span class="Impression-ratio-right">/人</span>
</div>
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.SingleVisaWay">
<el-form-item :label="form.SingleVisaWay==1?'人头奖金':'提成比例'" prop="SingleVisaRate"
:rules="form.SingleVisaWay==1?rules.SingleVisaRate2:rules.SingleVisaRate">
......@@ -132,7 +124,15 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="签证奖励" prop="TravelVisaZLMoney">
<el-form-item label="团签奖励" prop="TravelVisaMoney">
<div class="Impression-ratio-box">
<el-input type="Number" v-model="form.TravelVisaMoney" clearable></el-input>
<span class="Impression-ratio-right">/人</span>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="助理奖励" prop="TravelVisaZLMoney">
<div class="Impression-ratio-box">
<el-input type="Number" v-model="form.TravelVisaZLMoney" clearable></el-input>
<span class="Impression-ratio-right">/人</span>
......@@ -424,7 +424,7 @@
SingleVisaRate: item.SingleVisaRate,
TravelVisaMoney: item.TravelVisaMoney,
TravelVisaZLMoney: item.TravelVisaZLMoney,
CountryId: item.CountryId>0?item.CountryId:null,
CountryId: item.CountryId>0||item.CountryId==0?item.CountryId:null,
ProfitList: item.ProfitList,
ExtraList: item.ExtraList,
}
......@@ -452,7 +452,7 @@
// 点击确定
RulesOk(formName) {
this.form.LineIds = this.form.LineIdList.join(',')
this.form.CountryId = this.form.CountryId?this.form.CountryId:-1
// this.form.CountryId = this.form.CountryId||this.form.CountryId==0?this.form.CountryId:-1
this.$refs[formName].validate((valid) => {
if (valid) {
this.ruleLoading = true
......@@ -538,8 +538,8 @@
},
// 线路
getLineList() {
this.apipost("line_post_GetAllList_V2", {
LineDirection: 0
this.apipost("line_post_GetAllList_V3", {
IsShow: -1
}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
......
......@@ -116,14 +116,15 @@
<el-form-item label="描述">
<el-input class="w220" v-model="form.Description"></el-input>
</el-form-item>
<el-form-item label="线控" prop="XKEmployeeIdList">
<!-- XKEmployeeIdList -->
<el-form-item label="线控" prop="">
<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">
<!-- ZLEmployeeIdList -->
<el-form-item label="助理" prop="">
<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>
......
<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 class="productQuerySearch">
<ul class="opUl">
<li>
<em>出团公司</em>
<el-select filterable size="mini" v-model='msg.OutBranchId'
@change='handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select>
</li>
<li>
<em>期数</em>
<el-select v-model="msg.PeriodId" 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>
<li>
<em>所属公司</em>
<el-select filterable size="mini" v-model='msg.RB_Branch_Id'
@change='getDepartment();handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select filterable size="mini" v-model='msg.RB_Department_Id'
@change='getEmployee();handleCurrentChange(1)'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList'
:label='item.DepartmentName'
:value='item.DepartmentID'
:key='item.DepartmentID'>
</el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.EmployeeId" size="mini"
@change="handleCurrentChange(1)" :disabled="disabled" 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 style="position: fixed;right: 0;top: 51px;">
<input type="button" class="normalBtn" value="导出" @click="exportExcel">
</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>
<th>期数</th>
<th>描述</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.BranchName}}</td>
<td>{{item.DeptName}}</td>
<td>{{item.UserName}}</td>
<td>{{item.PeopleNum?item.PeopleNum:'-'}}</td>
<td>{{item.PeopleMoney?item.PeopleMoney:'-'}}</td>
<td>{{item.TotalCMoney?item.TotalCMoney:'-'}}</td>
<td>{{item.BranchCommission?item.BranchCommission:'-'}}</td>
<td>{{item.Periods}}</td>
<td>{{item.Description}}</td>
<td>
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('OpComPersonDetails',item)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="11">暂无数据</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>
</div>
</template>
<script>
import moment from "moment"
export default {
components:{
},
data() {
return {
objNew:{},
outerVisible:false,//提成比例弹窗
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
PeriodId: -1,
EmployeeId: -1,
RB_Department_Id: -1,//部门ID
RB_Branch_Id: -1,//公司ID
OutBranchId: -1,//出团公司ID
},
loading: false,
//数据源
dataList: [],
total: 0,
disabled: true,
PeroidsList:[],
searchList: [],
departMentList:[],
titleList:[
{name:'不限',id:'-1'},
{name:'引流',id:'2'},
{name:'销售',id:'1'}
],
departmentList:[],
companyList: [],
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
departmentMsg: {
RB_Group_Id: '0',
RB_Branch_Id:'0',
Status:'0',
ParentId:'-1',
Tier:'0',
},
disabled:true
}
},
created(){
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.departmentMsg.RB_Branch_Id = userInfo.RB_Branch_Id;
this.GetCommissionPeroidsList()//期数
this.getEmployee()//人员
this.getDepartment()
this.getCompany()
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
this.msg.PeriodId = this.$route.query.PeriodId?Number(this.$route.query.PeriodId):-1
this.msg.OutBranchId = this.$route.query.RB_Branch_Id>-1?Number(this.$route.query.RB_Branch_Id):Number(userInfo.RB_Branch_id)
this.msg.EmployeeId = this.$route.query.UserId?Number(this.$route.query.UserId):Number(userInfo.EmployeeId)
if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1
||ActionMenuCode.indexOf('S_CheckAllOrder')!=-1
||ActionMenuCode.indexOf('F_Query_AllIncomPay')!=-1) {//是否有看所有人的权限
this.disabled = false;
this.msg.OutBranchId = -1
this.msg.RB_Branch_Id = -1
// this.msg.RB_Department_Id = -1
this.msg.EmployeeId = -1
}else{
this.disabled = true;
}
},
methods: {
getDepartment() {
this.departmentMsg.RB_Branch_Id = this.msg.RB_Branch_Id
this.apipost('admin_get_DepartmentGetList', this.departmentMsg, res => {
if(res.data.resultCode == 1) {
this.departmentList = res.data.data;
}
}, err => {})
},
getCompany(){
this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
if(res.data.resultCode==1){
this.companyList=res.data.data;
}else{}
},err=>{})
},
GetCommissionPeroidsList() { //期数下拉
this.apipost(
"opcommission_GetNewOPCommissionPeroidsList",{},res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
if(!this.$route.query.PeriodId){
this.msg.PeriodId = this.PeroidsList[0].Id
}
this.getList()
} else {
this.Error(res.data.message);
}
}
);
},
getEmployee() {//所有人员下拉
let employeeMsg = {
RB_Group_id: "0",
RB_Branch_id: "-1",
departmentId: this.msg.RB_Department_Id>1?this.msg.RB_Department_Id:"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: {
PeriodId: this.$route.query.PeriodId,
OutBranchId: item.RB_Branch_Id,
UserId: item.EmployeeId,
blank: 'y',
tab: '同业提现详情'
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
"opcommission_GetNewOPCommissionEmpPageList",
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() { //导出
let msg = JSON.parse(JSON.stringify(this.msg))
let userInfo = this.getLocalStorage();
msg.EmployeeIdUser = userInfo.EmployeeId
var fileName = "OP提成分组表.xls";
this.GetLocalFile("opcommission_GetNewOPCommissionEmpListToExcel", 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;
}
.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-select filterable v-model='msg.OutBranchId'
@change='handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select>
</li>
<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>0?'+' + item.SumWage: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('OPCommissionDetail',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)" 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>
</div>
</template>
<script>
import moment from "moment"
export default {
data() {
return {
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
companyList: [],
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: false,//是否可以制单
disabled: true
}
},
mounted() {
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
let ActionMenuCode = userInfo.ActionMenuCode;
this.msg.OutBranchId = userInfo.RB_Branch_id
if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) {
this.btnShow = true;
}
if (ActionMenuCode.indexOf('home_DCommissionZD') != -1) {
this.cMaker = true;
}
if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1
||ActionMenuCode.indexOf('S_CheckAllOrder')!=-1
||ActionMenuCode.indexOf('F_Query_AllIncomPay')!=-1) {//是否有看所有人的权限
this.disabled = false;
}else{
this.disabled = true;
}
this.getCompany()
this.getList()
},
methods: {
getCompany(){
this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
if(res.data.resultCode==1){
this.companyList=res.data.data;
}else{}
},err=>{})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, id) {
let title = ''
title = '提成明细'
this.$router.push({
path: path,
query: {
PeriodId: id,
blank: 'y',
tab: title
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
'opcommission_GetNewOPCommissionPageList', 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(
"opcommission_SetNewOPCommission", { Month: this.Month },
res => {
this.btnLoading = false;
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('报表生成成功')
} else {
this.$confirm(res.data.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {})
.catch(() => {});
}
}
);
},
// 点击制单
YijianZD(item) {
let Money
if(this.msg.OutBranchId>-1){
if(item.BranchCommission>0){
Money=item.BranchCommission
}else{
this.Error("公司提成为0,不能制单!")
return;
}
}else{
Money=item.SumPrice
}
let obj = {
CostType: 16,
Money: Money,
CurrencyId: 1,
XSTC: 1,
OtherType:73,
ReFinanceId:item.Id,
isRB_Branch_Id: true
}
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
orderObj: JSON.stringify(obj)
}
if(this.msg.OutBranchId>-1){
query.id = 30
query.Name = "分公司OP提成单"
}else{
query.id = 28
query.Name = "总部OP提成单"
}
this.$router.push({
path: "/addFinancialDocuments",
query
});
},
gofinancialdetail(item) {
let arr = item.split('-')
this.$router.push({
name: 'FinancialDocumentsDetail',
query: {
id: arr[0],
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-select filterable v-model='msg.OutBranchId'
@change='handleCurrentChange(1)'>
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select>
</li>
<li>
<em>期数</em>
<el-select v-model="msg.PeriodId" 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>
<li>
<em>所属公司</em>
<el-select filterable v-model='msg.RB_Branch_Id'
@change='getDepartment();handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select filterable v-model='msg.RB_Department_Id'
@change='getEmployee();handleCurrentChange(1)'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList'
:label='item.DepartmentName'
:value='item.DepartmentID'
:key='item.DepartmentID'>
</el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.EmployeeId" size="mini"
@change="handleCurrentChange(1)" :disabled="disabled" 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>团/订单ID</em>
<el-input maxlength="50" v-model="msg.TCID" class="permiss-input w200"
@change="handleCurrentChange(1)" :placeholder="$t('pub.pleaseImport')"></el-input>
</li>
<li>
<em>团号</em>
<el-input maxlength="50" v-model="msg.TCNUM" class="permiss-input w200"
@change="handleCurrentChange(1)" :placeholder="$t('pub.pleaseImport')"></el-input>
</li>
<li>
<em>订单类型</em>
<el-select v-model="msg.OrderType" class="w200 HworkInput"
@change="handleCurrentChange(1)">
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="item in OrderTypeList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</li>
<li>
<em>提成方式</em>
<el-select v-model="msg.Way" class="w200 HworkInput"
@change="handleCurrentChange(1)">
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="item in WayTypeList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</li>
<li style="position: fixed;right: 3px;top: 51px;"><input type="button" class="normalBtn" value="导出" @click="exportExcel"></li>
</ul>
</div>
<!-- 统计版块 -->
<div class="groupTourOrder_count">
<el-row :gutter="20">
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="6">
<div class="groupTourOrder_count_item HT_total">
<div style="display: flex;justify-content: space-between;">
<span>统计</span>
<!-- <span style="color: red;">注:门票不计入人头奖励</span> -->
</div>
<p style="margin-top: 10px;">
<span>总人数:
{{dataObj.TotalNum}}
</span>
<span style="margin-left: 20px;">总提成:
{{dataObj.TotalMoney}}
</span>
</p>
</div>
</el-col>
</el-row>
</div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0"
style="margin-top: 10px;">
<tr>
<th style="width: 100px;">出团公司</th>
<th style="width: 80px;">类型</th>
<th style="width: 150px;">团号</th>
<th style="width: 100px;">所属公司</th>
<th style="width: 100px;">部门</th>
<th style="width: 100px;">姓名</th>
<th style="width: 100px;">线路</th>
<th style="width: 100px;">人数</th>
<th style="width: 100px;">利润</th>
<th style="width: 100px;">提成方式</th>
<th style="width: 120px;">提成比例/奖励</th>
<th style="width: 100px;">提成金额</th>
<th style="width: 100px;">期数</th>
<th width='200'>备注</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.OutBranchName?item.OutBranchName:'-'}}</td>
<td>{{item.OrderTypeName}}</td>
<td><span class="cursor-p" :style="{'color': !disabled?'#409EFF':''}" v-if="item.TCNUM" @click="!disabled?goTuanDetails(item):''">{{item.TCNUM}}({{item.TCID}})</span></td>
<td>{{item.BranchName?item.BranchName:'-'}}</td>
<td>{{item.DeptName?item.DeptName:'-'}}</td>
<td>{{item.UserName}}</td>
<td>{{item.LineName}}</td>
<td style="width: 100px;">{{item.PeopleCount?item.PeopleCount:'-'}}</td>
<td>{{item.TCProfit?item.TCProfit:'-'}}</td>
<td>{{item.Way==1?'人头奖励':'利润比例'}}</td>
<td>{{item.Rate&&item.Way==2?item.Rate+'%':item.Rate&&item.Way==1?item.Rate+'':'-'}}</td>
<td>{{item.CommissionMoney?item.CommissionMoney:'-'}}</td>
<td>{{item.PeriodsReissue}}</td>
<td>{{item.Description?item.Description:'-'}}</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="18">暂无数据</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>
</div>
</template>
<script>
import moment from "moment"
export default {
components:{
},
data() {
return {
dataObj:{},
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
EmployeeId: -1,
PeriodId: -1,
OrderId:'',
OrderType: -1,
Way: -1,
TCNUM: '',
RB_Department_Id: -1,//部门ID
RB_Branch_Id: -1,//公司ID
OutBranchId: -1,//出团公司ID
},
loading: false,
//数据源
dataList: [],
total: 0,
btnShow: false,
PeroidsList:[],
searchList: [],
TotalMoney: 0,
TotalNum: 0,
disabled: true,
WayTypeList:[
{name:'不限',Id:'-1'},
{name:'人头奖励',Id:'1'},
{name:'利润比例',Id:'2'}
],
titleList:[
{name:'不限',id:'-1'},
{name:'引流',id:'2'},
{name:'销售',id:'1'}
],
OrderTypeList:[],
departmentList:[],
companyList: [],
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
departmentMsg: {
RB_Group_Id: '0',
RB_Branch_Id:'0',
Status:'0',
ParentId:'-1',
Tier:'0',
},
S_CheckBranchOrder:false,
S_CheckAllOrder:false,
disabled:true
}
},
created(){
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.departmentMsg.RB_Branch_Id = userInfo.RB_Branch_Id;
this.GetCommissionPeroidsList()//期数
this.getEmployee() //人员
this.getDepartment()
this.getCompany()
this.GetOrderTypeEnumList()
this.GetCommissionPeroidsList()//期数
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
// 判断是否销售
if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1) {
this.S_CheckBranchOrder = true
}
if (ActionMenuCode.indexOf('S_CheckAllOrder') != -1) {
this.S_CheckAllOrder = true
}
if (this.$route.query) { //不大于0的话用默认值
if (this.$route.query.PeriodId && this.$route.query.PeriodId > 0) {
}
}
this.msg.PeriodId = this.$route.query.PeriodId?Number(this.$route.query.PeriodId):-1
this.msg.OrderId = this.$route.query.OrderId?this.$route.query.OrderId:''
this.msg.OutBranchId = this.$route.query.OutBranchId?Number(this.$route.query.OutBranchId):-1
this.msg.RB_Branch_Id = this.$route.query.RB_Branch_Id?Number(this.$route.query.RB_Branch_Id):Number(userInfo.RB_Branch_id)
this.msg.EmployeeId = this.$route.query.UserId?Number(this.$route.query.UserId):Number(userInfo.EmployeeId)
if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1
||ActionMenuCode.indexOf('S_CheckAllOrder')!=-1
||ActionMenuCode.indexOf('F_Query_AllIncomPay')!=-1) {//是否有看所有人的权限
this.disabled = false;
this.msg.OutBranchId = this.$route.query.OutBranchId?Number(this.$route.query.OutBranchId):-1
this.msg.RB_Branch_Id = this.$route.query.RB_Branch_Id?Number(this.$route.query.RB_Branch_Id):-1
// this.msg.RB_Department_Id = -1
this.msg.EmployeeId = this.$route.query.UserId?Number(this.$route.query.UserId):-1
}else{
this.disabled = true;
}
},
methods: {
GetOrderTypeEnumList() {
this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.OrderTypeList = res.data.data;
} else {
this.$message.error(res.data.message);
}
});
},
getDepartment() {
this.apipost('admin_get_DepartmentGetList', this.departmentMsg, res => {
if(res.data.resultCode == 1) {
this.departmentList = res.data.data;
}
}, err => {})
},
getCompany(){
this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
if(res.data.resultCode==1){
this.companyList=res.data.data;
}else{}
},err=>{})
},
goTuanDetails(row) {
let name = ''
if (row.IsOneDayOrder == 1) {
name = 'groupTourOrderByTuanOne'
} else {
name = 'groupTourOrderByTuan'
}
this.$router.push({
name: name,
query: {
id: row.TCID,
tcmun: row.TCNUM,
blank: "y",
}
});
},
clickUrl(row,type){
let data = [{
path: "",
OrderId: row.OrderId,
Type: '',
PeriodId: this.msg.PeriodId
}]
let href
let url = this.domainManager().crmRoutingUrl;
if (row.OrderType == 1) {
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
data[0].path = 'myCustomerOrderAllType'
} else {
data[0].path = 'customerOrderAllType'
}
href = url + 'automaticLogin?token=' + this.getLocalStorage().token + '&data=' + JSON.stringify(data)
window.open(href);
} else {
let name = ''
if (row.OrderType == 6) {
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
name = 'VisaProductEditOrder'
} else {
name = 'VisaProductEditOrderOP'
}
this.$router.push({
name: name,
});
} else if (row.OrderType == 2) { //跟团 一日游
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
if (row.TravelType == 1) {
name = 'groupTourOrder'
} else {
name = 'groupTourOrderOne'
}
} else {
name = 'enrollTotal'
}
} else if (row.OrderType == 3) { //酒店
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
name = 'singleProductHotelOrder'
} else {
name = 'singleProductHotelOrderOP'
}
} else if (row.OrderType == 4) { //门票
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
name = 'SingleticketOrderList'
} else {
name = 'SingleticketOrderListOP'
}
} else if (row.OrderType == 5) { //包车
if(row.CarType==''||row.CarType==null){
this.GetAdminCarOrderPageList(row,url,href,data)
}else{
if(!this.S_CheckBranchOrder && !this.S_CheckAllOrder){
name = 'CharterOrderList'
}else{
name= 'CharterOrderListOP'
}
data[0].Type = row.CarType==null||!row.CarType?4:row.CarType
}
} else if (row.OrderType == 7) { //jalan酒店
this.$message.info('jalan酒店暂不支持查看')
// if(!this.S_CheckBranchOrder && !this.S_CheckAllOrder){
// name = 'CharterOrderList'
// }else{
// name = 'CharterOrderListOP'
// }
}
if (name) {
this.$router.push({
name: name,
query: {
OrderId: row.OrderId,
PeriodId: this.msg.PeriodId,
blank: "y",
}
});
}
}
},
GetAdminCarOrderPageList(row, url, href, data) {
let msg = {
pageIndex: 1,
pageSize: 5,
OrderType: '',
OrderId: row.OrderId,
OrderNo: '',
SurName: '',
Name: '',
OrderStatus: 0,
StartTime: '',
EndTime: '',
OrderSTime: '',
OrderETime: '',
ProductName: '',
Mobile: '', //电话
IsSelectSale: 1,
EnterID: 0, //业务员
}
let name
this.apipost('CarSingle_post_GetAdminCarOrderPageList', msg, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data.pageData
let OrderType
if (pageData && pageData.length > 0) {
OrderType = pageData[0].OrderType
}
if (!this.S_CheckBranchOrder && !this.S_CheckAllOrder) {
name = 'CharterOrderList'
} else {
name = 'CharterOrderListOP'
}
this.$router.push({
name: name,
query: {
OrderId: row.OrderId,
OrderType: OrderType ? OrderType : 4,
blank: "y",
}
});
}
})
},
// 订单统计
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);
},
GetCommissionPeroidsList() { //期数下拉
this.apipost(
"opcommission_GetNewOPCommissionPeroidsList",{},res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
if(!this.$route.query.PeriodId){
this.msg.PeriodId = this.PeroidsList[0].Id
}
this.getList()
} 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, id) {
this.$router.push({
path: path,
query: {
PeriodId: id,
blank: 'y',
tab: '期数详情'
}
});
},
//获取数据
getList() {
let msg = JSON.parse(JSON.stringify(this.msg))
if (msg.OrderId == '') {
msg.OrderId = 0
}
this.loading = true;
this.apipost(
"opcommission_GetNewOPCommissionDetailsPageList",
msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataObj = res.data.data
this.dataList = res.data.data.pmodel.pageData;
this.total = res.data.data.pmodel.count;
} else {
this.Error(res.data.message);
}
}
);
},
exportExcel() { //导出
let msg = JSON.parse(JSON.stringify(this.msg))
let userInfo = this.getLocalStorage();
msg.EmployeeIdUser = userInfo.EmployeeId
var fileName = "OP提成明细表.xls";
this.GetLocalFile("opcommission_GetNewOPCommissionDetailsListToExcel", msg, fileName);
}
}
}
</script>
\ No newline at end of file
......@@ -151,7 +151,7 @@
<th style="width: 100px;">线路</th>
<th style="width: 100px;">是否欧洲</th>
<th style="width: 100px;">订单人数</th>
<th style="width: 100px;">订单利润</th>
<th style="width: 100px;">团队总人数</th>
<th style="width: 100px;">团队利润</th>
<th style="width: 100px;">提成方式</th>
......
......@@ -1049,6 +1049,7 @@ export default {
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
},
AddFinancial(z){ //保存
// 手配费参数
if(this.is_HandFee){
if(!this.HandFee.BranchId){
......@@ -1225,6 +1226,7 @@ export default {
this.msg.ReTCID=this.czmsg.ReTCID;
}
// console.log(this.orderObj.OtherType,this.commissionObj,this.tradeObj,this.crmOrderObj,this.msg,'---')
this.apipost('Financial_post_Set',this.msg,res=>{
if(res.data.resultCode==1){
//清除旅客名单数据
......@@ -1984,7 +1986,6 @@ export default {
this.tradeObj = JSON.parse(this.$route.query.tradeObj);
} else{
this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null;
}
this.isFrompassenger = this.orderObj ? this.orderObj.isFromPassenger : undefined;
let TCID = (this.orderObj && this.orderObj.TCIDList && this.orderObj.TCIDList.length>0) ? this.orderObj.TCIDList[0] : 0
......
......@@ -5072,7 +5072,7 @@ export default {
{
path: '/OPcommissionPeriods',
name: 'OPcommissionPeriods',
component: resolve => require(['@/components/FinancialModule/OPcommissionPeriods'], resolve),
component: resolve => require(['@/components/FinancialModule/OpCommission/OPcommissionPeriods'], resolve),
meta: {
title: 'op提成'
}
......@@ -5153,7 +5153,7 @@ export default {
{
path: '/OPCommissionDetail',
name: 'OPCommissionDetail',
component: resolve => require(['@/components/FinancialModule/OPCommissionDetail'], resolve),
component: resolve => require(['@/components/FinancialModule/OpCommission/OPCommissionDetail'], resolve),
meta: {
title: 'op提成详情'
}
......@@ -5161,7 +5161,7 @@ export default {
{
path: '/OpComPersonDetails',
name: 'OpComPersonDetails',
component: resolve => require(['@/components/FinancialModule/OpComPersonDetails'], resolve),
component: resolve => require(['@/components/FinancialModule/OpCommission/OpComPersonDetails'], resolve),
meta: {
title: 'op提成明细'
}
......
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