Commit 070ef650 authored by youjie's avatar youjie

同业提成制单

parent a64705f2
......@@ -1781,6 +1781,16 @@
tab: "台湾销售提成详情"
}
});
} else if (GetDetail.OtherType == 72) {//同业提成详情
this.$router.push({
name: 'TradeTicketDetails',
query: {
PeriodId: GetDetail.ReFinanceId,
OutBranchId: GetDetail.RB_Branch_Id,
blank: "y",
tab: "同业提成详情"
}
});
} else {
this.$router.push({
name: 'CommissionDetail',
......
......@@ -32,7 +32,19 @@
<div class="flexOne domesticCommission">
<div>
<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-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月">
......@@ -82,19 +94,14 @@
<el-button type="primary" class="CM_look" @click="goUrl('TradeTicketUserDetails',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-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>-->
</el-tooltip> -->
</td>
</tr>
<tr v-if="dataList.length==0">
......@@ -172,6 +179,11 @@
export default {
data() {
return {
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
companyList: [],
orderMakerList:[],//制单人列表
outerVisible: false,
Month: moment().subtract(1, 'months').format("YYYY-MM"),
......@@ -199,14 +211,23 @@
},
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;
}
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=>{})
},
// 是否已发放
checkSelectable (row){
return row.IsGiveOut != 1
......@@ -244,7 +265,7 @@
this.$router.push({
path: path,
query: {
PeriodsId: id,
PeriodId: id,
blank: 'y',
tab: title
}
......@@ -350,37 +371,63 @@
},
// 点击制单
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)
let Money
if(this.msg.OutBranchId>-1){
if(type==1){
if(item.BranchCommission>0){
Money=item.BranchCommission
}else{
this.Error("公司提成为0,不能制单!")
return;
}
}if(type==2){
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:72,
ReFinanceId:item.Id,
}
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
orderObj: JSON.stringify(obj)
}
if(this.msg.OutBranchId>-1){
query.id = 30
query.Name = "分公司销售提成单"
}else{
query.id = 28
query.Name = "总部销售提成单"
}
this.$router.push({
path: "/addFinancialDocuments",
query
});
},
err => {}
)
},
gofinancialdetail(id) {
gofinancialdetail(item) {
let arr = item.split('-')
this.$router.push({
name: 'FinancialDocumentsDetail',
query: {
id: id,
id: arr[0],
blank: 'y',
tab: '单据详情'
}
......
......@@ -35,31 +35,21 @@
<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.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.UserId" 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>
<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.PeriodsId" size="mini" @change="handleCurrentChange(1)" filterable>
<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>
......@@ -68,20 +58,7 @@
<li>
<em>所属公司</em>
<el-select filterable v-model='msg.RB_Branch_Id'
@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 filterable v-model='msg.OutBranchId'
@change='handleCurrentChange(1)'>
@change='getDepartment();handleCurrentChange(1)'>
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
......@@ -91,10 +68,11 @@
></el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select filterable v-model='msg.RB_Department_Id'
@change='handleCurrentChange(1)'>
@change='getEmployee();handleCurrentChange(1)'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList'
:label='item.DepartmentName'
......@@ -103,41 +81,88 @@
</el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.UserId" 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-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.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 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>
<span>统计</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>类型</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 width='300'>备注</th>
<th style="width: 80px;">类型</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: 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 width='200'>备注</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.OrderTypeName}}</td>
<td><span class="cursor-p" style="color: #409EFF;" @click="clickUrl(item,1)">{{item.OrderId}}</span></td>
<td><span class="cursor-p" style="color: #409EFF;" v-if="item.TCNUM" @click="goTuanDetails(item)">{{item.TCNUM}}({{item.TCID}})</span></td>
<td>{{item.BranchName?item.BranchName:'-'}}</td>
<td>{{item.OutBranchName?item.OutBranchName:'-'}}</td>
<td>{{item.DeptName?item.DeptName:'-'}}</td>
<td>{{item.UserName}}</td>
<td>{{item.LineName}}</td>
<td>{{item.IsEurope==1?'是':'否'}}</td>
<td><span class="cursor-p" @click="clickUrl(item,1)">{{item.OrderId}}</span></td>
<td>{{item.TCNUM}}({{item.TCID}})</td>
<td>{{item.PeopleNum}}</td>
<td>{{item.TCGuestNum}}</td>
<td>{{item.Way==1?'销售额':'利润比'}}</td>
......@@ -175,6 +200,7 @@
},
data() {
return {
dataObj:{},
objNew:{},
outerVisible:false,
Month: moment().format("YYYY-MM"),
......@@ -182,7 +208,7 @@
pageIndex: 1,
pageSize: 20,
UserId: -1,
PeriodsId: -1,
PeriodId: -1,
OrderId:'',
OrderType: -1,
TCNUM: '',
......@@ -229,6 +255,7 @@
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.getEmployee() //人员
this.getDepartment()
this.getCompany()
......@@ -243,13 +270,14 @@
this.S_CheckAllOrder = true
}
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.PeriodId && this.$route.query.PeriodId > 0) {
this.msg.PeriodId = Number(this.$route.query.PeriodId)
}
if (this.$route.query.EmpType) {
this.msg.EmpType = this.$route.query.EmpType
if (this.$route.query.UserId) {
this.msg.UserId = this.$route.query.UserId
}
}
this.getList()
},
methods: {
GetOrderTypeEnumList() {
......@@ -275,6 +303,22 @@
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 = [{
......@@ -426,8 +470,8 @@
this.outerVisible = true
},
GetCommissionPeroidsList() { //期数下拉
this.crmapipost(
"/api/Commission/GetCommissionPeroidsList",{},res => {
this.apipost(
"sellcommission_GetTYSaleCommissionPeriodsList",{},res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
} else {
......@@ -449,10 +493,7 @@
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 => {}
......@@ -468,7 +509,7 @@
this.$router.push({
path: path,
query: {
PeriodsId: id,
PeriodId: id,
blank: 'y',
tab: '期数详情'
}
......@@ -487,6 +528,7 @@
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 {
......
......@@ -127,17 +127,21 @@
<div class="productQuerySearch">
<ul class="opUl">
<li>
<em>人员</em>
<el-select v-model="msg.UserId" 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>
<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.PeriodsId" size="mini" @change="handleCurrentChange(1)" filterable>
<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>
......@@ -146,20 +150,7 @@
<li>
<em>所属公司</em>
<el-select filterable v-model='msg.RB_Branch_Id'
@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 filterable v-model='msg.OutBranchId'
@change='handleCurrentChange(1)'>
@change='getDepartment();handleCurrentChange(1)'>
<el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option
v-for="item in companyList"
......@@ -169,10 +160,11 @@
></el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select filterable v-model='msg.RB_Department_Id'
@change='handleCurrentChange(1)'>
@change='getEmployee();handleCurrentChange(1)'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList'
:label='item.DepartmentName'
......@@ -181,6 +173,17 @@
</el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.UserId" 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 style="position: fixed;right: 0;top: 51px;">
<input type="button" class="normalBtn" value="导出" @click="exportExcel">
</li> -->
......@@ -197,6 +200,7 @@
<th>欧洲线及其他人数</th>
<th>欧洲线及其他奖励</th>
<th>总提成</th>
<th>出团公司提成</th>
<th>期数</th>
<th>操作</th>
</tr>
......@@ -209,9 +213,9 @@
<td>{{item.EuropePNum?item.EuropePNum:'-'}}</td>
<td>{{item.EuropeMoney?item.EuropeMoney:'-'}}</td>
<td>{{item.TotalCMoney?item.TotalCMoney:'-'}}</td>
<td>{{item.BranchCommission?item.BranchCommission:'-'}}</td>
<td>{{item.Periods}}</td>
<td>
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('TradeTicketDetails',item)"
icon="iconfont icon-chakan" circle></el-button>
......@@ -255,7 +259,7 @@
pageIndex: 1,
pageSize: 20,
EmpId: -1,
PeriodsId: -1,
PeriodId: -1,
UserId: -1,
RB_Department_Id: -1,//部门ID
RB_Branch_Id: -1,//公司ID
......@@ -296,8 +300,8 @@
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.departmentMsg.RB_Branch_Id = userInfo.RB_Branch_Id;
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.PeriodId) {
this.msg.PeriodId = Number(this.$route.query.PeriodId)
}
if (this.$route.query && this.$route.query.EmpIds) {
this.msg.EmpIds = this.$route.query.EmpIds
......@@ -310,6 +314,7 @@
},
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;
......@@ -337,7 +342,7 @@
{
path: "planeTicketOrder",
EmpType: item.EmpType,
PeriodsId: item.Month,
PeriodId: item.Month,
EmName: item.EmName,
EmpId: item.EmpId,
},
......@@ -355,7 +360,7 @@
{
path: "clueManagement",
EmpType: item.EmpType,
PeriodsId: item.Month,
PeriodId: item.Month,
EmName: item.EmName,
EmpId: item.EmpId,
},
......@@ -390,7 +395,7 @@
let employeeMsg = {
RB_Group_id: "0",
RB_Branch_id: "-1",
departmentId: "0",
departmentId: this.msg.RB_Department_Id>1?this.msg.RB_Department_Id:"0",
IsLeave: "-1"
}
this.apipost(
......@@ -413,8 +418,7 @@
this.$router.push({
path: path,
query: {
PeriodsId: this.$route.query.Periods,
EmpType:this.msg.EmpType,
PeriodId: this.$route.query.PeriodId,
UserId: item.UserId,
blank: 'y',
tab: '同业提现详情'
......
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