Commit 6082fe72 authored by youjie's avatar youjie

no message

parent b36a7a54
<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 0px;
}
.domesticCommission .hoverSpan span:hover {
cursor: pointer;
text-decoration: underline;
color: red;
}
.tdOne{
border-bottom: 1px solid #eeeeee;
padding: 0 0 5px 0;
}
.tdTwo{
padding: 5px 0 0 0;
}
</style>
<template>
<div class="flexOne domesticCommission">
<div>
<ul class="opUl">
<li>
<em>出团公司</em>
<el-select v-model="msg.OutBranchId" size="mini" @change="handleCurrentChange(1)" >
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName"
:value="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>
<th>操作</th>
</tr>
<tr v-for="item in dataList" style="line-height: 15px;">
<td>{{item.Periods}}</td>
<td>{{item.Name}}</td>
<td>
<div class="tdOne">销售</div>
<div class="tdTwo">OP</div>
</td>
<td>
<div class="tdOne">{{item.SellSumPrice}}</div>
<div class="tdTwo">{{item.OPSumPrice}}</div>
</td>
<td>
<div class="tdOne">{{item.BranchCommission?item.BranchCommission:'-'}}</div>
<div class="tdTwo">{{item.BranchOPCommission?item.BranchOPCommission:'-'}}</div>
</td>
<td>
<div class="tdOne">
<span v-for="(x,y) in item.SellFinanceIdList" >
<span style="cursor: pointer;text-decoration: underline;" @click='gofinancialdetail(x)'>
{{x}}
</span>
{{item.FinanceIdList.length == y+1 ?'':'、'}}
</span>
</div>
<div class="tdTwo">
<span v-for="(x,y) in item.OPFinanceIdList" >
<span style="cursor: pointer;text-decoration: underline;" @click='gofinancialdetail(x)'>
{{x}}
</span>
{{item.FinanceIdList.length == y+1 ?'':'、'}}
</span>
</div>
</td>
<td>
<div>{{item.CreateByStr}}</div>
<div>{{item.CreateStr}}</div>
</td>
<td>
<div class="tdOne">
<el-tooltip class="item" effect="dark" content="查看用户" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('ServiceCommissionUser',item.Id,1)"
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>
</div>
<div class="tdTwo">
<el-tooltip class="item" effect="dark" content="查看用户" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('ServiceCommissionUser',item.Id,2)"
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>
</div>
</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 {
Month: moment().subtract(1,'months').format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
Periods: 0,
OutBranchId:-1,
},
loading: false,
//数据源
dataList: [],
total: 0,
btnShow: false,
PeriodsList: [],
btnLoading: false,
BranchList:[],
cMaker:false,//是否可以制单
}
},
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;
}
if (ActionMenuCode.indexOf('home_DCommissionZD') != -1) {
this.cMaker = true;
}
// this.getqishilist()
this.getList();
this.getCompanyList()
},
methods: {
//初始化公司
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id
};
this.apipost(
"admin_get_BranchGetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.BranchList = res.data.data;
}
},
err => { }
);
},
getqishilist() {
this.apipost(
"sellcommission_GetGNCommissionPeriodsList",
{},
res => {
if (res.data.resultCode == 1) {
this.PeriodsList = res.data.data;
// if(this.PeriodsList && this.PeriodsList.length>0){
// this.msg.Periods = Number(this.PeriodsList[0].Id)
// }
} else {
this.Error(res.data.message);
}
},
null
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, id , type) {
this.$router.push({
path: path,
query: {
PeriodId: id,
blank: 'y',
Type: type,
tab: '期数详情',
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetDxCommissionPageList",
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
);
},
//生成提成报表
generateTable() {
if (!this.Month || this.Month == "") {
this.Error("请选择月份!")
return;
}
this.btnLoading = true;
this.apipost(
"sellcommission_Post_SetDxCommissionSend", { Month: this.Month },
res => {
this.btnLoading = false;
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('报表生成成功')
} else {
this.Error(res.data.message);
}
},
null
);
},
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:43,
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){
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;
}
.domesticCommissionUser .opUl li input{
height: 34px !important;
}
.domesticCommissionUser .singeRowTable tr td {
padding: 8px 5px;
}
.domesticCommissionUser .hoverSpan span:hover {
cursor: pointer;
text-decoration: underline;
color: red;
}
</style>
<template>
<div class="flexOne domesticCommissionUser">
<div>
<ul class="opUl">
<li>
<em>人员</em>
<el-select v-model="msg.UserId" size="mini" @change="handleCurrentChange(1)" filterable :disabled='disabled'>
<el-option label="不限" :value="-1"></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.OutBranchId" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName"
:value="item.Id"></el-option>
</el-select>
</li>
<li>
<em>公司</em>
<el-select v-model="msg.RB_Branch_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName"
:value="item.Id"></el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select v-model="msg.RB_Department_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in departMentList" :key="item.index" :label="item.DepartmentName"
:value="item.DepartmentID"></el-option>
</el-select>
</li>
<!-- <li>
<em>类型</em>
<el-select v-model="msg.Type" size="mini" @change="handleCurrentChange(1)" filterable :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in typeList" :key="item.index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</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.BranchName}}</td>
<td>{{item.DeptName}}</td>
<td>{{item.UserName}}</td>
<td>{{item.TCNumber}}</td>
<td>{{item.CommissionMoney}}</td>
<td>{{item.Periods}}</td>
<td>
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('ServiceCommissiondetails',item)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="10">暂无数据</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 {
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
PeriodId: 0,
UserId: -1,
Type: '',
RB_Branch_Id: -1,
RB_Department_Id: -1,
OutBranchId:-1,
},
loading: false,
//数据源
dataList: [],
total: 0,
disabled: true,
PeriodsList: [],
BranchList: [],
searchList: [],
departMentList:[],
typeList: [
{name:'销售',id:1},
{name:'OP',id:2},
]
}
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
if (ActionMenuCode.indexOf('home_CommissionSeeAll') != -1) {//是否有看所有人的权限
this.disabled = false;
}else{
this.disabled = true;
this.msg.UserId = Number(userInfo.EmployeeId)
}
if (this.$route.query && this.$route.query.PeriodId) {
this.msg.PeriodId = this.$route.query.PeriodId
}
if (this.$route.query && this.$route.query.Type) {
this.msg.Type = this.$route.query.Type
}
this.getList();
// this.getqishilist()
this.getCompanyList()//获取公司
this.getEmployee()//人员
this.getDerpartMent()//部门
},
methods: {
getDerpartMent() {
//获取部门
this.apipost(
"admin_get_DepartmentGetList",
this.getDepartmentMsg,
res => {
if (res.data.resultCode == 1) {
this.departMentList = res.data.data;
} else { }
},
err => { }
);
},
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 => { }
);
},
//初始化公司
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id
};
this.apipost(
"admin_get_BranchGetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.BranchList = res.data.data;
}
},
err => { }
);
},
getqishilist() {
this.apipost(
"sellcommission_GetGNCommissionPeriodsList",
{},
res => {
if (res.data.resultCode == 1) {
this.PeriodsList = res.data.data;
if (this.PeriodsList && this.PeriodsList.length > 0) {
// this.msg.Periods = Number(this.PeriodsList[0].Id)
}
} else {
this.Error(res.data.message);
}
},
null
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, item) {
this.$router.push({
path: path,
query: {
PeriodId: this.$route.query.PeriodId,
UserId:item.UserId,
RB_Branch_Id:item.RB_Branch_Id,
RB_Department_Id:item.RB_Department_Id,
blank: 'y',
Type: this.msg.Type,
tab: '单项服务提现详情',
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetDxCommissionDetailsListForUser",
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
);
},
}
}
</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;
}
</style>
<template>
<div class="flexOne domesticCommissiondetails">
<div style="min-height: 70px;">
<ul class="opUl">
<li>
<em>期数</em>
<el-select v-model="msg.PeriodId" size="mini" @change="handleCurrentChange(1)">
<el-option label="不限" :value="0"></el-option>
<el-option v-for="(item,index) in PeriodsList" :key="item.index" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</li>
<li>
<em>出团公司</em>
<el-select v-model="msg.OutBranchId" size="mini" @change="handleCurrentChange(1)">
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName" :value="item.Id">
</el-option>
</el-select>
</li>
<li>
<em>公司</em>
<el-select v-model="msg.RB_Branch_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName" :value="item.Id">
</el-option>
</el-select>
</li>
<li>
<em>部门</em>
<el-select v-model="msg.RB_Department_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in departMentList" :key="item.index" :label="item.DepartmentName"
:value="item.DepartmentID"></el-option>
</el-select>
</li>
<li>
<em>人员</em>
<el-select v-model="msg.UserId" size="mini" @change="handleCurrentChange(1)" filterable :disabled='disabled'>
<el-option label="不限" :value="-1"></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-input maxlength="50" v-model="msg.TCNUM" class="permiss-input w200"
@keyup.native.enter="handleCurrentChange(1)" :placeholder="$t('pub.pleaseImport')"></el-input>
</li>
</ul>
</div>
<!-- <li>
<input type="button" class="normalBtn" value="导出" @click="exportExcel">
</li> -->
<div style="display: flex;align-items: center;height: 50px;justify-content: space-between;">
<div style="display: flex;align-items: center;">
<span>总金额:{{TotalMoney}}</span>
<span style="margin-left: 15px;">总人数:{{TotalNum}}</span>
</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 width='400'>备注</th>
<!-- <th>操作</th> -->
</tr>
<tr v-for="item in dataList">
<td>{{item.BranchName}}</td>
<td>{{item.DeptName}}</td>
<td>{{item.UserName}}</td>
<td>
<div>{{item.OutBranchName}}</div>
<span style="cursor: pointer;text-decoration: underline;" @click="goTravel(item.TCID)">
{{item.TCNUM}}({{item.TCID}})
</span>
</td>
<td>{{item.OrderId}}</td>
<td>{{item.TCProfit}}</td>
<td>{{item.PeopleCount}}</td>
<td>{{item.CommissionMoney}}</td>
<td>{{item.OtherMoney}}</td>
<td>{{item.BackMoney}}</td>
<td>{{item.RealityCommissionMoney}}</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('OPCommissionDetail',item.ID)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
</td> -->
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="12">暂无数据</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 {
Month: moment().format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
PeriodId: 0,
UserId: -1,
Type: '',
RB_Branch_Id: -1,
RB_Department_Id: -1,
OrderId: '',
TCNUM: '',
OutBranchId: -1
},
loading: false,
//数据源
dataList: [],
total: 0,
btnShow: false,
PeriodsList: [],
BranchList: [],
searchList: [],
departMentList: [],
TotalMoney: 0,
TotalNum: 0,
disabled: true
}
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
if (this.$route.query) { //不大于0的话用默认值
if (this.$route.query.PeriodId && this.$route.query.PeriodId > 0) {
this.msg.PeriodId = Number(this.$route.query.PeriodId)
}
if (this.$route.query.UserId && this.$route.query.UserId > 0) {
this.msg.UserId = Number(this.$route.query.UserId)
}
if (this.$route.query.RB_Branch_Id) {
this.msg.RB_Branch_Id = Number(this.$route.query.RB_Branch_Id)
}
if (this.$route.query.RB_Department_Id && this.$route.query.RB_Department_Id > 0) {
this.msg.RB_Department_Id = Number(this.$route.query.RB_Department_Id)
}
if (this.$route.query.Type) {
this.msg.Type = this.$route.query.Type
}
}
if (ActionMenuCode.indexOf('home_CommissionSeeAll') != -1) { //是否有看所有人的权限
this.disabled = false;
} else {
this.disabled = true;
this.msg.UserId = Number(userInfo.EmployeeId)
}
this.getList();
this.getqishilist()
this.getCompanyList() //获取公司
this.getEmployee() //人员
this.getDerpartMent() //部门
},
methods: {
getDerpartMent() {
//获取部门
this.apipost(
"admin_get_DepartmentGetList",
this.getDepartmentMsg,
res => {
if (res.data.resultCode == 1) {
this.departMentList = res.data.data;
} else {}
},
err => {}
);
},
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 => {}
);
},
//初始化公司
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id
};
this.apipost(
"admin_get_BranchGetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.BranchList = res.data.data;
}
},
err => {}
);
},
getqishilist() {
this.apipost(
"sellcommission_GetDxCommissionPeriodsList", {},
res => {
if (res.data.resultCode == 1) {
this.PeriodsList = res.data.data;
if (this.PeriodsList && this.PeriodsList.length > 0) {
// this.msg.Periods = Number(this.PeriodsList[0].Id)
}
} else {
this.Error(res.data.message);
}
},
null
);
},
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.apipost(
"sellcommission_GetDxCommissionSingleDetailsList",
msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.TotalMoney = res.data.data.TotalMoney ? res.data.data.TotalMoney : 0
this.TotalNum = res.data.data.TotalNum ? res.data.data.TotalNum : 0
this.dataList = res.data.data.pmodel.pageData;
this.total = res.data.data.pmodel.count;
} else {
this.Error(res.data.message);
}
},
null
);
},
exportExcel() { //导出
let msg = JSON.parse(JSON.stringify(this.msg))
if (msg.OrderId == '') {
msg.OrderId = 0
}
let userInfo = this.getLocalStorage();
msg.EmployeeIdUser = userInfo.EmployeeId
var fileName = "单项服务提成明细.xls";
this.GetLocalFile("sellcommission_GetDxCommissionSingleDetailsListToExcel", msg, fileName);
},
goTravel(TCID) { //跳转到团队列表
this.$router.push({
path: 'TravelControlList',
query: {
TCID: TCID,
blank: 'y',
tab: '团控列表'
}
});
}
}
}
</script>
<template>
<div class="domesticCommissionRule">
<div class="query-box">
<ul>
<li>
<span>
<em>规则名称</em>
<el-input type="text" v-model="msg.RuleName" @keyup.native.enter="handleCurrentChange(1)">
</el-input>
</span>
</li>
<li>
<span style="display: flex;align-items: center;">
<em>线路</em>
<el-select v-model="msg.LineId" size="mini" @change="handleCurrentChange(1)">
<el-option label="请选择" :value="0"></el-option>
<el-option v-for="(item,index) in LineList" :key="item.index" :label="item.LineName" :value="item.LineID">
</el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="normalBtn" value="新增" @click="addNew">
</li>
</ul>
</div>
<div class="commonContent">
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>规则名称</th>
<th>线路</th>
<!-- <th>类型</th> -->
<!-- <th>来源 </th> -->
<!-- <th>团队类型名称 </th> -->
<!-- <th>类型</th> -->
<th>金额/比例</th>
<th>结团审核人</th>
<th>修改人</th>
<th>修改时间</th>
<th>操作</th>
</tr>
</thead>
<template v-for="(item,index) in DataList">
<tr>
<td>{{item.RuleName}}</td>
<td>
<el-tag style="margin: 0 3px;" size="mini" v-for="(x,i) in item.LineNameList" :key="i">{{x}}</el-tag>
</td>
<td>
<div style="height: 50%;border-bottom: 1px solid #eeeeee;padding: 3px 0;">销售:<span style="color: red;">{{item.SellRate}}</span>%</div>
<div style="padding: 3px 0;">OP:<span style="color: red;">{{item.OPRate}}</span>%</div>
</td>
<td>{{item.AuditEmpName}}</td>
<td>{{item.UpdateBy}}</td>
<td>{{item.UpdateDate}}</td>
<td>
<el-button-group size='mini'>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit"
@click="isShowDIv = true,divTitle='修改提成规则',getEdit(item)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="DeleteRules(item.Id)">
</el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
</template>
<tr v-if="DataList.length==0">
<td colspan="10" align="center">暂无数据</td>
</tr>
<tfoot>
<tr>
<td colspan="10">
<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>
</td>
</tr>
</tfoot>
</table>
</div>
<el-dialog title="单项服务提成规则" :visible.sync="ruleVisible" width="800px">
<el-form ref="addMsg" :model="addMsg" :rules="rules" label-width="110px">
<el-form-item label="规则名称" prop="RuleName">
<el-input type="text" v-model="addMsg.RuleName"></el-input>
</el-form-item>
<el-form-item label="线路" prop="LineIds">
<el-select v-model="addMsg.LineIds" multiple style="width: 100%;">
<el-option v-for="(item,index) in LineList" :key="index" :label="item.LineName" :value="item.LineID">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="SellRate" label="销售">
<el-input style="width: 170px;" type="Number" v-model="addMsg.SellRate"
@keyup.native="checkPrice(addMsg,'SellRate',true)">
<template slot="append">%</template>
</el-input>
</el-form-item>
<el-form-item prop="OPRate" label="OP">
<el-input style="width: 170px;" type="Number" v-model="addMsg.OPRate"
@keyup.native="checkPrice(addMsg,'OPRate',true)">
<template slot="append">%</template>
</el-input>
</el-form-item>
<el-form-item label="结团审核人:" prop="AuditEmpId" >
<el-select
v-model="addMsg.AuditEmpId"
filterable
remote
reserve-keyword
:placeholder="$t('pub.pleaseImport')"
:remote-method="remoteMethod"
@change="getpersonnel"
>
<el-option
v-for="item in searchList"
:key="item.empId"
:label="item.name"
:value="item.empId">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleVisible = false,resetForm('addMsg')">取 消</el-button>
<el-button size="small" type="danger" @click="RulesOk('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Vue from "vue";
const addobj = {
Id: 0,
RuleName: '',
LineIds: [],
SellRate: '',
OPRate: '',
AuditEmpId: ''
}
export default {
data() {
var checkVariable = (rule, value, callback) => {
if (value == null || value.length == 0) {
return callback(new Error("提成比列不能为空"));
}
let a = parseFloat(value);
if (isNaN(a)) {
callback(new Error("提成比例必须是整数"));
} else {
callback();
}
};
return {
msg: {
pageIndex: 1,
pageSize: 10,
// RuleName: '',
// LineId: 0,
},
searchList:[],//人员
loading: false, //加载层
DataList: [],
total: 0,
TeamListArr: [], //团队类型
LineList: [], //线路
ruleVisible: false, //弹窗的显示
addMsg: Object.assign({}, addobj),
rules: {
RuleName: [{
required: true,
message: '请输入规则名称',
trigger: 'change'
}],
LineIds: [{
required: true,
message: '请选择路线',
trigger: 'change'
}],
SellRate: [{
required: true,
message: '请输入销售提成比例',
trigger: 'blur'
}],
OPRate: [{
required: true,
message: '请输入OP提成比例',
trigger: 'blur'
}],
AuditEmpId: [{
required: true,
message: '请选择结团审核人',
trigger: 'change'
}],
},
};
},
created() {
this.getList()
this.getTeamList()
this.getLineList()
},
methods: {
handleCurrentChange(val) {
//翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetDxCommissionRuleList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
}
},
err => {}
);
},
//获取线路列表
getLineList() {
this.apipost(
"line_post_GetAllList", {},
res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
}
);
},
getTeamList() { //获取团队类型的列表
this.apipost("travel_get_GetTravelPriceTeamTypeList", {}, res => {
if (res.data.resultCode == 1) {
this.TeamListArr = res.data.data;
this.TeamListArr.forEach(x => {
x.disabled = false
})
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
getEdit(row) { //修改规则
let data = JSON.parse(JSON.stringify(row))
this.addMsg = Object.assign({}, addobj)
this.addMsg.Id = data.Id;
this.addMsg.RuleName = data.RuleName;
this.addMsg.LineIds = data.LineIds.split(',').map(Number);
this.addMsg.SellRate = data.SellRate;
this.addMsg.OPRate = data.OPRate;
this.addMsg.AuditEmpId = data.AuditEmpId;
this.ruleVisible = true;
this.remoteMethod(data.AuditEmpName)
},
DeleteRules(ID) { //删除规则
this.$confirm("是否删除? ", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost('sellcommission_DelDxCommissionRule', {
RuleId: ID
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message)
this.getList()
} else {
this.Error(res.data.message)
}
})
})
.catch(() => {});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
addNew() { //新增
this.addMsg = {
Id: 0,
RuleName: '',
LineIds: [],
SellRate: '',
OPRate: '',
AuditEmpId: ''
}
this.ruleVisible = true;
this.resetForm('addMsg')
},
RulesOk(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let LineIds = JSON.parse(JSON.stringify(this.addMsg.LineIds))
this.addMsg.LineIds = this.addMsg.LineIds.join(',')
this.apipost(
'sellcommission_SetDxCommissionRule', this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.getList();
this.ruleVisible = false;
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
},
err => {}
)
}
});
},
remoteMethod(query) { // 审核人模糊查询
if (query !== '') {
this.apipost("admin_Get_Chat_All_SelectEmpName",{ EmName:query },res => {
if (res.data.resultCode == 1) {
this.searchList = res.data.data;
}
},err => {});
} else {
this.searchList = [];
}
},
getpersonnel(){
for(let i = 0;i<this.searchList.length;i++){
// let x = this.searchList[i]
// if(x.empId == this.addMsg.AuditEmpId){
// this.addMsg.TempTypeList[y].Name = x.name;
// break
// }
}
}
},
mounted() {
}
};
</script>
<style>
/* .rule-box .el-select__tags{
top: 100%;
} */
.domesticCommissionRule .query-box input {
height: 34px !important;
}
</style>
\ No newline at end of file
......@@ -4613,6 +4613,38 @@ export default {
title: '国内提成详情'
}
},
{
path: '/ServiceTheRules',
name: 'ServiceTheRules',
component: resolve => require(['@/components/FinancialModule/ServiceCommission/ServiceTheRules'], resolve),
meta: {
title: '单项服务提成规则'
}
},
{
path: '/ServiceCommission',
name: 'ServiceCommission',
component: resolve => require(['@/components/FinancialModule/ServiceCommission/ServiceCommission'], resolve),
meta: {
title: '单项服务提成'
}
},
{
path: '/ServiceCommissionUser',
name: 'ServiceCommissionUser',
component: resolve => require(['@/components/FinancialModule/ServiceCommission/ServiceCommissionUser'], resolve),
meta: {
title: '单项服务提成用户分组'
}
},
{
path: '/ServiceCommissiondetails',
name: 'ServiceCommissiondetails',
component: resolve => require(['@/components/FinancialModule/ServiceCommission/ServiceCommissiondetails'], resolve),
meta: {
title: '单项服务提成详情'
}
},
{
path: '/OPsalesCommission',
name: 'OPsalesCommission',
......
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