Commit ac70a43a authored by youjie's avatar youjie

优化同业提成

parent 16dd8f84
......@@ -1786,7 +1786,7 @@
name: 'TradeTicketDetails',
query: {
PeriodId: GetDetail.ReFinanceId,
OutBranchId: GetDetail.RB_Branch_Id,
RB_Branch_Id: GetDetail.RB_Branch_Id,
blank: "y",
tab: "同业提成详情"
}
......
......@@ -2,8 +2,6 @@
<div class="page_FProcessManagement">
<ul class="_nav clearfix">
<li style="color: red;">注:门票不计入人头奖励</li>
<!-- <button class="hollowFixedBtn" style="right: 185px;" @click="clickTheRules(1)">提成限制</button>
<button class="normalBtn" style="position: absolute; right: 90px;top: 9px;" @click="clickTheRules()">提成规则</button> -->
<input type="button" class="hollowFixedBtn" value="新增" @click="AddMsg"/>
<input type="button" class="normalBtn" style="position: absolute; right: 90px;top: 9px;" value="查询" @click="getList"/>
</ul>
......@@ -157,7 +155,7 @@
<div v-if="dataList.length==0"
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;margin-top: 30px;"
>暂无数据</div>
<el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px">
<el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px" @close="resetForm('form')">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="ImpressionTicketing-msgbox bottom0">
<el-form-item label="规则名称" prop="Name">
......@@ -391,27 +389,6 @@
<el-button size="small" type="danger" @click="RulesOk('form')" :loading="ruleLoading">确 定</el-button>
</span>
</el-dialog>
<!-- 设置限制 -->
<el-dialog :title="titleName" :visible.sync="TheRulesVisible" width="300px">
<el-form ref="form" :model="TheRulesForm" :rules="rules" :label-width="titleName.indexOf('限制')!=-1?'80px':'120px'">
<div v-if="titleName.indexOf('限制')!=-1" class="ImpressionTicketing-msgbox bottom0 line-heigh">
<el-form-item :label="TheRulesForm.SNO =='1'?'限制金额':'限制条数'" prop="Content">
<el-input-number :min="0" v-model="TheRulesForm.Content" clearable></el-input-number>
</el-form-item>
</div>
<div v-else class="ImpressionTicketing-msgbox bottom0" v-for="(item,index) in TheRulesData">
<el-form-item :label="item.Name+':'">
<span style="margin-left: 10px;">{{item.Content}}
<i style="margin-left: 5px;">{{item.SNO==2?' RMB':' 条'}}</i>
</span>
</el-form-item>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="TheRulesVisible = false,ruleLoading = false">取 消</el-button>
<el-button size="small" type="danger" @click="titleName.indexOf('限制')!=-1?OkTheRules('form'):TheRulesVisible = false" :loading="ruleLoading">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -420,7 +397,6 @@
data() {
return {
value:"",
EmployeeList:[],
rules: {
Name: [{
required: true,
......@@ -468,9 +444,6 @@
trigger: "blur"
}],
},
EmpList:[//参与人
{EmployeeId:''}
],
AwardRuleList:
{
StartValue:0,
......@@ -543,85 +516,19 @@
},
ruleLoading: false,
ruleVisible:false,
titleName:'标题',
titleName:'提成规则',
loading: false,
titleList:[
{name:'引流规则',id:'2'},
{name:'销售规则',id:'1'}
],
dataList:[],
msg:{
EmpType: '2'
},
hintStart:'',
hintEnd:'',
TheRulesVisible: false,
TheRulesForm:{
Name:'',
SNO:2,
Content:''
},
TheRulesData:[
]
}
},
created() {},
mounted() {
this.form.EmpType = this.msg.EmpType
this.getList()
this.getEmployeeList()
},
methods: {
// 点击确定
OkTheRules(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let data = {
SNO:this.TheRulesForm.SNO==1?2:1,
Content:this.TheRulesForm.Content,
}
this.ruleLoading = true
this.crmapipost(
'/api/commission/SetCommissionLimit', data,
res => {
if (res.data.resultCode == 1) {
this.resetForm('form')
// this.getList();
this.TheRulesVisible = false;
this.ruleLoading = false
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
},
err => {}
)
}
});
},
GetCommissionLimit() {
this.crmapipost(
'/api/commission/GetCommissionLimit', {},
res => {
if (res.data.resultCode == 1) {
this.TheRulesData = res.data.data
} else {
this.Error(res.data.message)
}
},
err => {}
)
},
clickTheRules(type){
this.TheRulesVisible = true
if(type==1){
this.titleName = this.TheRulesForm.SNO==1?'销售提成限制':'引流提成限制'
}else{
this.titleName = '提成规则'
this.ruleLoading = false
this.GetCommissionLimit()
}
// 初始化表单
resetForm(formName) {
this.$refs[formName].resetFields();
},
// 添加规则
addRule(row,index,type){
......@@ -653,19 +560,7 @@
},
AddMsg(){//新增
this.ruleVisible = true
if(this.msg.EmpType=='1'){
this.titleName = '销售规则'
this.hintStart = '开始值'
this.hintEnd = '结束值'
this.rules.StartValue[0].message = '请输入开始值'
this.rules.EndValue[0].message = '请输入结束值'
}if(this.msg.EmpType=='2'){
this.titleName = '引流规则'
this.hintStart = '引流条数'
this.hintEnd = '成交单数'
this.rules.StartValue[0].message = '请输入引流条数'
this.rules.EndValue[0].message = '请输入成交单数'
}
this.titleName = '提成规则'
},
SetRules(item){//编辑
this.ruleVisible = true;
......@@ -725,16 +620,6 @@
}
});
},
// 已选人员获取
personnel(){
this.form.EmpList= []
for(let i=0;i<this.form.EmployeeId.length;i++){
let data = {
EmployeeId:this.form.EmployeeId[i],
}
this.form.EmpList.push(data)
}
},
// 获取列表数据
getList() {
this.loading = true;
......@@ -748,26 +633,6 @@
}
});
},
// 获取人员列表
getEmployeeList() {
let userInfo = this.getLocalStorage()
let msg = {
GroupId: userInfo.RB_Group_id,
BranchId: '-1',
DepartmentId: '-1',
PostId: '-1',
IsLeave: '0'
}
this.apipost(
'admin_get_EmployeeGetList', msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data
}
},
err => {}
)
},
// 重置表单
resetForm(formName) {
this.ruleVisible = false;
......
......@@ -276,18 +276,18 @@
}
}
this.msg.PeriodId = this.$route.query&&this.$route.query.PeriodId?Number(this.$route.query.PeriodId):-1
this.msg.OrderId = this.$route.query&&this.$route.query.OrderId?this.$route.query.OrderId:''
this.msg.OutBranchId = this.$route.query&&this.$route.query.RB_Branch_Id>-1?Number(this.$route.query.RB_Branch_Id):Number(userInfo.RB_Branch_id)
this.msg.UserId = this.$route.query&&this.$route.query.UserId?Number(this.$route.query.UserId):Number(userInfo.EmployeeId)
this.msg.PeriodId = this.$route.query.PeriodId?Number(this.$route.query.PeriodId):-1
this.msg.OrderId = this.$route.query.OrderId?this.$route.query.OrderId:''
this.msg.RB_Branch_Id = this.$route.query.RB_Branch_Id?Number(this.$route.query.RB_Branch_Id):Number(userInfo.RB_Branch_id)
this.msg.UserId = this.$route.query.UserId?Number(this.$route.query.UserId):Number(userInfo.EmployeeId)
if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1
||ActionMenuCode.indexOf('S_CheckAllOrder')!=-1
||ActionMenuCode.indexOf('F_Query_AllIncomPay')!=-1) {//是否有看所有人的权限
this.disabled = false;
this.msg.OutBranchId = -1
this.msg.RB_Branch_Id = -1
this.msg.RB_Branch_Id = this.$route.query.RB_Branch_Id?Number(this.$route.query.RB_Branch_Id):-1
// this.msg.RB_Department_Id = -1
this.msg.UserId = -1
this.msg.UserId = this.$route.query.UserId?Number(this.$route.query.UserId):-1
}else{
this.disabled = true;
}
......
......@@ -18,12 +18,10 @@
<template>
<div style="float: left;">
<span class="cF1416C"
:class="{'cursor-pointer':(objNew.createTime&&objNew.createTime>=new Date('2023-04-01').Format('yyyy-MM-dd'))
||(objNew.createDate&&objNew.createDate>=new Date('2023-04-01').Format('yyyy-MM-dd'))
||(objNew.CreateTime&&new Date(objNew.CreateTime).Format('yyyy-MM-dd')>=new Date('2023-04-01').Format('yyyy-MM-dd'))}"
@click="(objNew.createTime&&objNew.createTime>=new Date('2023-04-01').Format('yyyy-MM-dd'))
||(objNew.createDate&&objNew.createDate>=new Date('2023-04-01').Format('yyyy-MM-dd'))
||(objNew.CreateTime&&new Date(objNew.CreateTime).Format('yyyy-MM-dd')>=new Date('2023-04-01').Format('yyyy-MM-dd'))?DetailsOfRoyalty():''">
:class="{'cursor-pointer':!type||(type=='跟团游订单'&&objNew.startDate&&objNew.startDate>=new Date('2023-04-01').Format('yyyy-MM-dd'))}"
@click="!type||(type=='跟团游订单'&&objNew.startDate&&objNew.startDate>=new Date('2023-04-01').Format('yyyy-MM-dd'))
||objNew.createDate
||objNew.CreateTime?DetailsOfRoyalty():''">
<span class="fz15 fbold">
<!-- {{objNew.commissionCurrency?objNew.commissionCurrency:objNew.CurrencyName!='人民币'?objNew.CurrencyName:'¥'}} -->
{{ objNew.commissionMoney?moneyFormat(objNew.commissionMoney):objNew.SellCommission }}
......@@ -93,14 +91,15 @@
<td>{{item.Description?item.Description:'-'}}</td>
</tr>
</table>
<div v-if="dataList.length==0"
style="width: 100%;border:1px solid #fff;display: flex;align-items: center;justify-content: center;height: 60px;margin-top: 30px;"
>暂无数据</div>
<!-- 分页 -->
<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>
<div v-if="dataList&&dataList.length==0"
style="width: 100%;border:1px solid #fff;display: flex;align-items: center;justify-content: center;height: 60px;margin-top: 30px;"
>暂无数据</div>
</div>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
......@@ -112,7 +111,7 @@
<script>
export default {
props:['objNew'],
props:['objNew','type'],
data() {
return {
dataObj:{},
......@@ -137,7 +136,7 @@
watch:{
objNew: {
handler(val, oldVal) {
this.msg.OrderId = val.id?val.id:val.OrderId
this.msg.OrderId = val.id?val.id:val.OrderId?val.OrderId:val.orderId
this.msg.PeriodId = this.$route.query.PeriodId?this.$route.query.PeriodId:-1
},
deep: true,
......
......@@ -1716,7 +1716,7 @@
<p v-if="item.tradeWay == 1">{{ item.platformOrder }}</p>
<p v-if="item.commissionMoney" style="color: red">
<span style="float: left;">{{ $t("salesModule.Commission") }}</span>
<commissionDialog :objNew="item"></commissionDialog>{{item.commissionCurrency}}
<commissionDialog :type="pagesTitle" :objNew="item"></commissionDialog>{{item.commissionCurrency}}
<!-- {{ item.commissionMoney }} {{item.commissionCurrency}} -->
</p>
<p v-else-if="item.latestCommissionMoney" style="color: red">
......@@ -2432,6 +2432,7 @@
export default {
data() {
return {
pagesTitle:'跟团游订单',
SpecialAppShow: false,
SpecialAppMsg: {
ApplyReason: "",
......
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