Commit 38fc8ddb authored by youjie's avatar youjie

业绩提成规则 新增部门有效到访奖励

parent 8682cff8
...@@ -155,7 +155,10 @@ ...@@ -155,7 +155,10 @@
<q-radio v-model="addMsg.SendType" val="1" label="业绩比例" /> <q-radio v-model="addMsg.SendType" val="1" label="业绩比例" />
<q-radio v-model="addMsg.SendType" val="2" label="固定金额" /> <q-radio v-model="addMsg.SendType" val="2" label="固定金额" />
</div> </div>
<div style="margin-bottom: 80px;" v-if="addMsg.SendType=='1'"> <!-- style="margin-bottom: 80px;" -->
<div v-if="addMsg.SendType=='1'"
:style="{'margin-bottom': addMsg.Type==1&&addMsg.ChildEmpList
&&addMsg.ChildEmpList.length>0?'0':'80px'}">
<div>业绩比例</div> <div>业绩比例</div>
<div <div
...@@ -210,7 +213,9 @@ ...@@ -210,7 +213,9 @@
/> />
</div> </div>
</div> </div>
<div style="margin-bottom: 80px;" v-if="addMsg.SendType=='2'"> <div v-if="addMsg.SendType=='2'"
:style="{'margin-bottom': addMsg.Type==1&&addMsg.ChildEmpList
&&addMsg.ChildEmpList.length>0?'0':'80px'}">
<div>固定金额</div> <div>固定金额</div>
<div style="display: flex;align-items: center;margin-bottom: 10px;"> <div style="display: flex;align-items: center;margin-bottom: 10px;">
...@@ -242,6 +247,69 @@ ...@@ -242,6 +247,69 @@
<span class="fz14 text-negative">注释:额外奖励需确认邀约咨询30分钟以上</span> <span class="fz14 text-negative">注释:额外奖励需确认邀约咨询30分钟以上</span>
</div> </div>
</div> </div>
</div>
<div v-if="addMsg.Type==1&&addMsg.ChildEmpList&&addMsg.ChildEmpList.length>0"
:style="{'margin-bottom': addMsg.EnableZGAward==0?'80px':''}" >
<q-toggle v-model="addMsg.EnableZGAward"
label="是否启用部门有效到访奖励"
left-label
false-value="0"
true-value="1"/>
</div>
<div style="margin-bottom: 80px;" v-if="addMsg.EnableZGAward==1">
<div>有效到访奖励阶梯列表</div>
<div
v-for="(x,y) in addMsg.ZGAwardList"
:key="y"
style="display: flex;align-items: center;margin-bottom: 10px;"
>
<q-input
clearable
filled
v-model="x.StartValue"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="初始值"
/>
<q-input
clearable
filled
v-model="x.EndValue"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="结束值"
/>
<q-input
clearable
filled
v-model="x.Rate"
style="width: 190px;margin-right: 5px;"
type="number"
@input="$forceUpdate()"
label="提成金额"
/>
<q-btn
round
size="xs"
color="deep-orange"
icon="delete"
v-if="addMsg.ZGAwardList.length > 1"
@click="addMsg.ZGAwardList.splice(y, 1)"
style="margin-left: 10px;"
/>
<q-btn
round
size="xs"
color="primary"
icon="add"
v-if="addMsg.ZGAwardList.length == y + 1"
@click="addMsg.ZGAwardList.push({ StartValue: '', EndValue: '', Rate: '' })"
style="margin-left: 10px;"
/>
</div>
</div> </div>
<div style="width: 100%;height: 50px;position: absolute;left: 0;bottom: 0;background: #FFF;display: flex;align-items: center;padding: 0 20px;justify-content: flex-end;"> <div style="width: 100%;height: 50px;position: absolute;left: 0;bottom: 0;background: #FFF;display: flex;align-items: center;padding: 0 20px;justify-content: flex-end;">
<q-btn <q-btn
...@@ -328,7 +396,11 @@ export default { ...@@ -328,7 +396,11 @@ export default {
], ],
SendType: '1', SendType: '1',
PeopleMoney: 0, PeopleMoney: 0,
ExtraMoney: 0 ExtraMoney: 0,
EnableZGAward: '0',
ZGAwardList: [
{ StartValue: '', EndValue: '', Rate: '' }
],
} }
} else {//修改 } else {//修改
this.addMsg = JSON.parse(JSON.stringify(this.selectData)) this.addMsg = JSON.parse(JSON.stringify(this.selectData))
...@@ -341,7 +413,7 @@ export default { ...@@ -341,7 +413,7 @@ export default {
this.addMsg.SendType = this.addMsg.SendType?String(this.addMsg.SendType):'1' this.addMsg.SendType = this.addMsg.SendType?String(this.addMsg.SendType):'1'
this.addMsg.PeopleMoney = this.addMsg.PeopleMoney?this.addMsg.PeopleMoney:0 this.addMsg.PeopleMoney = this.addMsg.PeopleMoney?this.addMsg.PeopleMoney:0
this.addMsg.ExtraMoney = this.addMsg.ExtraMoney?this.addMsg.ExtraMoney:0 this.addMsg.ExtraMoney = this.addMsg.ExtraMoney?this.addMsg.ExtraMoney:0
this.addMsg.EnableZGAward = this.addMsg.EnableZGAward?String(this.addMsg.EnableZGAward):'0'
if(this.addMsg.EmpList.length== this.employeeList.length){ if(this.addMsg.EmpList.length== this.employeeList.length){
this.personnel=true this.personnel=true
}else{ }else{
...@@ -356,6 +428,9 @@ export default { ...@@ -356,6 +428,9 @@ export default {
if(this.addMsg.RateList.length==0){ if(this.addMsg.RateList.length==0){
this.addMsg.RateList.push({ StartValue: '', EndValue: '', Rate: '' }) this.addMsg.RateList.push({ StartValue: '', EndValue: '', Rate: '' })
} }
if(this.addMsg.ZGAwardList&&this.addMsg.ZGAwardList.length==0&&this.addMsg.EnableZGAward){
this.addMsg.ZGAwardList.push({ StartValue: '', EndValue: '', Rate: '' })
}
} }
}, },
...@@ -453,7 +528,35 @@ export default { ...@@ -453,7 +528,35 @@ export default {
if(x.StartValue==='' ){ if(x.StartValue==='' ){
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请输入初始值`, message: `请输入业绩比例初始值`,
position: 'top'
})
return
}
if(x.EndValue==''){
this.$q.notify({
type: 'negative',
message: `请输入业绩比例结束值`,
position: 'top'
})
return
}
if(x.Rate<0){
this.$q.notify({
type: 'negative',
message: `请输入业绩比例不小于0的提成比例`,
position: 'top'
})
return
}
}
if(msg.EnableZGAward=='1'){
for(let i=0;i<msg.ZGAwardList.length;i++){
let x = msg.ZGAwardList[i]
if(x.StartValue==='' ){
this.$q.notify({
type: 'negative',
message: `请输入有效到访奖励初始值`,
position: 'top' position: 'top'
}) })
return return
...@@ -461,7 +564,7 @@ export default { ...@@ -461,7 +564,7 @@ export default {
if(x.EndValue==''){ if(x.EndValue==''){
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请输入结束值`, message: `请输入有效到访奖励结束值`,
position: 'top' position: 'top'
}) })
return return
...@@ -469,12 +572,15 @@ export default { ...@@ -469,12 +572,15 @@ export default {
if(x.Rate<0){ if(x.Rate<0){
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请输入不小于0的提成比例`, message: `请输入有效到访奖励不小于0的提成比例`,
position: 'top' position: 'top'
}) })
return return
} }
} }
}else{
msg.ZGAwardList = []
}
this.$emit('success',msg) this.$emit('success',msg)
} }
}, },
......
...@@ -63,7 +63,9 @@ ...@@ -63,7 +63,9 @@
:class="{ 'my-sticky-header-table': height != 'unset' }" separator="none" :data="dataList" :columns="columns" :class="{ 'my-sticky-header-table': height != 'unset' }" separator="none" :data="dataList" :columns="columns"
row-key="StuId" hide-bottom> row-key="StuId" hide-bottom>
<template v-if="showHeader" v-slot:top> <template v-if="showHeader" v-slot:top>
<div class="col-2 q-table__title">学员信息</div> <div class="col-2 q-table__title">学员信息
<template v-if="Count>0">(共{{Count}}条)</template>
</div>
<q-space /> <q-space />
<div class="page-option" v-if="!pushMode"> <div class="page-option" v-if="!pushMode">
<q-btn color="accent" v-if="IsTrasferAll()" outline class="q-mr-md" size="sm" icon="swap_horiz" label="批量转交" <q-btn color="accent" v-if="IsTrasferAll()" outline class="q-mr-md" size="sm" icon="swap_horiz" label="批量转交"
...@@ -297,6 +299,10 @@ ...@@ -297,6 +299,10 @@
export default { export default {
props: { props: {
Count: {
type: Number,
default: null
},
//数据列表 //数据列表
dataList: { dataList: {
type: Array, type: Array,
......
...@@ -168,8 +168,11 @@ ...@@ -168,8 +168,11 @@
<div <div
v-if="scope.row.OrderId" v-if="scope.row.OrderId"
style="cursor: pointer;text-decoration: underline;" style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList(scope.row.ClassType == -1 ?'/sale/studyOrderStatistics' : '/sale/orderStatistics', scope.row)" @click="goUrlorderList(scope.row.OrderId==-1?'/school/student'
>{{ scope.row.OrderId }}</div> :scope.row.OrderId!=-1&&scope.row.ClassType == -1 ?'/sale/studyOrderStatistics'
:scope.row.OrderId!=-1?'/sale/orderStatistics':'',
scope.row)"
>{{ scope.row.OrderId!=-1?scope.row.OrderId:'有效到访奖励' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="IssueNum" label="发放次数" width="94"> <el-table-column prop="IssueNum" label="发放次数" width="94">
...@@ -244,6 +247,7 @@ ...@@ -244,6 +247,7 @@
</div> </div>
</template> </template>
<script> <script>
import { date } from 'quasar'
import { import {
GetClassTypePageList, GetClassTypePageList,
} from '../../../api/system/index'; } from '../../../api/system/index';
...@@ -294,7 +298,7 @@ export default { ...@@ -294,7 +298,7 @@ export default {
created() { }, created() { },
mounted() { mounted() {
if (this.$route.query && this.$route.query.userId) { if (this.$route.query && this.$route.query.userId) {
this.msg.UserId = this.$route.query.userId this.msg.UserId = Number(this.$route.query.userId)
} }
if (this.$route.query && this.$route.query.preriodId) { if (this.$route.query && this.$route.query.preriodId) {
this.msg.PeriodId = this.$route.query.preriodId this.msg.PeriodId = this.$route.query.preriodId
...@@ -450,10 +454,23 @@ export default { ...@@ -450,10 +454,23 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
goUrlorderList(path, row) {//订单跳转 goUrlorderList(path, row) {//订单跳转
if(row.OrderId!=-1){
this.OpenNewUrl(path, { this.OpenNewUrl(path, {
OrderId: row.OrderId, OrderId: row.OrderId,
// EnterID:row.UserId // EnterID:row.UserId
}); });
}else{
// row.IsDept==2
let newDate = row.Periods.split('-')
let MonthDayNum = new Date(newDate[0], newDate[1], 0).getDate(); //计算当月的天数
this.OpenNewUrl(path, {
OrderId: row.OrderId,
startTime: row.Periods+'-01',
endTime: row.Periods+'-'+MonthDayNum,
createBy: row.UserId
});
}
}, },
goUrlclass(path, Names) {//班级 goUrlclass(path, Names) {//班级
let Name = encodeURI(Names) let Name = encodeURI(Names)
......
...@@ -214,6 +214,25 @@ ...@@ -214,6 +214,25 @@
<td style="min-width: 220px;">{{ item.ExtraMoney }}</td> <td style="min-width: 220px;">{{ item.ExtraMoney }}</td>
</tr> </tr>
</table> </table>
<table v-if="item.EnableZGAward=='1'"
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
>
<tr>
<td rowspan="2" width="100" style="min-width: 100px;">有效到访奖励</td>
<th style="min-width: 220px;"
v-for="( son , sIndex ) in item.ZGAwardList"
:key="sIndex"
>{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<=有效到访<':'<有效到访'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th>
</tr>
<tr style="">
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.ZGAwardList" :key="sIndex">{{ son.Rate }}</td>
</tr>
</table>
</div> </div>
</div> </div>
......
...@@ -135,9 +135,14 @@ ...@@ -135,9 +135,14 @@
</el-table-column> </el-table-column>
<el-table-column prop="OrderId" label="订单号"> <el-table-column prop="OrderId" label="订单号">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor: pointer;text-decoration: underline;" <div
@click="goUrlorderList(scope.row.ClassType == -1 ?'/sale/studyOrderStatistics' : '/sale/orderStatistics',scope.row)"> v-if="scope.row.OrderId"
{{scope.row.OrderId}} </div> style="cursor: pointer;text-decoration: underline;"
@click="goUrlorderList(scope.row.OrderId==-1?'/school/student'
:scope.row.OrderId!=-1&&scope.row.ClassType == -1 ?'/sale/studyOrderStatistics'
:scope.row.OrderId!=-1?'/sale/orderStatistics':'',
scope.row)">
{{ scope.row.OrderId!=-1?scope.row.OrderId:'有效到访奖励' }} </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width='130' prop="TotalCommissionMoney" label="订单发放信息"> <el-table-column width='130' prop="TotalCommissionMoney" label="订单发放信息">
...@@ -467,9 +472,21 @@ ...@@ -467,9 +472,21 @@
}); });
}, },
goUrlorderList(path, row) { //订单跳转 goUrlorderList(path, row) { //订单跳转
if(row.OrderId!=-1){
this.OpenNewUrl(path, { this.OpenNewUrl(path, {
OrderId: row.OrderId, OrderId: row.OrderId,
}); });
}else{
// row.IsDept==2
let newDate = row.Periods.split('-')
let MonthDayNum = new Date(newDate[0], newDate[1], 0).getDate(); //计算当月的天数
this.OpenNewUrl(path, {
OrderId: row.OrderId,
startTime: row.Periods+'-01',
endTime: row.Periods+'-'+MonthDayNum,
createBy: row.UserId
});
}
}, },
getmingxi(row) { //明细 getmingxi(row) { //明细
getSellAchievementsChangeLog({ getSellAchievementsChangeLog({
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<stulist :dataList="data" @reload="getStudent" @success="refreshPage" :loading="loading" ref="stuList" <stulist :dataList="data" @reload="getStudent" @success="refreshPage" :loading="loading" ref="stuList"
:isJudgeTrans="isJudgeTrans"> :isJudgeTrans="isJudgeTrans" :Count="Count">
</stulist> </stulist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" <q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
}, },
data() { data() {
return { return {
Count:0,
currentUrl: "", currentUrl: "",
data: [], data: [],
loading: true, loading: true,
...@@ -348,6 +349,7 @@ ...@@ -348,6 +349,7 @@
this.loading = false; this.loading = false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
this.Count = res.Data.Count
this.data.forEach(x => { this.data.forEach(x => {
if (x.CreateBy != this.userInfo.Id) { if (x.CreateBy != this.userInfo.Id) {
x.BelongType = 3; x.BelongType = 3;
......
...@@ -63,14 +63,19 @@ ...@@ -63,14 +63,19 @@
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name" <q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.StuChannel" ref="AdvisorStatus" :options="channelList" clearable label="渠道" v-model="msg.StuChannel" :options="channelList" clearable label="渠道"
class="col-6 q-pb-lg" emit-value map-options />
</div>
<div class="col-3">
<q-select filled stack-label option-value="Id" @input="resetSearch" dense option-label="Name"
v-model="msg.IsSureConsultTime" :options="visitList" clearable label="有效到访"
class="col-6 q-pb-lg" emit-value map-options /> class="col-6 q-pb-lg" emit-value map-options />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<stulist :dataList="data" @success="refreshPage" :loading="loading" ref="stuList" :authObj="AuthObj" <stulist :dataList="data" @success="refreshPage" :loading="loading" ref="stuList" :authObj="AuthObj"
:queryMsg="msg"> :queryMsg="msg" :Count="AuthObj.Count">
</stulist> </stulist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" <q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
...@@ -139,6 +144,7 @@ ...@@ -139,6 +144,7 @@
CreateType: "", //来源类型 CreateType: "", //来源类型
StuSourceId: "", //来源人编号 StuSourceId: "", //来源人编号
CategoryId: "", //同行编号 CategoryId: "", //同行编号
IsSureConsultTime: 1,// 0不限 1有效到访 2无效到访
}, },
dateArray: [], //日期数组 dateArray: [], //日期数组
pageCount: 0, pageCount: 0,
...@@ -149,8 +155,14 @@ ...@@ -149,8 +155,14 @@
customTypeList: [], //客户类型 customTypeList: [], //客户类型
AuthObj: { AuthObj: {
isShowDownload: true, isShowDownload: true,
Count: 0
}, },
consultList: [], consultList: [],
visitList: [
{Name:'不限',Id:0},
{Name:'只看有效到访',Id:1},
{Name:'只看无效到访',Id:2},
],
//渠道列表 //渠道列表
channelList: [], channelList: [],
} }
...@@ -269,6 +281,7 @@ ...@@ -269,6 +281,7 @@
this.loading = false; this.loading = false;
this.data = res.Data.PageData this.data = res.Data.PageData
this.pageCount = res.Data.PageCount this.pageCount = res.Data.PageCount
this.AuthObj.Count = res.Data.Count
this.data.forEach(x => { this.data.forEach(x => {
if (x.CreateBy != this.userInfo.Id) { if (x.CreateBy != this.userInfo.Id) {
x.BelongType = 3; x.BelongType = 3;
......
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