Commit ee3cd3f3 authored by 吴春's avatar 吴春
parents f808410d 2dea742e
......@@ -310,6 +310,58 @@
style="margin-left: 10px;"
/>
</div>
</div>
<div style="margin-bottom: 80px;">
<div>部门共同奖金分配</div>
<div
v-for="(x,y) in addMsg.DeptAwardList"
:key="y"
style="display: flex;align-items: center;margin-bottom: 10px;"
>
<q-select
filled
stack-label
option-value="Id"
option-label="EmployeeName"
v-model="x.EmpId"
use-input
:options="myEmployeeList"
label="奖励分配人员"
:dense="false"
emit-value
map-options
@filter="filterEmployee"
style="width: 240px;margin-right: 5px;"
@input='getDeptPersonnel(x,y)'
/>
<q-input
clearable
filled
v-model="x.Rate"
style="width: 190px;"
type="number"
@input="$forceUpdate()"
label="奖励分配比例(%)"
/>
<q-btn
round
size="xs"
color="deep-orange"
icon="delete"
v-if="addMsg.DeptAwardList.length > 1"
@click="addMsg.DeptAwardList.splice(y, 1)"
style="margin-left: 10px;"
/>
<q-btn
round
size="xs"
color="primary"
icon="add"
v-if="addMsg.DeptAwardList.length == y + 1"
@click="addMsg.DeptAwardList.push({ EmpId: '',EmName:'', Rate: '' })"
style="margin-left: 10px;"
/>
</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;">
<q-btn
......@@ -401,6 +453,9 @@ export default {
ZGAwardList: [
{ StartValue: '', EndValue: '', Rate: '' }
],
DeptAwardList:[
{EmpId:null,EmName:null,Rate:null}
]
}
} else {//修改
this.addMsg = JSON.parse(JSON.stringify(this.selectData))
......@@ -414,6 +469,7 @@ export default {
this.addMsg.PeopleMoney = this.addMsg.PeopleMoney?this.addMsg.PeopleMoney:0
this.addMsg.ExtraMoney = this.addMsg.ExtraMoney?this.addMsg.ExtraMoney:0
this.addMsg.EnableZGAward = this.addMsg.EnableZGAward?String(this.addMsg.EnableZGAward):'0'
this.addMsg.DeptAwardList = this.addMsg.DeptAwardList?this.addMsg.DeptAwardList:[{EmpId:null,EmName:null,Rate:null}]
if(this.addMsg.EmpList.length== this.employeeList.length){
this.personnel=true
}else{
......@@ -581,6 +637,27 @@ export default {
}else{
msg.ZGAwardList = []
}
if(msg.DeptAwardList.length>0){
for(let i=0;i<msg.DeptAwardList.length;i++){
let x = msg.DeptAwardList[i]
if(!x.EmpId){
this.$q.notify({
type: 'negative',
message: `请选择奖励分配人员`,
position: 'top'
})
return
}
if(!x.Rate){
this.$q.notify({
type: 'negative',
message: `请输入奖励分配比例`,
position: 'top'
})
return
}
}
}
this.$emit('success',msg)
}
},
......@@ -634,6 +711,10 @@ export default {
}
},
getDeptPersonnel(item,i){
let obj = this.myEmployeeList.filter(x=>{return x.Id==item.EmpId})
if(obj&&obj.length>0)this.addMsg.DeptAwardList[i].EmName = obj[0].EmployeeName
},
getpersonnel(type){
if(type==1){//人员全选
if(this.addMsg.EmpList.length== this.employeeList.length){
......
......@@ -44,8 +44,8 @@
</q-field>
</div>
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="objOption.TeacherId"
ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" class="col-6 q-pr-lg"
:class="[$q.platform.is.desktop?'q-pb-lg':'q-pb-sm']" emit-value
ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false" class="col-6 "
:class="[$q.platform.is.desktop?'q-pb-lg q-pr-lg':'q-pb-sm q-pr-sm']" emit-value
map-options />
<q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="objOption.ClassRoomId"
......@@ -54,12 +54,12 @@
map-options />
<q-select filled stack-label option-value="Id" option-label="LessonName" v-model="objOption.TrialLessonId"
:options="TrialList" label="试听课程" :dense="false" class="col-6 q-pr-lg"
:class="[$q.platform.is.desktop?'q-pb-lg':'q-pb-sm']" emit-value map-options />
:options="TrialList" label="试听课程" :dense="false" class="col-6"
:class="[$q.platform.is.desktop?'q-pb-lg q-pr-lg':'q-pb-sm q-pr-sm']" emit-value map-options />
<q-select filled stack-label option-value="Name" option-label="Name" v-model="objOption.ClassContent"
<!-- <q-select filled stack-label option-value="Name" option-label="Name" v-model="objOption.ClassContent"
ref="ClassContent" :options="ContentList" label="主讲内容" :dense="false" class="col-12 q-pb-lg" emit-value
map-options />
map-options /> -->
</div>
</q-card-section>
<q-separator />
......@@ -120,15 +120,23 @@
TrialList: [] //试听课程下拉数据
}
},
mounted() {
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
if (month < 10) {
month = '0' + month
watch: {
saveObj:{
handler(n){
this.initObj()
},
deep: true
}
this.objOption.ClassDate = year + '-' + month + '-' + day;
},
mounted() {
// let nowDay = new Date();
// var year = nowDay.getFullYear(); //年
// var month = nowDay.getMonth() + 1; //月
// var day = nowDay.getDate(); //日
// if (month < 10) {
// month = '0' + month
// }
// this.objOption.ClassDate = year + '-' + month + '-' + day;
this.GetTeacherList();
this.getClassRoomList();
this.GetTrialDrop();
......@@ -144,11 +152,13 @@
},
//初始化表单
initObj() {
this.objOption.ClassDate = this.saveObj.ReservationDate
if (this.saveObj && this.saveObj.ReserveClassId > 0) {
GetReserveClass({
ReserveClassId: this.saveObj.ReserveClassId
}).then(res => {
if (res.Code == 1) {
this.objOption.ReserveClassId = res.Data.ReserveClassId;
this.objOption.TeacherId = res.Data.TeacherId;
this.objOption.ClassDate = res.Data.ClassDateStr;
......
......@@ -68,12 +68,12 @@
</div>
<div class="row justify-end">
<q-btn label="修改" color="primary" flat @click="editVisitor(x)"/>
<q-btn label="删除" color="teal-10" flat @click="DeleteVisitorReserve(x.Id)"/>
<q-btn label="删除" color="red-6" flat @click="DeleteVisitorReserve(x.Id)"/>
</div>
</q-card>
</template>
<reserveForm v-if="isShowReserve" :save-obj="reserveObj" @close="closeReserveForm" @success="refreshPage">
<reserveForm v-if="isShowReserve" :saveObj="reserveObj" @close="closeReserveForm" @success="refreshPage">
</reserveForm>
</div>
</template>
......@@ -109,6 +109,7 @@
label: '学生名称',
align: 'left',
field: 'StuName',
required: true,
},
{
name: 'ReservationDate',
......@@ -207,11 +208,7 @@ return timeStr;
},
//编辑试听
editVisitor(obj) {
if (obj) {
this.reserveObj = obj
} else {
this.reserveObj = null
}
this.isShowReserve = true;
},
//关闭弹窗
......
......@@ -90,56 +90,9 @@
</div>
</el-dialog>
<el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%">
<div class="row wrap">
<div style="width:100%;margin-bottom:15px;">试听时间:<span style="color:red;">{{timeFormatSeconds(VisitorReserveClassMsg.ReservationDate)}}</span></div>
<div style="width:100%;margin-bottom:15px;">试听需求:<span style="color:red;">{{VisitorReserveClassMsg.Demand}}</span></div>
</div>
<div class="row studentDate">
<q-field filled class="col-6 q-pb-lg q-pr-lg" dense>
<template v-slot:control>
<el-date-picker v-model="VisitorReserveClassMsg.ClassDate" ref="ClassDate" :rules="[val => !!val || '请选择预约日期']"
style="width:225px" size="mini" type="date" placeholder="预约日期" value-format="yyyy-MM-dd">
</el-date-picker>
</template>
</q-field>
<div class="col-6 q-pr-lg Student_Date ">
<q-field filled class="q-pb-lg" dense>
<template v-slot:control>
<el-time-select v-model="VisitorReserveClassMsg.ClassTime" size="mini" ref="ClassTime" style="width:50%" :picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: VisitorReserveClassMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select v-model="VisitorReserveClassMsg.EndTime" size="mini" dense ref="EndTime" style="width:50%"
:picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: VisitorReserveClassMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</template>
</q-field>
</div>
</div>
<div class="row wrap">
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="VisitorReserveClassMsg.TeacherId"
ref="TeacherId" :options="TeacherList" label="选择教师" dense class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="RoomId" dense option-label="RoomName" v-model="VisitorReserveClassMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="Id" dense option-label="LessonName" v-model="VisitorReserveClassMsg.TrialLessonId"
:options="TrialList" label="试听课程" class="col-6 q-pb-lg q-pr-lg" emit-value map-options />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeShitingKaiKe()">取 消</el-button>
<el-button type="primary" @click="SetVisitorReserveClass()">确 定</el-button>
</div>
<el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%" @close="closeShitingKaiKe">
<audition :VisitorReserveClassMsg="VisitorReserveClassMsg"
@close="closeShitingKaiKe" @success="SetVisitorReserveClass()"></audition>
</el-dialog>
</div>
</template>
......@@ -159,6 +112,7 @@
} from "../../../api/school/index";
import reserveclassForm from "./reserveclass-form";
import reserveclasskaikeform from "./reserveclasskaikeform";
import audition from "../../../pages/h5page/audition";
export default {
meta: {
......@@ -167,7 +121,8 @@
components: {
reserveclassForm,
reserveclasskaikeform,
UeEditor
UeEditor,
audition
},
props: {
saveObj: {
......@@ -258,6 +213,10 @@ return timeStr;
},
//保存
SetVisitorReserveClass() {
this.closeShitingKaiKe();
this.getList();
this.$forceUpdate()
return
if (this.VisitorReserveClassMsg.ClassDate == "") {
this.$q.notify({
type: "negative",
......@@ -324,6 +283,7 @@ return timeStr;
this.VisitorReserveClassMsg.ClassPlanId=0;
this.VisitorReserveClassMsg.Demand="";
this.VisitorReserveClassMsg.IsShow=false;
this.$forceUpdate()
},
//试听课开课
ShitingKaiKe(item){
......
......@@ -65,10 +65,10 @@
</el-table-column>
<el-table-column prop="UserName" label="人员" :filters='UserNamelist' :filter-method="filterHandler">
</el-table-column>
<el-table-column prop="IsDept" label="业绩方式" >
<el-table-column prop="IsCommonDept" label="业绩方式" >
<template slot-scope="scope">
<span v-if="scope.row.IsDept==1">部门</span>
<span v-if="scope.row.IsDept==2">个人</span>
<span v-if="scope.row.IsCommonDept==1">部门</span>
<span v-if="scope.row.IsCommonDept==0">个人</span>
</template>
</el-table-column>
<el-table-column width='170' prop="ClassName" label="班级信息">
......@@ -99,6 +99,8 @@
<div v-if="scope.row.OtherMoney">额外奖励:{{scope.row.OtherMoney}}</div>
<div v-if="scope.row.BackMoney">额外扣除:{{scope.row.BackMoney}}</div>
<div v-if="scope.row.GiveOutMoney">累计已发:{{scope.row.GiveOutMoney}}</div>
<div v-if="scope.row.OrderSaleMoney">订单业绩:{{ scope.row.OrderSaleMoney }}</div>
</template>
</el-table-column>
......
......@@ -94,7 +94,7 @@
option-value="Id"
@input="getList"
option-label="Name"
v-model="msg.IsDept"
v-model="msg.IsCommonDept"
:options="IsDeptList"
label="业绩方式"
:dense="false"
......@@ -139,10 +139,10 @@
</template>
</el-table-column>
<el-table-column prop="UserName" label="销售"></el-table-column>
<el-table-column prop="IsDept" label="业绩方式">
<el-table-column prop="IsCommonDept" label="业绩方式">
<template slot-scope="scope">
<span v-if="scope.row.IsDept == 1">部门</span>
<span v-if="scope.row.IsDept == 2">个人</span>
<span v-if="scope.row.IsCommonDept == 1">部门</span>
<span v-if="scope.row.IsCommonDept == 0">个人</span>
</template>
</el-table-column>
<el-table-column width="130" prop="ClassName" label="班级信息">
......@@ -175,17 +175,8 @@
>{{ scope.row.OrderId!=-1?scope.row.OrderId:'有效到访奖励' }}</div>
</template>
</el-table-column>
<el-table-column prop="IssueNum" label="发放次数" width="94">
<template slot-scope="scope">
<div
v-if="scope.row.IssueNum"
style="cursor: pointer;text-decoration: underline;"
@click="goorderUrl(scope.row)"
>发放第{{ scope.row.IssueNum }}</div>
</template>
</el-table-column>
<el-table-column width="130" prop="TotalCommissionMoney" label="订单发放信息">
<el-table-column width="150" prop="TotalCommissionMoney" label="订单发放信息">
<template slot-scope="scope">
<div v-if="scope.row.TotalCommissionMoney" style="color: rgb(255, 156, 0);cursor: pointer;text-decoration: underline;" @click="getmingxi(scope.row)">
......@@ -199,15 +190,17 @@
<div v-if="scope.row.OtherMoney">额外奖励:{{ scope.row.OtherMoney }}</div>
<div v-if="scope.row.BackMoney">额外扣除:{{ scope.row.BackMoney }}</div>
<div v-if="scope.row.GiveOutMoney">累计已发:{{ scope.row.GiveOutMoney }}</div>
<div v-if="scope.row.OrderSaleMoney">订单业绩:{{ scope.row.OrderSaleMoney }}</div>
</template>
</el-table-column>
<el-table-column prop="IsFirstCommission" label="首次发放">
<!-- <el-table-column prop="IsFirstCommission" label="首次发放">
<template slot-scope="scope">
<div
v-if="scope.row.IsFirstCommission"
>{{ scope.row.IsFirstCommission == 1 ? '是' : '否' }}</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="TotalHours" label="课时统计" width="120">
<template slot-scope="scope">
<div v-if="scope.row.TotalHours">总计课时:{{ scope.row.TotalHours }}</div>
......@@ -241,6 +234,15 @@
</template>
</el-table-column>
<el-table-column width="90" prop="PeopleNumMoney" label="人头奖励"></el-table-column>
<el-table-column prop="IssueNum" label="发放次数" width="94">
<template slot-scope="scope">
<div
v-if="scope.row.IssueNum"
style="cursor: pointer;text-decoration: underline;"
@click="goorderUrl(scope.row)"
>发放第{{ scope.row.IssueNum }}</div>
</template>
</el-table-column>
<el-table-column width="90" prop="Periods" label="期数"></el-table-column>
<el-table-column prop="Remark" width="160" label="备注"></el-table-column>
</el-table>
......@@ -278,11 +280,11 @@ export default {
ClassId: 0,
OrderId: '',
UserType: 0,//类型 1市场、2顾问、3教师
IsDept: 0,//业绩方式 1部门 2个人
IsCommonDept: '0',//业绩方式 1部门 2个人
UserIds: '',
},
UserTypeList: [{ Id: 0, Name: '不限' }, { Id: 1, Name: '市场' }, { Id: 2, Name: '顾问' }, { Id: 3, Name: '教师' },],
IsDeptList: [{ Id: 0, Name: '不限' }, { Id: 1, Name: '部门' }, { Id: 2, Name: '个人' }],
IsDeptList: [{ Id: '0', Name: '不限' }, { Id: '1', Name: '部门' }, { Id: '2', Name: '个人' }],
pageCount: 0,
persistent: false,
listData: {},
......@@ -307,6 +309,9 @@ export default {
if (this.$route.query && this.$route.query.UserIds) {
this.msg.UserIds = this.$route.query.UserIds
}
if(this.$route.query && this.$route.query.IsCommonDept){
this.msg.IsCommonDept = this.$route.query.IsCommonDept
}
this.getList()
this.setClass()
this.getEmployee()
......@@ -331,7 +336,8 @@ export default {
let obj = {
SchoolName: '合计',
YFMoney: 0,
PeopleNumMoney: 0
PeopleNumMoney: 0,
IsCommonDept:-1
}
this.tableData.forEach((x) => {
if (x.YFMoney) {
......
......@@ -48,9 +48,9 @@
<div class="col row wrap q-mr-lg q-col-gutter-md"></div>
</div>
<template>
<div class="cycle_Title">
业绩提成规则
<q-btn color="accent" size="sm" icon="add" label="新增规则" @click="AddMsg()" />
<div class="row justify-between q-pb-lg">
<span class="cycle_Title">业绩提成规则</span>
<q-btn color="accent" size="xs" icon="add" label="新增规则" @click="AddMsg()" />
</div>
<div
class="cm_content"
......@@ -233,6 +233,24 @@
</tr>
</table>
<table v-if="item.IsDeptAward=='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.DeptAwardList"
:key="sIndex"
>{{ son.EmName }}</th>
</tr>
<tr style="">
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.DeptAwardList" :key="sIndex">{{ son.Rate }}%</td>
</tr>
</table>
</div>
</div>
......
......@@ -67,7 +67,7 @@
<template slot-scope="scope">
<div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo" @click="goUrl('market/AchievementsUserDetailList',scope.row.UserId)"></i>
<i class="iconfont icon-sousuo" @click="goUrl('market/AchievementsUserDetailList',scope.row.IsCommonDept,scope.row.UserId)"></i>
</el-tooltip>
</div>
</template>
......@@ -174,7 +174,17 @@
goUrl(path, id) {
goUrl(path,IsCommonDept, id) {
if(IsCommonDept==1){
this.$router.push({
path: '/financial/' + path,
query: {
IsCommonDept: IsCommonDept,
preriodId: this.$route.query.id,
blank: 'y',
}
})
}else{
this.$router.push({
path: '/financial/' + path,
query: {
......@@ -183,6 +193,7 @@
blank: 'y',
}
})
}
},
filterHandler(value, row, column) {
const property = column['property'];
......
......@@ -94,7 +94,7 @@
</div>
<div class="col-3">
<q-select filled stack-label input-debounce="0" option-value="Id" @input="resetSearch()" option-label="Name"
v-model="msg.IsDept" :options="IsDeptList" label="业绩方式" :dense="false" emit-value map-options>
v-model="msg.IsCommonDept" :options="IsDeptList" label="业绩方式" :dense="false" emit-value map-options>
</q-select>
</div>
</div>
......@@ -117,10 +117,10 @@
</template>
</el-table-column>
<el-table-column prop="UserName" label="人员"> </el-table-column>
<el-table-column prop="IsDept" label="业绩方式">
<el-table-column prop="IsCommonDept" label="业绩方式">
<template slot-scope="scope">
<span v-if="scope.row.IsDept==1">部门</span>
<span v-if="scope.row.IsDept==2">个人</span>
<span v-if="scope.row.IsCommonDept==1">部门</span>
<span v-if="scope.row.IsCommonDept==0">个人</span>
</template>
</el-table-column>
<el-table-column width='170' prop="ClassName" label="班级信息">
......@@ -145,7 +145,7 @@
{{ scope.row.OrderId!=-1?scope.row.OrderId:'有效到访奖励' }} </div>
</template>
</el-table-column>
<el-table-column width='130' prop="TotalCommissionMoney" label="订单发放信息">
<el-table-column width='150' prop="TotalCommissionMoney" label="订单发放信息">
<template slot-scope="scope">
<div style="color: rgb(255, 156, 0);cursor: pointer;text-decoration: underline;"
@click="getmingxi(scope.row)">
......@@ -157,13 +157,14 @@
</q-popup-proxy>
</div>
<div>累计已发:{{scope.row.GiveOutMoney}}</div>
<div v-if="scope.row.OrderSaleMoney">订单业绩:{{ scope.row.OrderSaleMoney }}</div>
</template>
</el-table-column>
<el-table-column prop="IsFirstCommission" label="首次发放">
<!-- <el-table-column prop="IsFirstCommission" label="首次发放">
<template slot-scope="scope">
<div>{{scope.row.IsFirstCommission==1?'是':'否'}}</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="TotalHours" label="课时统计" width='160'>
<template slot-scope="scope">
<div>总计课时:{{scope.row.TotalHours}}</div>
......@@ -242,7 +243,7 @@
ClassId: 0,
OrderId: '',
UserType: 0, //类型 1市场、2顾问、3教师
IsDept: 0, //业绩方式 1部门 2个人
IsCommonDept: 0, //业绩方式 1部门 2个人
},
UserTypeList: [{
Id: 0,
......
......@@ -61,6 +61,10 @@ td .border-b:last-child {
.orderCompleteStatistics td {
color: #000;
}
.el-form-item {
margin-bottom: 7px;
}
</style>
<template>
<div class="page_EasyReport My_table_tell page-body" v-loading="AALloading">
......
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