Commit ac70a43a authored by youjie's avatar youjie

优化同业提成

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