Commit 6265eb73 authored by 沈良进's avatar 沈良进
parents a93f630b 9b84890d
......@@ -193,6 +193,14 @@
}
},
watch: {
msg:{
handler(newValue, oldValue) {
this.getList()
},
deep: true,
},
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
......@@ -213,16 +221,17 @@
this.msg.Type = this.$route.query.Type
}
this.msg.TCNUM = this.$route.query.TCNUM?this.$route.query.TCNUM:""
this.msg.UserId = this.$route.query.UserId?Number(this.$route.query.UserId):-1
this.isSearch = this.$route.query.isSearch?this.$route.query.isSearch:false
}
if (ActionMenuCode.indexOf('home_CommissionSeeAll') != -1) { //是否有看所有人的权限
this.disabled = false;
} else {
this.disabled = true;
if(!this.$route.query.UserId){
this.msg.UserId = Number(userInfo.EmployeeId)
}
this.getList();
}
this.getList()
this.getqishilist()
this.getCompanyList() //获取公司
this.getEmployee() //人员
......
......@@ -218,8 +218,10 @@
this.disabled = false;
} else {
this.disabled = true;
if(!this.$route.query.UserId){
this.msg.UserId = Number(userInfo.EmployeeId)
}
}
this.getList();
this.getqishilist()
this.getCompanyList() //获取公司
......
<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="(subItem,subIndex) in DataList">
<tr v-for="(childItem,childIndex) in subItem.DetailList">
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">{{subItem.RuleName}}</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">
<span v-for="(x,y) in subItem.LineNameList"
:key="y+'1'">{{x}}{{subItem.LineNameList.length==y+1?'':'、'}}</span>
</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">{{subItem.BranchName}}</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">
<span v-if="subItem.RuleType==1">销售</span>
<span v-if="subItem.RuleType==2">OP</span>
<span v-if="subItem.RuleType==3">自定义人员</span>
</td>
<!-- <td >
<span v-if="childItem.SourceType==1">正常</span>
<span v-if="childItem.SourceType==2">飞猪</span>
<span v-if="childItem.SourceType==3">小红书</span>
</td> -->
<td>{{childItem.TravelType==1?'一日游':childItem.TravelType==2?'单项':'出境'}}</td>
<td>
<span v-if="childItem.CommissionType == 1">人头</span>
<span v-if="childItem.CommissionType == 2">利润比例</span>
</td>
<td>
<span>{{childItem.Money}} {{subItem.CurrencyName}}/人</span>
<span v-if="childItem.CommissionType == 2">
<div>利润比{{childItem.ProfitRate}}%</div>
<div>利润<=0 {{childItem.Money}}元/人 </div> </span> </td>
<td v-if="childIndex==0"
:rowspan="subItem.DetailList.length">{{subItem.UpdateBy}}</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">{{subItem.UpdateDate}}</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">
<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(subItem)">
</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(subItem.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="LineshortIds">
<el-select v-model="addMsg.LineshortIds" multiple placeholder="选择线路" 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-row>
<el-col :span="8">
<el-form-item label="公司" prop="BranchId">
<el-select v-model="addMsg.BranchId" placeholder="选择公司" style="width: 100%;">
<el-option v-for="item in companyList" :label='item.BName' :value='item.Id' :key='item.Id'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结团审核人" prop="AuditEmpId">
<el-select
v-model="addMsg.AuditEmpId"
filterable
remote
reserve-keyword
placeholder="搜索审核人"
:remote-method="remoteMethod"
style="width: 100%;"
>
<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-col>
<el-col :span="8">
<el-form-item label="币种" prop="CurrencyId">
<el-select placeholder="选择币种"
v-model="addMsg.CurrencyId" style="width: 100%;" @change="getCurrent(addMsg.CurrencyId)">
<el-option v-for="item in allCurrencyList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="类型" prop="RuleType">
<el-radio v-model="addMsg.RuleType" label="1">销售</el-radio>
<el-radio v-model="addMsg.RuleType" label="2" style="margin-right: 20px;">OP</el-radio>
<!-- <el-radio v-model="addMsg.RuleType" label="3" style="margin-right: 20px;">自定义人员</el-radio>
<span style="font-size: 12px;color:red">(*注:自定义人员将会跟随 OP规则设置的团队类型匹配)</span> -->
</el-form-item>
<el-form-item label="提成比例表">
<div style="width: 100%;border-bottom: 1px solid #e2e2e2;padding-bottom: 10px;margin-top: 10px;"
v-for="(x,y) in addMsg.DetailList" :key='y'>
<!-- <div style="display: flex;align-items: center;margin-top: 10px;">
<el-form-item label="来源">
<el-radio v-model="x.SourceType" label="1" @change='getSType(y)'>正常</el-radio>
<el-radio v-model="x.SourceType" label="2" :disabled="x.STdisabled" style="margin-right: 20px;" @change='getSType(y)'>飞猪</el-radio>
<el-radio v-model="x.SourceType" label="3" :disabled="x.STdisabledXHS" style="margin-right: 20px;" @change='getSType(y)'>小红书</el-radio>
</el-form-item>
<el-button style="margin-left: 15px;padding: 6px;" type="danger" size="mini" class="el-icon-delete" circle
v-if="addMsg.DetailList.length>1" @click="addMsg.DetailList.splice(y,1),selectdis()">
</el-button>
</div> -->
<div style="display: flex;align-items: center;">
<!-- <span style="line-height: 34px;">团队类型:</span> -->
<!-- <el-form-item v-if='x.SourceType==1 && addMsg.RuleType!=3' :prop="'DetailList.'+ y +'.TravelType'"
:rules="productGroupRules.TravelType" label="团队类型">
<el-select v-model="x.TravelType" style="width: 200px;" @change="selectdis($event, y),gettdName(x.Id,y)"
clearable>
<el-option v-for="item in TeamListArr" :key="item.Id" :label="item.Name" :disabled="item.disabled"
:value="item.Id"></el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="人员选择:" v-if=" addMsg.RuleType==3" :prop="'DetailList.'+ y +'.Id'" :rules="productGroupRules2.Id">
<el-select
v-model="x.Id"
filterable
remote
reserve-keyword
:placeholder="$t('pub.pleaseImport')"
:remote-method="remoteMethod"
@change="getpersonnel(y)"
>
<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> -->
</div>
<!-- <div style="display: flex;align-items: center;margin-top: 10px;">
<el-form-item label="类型">
<el-radio v-model="x.CommissionType" label="1">人头</el-radio>
<el-radio v-model="x.CommissionType" label="2" style="margin-right: 20px;">利润比列</el-radio>
</el-form-item>
</div> -->
<div style="display: flex;align-items: center;margin-bottom: 10px;">
<el-row>
<el-col :span="12">
<el-form-item :prop="'DetailList.'+ y +'.TravelType'"
:rules="productGroupRules.TravelType" label="团队类型">
<el-select v-model="x.TravelType" style="width: 200px;" @change="selectdis($event, y),gettdName(x.Id,y)"
clearable>
<el-option v-for="item in TeamListArr" :key="item.Id" :label="item.Name" :disabled="item.disabled"
:value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :prop="'DetailList.'+ y +'.Money'" :rules="productGroupRules.Money"
label="人头金额">
<el-input style="width: 200px;" type="Number" v-model="x.Money"
@keyup.native="checkPrice(x,'Money',true)"><template slot="append">{{CurrentNmae}}/人</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item v-if="x.CommissionType==2" :prop="'DetailList.'+ y +'.ProfitRate'"
:rules="productGroupRules.ProfitRate" label="利润比例">
<el-input style="width: 170px;" type="Number" v-model="x.ProfitRate"
@keyup.native="checkPrice(x,'ProfitRate',true)">
<template slot="append">%</template>
</el-input>
<!-- <span style="margin-left: 15px;" >利润小于等于0:</span>
-->
</el-form-item>
<el-form-item v-if="x.CommissionType==2" :prop="'DetailList.'+ y +'.Money'" :rules="productGroupRules.Money"
label="利润<=0时">
<el-input style="width: 170px;" type="Number" v-model="x.Money"
@keyup.native="checkPrice(x,'Money',true)"><template slot="append">{{CurrentNmae}}/人</template>
</el-input>
</el-form-item>
<div>
<el-button style="margin-left: 15px;padding: 6px;" type="danger" size="mini" class="el-icon-delete" circle
v-if="addMsg.DetailList.length>1" @click="addMsg.DetailList.splice(y,1),selectdis()">
</el-button>
</div>
<!-- <span v-if="x.CommissionType==1">人头金额:</span>
<span v-if="x.CommissionType==2">利润比例:</span>
-->
</div>
</div>
<!-- v-if="TeamListArr.length>addMsg.DetailList.length || addMsg.RuleType==3" -->
<el-button size="mini" type="primary"
class="el-icon-circle-plus-outline" circle @click="addDetailList"></el-button>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleVisible = false">取 消</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: '',
LineshortIds: [],
BranchId: '',
RuleType: '1',
CurrencyId:'',
AuditEmpId: '',
DetailList: [{
TravelType: '',
// Name: '',
CommissionType: '1',
Money: '0',
// ProfitRate: '0',//提成比例
// SourceType:'1',//来源
// STdisabled:false,
// STdisabledXHS:false
}]
}
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 {
CurrentNmae: '',
//所有币种
allCurrencyList: [],
companyList: [],
getCompanyMsg: {
RB_Group_Id: '0',
Status: '0',
},
msg: {
pageIndex: 1,
pageSize: 10,
RuleName: '',
LineId: 0,
BranchId: -1,
},
searchList:[],//人员
loading: false, //加载层
DataList: [],
total: 0,
TeamListArr: [
{Name:'一日游',Id:1,disabled:false},
{Name:'单项',Id:2,disabled:false},
{Name:'出境',Id:3,disabled:false},
], //团队类型
LineList: [], //线路
ruleVisible: false, //弹窗的显示
addMsg: Object.assign({}, addobj),
rules: {
RuleName: [{
required: true,
message: '请输入规则名称',
trigger: 'blur'
}],
LineshortIds: [{
type: 'array',
required: true,
message: '请选择路线',
trigger: 'change'
}],
BranchId: [{
required: true,
message: '请选择公司',
trigger: 'change'
}],
CurrencyId: [{
required: true,
message: '请选择币种',
trigger: 'change'
}],
AuditEmpId: [{
required: true,
message: '请选择结团审核人',
trigger: 'change'
}],
},
productGroupRules2:{
Id: [{
required: true,
message: '请选择人员',
trigger: 'change'
}],
},
productGroupRules: {
TravelType: [{
required: true,
message: '请选择团队类型',
trigger: 'change'
}],
Money: [{
required: true,
message: '不能为空',
trigger: 'change'
}],
ProfitRate: [{
required: true,
message: '不能为空',
trigger: 'change'
}],
}
};
},
created() {
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.getList()
this.getTeamList()
this.getLineList()
this.getCompany()
this.getAllCurrency()
},
methods: {
//获取当前下拉选中币种
getCurrent(currencyId) {
this.allCurrencyList.forEach(x => {
if (x.ID == currencyId) {
this.CurrentNmae = x.Name;
}
});
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList",
{},
res => {
if (res.data.resultCode == 1) {
this.allCurrencyList = 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 => {})
},
handleCurrentChange(val) {
//翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetTWCommissionRuleList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
}
},
err => {}
);
},
selectdis(val, index) { //团队类型下拉了不能再次选择
this.TeamListArr.forEach((x, y) => {
let ishow = false;
this.addMsg.DetailList.map((j, ji) => {
if (ishow == false) {
if (x.Id == j.Id) {
x.disabled = true;
ishow = true;
return;
} else {
x.disabled = false;
}
}
});
});
},
gettdName(id, index) { //获取团队类型名称
this.TeamListArr.map(x => {
if (x.Id == id) {
this.addMsg.DetailList[index].Name = x.Name;
return false
}
})
},
//获取线路列表
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
this.addMsg.LineshortIds = data.LineIds.split(',').map(Number);
this.addMsg.DetailList = data.DetailList;
this.addMsg.RuleType = data.RuleType.toString();
this.addMsg.BranchId = data.BranchId
this.addMsg.AuditEmpId = data.AuditEmpId
this.addMsg.CurrencyId = data.CurrencyId
this.CurrentNmae = data.CurrencyName
this.remoteMethod(data.AuditEmpName)
this.searchList=[]
this.addMsg.DetailList.forEach(x => {
x.CommissionType = x.CommissionType.toString()
// x.SourceType = x.SourceType.toString()
// if(this.addMsg.RuleType==3){
// this.searchList.push({empId:x.Id,name:x.Name,postName:''})
// }
})
if(this.addMsg.RuleType!=3){
this.isshowfeizhu()//检测是否有飞猪 如果有就不能选择第二个
}
this.selectdis()
this.ruleVisible = true;
},
DeleteRules(ID) { //删除规则
this.$confirm("是否删除? ", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost('sellcommission_DelTWCommissionRule', {
RuleId: ID
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message)
this.getList()
} else {
this.Error(res.data.message)
}
})
})
.catch(() => {});
},
addNew() { //新增
this.addMsg = {
Id: 0,
RuleName: '',
LineIds: '',
LineshortIds: [],
RuleType:'1',
CurrencyId:'',
AuditEmpId: '',
DetailList: [{
TravelType: '',
// Name: '',
CommissionType: '1',
Money: '0',
// ProfitRate: '0',
// SourceType:'1',
// STdisabled:false,
// STdisabledXHS:false,
}]
}
this.selectdis()
this.ruleVisible = true;
},
addDetailList() { //新增类型
let isdisabled = false
let isdisabledXHS = false
for(let i = 0;i<this.addMsg.DetailList.length;i++){
let x = this.addMsg.DetailList[i]
// if(this.addMsg.RuleType!=3){
// if(x.SourceType==2||x.SourceType==3){
// if(x.SourceType==2) isdisabled=true
// if(x.SourceType==3) isdisabledXHS=true
// break
// }
// }
}
let obj = {
TravelType: '',
CommissionType: '1',
Money: '0',
}
this.addMsg.DetailList.push(obj)
},
RulesOk(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let LineshortIds = JSON.parse(JSON.stringify(this.addMsg.LineshortIds))
this.addMsg.LineIds = LineshortIds.join(',')
this.apipost(
'sellcommission_SetTWCommissionRule', 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 => {}
)
}
});
},
isshowfeizhu(){
let isfeizhu = false
let isxiaohongshu = false
for(let i = 0;i<this.addMsg.DetailList.length;i++){
let x = this.addMsg.DetailList[i]
if(x.SourceType==2){
isfeizhu=true
}
if(x.SourceType==3){
isxiaohongshu=true
}
}
this.addMsg.DetailList.forEach(x=>{
if(isfeizhu==true){
if(x.SourceType==2){
x.STdisabled = false;
if(this.addMsg.RuleType!=3){
x.Id=0;
x.Name='飞猪'
}
}else{
x.STdisabled = true
}
}else{
x.STdisabled = false
}
if(isxiaohongshu==true){
if(x.SourceType==3){
x.STdisabledXHS = false;
if(this.addMsg.RuleType!=3){
x.Id=0;
x.Name='小红书'
}
}else{
x.STdisabledXHS = true
}
}else{
x.STdisabledXHS = false
}
})
},
getSType(index){//选了飞猪之后 后面的不能选飞猪了
if(this.addMsg.DetailList[index].SourceType==1 && this.addMsg.RuleType!=3){
this.addMsg.DetailList[index].Id=''
this.addMsg.DetailList[index].Name=''
}
if(this.addMsg.RuleType!=3){
this.isshowfeizhu()//检测是否有飞猪 如果有就不能选择第二个
}
this.selectdis()
this.$forceUpdate();
},
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(y){
return
for(let i = 0;i<this.searchList.length;i++){
let x = this.searchList[i]
if(x.empId == this.addMsg.DetailList[y].Id){
this.addMsg.DetailList[y].Name = x.name;
break
}
}
}
},
mounted() {
}
};
</script>
<style>
/* .rule-box .el-select__tags{
top: 100%;
} */
.domesticCommissionRule .query-box input {
height: 34px !important;
}
</style>
<style>
.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;
}
</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-input maxlength="50" v-model="msg.Name" class="permiss-input w200"
@keyup.native.enter="msg.pageIndex=1,getList()"
:placeholder="$t('pub.pleaseImport')"></el-input>
</li> -->
<li>
<em>期数</em>
<el-select v-model="msg.PeriodsId" size="mini" filterable @change="msg.pageIndex=1,getList()">
<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-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 width="150">汇率</th>
<th>操作信息</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.Periods}}</td>
<td>{{item.Name}}</td>
<td>
<p>{{item.SumPrice}}</p>
</td>
<td>{{item.BranchCommission}}</td>
<td>
<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>
</td>
<td>
<div style="display: flex;justify-content: space-between;align-items: center;padding: 0 5px;">
<div>
<div v-for="(x,y) in item.CurrencyRateList"
:style="{'border-top': y!=0? '1px solid #eeee':''}"
style="text-align: left;">
<span style="cursor: pointer;">
{{x.Rate?x.Rate:'未设汇率'}}
</span>
<span style="color: #6E6E6E;">{{x.CurrencyName}}</span>
</div>
</div>
<div style="flex-shrink: 0;">
<i v-if="item.FinanceIdList.length==0"
class="el-icon-edit"
style="color: #409eff;cursor: pointer;" @click="editRate(item)"></i>
</div>
</div>
</td>
<td>
<div>{{item.CreateByStr}}</div>
<div>{{item.CreateStr}}</div>
</td>
<td>
<div style="display: flex;">
<el-tooltip class="item" effect="dark" content="查看用户" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('domesticCommissionUserTW',item.Id)"
icon="iconfont icon-chakan" circle></el-button>
</el-tooltip>
<el-tooltip v-if="cMaker==true&&item.BranchCommission>0" 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="8">暂无数据</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>
<el-dialog title="修改本位币汇率" :visible.sync="showVisible" width="400px">
<el-form ref="addMsg" :model="addMsg" :rules="rules" label-width="110px">
<div v-for="(x,y) in addMsg.CurrencyRate" :key="y">
<el-row>
<el-col :span="24">
<el-form-item label="本位币汇率" :prop="'CurrencyRate.'+ y +'.Rate'"
:rules="productCurrencyRate.Rate">
<el-input type="Number" v-model="x.Rate">
<template slot="append" style="width: 100%;">{{x.CurrencyName}}</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="showVisible = false">取 消</el-button>
<el-button size="small" type="danger" @click="submit('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import moment from "moment"
export default {
data() {
return {
//所有币种
allCurrencyList: [],
showVisible: false,
rules:{},
productCurrencyRate: {
CurrencyId: [{
required: true,
message: '请选择币种',
trigger: 'change'
}],
Rate: [{
required: true,
message: '本位币汇率不能为空',
trigger: 'blur'
}],
},
addMsg:{
PeriodsId: 0,
CurrencyRate:[
{
CurrencyId: 0,
Rate: 0,
CurrencyName: '',
}
]
},
PeroidsList: [],
Month: moment().subtract(1,'months').format("YYYY-MM"),
msg: {
pageIndex: 1,
pageSize: 20,
Periods: 0,
Name: '',
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.getList();
this.getCompanyList()
this.GetCommissionPeroidsList()
this.getAllCurrency()
},
methods: {
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList",
{},
res => {
if (res.data.resultCode == 1) {
this.allCurrencyList = res.data.data;
}
},
err => { }
);
},
editRate(item){
this.addMsg.PeriodsId = item.Id
this.addMsg.CurrencyRate = JSON.parse(JSON.stringify(item.CurrencyRateList))
this.showVisible = true
},
submit(formName) {
for(let i=0;i<this.addMsg.CurrencyRate.length;i++){
if(this.addMsg.CurrencyRate[i].Rate<=0){
this.Error('汇率须大于0')
return
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost(
'sellcommission_SetTWPeriodsRate', this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.getList();
this.showVisible = false;
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
},
err => {}
)
}
});
},
GetCommissionPeroidsList() { //期数下拉
this.apipost("sellcommission_GetTWCommissionPeriodsList", {}, res => {
if (res.data.resultCode == 1) {
this.PeroidsList = res.data.data;
} else {
this.Error(res.data.message);
}
},
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 => { }
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goUrl(path, id) {
this.$router.push({
path: path,
query: {
PeriodId: id,
blank: 'y',
tab: '期数详情'
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetTWCommissionPageList",
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_SetTWCommissionSend", { 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:69,
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(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;
}
.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>
</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('domesticCommissiondetailsTW',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,
RB_Branch_Id: -1,
RB_Department_Id: -1,
OutBranchId:-1,
},
loading: false,
//数据源
dataList: [],
total: 0,
disabled: true,
PeriodsList: [],
BranchList: [],
searchList: [],
departMentList:[],
}
},
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
}
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',
tab: '国内提现详情'
}
});
},
//获取数据
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetTWCommissionDetailsListForUser",
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
......@@ -150,7 +150,7 @@
</td> -->
</tr>
<tr v-if="dataList.length==0">
<td style="text-align:center" colspan="12">暂无数据</td>
<td style="text-align:center" colspan="13">暂无数据</td>
</tr>
</table>
<!-- 分页 -->
......
<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)" @change="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>期数</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.LineName}}</td>
<td>{{item.OrderId?item.OrderId:'-'}}</td>
<!-- <td>{{item.TCProfit}}</td> -->
<td>{{item.GuestCount}}</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="9">暂无数据</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,
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 (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_GetTWCommissionPeriodsList", {},
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_GetTWCommissionSingleDetailsList",
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_GetTWCommissionSingleDetailsListToExcel", msg, fileName);
},
goTravel(TCID) { //跳转到团队列表
this.$router.push({
path: 'TravelControlList',
query: {
TCID: TCID,
blank: 'y',
tab: '团控列表'
}
});
}
}
}
</script>
......@@ -122,25 +122,6 @@
@click="getCompanyCheck(item)" :key="bindex">{{item.BName}}</span>
</div>
<ul>
<li>
<span>
<em>提成状态</em>
<el-select class="w150" v-model="queryMsg.QSendCommissionState" filterable
@change="getControlList()">
<el-option v-for="item in QSendCommissionStateList" :label="item.Name" :value="item.ID"
:key="item.LineID"></el-option>
</el-select>
<a style="margin-left: 5px;margin-right: 5px;">只看审核驳回</a>
<el-switch
v-model="queryMsg.QOutGroupAuditReject"
active-text=""
inactive-text=""
active-color="#409eff"
inactive-color="#dcdfe6"
active-value="1"
inactive-value="0" @change="resetPageIndex(),getControlList()"/>
</span>
</li>
<li>
<span>
<em>{{$t('system.table_ssLine')}}</em>
......@@ -338,6 +319,29 @@
</el-checkbox-group>
</span>
</div>
<div class="comSearchDiv" style="display: flex;align-items: center;">
<span style="flex-shrink: 0;">提成状态</span>
<span style="display: flex;align-items: center;flex-wrap: wrap;">
<el-select class="w180 multiple_input" v-model="queryMsg.QSendCommissionState">
<el-option v-for="item in QSendCommissionStateList" :label="item.Name" :value="item.ID"
:key="item.LineID"></el-option>
</el-select>
<a style="margin-left: 5px;margin-right: 5px;">只看审核驳回</a>
<el-switch
v-model="queryMsg.QOutGroupAuditReject"
active-text=""
inactive-text=""
active-color="#409eff"
inactive-color="#dcdfe6"
active-value="1"
inactive-value="0"/>
<div style="margin-top: 10px;margin-left: 10px;font-size: 11px;" v-if="isCommissionDetails">
<span style="color:#000000;background-color: #ff99cc;padding:0px 2px;border-radius:5px">单项</span>
<span style="color:#000000;background-color: #bcd6ee;padding:0px 4px;border-radius:5px">国内</span>
<span style="color:#000000;background-color: #DDDDDD;padding:0px 4px;border-radius:5px">出境</span>
</div>
</span>
</div>
<button class="normalBtn TC_SearchBtn"
@click="resetPageIndex(),getControlList(),queryCommonData.showHigradeSearch=false">{{$t('pub.searchBtn')}}
</button>
......@@ -406,11 +410,6 @@
</li>
</ul>
</div>
<div class="hotelProductManage2_tableBox" style="margin-bottom:20px;" v-if="isCommissionDetails">
<span style="color:#000000;background-color: #ff99cc;padding:2px 4px;border-radius:5px">单项</span>
<span style="color:#000000;background-color: #bcd6ee;padding:2px 4px;border-radius:5px">国内</span>
<span style="color:#000000;background-color: #DDDDDD;padding:2px 4px;border-radius:5px">出境</span>
</div>
<div class="TravelTclList" v-loading="queryCommonData.loading">
<ul>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
......@@ -469,12 +468,12 @@
<span class="TC_xiajia quxiao" v-if="item.TCState==4">{{$t('hotel.hotel_HasBeenCancelled')}}</span>
</div>
<div class="TC_TravelSalePlat clearfix"
v-if="item.Royalty">
v-if="item.Royalty" style="display: flex;flex-wrap: wrap;align-items: baseline;">
<span class="TC_neibu" style="color: red;font-size: 11px;line-height: 25px;">{{item.Royalty?item.Royalty.Periods:''}} 期</span>
<span style="cursor: pointer;" v-for="x in item.Royalty.List"
@click="goRoyaltyUrl(item,item.Royalty,x)"
class="TC_neibu"
:style="{'background-color':x.Type==1?'#ff99cc':x.Type==2?'#bcd6ee':'#DDDDDD','color':'#000000','margin-top':'3px'}">
:style="{'background-color':item.Royalty.Type==1?'#ff99cc':item.Royalty.Type==2?'#bcd6ee':'#DDDDDD','color':'#000000','margin-top':'3px'}">
{{x.UserName}}<span>¥{{x.CommissionMoney}}</span>
</span>
</div>
......@@ -1463,7 +1462,7 @@
name = 'ServiceCommissiondetails'
obj.UserId = item.UserId
obj.TCNUM = row.TCNUM
obj.Type = ''
obj.Type = 2
}
this.$router.push({
name: name,
......@@ -1766,7 +1765,6 @@
})
})
this.$forceUpdate()
console.log( this.queryCommonData.dataList[0].Royalty,'------')
}
}
)
......
......@@ -94,25 +94,6 @@
@click="getCompanyCheck(item)">{{item.BName}}</span>
</div>
<ul>
<li>
<span>
<em>提成状态</em>
<el-select class="w150" v-model="queryMsg.QSendCommissionState" filterable
@change="getControlList()">
<el-option v-for="item in QSendCommissionStateList" :label="item.Name" :value="item.ID"
:key="item.LineID"></el-option>
</el-select>
<a style="margin-left: 5px;margin-right: 5px;">只看审核驳回</a>
<el-switch
v-model="queryMsg.QOutGroupAuditReject"
active-text=""
inactive-text=""
active-color="#409eff"
inactive-color="#dcdfe6"
active-value="1"
inactive-value="0" @change="resetPageIndex(),getControlList()"/>
</span>
</li>
<li>
<span>
<em>{{$t('system.table_ssLine')}}</em>
......@@ -299,6 +280,29 @@
</el-select>
</span>
</div>
<div class="comSearchDiv" style="display: flex;align-items: center;">
<span style="flex-shrink: 0;">提成状态</span>
<span style="display: flex;align-items: center;flex-wrap: wrap;">
<el-select class="w180 multiple_input" v-model="queryMsg.QSendCommissionState">
<el-option v-for="item in QSendCommissionStateList" :label="item.Name" :value="item.ID"
:key="item.LineID"></el-option>
</el-select>
<a style="margin-left: 5px;margin-right: 5px;">只看审核驳回</a>
<el-switch
v-model="queryMsg.QOutGroupAuditReject"
active-text=""
inactive-text=""
active-color="#409eff"
inactive-color="#dcdfe6"
active-value="1"
inactive-value="0"/>
<div style="margin-top: 10px;margin-left: 10px;font-size: 11px;" v-if="isCommissionDetails">
<span style="color:#000000;background-color: #ff99cc;padding:0px 2px;border-radius:5px">单项</span>
<span style="color:#000000;background-color: #bcd6ee;padding:0px 4px;border-radius:5px">国内</span>
<span style="color:#000000;background-color: #DDDDDD;padding:0px 4px;border-radius:5px">出境</span>
</div>
</span>
</div>
<button class="normalBtn TC_SearchBtn"
@click="resetPageIndex(),getControlList(),queryCommonData.showHigradeSearch=false">{{$t('pub.searchBtn')}}
</button>
......@@ -368,11 +372,7 @@
</li>
</ul>
</div>
<div class="hotelProductManage2_tableBox" style="margin-bottom:20px;" v-if="isCommissionDetails">
<span style="color:#000000;background-color: #ff99cc;padding:2px 4px;border-radius:5px">单项</span>
<span style="color:#000000;background-color: #bcd6ee;padding:2px 4px;border-radius:5px">国内</span>
<span style="color:#000000;background-color: #DDDDDD;padding:2px 4px;border-radius:5px">出境</span>
</div>
<div class="TravelTclList" v-loading="queryCommonData.loading">
<ul>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
......@@ -420,12 +420,12 @@
<span class="TC_xiajia quxiao" v-if="item.TCState==4">{{$t('hotel.hotel_HasBeenCancelled')}}</span>
</div>
<div class="TC_TravelSalePlat clearfix"
v-if="item.Royalty">
v-if="item.Royalty" style="display: flex;flex-wrap: wrap;align-items: baseline;">
<span class="TC_neibu" style="color: red;font-size: 11px;line-height: 25px;">{{item.Royalty?item.Royalty.Periods:''}}</span>
<span style="cursor: pointer;" v-for="x in item.Royalty.List"
@click="goRoyaltyUrl(item,item.Royalty,x)"
class="TC_neibu"
:style="{'background-color':x.Type==1?'#ff99cc':x.Type==2?'#bcd6ee':'#DDDDDD','color':'#000000','margin-top':'3px'}">
:style="{'background-color':item.Royalty.Type==1?'#ff99cc':item.Royalty.Type==2?'#bcd6ee':'#DDDDDD','color':'#000000','margin-top':'3px'}">
{{x.UserName}}<span>¥{{x.CommissionMoney}}</span>
</span>
</div>
......@@ -955,7 +955,7 @@
name = 'ServiceCommissiondetails'
obj.UserId = item.UserId
obj.TCNUM = row.TCNUM
obj.Type = ''
obj.Type = 2
}
this.$router.push({
name: name,
......
......@@ -514,78 +514,67 @@
rules:{
UseCompName: [{
required: true,
// message: '请输入订车单位',
message: '请输入订车单位',
trigger: 'blur'
}],
UseName: [{
required: true,
// message: '请输入订车人名称',
message: '请输入订车人名称',
trigger: 'blur'
}],
PickUpInfo: [{
required: true,
// message: '请输入接机信息',
message: '',
message: '请输入接机信息',
trigger: 'blur'
}],
GoFlightInfo: [{
required: true,
// message: '请输入去程航班',
message: '',
message: '请输入去程航班',
trigger: 'change'
}],
BackFlightInfo: [{
required: true,
// message: '请输入回程航班',
message: '',
message: '请输入回程航班',
trigger: 'blur'
}],
PeopleNum: [{
required: true,
// message: '请输入用车人数',
message: '',
message: '请输入用车人数',
trigger: 'blur'
}],
UseDayNum: [{
required: true,
// message: '请输入行程天数',
message: '',
message: '请输入行程天数',
trigger: 'blur'
}],
StartDate:[{
required: true,
// message: '请选择开始日期',
message: '',
message: '请选择开始日期',
trigger: 'change'
}],
BusType: [{
required: true,
// message: '请选择用车类型',
message: '',
message: '请选择用车类型',
trigger: 'change'
}],
GuideInfo: [{
required: true,
// message: '请输入导游信息',
message: '',
message: '请输入导游信息',
trigger: 'blur'
}],
TeamName: [{
required: true,
// message: '请输入团队信息',
message: '',
message: '请输入团队信息',
trigger: 'blur'
}],
UseType: [{
required: true,
// message: '请选择用车类型',
message: '',
message: '请选择用车类型',
trigger: 'change'
}],
TripInfo: [{
required: true,
// message: '请输入行程信息',
message: '',
message: '请输入行程信息',
trigger: 'blur'
}],
},
......@@ -745,6 +734,12 @@
});
},
submit(){
for(let i=0;i<this.msg.details.length;i++){
if(!this.msg.details&&!this.msg.details[i].TripInfo){
this.Error('请输入行程信息')
return
}
}
this.$refs['msg'].validate((valid) => {
if (valid) {
this.setFormMsg()
......
......@@ -4772,6 +4772,7 @@ export default {
title: '国内提成列表'
}
},
{
path: '/domesticCommissionUser',
name: 'domesticCommissionUser',
......@@ -4788,6 +4789,38 @@ export default {
title: '国内提成详情'
}
},
{
path: '/domesticCommissionRuleTW',
name: 'domesticCommissionRuleTW',
component: resolve => require(['@/components/FinancialModule/domesticCommissionRuleTW'], resolve),
meta: {
title: '台湾提成规则'
}
},
{
path: '/domesticCommissionTW',
name: 'domesticCommissionTW',
component: resolve => require(['@/components/FinancialModule/domesticCommissionTW'], resolve),
meta: {
title: '台湾提成列表'
}
},
{
path: '/domesticCommissionUserTW',
name: 'domesticCommissionUserTW',
component: resolve => require(['@/components/FinancialModule/domesticCommissionUserTW'], resolve),
meta: {
title: '台湾提成用户分组'
}
},
{
path: '/domesticCommissiondetailsTW',
name: 'domesticCommissiondetailsTW',
component: resolve => require(['@/components/FinancialModule/domesticCommissiondetailsTW'], resolve),
meta: {
title: '台湾提成详情'
}
},
{
path: '/ServiceTheRules',
name: 'ServiceTheRules',
......
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