Commit 00dbc742 authored by Mac's avatar Mac

市场顾问提成规则页面

parent 59459c21
......@@ -573,6 +573,28 @@ export function getTeacherContributeConfig(data) {
data
})
}
/**
* 获取市场顾问提成规则列表
*/
export function getSellAchievementsRuleList(data) {
return request({
url: '/SellAchievements/GetSellAchievementsRuleList',
method: 'post',
data
});
}
/**
* 市场顾问保存规则
*/
export function setSellAchievementsRule(data) {
return request({
url: '/SellAchievements/SetSellAchievementsRule',
method: 'post',
data
});
}
......
<style>
@import "../css/cssReset.css";
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.salesRules .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.salesRules .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.marketRules .border-bottom {
padding-bottom: 5px;
margin-bottom: 5px;
}
.marketRules .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.marketRules .singeRowTable tr th {
border: 1px solid #d2d2d2;
}
</style>
<template>
<div class="page-body marketRules">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"></div>
</div>
<template>
<div class="cm_content" style="width: 100%;">
<table
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr>
<th colspan="12">市场顾问提成规则</th>
</tr>
<tr>
<th rowspan="2">方案名称</th>
<th rowspan="2">类型</th>
<th rowspan="2">课程类型</th>
<th rowspan="2">课程</th>
<th rowspan="2">提成方式</th>
<th rowspan="2">提成人员</th>
<th rowspan="2">部门人员</th>
<th rowspan="2">课程比例</th>
<th colspan="3">业绩比例</th>
<th rowspan="2" width="100">操作</th>
</tr>
<tr>
<th>初始值</th>
<th>结束值</th>
<th>提成比例</th>
</tr>
<tr v-for=" ( item , index ) in dataList ">
<td>
<span>{{ item.Name }}</span>
</td>
<td>
<span v-if="item.Type == 1">市场</span>
<span v-if="item.Type == 2">顾问</span>
<span v-if="item.Type == 3">教师</span>
</td>
<td>
<span v-if="item.Type == 1">包含</span>
<span v-if="item.Type == 2">不包含</span>
</td>
<td>
<p v-for="( son , sIndex ) in item.CourseList">{{ son.CourseName }}</p>
</td>
<td>
<span v-if="item.CommissionType == 1">课耗提成</span>
<span v-if="item.CommissionType == 2">次月全提</span>
<span v-if="item.CommissionType == 3">课程比例</span>
</td>
<td>
<p v-for="( son , sIndex ) in item.EmpList">{{ son.EmployeeName }}</p>
</td>
<td>
<p v-for="( son , sIndex ) in item.ChildEmpList">{{ son.EmployeeName }}</p>
</td>
<td>
<span>{{ item.CourseRate }}</span>
</td>
<td v-for="( son , sIndex ) in item.RateList">{{ son.StartValue }}</td>
<td v-for="( son , sIndex ) in item.RateList">{{ son.EndValue }}</td>
<td v-for="( son , sIndex ) in item.RateList">{{ son.Rate }}</td>
<td>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400"
label="编辑"
@click="EditTask(props.row)"
/>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
style="font-weight:400"
label="删除"
@click="RemoveTask(props.row.Id)"
/>
</td>
</tr>
</table>
<div
v-if="dataList.length == 0"
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;"
>暂无数据</div>
<div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 10px;">
<q-btn color="accent" size="sm" icon="add" label="新增规则" @click="AddMsg()" />
<q-btn color="accent" size="sm" label="保存" @click="setMsg()" style="margin-left: 15px;" />
</div>
</div>
</template>
</div>
</template>
<script>
import {
getSellAchievementsRuleList,
} from '../../../api/finance/index'
export default {
meta: {
title: "销售提成规则"
},
props: {},
components: {},
data() {
return {
loading: false,
dataList: [], //列表数据
isSalerule_preserve: false,
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x => {//判断权限
if (x.FunctionCode == "Salerule_preserve") {//判断是否有保存的权限
this.isSalerule_preserve = true;
return
}
})
},
mounted() {
this.getSellAchievementsRuleList(); //获取规则
},
methods: {
getSellAchievementsRuleList() {
this.loading = true;
getSellAchievementsRuleList({}).then(res => {
if (res.Code == 1) {
this.dataList = res.Data
}
this.loading = false
})
},
preservation() { //保存规则
// setSellAchievementsRule(addMsg).then(res => {
// if (res.Code == 1) {
// this.$q.notify({
// icon: 'iconfont icon-chenggong',
// color: 'accent',
// timeout: 2000,
// message: '数据保存成功!',
// position: 'top'
// })
// }
// })
},
AddMsg() {
let obj = {
Id:0,
Name:'',
Type:1,
CourseType:1,
CourseIds:'',
CourseList:[],//课程列表
CommissionType:1,
EmpIds:'',
EmpList:[],
ChildEmpIds:'',
ChildEmpList:[],
CourseRate:'',
}
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -704,6 +704,11 @@ const routes = [{
component: () =>
import("pages/financial/contribution/commissionStatistics.vue")
},
{
path: "/financial/market/commissionRule", // 市场顾问 提现规则
component: () =>
import("pages/financial/market/commissionRule.vue")
},
......
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