Commit 070ef650 authored by youjie's avatar youjie

同业提成制单

parent a64705f2
...@@ -1781,6 +1781,16 @@ ...@@ -1781,6 +1781,16 @@
tab: "台湾销售提成详情" tab: "台湾销售提成详情"
} }
}); });
} else if (GetDetail.OtherType == 72) {//同业提成详情
this.$router.push({
name: 'TradeTicketDetails',
query: {
PeriodId: GetDetail.ReFinanceId,
OutBranchId: GetDetail.RB_Branch_Id,
blank: "y",
tab: "同业提成详情"
}
});
} else { } else {
this.$router.push({ this.$router.push({
name: 'CommissionDetail', name: 'CommissionDetail',
......
...@@ -32,7 +32,19 @@ ...@@ -32,7 +32,19 @@
<div class="flexOne domesticCommission"> <div class="flexOne domesticCommission">
<div> <div>
<ul class="opUl"> <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> <li>
<em>选择月份</em> <em>选择月份</em>
<el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月"> <el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月">
...@@ -82,19 +94,14 @@ ...@@ -82,19 +94,14 @@
<el-button type="primary" class="CM_look" @click="goUrl('TradeTicketUserDetails',item.Id)" <el-button type="primary" class="CM_look" @click="goUrl('TradeTicketUserDetails',item.Id)"
icon="iconfont icon-chakan" circle></el-button> icon="iconfont icon-chakan" circle></el-button>
</el-tooltip> </el-tooltip>
<!--
<el-tooltip v-if="cMaker==true" class="item" effect="dark" content="提成制单" placement="top"> <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" <el-button @click="YijianZD(item,1)" type="danger" class="CM_look" v-if="cMaker==true"
icon="iconfont icon-mui-icon-add" circle></el-button> icon="iconfont icon-mui-icon-add" circle></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="cMaker==true" class="item" effect="dark" content="工资制单" placement="top"> <!-- <el-tooltip 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" <el-button @click="goUrl('ImpressionCurrentProfit',item.Id,1)" type="danger" class="CM_look"
icon="iconfont icon-money" circle></el-button> icon="iconfont icon-money" circle></el-button>
</el-tooltip>--> </el-tooltip> -->
</td> </td>
</tr> </tr>
<tr v-if="dataList.length==0"> <tr v-if="dataList.length==0">
...@@ -172,6 +179,11 @@ ...@@ -172,6 +179,11 @@
export default { export default {
data() { data() {
return { return {
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
},
companyList: [],
orderMakerList:[],//制单人列表 orderMakerList:[],//制单人列表
outerVisible: false, outerVisible: false,
Month: moment().subtract(1, 'months').format("YYYY-MM"), Month: moment().subtract(1, 'months').format("YYYY-MM"),
...@@ -199,14 +211,23 @@ ...@@ -199,14 +211,23 @@
}, },
mounted() { mounted() {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
let ActionMenuCode = userInfo.ActionMenuCode; let ActionMenuCode = userInfo.ActionMenuCode;
this.msg.OutBranchId = userInfo.RB_Branch_id this.msg.OutBranchId = userInfo.RB_Branch_id
if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) { if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) {
this.btnShow = true; this.btnShow = true;
} }
this.getCompany()
this.getList() this.getList()
}, },
methods: { methods: {
getCompany(){
this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
if(res.data.resultCode==1){
this.companyList=res.data.data;
}else{}
},err=>{})
},
// 是否已发放 // 是否已发放
checkSelectable (row){ checkSelectable (row){
return row.IsGiveOut != 1 return row.IsGiveOut != 1
...@@ -244,7 +265,7 @@ ...@@ -244,7 +265,7 @@
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
PeriodsId: id, PeriodId: id,
blank: 'y', blank: 'y',
tab: title tab: title
} }
...@@ -350,37 +371,63 @@ ...@@ -350,37 +371,63 @@
}, },
// 点击制单 // 点击制单
YijianZD(item,type) { YijianZD(item,type) {
this.outerVisible = true let Money
this.GetCommissionSendEmployeeList(item,type) if(this.msg.OutBranchId>-1){
}, if(type==1){
// 获取可制单人员 if(item.BranchCommission>0){
GetCommissionSendEmployeeList(item,type){ Money=item.BranchCommission
this.BillMakingMsg.PeroidsId = item.Id }else{
this.BillMakingMsg.Type = type this.Error("公司提成为0,不能制单!")
let msg = { return;
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)
} }
}, }if(type==2){
err => {} 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
});
}, },
gofinancialdetail(id) { gofinancialdetail(item) {
let arr = item.split('-')
this.$router.push({ this.$router.push({
name: 'FinancialDocumentsDetail', name: 'FinancialDocumentsDetail',
query: { query: {
id: id, id: arr[0],
blank: 'y', blank: 'y',
tab: '单据详情' tab: '单据详情'
} }
......
...@@ -127,17 +127,21 @@ ...@@ -127,17 +127,21 @@
<div class="productQuerySearch"> <div class="productQuerySearch">
<ul class="opUl"> <ul class="opUl">
<li> <li>
<em>人员</em> <em>出团公司</em>
<el-select v-model="msg.UserId" size="mini" @change="handleCurrentChange(1)" filterable> <el-select filterable v-model='msg.OutBranchId'
<el-option label="不限" :value="-1"></el-option> @change='handleCurrentChange(1)'>
<el-option label="微途" :value="-2"></el-option> <el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option v-for="(item,index) in searchList" :key="item.index" :label="item.name" <el-option
:value="item.empId"></el-option> v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<em>期数</em> <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 label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in PeroidsList" :key="item.index" :label="item.Periods" <el-option v-for="(item,index) in PeroidsList" :key="item.index" :label="item.Periods"
:value="item.Id"></el-option> :value="item.Id"></el-option>
...@@ -146,20 +150,7 @@ ...@@ -146,20 +150,7 @@
<li> <li>
<em>所属公司</em> <em>所属公司</em>
<el-select filterable v-model='msg.RB_Branch_Id' <el-select filterable v-model='msg.RB_Branch_Id'
@change='handleCurrentChange(1)'> @change='getDepartment();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)'>
<el-option label="不限" :value="-1" :key="-1"></el-option> <el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option <el-option
v-for="item in companyList" v-for="item in companyList"
...@@ -169,10 +160,11 @@ ...@@ -169,10 +160,11 @@
></el-option> ></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<em>部门</em> <em>部门</em>
<el-select filterable v-model='msg.RB_Department_Id' <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 label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList' <el-option v-for='item in departmentList'
:label='item.DepartmentName' :label='item.DepartmentName'
...@@ -181,6 +173,17 @@ ...@@ -181,6 +173,17 @@
</el-option> </el-option>
</el-select> </el-select>
</li> </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;"> <!-- <li style="position: fixed;right: 0;top: 51px;">
<input type="button" class="normalBtn" value="导出" @click="exportExcel"> <input type="button" class="normalBtn" value="导出" @click="exportExcel">
</li> --> </li> -->
...@@ -197,6 +200,7 @@ ...@@ -197,6 +200,7 @@
<th>欧洲线及其他人数</th> <th>欧洲线及其他人数</th>
<th>欧洲线及其他奖励</th> <th>欧洲线及其他奖励</th>
<th>总提成</th> <th>总提成</th>
<th>出团公司提成</th>
<th>期数</th> <th>期数</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
...@@ -209,9 +213,9 @@ ...@@ -209,9 +213,9 @@
<td>{{item.EuropePNum?item.EuropePNum:'-'}}</td> <td>{{item.EuropePNum?item.EuropePNum:'-'}}</td>
<td>{{item.EuropeMoney?item.EuropeMoney:'-'}}</td> <td>{{item.EuropeMoney?item.EuropeMoney:'-'}}</td>
<td>{{item.TotalCMoney?item.TotalCMoney:'-'}}</td> <td>{{item.TotalCMoney?item.TotalCMoney:'-'}}</td>
<td>{{item.BranchCommission?item.BranchCommission:'-'}}</td>
<td>{{item.Periods}}</td> <td>{{item.Periods}}</td>
<td> <td>
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('TradeTicketDetails',item)" <el-button type="primary" class="CM_look" @click="goUrl('TradeTicketDetails',item)"
icon="iconfont icon-chakan" circle></el-button> icon="iconfont icon-chakan" circle></el-button>
...@@ -255,7 +259,7 @@ ...@@ -255,7 +259,7 @@
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
EmpId: -1, EmpId: -1,
PeriodsId: -1, PeriodId: -1,
UserId: -1, UserId: -1,
RB_Department_Id: -1,//部门ID RB_Department_Id: -1,//部门ID
RB_Branch_Id: -1,//公司ID RB_Branch_Id: -1,//公司ID
...@@ -296,8 +300,8 @@ ...@@ -296,8 +300,8 @@
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团 this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.departmentMsg.RB_Branch_Id = userInfo.RB_Branch_Id; this.departmentMsg.RB_Branch_Id = userInfo.RB_Branch_Id;
let ActionMenuCode = userInfo.ActionMenuCode; let ActionMenuCode = userInfo.ActionMenuCode;
if (this.$route.query && this.$route.query.PeriodsId) { if (this.$route.query && this.$route.query.PeriodId) {
this.msg.PeriodsId = Number(this.$route.query.PeriodsId) this.msg.PeriodId = Number(this.$route.query.PeriodId)
} }
if (this.$route.query && this.$route.query.EmpIds) { if (this.$route.query && this.$route.query.EmpIds) {
this.msg.EmpIds = this.$route.query.EmpIds this.msg.EmpIds = this.$route.query.EmpIds
...@@ -310,6 +314,7 @@ ...@@ -310,6 +314,7 @@
}, },
methods: { methods: {
getDepartment() { getDepartment() {
this.departmentMsg.RB_Branch_Id = this.msg.RB_Branch_Id
this.apipost('admin_get_DepartmentGetList', this.departmentMsg, res => { this.apipost('admin_get_DepartmentGetList', this.departmentMsg, res => {
if(res.data.resultCode == 1) { if(res.data.resultCode == 1) {
this.departmentList = res.data.data; this.departmentList = res.data.data;
...@@ -337,7 +342,7 @@ ...@@ -337,7 +342,7 @@
{ {
path: "planeTicketOrder", path: "planeTicketOrder",
EmpType: item.EmpType, EmpType: item.EmpType,
PeriodsId: item.Month, PeriodId: item.Month,
EmName: item.EmName, EmName: item.EmName,
EmpId: item.EmpId, EmpId: item.EmpId,
}, },
...@@ -355,7 +360,7 @@ ...@@ -355,7 +360,7 @@
{ {
path: "clueManagement", path: "clueManagement",
EmpType: item.EmpType, EmpType: item.EmpType,
PeriodsId: item.Month, PeriodId: item.Month,
EmName: item.EmName, EmName: item.EmName,
EmpId: item.EmpId, EmpId: item.EmpId,
}, },
...@@ -390,7 +395,7 @@ ...@@ -390,7 +395,7 @@
let employeeMsg = { let employeeMsg = {
RB_Group_id: "0", RB_Group_id: "0",
RB_Branch_id: "-1", RB_Branch_id: "-1",
departmentId: "0", departmentId: this.msg.RB_Department_Id>1?this.msg.RB_Department_Id:"0",
IsLeave: "-1" IsLeave: "-1"
} }
this.apipost( this.apipost(
...@@ -413,8 +418,7 @@ ...@@ -413,8 +418,7 @@
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
PeriodsId: this.$route.query.Periods, PeriodId: this.$route.query.PeriodId,
EmpType:this.msg.EmpType,
UserId: item.UserId, UserId: item.UserId,
blank: 'y', blank: 'y',
tab: '同业提现详情' 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