Commit 76b6a4ad authored by Mac's avatar Mac
parents efcb76a7 e9635060
...@@ -24,3 +24,26 @@ export function SetTeachingRewardsInfo(data) { ...@@ -24,3 +24,26 @@ export function SetTeachingRewardsInfo(data) {
}) })
} }
/**
* 获取下拉数据
* @param {JSON参数} data
*/
export function GetTeachingRewardsBaseInfo(data) {
return request({
url: '/TeachingRewards/GetTeachingRewardsBaseInfo',
method: 'post',
data
})
}
/**
* 保存上面选择学校
* @param {JSON参数} data
*/
export function SetTeachingRewardsBase(data) {
return request({
url: '/TeachingRewards/SetTeachingRewardsBase',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -215,3 +215,15 @@ export function quertClassOrderList(data) { ...@@ -215,3 +215,15 @@ export function quertClassOrderList(data) {
data data
}) })
} }
/**
* 学员退课申请
*
*/
export function SetBackClassApply(data) {
return request({
url: '/order/BackClassApply',
method: 'post',
data
})
}
\ No newline at end of file
<style>
.socialTable {
width: 100%;
border-collapse: collapse;
}
.socialTable tr th {
background: #fff;
height: 40px;
font-size: 14px;
color: #333;
border: 1px solid #E6E6E6
}
.socialTable tr {
background: #fff;
text-align: center;
height: 40px;
}
.socialTable tr td {
font-size: 12px;
border: 1px solid #E5E5E5;
}
.Classdel_Div i,
.div_RowList i {
display: inline-block;
color: red;
visibility: hidden;
cursor: pointer;
margin-left: 3px;
}
.Classdel_Div:hover i {
visibility: visible;
}
.div_RowList:hover i {
visibility: visible;
}
</style>
<template>
<div>
<div class="col" style="display:flex;margin-top:20px;">
<div>
<q-select class="q-pb-lg q-pr-lg" style="width:300px;" multiple clearable filled stack-label use-input use-chips
option-value="CTypeId" option-label="CTypeName" v-model="tempSchool" ref="PostId" :options="DropDownList"
label="班级类型" :dense="false" emit-value map-options>
</q-select>
</div>
<div style="margin-top:15px;">
<q-btn color="accent" size="sm" @click="saveClass()" ref="addBtn" label="保存" />
</div>
</div>
<table class="socialTable">
<tr>
<th :colspan="FullClassRateList.length+4">
社会课时费调账规则
</th>
</tr>
<tr>
<td v-if="dataList.List&&dataList.List.length>0" :rowspan="(dataList.List.length*2)+3">平均上课率</td>
<td :colspan="FullClassRateList.length+3">满班率</td>
</tr>
<tr>
<td colspan="2"></td>
<td v-for="(item,index) in FullClassRateList" @click="getColEdit(item,index)">
<div class="Classdel_Div">{{item.StartValue}}%-{{item.EndValue}}%<i @click="deleCole(index)"
class="iconfont icon-shanchu"></i></div>
<q-popup-proxy>
<q-banner v-if="isShowColEdit">
<div style="width:200px;margin-top:20px;">
<div class="row">
<q-input filled v-model="editObj.StartValue" class="col-5 q-pb-lg" mask="date">
</q-input>
<div style="margin:20px 12px 0">-</div>
<q-input filled v-model="editObj.EndValue" class="col-5 q-pb-lg" mask="date">
</q-input>
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="确认" @click="editManBan()" color="accent q-px-md" style="font-weight:400 !important" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</td>
<td>
<q-btn round size="sm" color="primary" @click="addBanInit()" icon="iconfont icon-img_haha">
<q-popup-proxy>
<q-banner v-if="isShowBanMenu">
<div style="width:250px;">
<div style="margin:10px 0 15px 0;">新增满班率</div>
<q-input filled v-model="addBanObj.StartValue" class="col-6 q-pb-lg"
:rules="[val => !!val || '请填写最小满班率']" mask="date" label="最小满班率">
</q-input>
<q-input filled style="margin-top:10px;" v-model="addBanObj.EndValue" class="col-6 q-pb-lg"
:rules="[val => !!val || '请填写最大满班率']" mask="date" label="最大满班率">
</q-input>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowBanMenu=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="addColList()" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
</td>
</tr>
<template v-for="(item,index) in dataList.List">
<tr>
<td @click="getDataItem(item,index)" rowspan="2">
<div class="div_RowList">
{{item.StartValue}}<span v-if="item.StartValue>=0">%</span><span
v-if="item.StartValue>=0&&item.EndValue>=0">-</span>{{item.EndValue}}<span
v-if="item.EndValue>=0">%</span>
<i @click="deletRow(index)" class="iconfont icon-shanchu"></i>
</div>
<q-popup-proxy>
<q-banner v-if="isShowrowEdit">
<div style="width:200px;margin-top:20px;">
<div class="row">
<q-input filled v-model="editObj.StartValue" class="col-5 q-pb-lg" mask="date">
</q-input>
<div style="margin:20px 12px 0">-</div>
<q-input filled v-model="editObj.EndValue" class="col-5 q-pb-lg" mask="date">
</q-input>
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="确认" @click="editShangke()" color="accent q-px-md"
style="font-weight:400 !important" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</td>
<td>奖励课时费</td>
<td v-for="(subItem,subIndex) in item.FullClassList">
{{subItem.ClassMoney}}
<q-popup-edit v-model.number="subItem.ClassMoney" buttons>
<q-input v-model="subItem.ClassMoney" @change="getReset()" dense autofocus counter />
</q-popup-edit>
</td>
<td></td>
</tr>
<tr>
<td>增加带班人数</td>
<td v-for="(subItem,subIndex) in item.FullClassList">
{{subItem.PeopelNum}}
<q-popup-edit v-model.number="subItem.PeopelNum" buttons>
<q-input v-model="subItem.PeopelNum" @change="getReset()" dense autofocus counter />
</q-popup-edit>
</td>
<td></td>
</tr>
</template>
<tr>
<td>
<q-btn round size="sm" color="primary" @click="addInit()" icon="iconfont icon-img_haha">
<q-popup-proxy>
<q-banner v-if="isShowAddMenu">
<div style="width:250px;">
<div style="margin:10px 0 15px 0;">新增上课率</div>
<q-input filled v-model="addObj.StartValue" class="col-6 q-pb-lg"
:rules="[val => !!val || '请填写最小上课率']" mask="date" label="最小上课率">
</q-input>
<q-input filled style="margin-top:10px;" v-model="addObj.EndValue" class="col-6 q-pb-lg"
:rules="[val => !!val || '请填写最大上课率']" mask="date" label="最大上课率">
</q-input>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowAddMenu=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="addRowList()" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
</td>
<td v-for="(item,index) in FullClassRateList"></td>
<td></td>
<td></td>
</tr>
</table>
<div style="margin-top:20px;text-align:right;">
<q-btn color="accent" size="md" icon="add" @click="saveBonus()" ref="addBtn" label="保存" />
</div>
</div>
</template>
<script>
import {
SetTeachingRewardsInfo,
GetTeachingRewardsList,
GetTeachingRewardsBaseInfo,
SetTeachingRewardsBase
} from '../../api/reward/index';
import {
GetClassTypePageList
} from '../../api/system/index';
export default {
props: {},
components: {},
data() {
return {
tabCheck: 'first', //默认选第一个
dense: false,
msg: {
},
FullClassRateList: [], //头部列数据
dataList: [], //列表数据
isShowAddMenu: false, //显示新增上课率弹出
isShowBanMenu: false, //显示新增满班率
addObj: { //新增上课率
Id: 0,
StartValue: '',
EndValue: '',
FullClassList: []
},
addBanObj: {
Id: 0,
StartValue: '',
EndValue: '',
ClassMoney: "",
PeopelNum: ''
},
editObj: {
StartValue: '',
EndValue: ''
},
CommonIndex: -1,
isShowrowEdit: false,
isShowColEdit: false,
DropDownList: [], //社会班下拉数据
tempSchool: [], //选中的班级
setTeachMsg: {
Id: 0,
Type: 1,
BasicMoney: '',
BasicHour: '',
ClassTypeIds: ''
}
}
},
created() {},
mounted() {
this.getInfo();
this.getBaseDropInfo();
this.GetClassTypePageList();
},
methods: {
getInfo() {
let msg = {
Type: 2
}
GetTeachingRewardsList(msg).then(res => {
console.log(res, '初始数据');
if (res.Code == 1) {
this.dataList = res.Data;
if (this.dataList.FullClassRateList.length > 0) {
this.FullClassRateList = this.dataList.FullClassRateList;
}
}
})
},
//点击添加按钮
addInit() {
this.isShowAddMenu = true;
this.addObj.StartValue = '';
this.addObj.EndValue = '';
},
//添加满班率
addBanInit() {
this.isShowBanMenu = true;
this.addBanObj.StartValue = '';
this.addBanObj.EndValue = '';
},
//添加行
addRowList() {
if (this.addObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小上课率`
})
return;
}
if (this.addObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大上课率`
})
return;
}
if (this.addObj.StartValue == this.addObj.EndValue) {
this.addObj.EndValue = ''
}
if (parseInt(this.addObj.StartValue) > parseInt(this.addObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小上课率不能大于最大上课率`
})
return;
}
for (var i = 0; i < this.dataList.List.length; i++) {
if (this.dataList.List[i].StartValue == this.addObj.StartValue) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小上课值已经存在`
})
return;
}
if (this.dataList.List[i].EndValue == this.addObj.EndValue) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最大上课值已经存在`
})
return;
}
}
this.FullClassRateList.forEach(x => {
x.ClassMoney = ''
this.addObj.FullClassList.push(x);
})
this.dataList.List.push(this.addObj);
this.dataList.List.sort(this.compare("StartValue",true));
this.isShowAddMenu = false;
},
compare(property, desc) {
return function (a, b) {
var value1 = a[property];
var value2 = b[property];
if (desc == true) {
// 升序排列
return value1 - value2;
} else {
// 降序排列
return value2 - value1;
}
}
},
//添加列
addColList() {
console.log('来了老弟');
if (this.addBanObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小满班率`
})
return;
}
if (this.addBanObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大满班率`
})
return;
}
if (this.addBanObj.StartValue == this.addBanObj.EndValue) {
this.addBanObj.EndValue = ''
}
if (parseInt(this.addBanObj.StartValue) > parseInt(this.addBanObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小满班率不能大于最大满班率`
})
return;
}
let isExist = false;
this.dataList.List.forEach(x => {
x.FullClassList.forEach(y => {
console.log(this.addBanObj.StartValue, '---', y.StartValue);
console.log(this.addBanObj.EndValue, '---', y.EndValue);
console.log(parseInt(this.addBanObj.StartValue) > y.StartValue);
console.log(parseInt(this.addBanObj.EndValue) < y.EndValue);
if ((parseInt(this.addBanObj.StartValue) > y.StartValue) && (parseInt(this.addBanObj.EndValue) < y
.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `已经存在交集`
})
isExist = true
} else {
isExist = false;
}
})
if (!isExist) {
x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj)));
}
})
if (!isExist) {
this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj)));
}
this.isShowBanMenu = false;
},
//删除列
deleCole(index) {
this.FullClassRateList.splice(index, 1);
this.dataList.List.forEach(x => {
x.FullClassList.splice(index, 1);
})
},
//删除行
deletRow(index) {
this.dataList.List.splice(index, 1);
},
getReset() {
this.$forceUpdate();
},
getDataItem(item, index) {
this.isShowrowEdit = true;
this.CommonIndex = index;
this.editObj.StartValue = item.StartValue;
this.editObj.EndValue = item.EndValue;
},
//修改上课率和满班率
editShangke() {
this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue;
this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowrowEdit = false;
},
//修改满班率
getColEdit(item, index) {
this.isShowColEdit = true;
this.CommonIndex = index;
this.editObj.StartValue = item.StartValue;
this.editObj.EndValue = item.EndValue;
},
//保存修改满班率
editManBan() {
this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue;
this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowColEdit = false;
this.dataList.List.forEach(x => {
x.FullClassList.forEach((y, index) => {
if (index == this.CommonIndex) {
y.StartValue = parseInt(this.editObj.StartValue);
y.EndValue = parseInt(this.editObj.EndValue)
}
})
})
},
//获取设置数据
getBaseDropInfo() {
let msg = {
Type: 1
}
GetTeachingRewardsBaseInfo(msg).then(res => {
if (res.Code == 1) {
console.log(res, '数据');
this.setTeachMsg.Id = res.Data.Id;
this.setTeachMsg.BasicMoney = res.Data.BasicMoney;
this.setTeachMsg.BasicHour = res.Data.BasicHour;
}
})
},
//获取班级类型列表数据
GetClassTypePageList() {
let msg = {
pageIndex: 1,
pageSize: 999
};
GetClassTypePageList(msg).then(res => {
if (res.Code == 1) {
this.DropDownList = res.Data.PageData;
}
})
},
//保存上部
saveClass() {
this.setTeachMsg.ClassTypeIds = this.tempSchool.toString();
SetTeachingRewardsBase(this.setTeachMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
type: 'iconfont icon-chenggong',
color: 'accent',
position: "top",
message: `保存成功`
})
}
})
},
//保存奖金设置
saveBonus() {
let msg = {
Type: 2,
List: this.dataList.List
}
SetTeachingRewardsInfo(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
type: 'iconfont icon-chenggong',
color: 'accent',
position: "top",
message: `保存成功`
})
this.getInfo();
}
})
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass');
</style>
<!--退课申请-->
<template>
<q-dialog v-model="IsShowBackClassDialog" content-class="bg-grey-1" persistent transition-show="scale"
transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">退课申请</div>
</q-card-section>
<q-table :loading="loading" no-data-label="暂无相关学员数据" flat class="sticky-column-table" separator="none"
:data="studentList" :columns="columns" hide-bottom row-key="Id">
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div style="min-width:190px;width:100%">
<q-btn v-if="props.row.GuestState==1" flat size="xs" icon="iconfont icon-shenhe" color="info"
style="font-weight:400" class="q-mr-xs" label="申请" @click="clickItem(props.row,1)" />
<q-btn v-if="props.row.AuditStatus==3" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
style="font-weight:400" class="q-mr-xs" label="重新申请" @click="clickItem(props.row,2)" />
</div>
</q-td>
</template>
</q-table>
<q-input filled stack-label :dense="false" v-model="applyReason" style="margin-top: 20px" type="textarea"
class="col-12" label="申请理由" />
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeBackClassForm" />
<q-btn label="确认申请" color="accent" class="q-px-md" style="font-weight:400 !important"
@click="saveOrderBackClass" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
getOrderGuestPageList,
SetBackClassApply
} from '../../api/sale/sale'
export default {
name: "backclass-form",
props: {
saveObj: {
type: Object,
default: null,
},
},
data() {
return {
IsShowBackClassDialog: true,
backClassMsg: {
OrderId: 0,
ClassId: 0,
pageIndex: 1,
pageSize: 1000,
},
applyReason: "", //申请理由
loading: false,
columns: [{
name: 'GuestName',
label: '姓名',
field: 'GuestName',
align: 'left',
},
{
name: 'SexStr',
label: '性别',
field: 'SexStr',
align: 'left',
},
{
name: 'Age',
label: '年龄',
field: 'Age',
align: 'left',
},
{
name: 'Mobile',
label: '联系电话',
align: 'left',
field: 'Mobile'
},
{
name: 'ClassHours',
label: '已上课时',
field: 'ClassHours',
align: 'left',
},
{
name: 'GuestStateStr',
label: '状态',
field: 'GuestStateStr',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'Id'
}
],
studentList: [], //学员列表
chooseItem: {}, //当前选择项
}
},
created() {
this.backClassMsg.OrderId = this.saveObj.OrderId;
this.backClassMsg.ClassId = this.saveObj.ClassId;
this.getStudentList();
},
methods: {
//当前点击项
clickItem(item, type) {
this.chooseItem = item;
},
//关闭弹窗
closeBackClassForm() {
this.IsShowBackClassDialog = false;
this.applyReason = "";
this.backClassMsg.OrderId = 0;
this.backClassMsg.ClassId = 0;
this.chooseItem = {};
this.$emit('close');
},
//获取订单学员列表
getStudentList() {
this.studentList = [];
getOrderGuestPageList(this.backClassMsg).then(res => {
if (res.Code == 1) {
this.studentList = res.Data.PageData;
}
})
},
//获取学员退课申请
saveOrderBackClass() {
var applyMsg = {
GuestId: this.chooseItem.Id,
OrderId: this.chooseItem.OrderId,
applyReason: this.applyReason
};
if (!applyMsg.GuestId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择要申请的学员`
})
return;
}
console.log("item", applyMsg);
SetBackClassApply(applyMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '修改成功!',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
this.IsShowBackClassDialog = false
}
})
}
}
}
</script>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</q-item> </q-item>
<q-item clickable v-close-popup> <q-item clickable v-close-popup>
<q-item-section> <q-item-section>
<q-item-label>退课</q-item-label> <q-item-label @click="showBackClassForm(item)">退课</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
...@@ -204,11 +204,13 @@ ...@@ -204,11 +204,13 @@
<div class="col"> <div class="col">
<div class="row" style="justify-content: space-between"> <div class="row" style="justify-content: space-between">
<span>收款单据:</span> <span>收款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,1)"/> <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="chanceType(item,1)" />
</div> </div>
<div class="row wrap" > <div class="row wrap">
<div class="finance row" v-for="(x,j) in item.FinanceList" :index="j" :style="{ <div class="finance row" v-for="(x,j) in item.FinanceList" :index="j"
:style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')), background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}"> color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span> <span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
...@@ -216,10 +218,12 @@ ...@@ -216,10 +218,12 @@
</div> </div>
<div class="row" style="justify-content: space-between"> <div class="row" style="justify-content: space-between">
<span>付款单据:</span> <span>付款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,2)"/> <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="chanceType(item,2)" />
</div> </div>
<div class="row wrap" > <div class="row wrap">
<div class="finance row" v-for="(x,j) in item.RefundFinanceList" :index="j" :style="{ <div class="finance row" v-for="(x,j) in item.RefundFinanceList" :index="j"
:style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')), background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}"> color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span> <span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
...@@ -272,41 +276,6 @@ ...@@ -272,41 +276,6 @@
<q-item-label>学生名单</q-item-label> <q-item-label>学生名单</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup>
<q-item-section @click="transferOrder(item)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,1)">
<q-item-label>销售备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,2)">
<q-item-label>教务备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,3)">
<q-item-label>校长备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,4)">
<q-item-label>经理备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="CancelOrder(item)">
<q-item-label>取消</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section>
<q-item-label>退课</q-item-label>
</q-item-section>
</q-item>
</q-list> </q-list>
</q-btn-dropdown> </q-btn-dropdown>
</td> </td>
...@@ -425,11 +394,13 @@ ...@@ -425,11 +394,13 @@
<div class="col"> <div class="col">
<div class="row" style="justify-content: space-between"> <div class="row" style="justify-content: space-between">
<span>收款单据:</span> <span>收款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,1)"/> <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="chanceType(item,1)" />
</div> </div>
<div class="row wrap" > <div class="row wrap">
<div class="finance row" v-for="(x,j) in item.FinanceList" :index="j" :style="{ <div class="finance row" v-for="(x,j) in item.FinanceList" :index="j"
:style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')), background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}"> color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span> <span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
...@@ -437,10 +408,12 @@ ...@@ -437,10 +408,12 @@
</div> </div>
<div class="row" style="justify-content: space-between"> <div class="row" style="justify-content: space-between">
<span>付款单据:</span> <span>付款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,2)"/> <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="chanceType(item,2)" />
</div> </div>
<div class="row wrap" > <div class="row wrap">
<div class="finance row" v-for="(x,j) in item.RefundFinanceList" :index="j" :style="{ <div class="finance row" v-for="(x,j) in item.RefundFinanceList" :index="j"
:style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')), background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}"> color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span> <span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
...@@ -465,9 +438,13 @@ ...@@ -465,9 +438,13 @@
<transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm" <transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm"
@success="refreshClassOrder"></transOrder-form> @success="refreshClassOrder"></transOrder-form>
<myOrder-form v-if="isShowmyorderForm" :save-obj="myorderObjOption" @close="closeMOSaveForm"></myOrder-form> <myOrder-form v-if="isShowmyorderForm" :save-obj="myorderObjOption" @close="closeMOSaveForm"></myOrder-form>
<!-- 班级详情--> <!--班级详情-->
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshClass"></classinfo-form> <classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshClass">
</classinfo-form>
<!--退课申请-->
<backclass-form v-if="isShowBackClassForm" :save-obj="orderObj" @close="closeBackClassForm"
@success="refreshClassOrder"></backclass-form>
</div> </div>
</template> </template>
...@@ -475,6 +452,7 @@ ...@@ -475,6 +452,7 @@
import editorderForm from '../sale/editorder-form' //修改订单 import editorderForm from '../sale/editorder-form' //修改订单
import orderremarkForm from '../sale/orderremark-form' //订单备注 import orderremarkForm from '../sale/orderremark-form' //订单备注
import transOrderForm from '../sale/transOrder-form' //转交订单 import transOrderForm from '../sale/transOrder-form' //转交订单
import backclassForm from '../sale/backclass-form' //退课申请
import { import {
cancelClassOrder, //取消订单 cancelClassOrder, //取消订单
} from '../../api/sale/sale' } from '../../api/sale/sale'
...@@ -487,7 +465,8 @@ ...@@ -487,7 +465,8 @@
orderremarkForm, orderremarkForm,
transOrderForm, transOrderForm,
myOrderForm, myOrderForm,
classinfoForm classinfoForm,
backclassForm
}, },
props: { props: {
//正常订单 //正常订单
...@@ -506,64 +485,73 @@ ...@@ -506,64 +485,73 @@
isShowEditOrderForm: false, //是否显示订单修改 isShowEditOrderForm: false, //是否显示订单修改
isShowRemarkOrderForm: false, //是否线下修改订单备注 isShowRemarkOrderForm: false, //是否线下修改订单备注
isShowTransOrderForm: false, //是否显示转交订单 isShowTransOrderForm: false, //是否显示转交订单
isShowBackClassForm: false, //是否显示退课申请
orderObj: {}, //订单信息 orderObj: {}, //订单信息
isShowCancel: false, //是否显示取消订单 isShowCancel: false, //是否显示取消订单
remarkType: 0, //备注类型 remarkType: 0, //备注类型
isShowmyorderForm:false,//显示详情 isShowmyorderForm: false, //显示详情
myorderObjOption:{},//详情的数据 myorderObjOption: {}, //详情的数据
classObjOption: null, classObjOption: null,
isShowClassInfo: false, //是否显示课程信息 isShowClassInfo: false, //是否显示课程信息
} }
}, },
created() { created() {},
},
mounted() { mounted() {
}, },
methods: { methods: {
getOrderFinanceList(msg,type){ //显示退课申请
showBackClassForm(item) {
this.apipost('sellorder_post_GetOrderFinanceListForEdu',{OrderIds:msg},res=>{ this.orderObj = item;
if(res.data.resultCode===1){ this.isShowBackClassForm = true;
},
//关闭退课申请
closeBackClassForm() {
this.orderObj = {};
this.isShowBackClassForm = false;
},
//获取财务单据
getOrderFinanceList(msg, type) {
this.apipost('sellorder_post_GetOrderFinanceListForEdu', {
OrderIds: msg
}, res => {
if (res.data.resultCode === 1) {
let data = res.data.data; let data = res.data.data;
if(type==1){ if (type == 1) {
if(this.dataList){ if (this.dataList) {
this.dataList.forEach(x=>{ this.dataList.forEach(x => {
data.forEach(j=>{ data.forEach(j => {
if(x.OrderId == j.OrderId){ if (x.OrderId == j.OrderId) {
x.FinanceList = j.FinanceList x.FinanceList = j.FinanceList
x.RefundFinanceList = j.RefundFinanceList x.RefundFinanceList = j.RefundFinanceList
} }
}) })
}) })
} }
} else if (type == 2) {
}else if(type==2){ if (this.cancelList.length > 0) {
if(this.cancelList.length>0){ this.cancelList.forEach(x => {
this.cancelList.forEach(x=>{ data.forEach(j => {
data.forEach(j=>{ if (x.OrderId == j.OrderId) {
if(x.OrderId == j.OrderId){
x.FinanceList = j.FinanceList x.FinanceList = j.FinanceList
x.RefundFinanceList = j.RefundFinanceList x.RefundFinanceList = j.RefundFinanceList
} }
}) })
}) })
} }
} }
this.$forceUpdate() this.$forceUpdate()
}else{ } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
},err=>{}) }, err => {})
}, },
goOrderdetails(item,tab){ goOrderdetails(item, tab) {
item.tab=tab item.tab = tab
this.myorderObjOption= item; this.myorderObjOption = item;
this.isShowmyorderForm = true; this.isShowmyorderForm = true;
}, },
closeMOSaveForm(){ closeMOSaveForm() {
this.isShowmyorderForm = false; this.isShowmyorderForm = false;
}, },
//订单转交 //订单转交
...@@ -638,29 +626,29 @@ ...@@ -638,29 +626,29 @@
}); });
}, },
chanceType(obj,type){ chanceType(obj, type) {
let TCIDARR=[] let TCIDARR = []
TCIDARR.push(obj.ClassId) TCIDARR.push(obj.ClassId)
let orderObj = { let orderObj = {
OrderID:obj.OrderId, OrderID: obj.OrderId,
OrderSource:17, OrderSource: 17,
Obj: {}, Obj: {},
SourceID:0, SourceID: 0,
TCIDList: TCIDARR TCIDList: TCIDARR
} }
this.$router.push({ this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments', path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
query:{ query: {
"Type":type, "Type": type,
"companyID":this.getLocalStorage().School_Id, "companyID": this.getLocalStorage().School_Id,
"path": "", "path": "",
'blank':'y', 'blank': 'y',
'orderObj':JSON.stringify(orderObj), 'orderObj': JSON.stringify(orderObj),
'tradeWay':obj.tradeWay, 'tradeWay': obj.tradeWay,
} }
}); });
}, },
getClassInfo(obj) {//打开班级详情组件 getClassInfo(obj) { //打开班级详情组件
this.classObjOption = obj; this.classObjOption = obj;
this.isShowClassInfo = true; this.isShowClassInfo = true;
}, },
...@@ -674,35 +662,75 @@ ...@@ -674,35 +662,75 @@
}, },
} }
} }
</script> </script>
<style > <style>
li{ li {
list-style-type:none ; list-style-type: none;
}
.classorder ul {
padding: 0px
}
.classorder .price-popup {
border-radius: 4px;
} }
.classorder ul{padding: 0px}
.classorder .price-popup{border-radius: 4px;}
.classorder .el-range-editor .el-range-input { .classorder .el-range-editor .el-range-input {
background: none; background: none;
} }
.classorder .el-range-editor.el-input__inner { .classorder .el-range-editor.el-input__inner {
background-color: transparent; background-color: transparent;
} }
.classorder .q-mb-md{
.classorder .q-mb-md {
margin-bottom: 0; margin-bottom: 0;
} }
.classorder .stics{padding:10px 20px;background: #DDDEE0;border-radius: 4px;font-size: 14px;color: #000000;font-weight: bold}
.classorder .stics .stics-name{color: #2D2D2D;font-weight: 600;margin-right: 10px} .classorder .stics {
.classorder .tis {margin:10px 0;align-items: center} padding: 10px 20px;
.classorder .tis .tis-k{width: 10px;height: 10px;margin-right: 8px} background: #DDDEE0;
.classorder .tis span{font-size: 14px;color: #2D2D2D;font-weight: 600;margin-right: 20px} border-radius: 4px;
font-size: 14px;
color: #000000;
font-weight: bold
}
.classorder .stics .stics-name {
color: #2D2D2D;
font-weight: 600;
margin-right: 10px
}
.classorder .tis {
margin: 10px 0;
align-items: center
}
.classorder .tis .tis-k {
width: 10px;
height: 10px;
margin-right: 8px
}
.classorder .tis span {
font-size: 14px;
color: #2D2D2D;
font-weight: 600;
margin-right: 20px
}
.classorder table { .classorder table {
padding: 10px 0 ; padding: 10px 0;
width: 100%; width: 100%;
background-color: #ededed; background-color: #ededed;
border-collapse: collapse; border-collapse: collapse;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
font-size: 12px; font-size: 12px;
} }
.classorder table th { .classorder table th {
background-color: #ededed; background-color: #ededed;
height: 34px; height: 34px;
...@@ -746,6 +774,7 @@ ...@@ -746,6 +774,7 @@
.classorder table tr._color_666 th { .classorder table tr._color_666 th {
padding: 9px 15px; padding: 9px 15px;
} }
.classorder .enrollTotalSearchTable { .classorder .enrollTotalSearchTable {
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
...@@ -754,6 +783,7 @@ ...@@ -754,6 +783,7 @@
border-right: 1px solid #cccccc; border-right: 1px solid #cccccc;
border-collapse: collapse; border-collapse: collapse;
} }
.classorder .enrollTotalSearchTable tr { .classorder .enrollTotalSearchTable tr {
/* border-bottom: 2px solid #333; */ /* border-bottom: 2px solid #333; */
} }
...@@ -798,11 +828,13 @@ ...@@ -798,11 +828,13 @@
.classorder .enrollTotalSearchTable tr td p { .classorder .enrollTotalSearchTable tr td p {
line-height: 20px; line-height: 20px;
} }
.classorder .remarks{
.classorder .remarks {
font-size: 14px; font-size: 14px;
color: #2D2D2D; color: #2D2D2D;
} }
.classorder .remarks-b{
.classorder .remarks-b {
width: 100%; width: 100%;
height: 94px; height: 94px;
background: #F0F5FB; background: #F0F5FB;
...@@ -812,22 +844,29 @@ ...@@ -812,22 +844,29 @@
color: #999999; color: #999999;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
display:-webkit-box; display: -webkit-box;
line-height: 20px; line-height: 20px;
-webkit-line-clamp:4; -webkit-line-clamp: 4;
-webkit-box-orient:vertical ; -webkit-box-orient: vertical;
} }
.classorder .remarks-b-b{
text-align: right;position: absolute;right: 0px;bottom: 0px .classorder .remarks-b-b {
text-align: right;
position: absolute;
right: 0px;
bottom: 0px
} }
.classorder .on-left{
.classorder .on-left {
margin-right: 5px; margin-right: 5px;
} }
.classorder .finance{
.classorder .finance {
padding: 1px 10px; padding: 1px 10px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 4px; border-radius: 4px;
margin: 5px 3px 3px 0; margin: 5px 3px 3px 0;
} }
</style> </style>
...@@ -22,19 +22,24 @@ ...@@ -22,19 +22,24 @@
font-size: 12px; font-size: 12px;
border: 1px solid #E5E5E5; border: 1px solid #E5E5E5;
} }
.Classdel_Div i, .div_RowList i {
.Classdel_Div i,
.div_RowList i {
display: inline-block; display: inline-block;
color:red; color: red;
visibility: hidden; visibility: hidden;
cursor: pointer; cursor: pointer;
margin-left:3px; margin-left: 3px;
} }
.Classdel_Div:hover i{
visibility:visible; .Classdel_Div:hover i {
visibility: visible;
} }
.div_RowList:hover i{
visibility:visible; .div_RowList:hover i {
visibility: visible;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -44,9 +49,23 @@ ...@@ -44,9 +49,23 @@
</q-tabs> </q-tabs>
<template v-if="tabCheck=='first'"> <template v-if="tabCheck=='first'">
<div style="margin-top:20px;"> <div style="margin-top:20px;">
<div class="col" style="display:flex;">
<div>
<q-select class="q-pb-lg q-pr-lg" style="width:300px;" multiple clearable filled stack-label use-input use-chips
option-value="CTypeId" option-label="CTypeName" v-model="tempSchool" ref="PostId" :options="DropDownList"
label="班级类型" :dense="false" emit-value map-options>
</q-select>
</div>
<div style="margin-top:15px;">
<q-btn color="accent" size="sm" @click="saveClass()" ref="addBtn" label="保存" />
</div>
</div>
<table class="socialTable"> <table class="socialTable">
<tr> <tr>
<th :colspan="FullClassRateList.length+3" style="width:100px;">社会班教师绩效计算规则(结课发放)</th> <th :colspan="FullClassRateList.length+3">
社会班教师绩效计算规则(结课发放)
</th>
</tr> </tr>
<tr> <tr>
<td v-if="dataList.List&&dataList.List.length>0" :rowspan="dataList.List.length+3">平均上课率</td> <td v-if="dataList.List&&dataList.List.length>0" :rowspan="dataList.List.length+3">平均上课率</td>
...@@ -54,8 +73,26 @@ ...@@ -54,8 +73,26 @@
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td v-for="(item,index) in FullClassRateList"> <td v-for="(item,index) in FullClassRateList" @click="getColEdit(item,index)">
<div class="Classdel_Div">{{item.StartValue}}%-{{item.EndValue}}%<i @click="deleCole(index)" class="iconfont icon-shanchu"></i></div> <div class="Classdel_Div">{{item.StartValue}}%-{{item.EndValue}}%<i @click="deleCole(index)"
class="iconfont icon-shanchu"></i></div>
<q-popup-proxy>
<q-banner v-if="isShowColEdit">
<div style="width:200px;margin-top:20px;">
<div class="row">
<q-input filled v-model="editObj.StartValue" class="col-5 q-pb-lg" mask="date">
</q-input>
<div style="margin:20px 12px 0">-</div>
<q-input filled v-model="editObj.EndValue" class="col-5 q-pb-lg" mask="date">
</q-input>
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="确认" @click="editManBan()" color="accent q-px-md"
style="font-weight:400 !important" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</td> </td>
<td> <td>
<q-btn round size="sm" color="primary" @click="addBanInit()" icon="iconfont icon-img_haha"> <q-btn round size="sm" color="primary" @click="addBanInit()" icon="iconfont icon-img_haha">
...@@ -82,12 +119,30 @@ ...@@ -82,12 +119,30 @@
</td> </td>
</tr> </tr>
<tr v-for="(item,index) in dataList.List"> <tr v-for="(item,index) in dataList.List">
<td> <td @click="getDataItem(item,index)">
<div class="div_RowList"> <div class="div_RowList">
{{item.StartValue}}<span v-if="item.StartValue">%</span><span {{item.StartValue}}<span v-if="item.StartValue>=0">%</span><span
v-if="item.StartValue&&item.EndValue">-</span>{{item.EndValue}}<span v-if="item.EndValue">%</span> v-if="item.StartValue>=0&&item.EndValue>=0">-</span>{{item.EndValue}}<span
v-if="item.EndValue>=0">%</span>
<i @click="deletRow(index)" class="iconfont icon-shanchu"></i> <i @click="deletRow(index)" class="iconfont icon-shanchu"></i>
</div> </div>
<q-popup-proxy>
<q-banner v-if="isShowrowEdit">
<div style="width:200px;margin-top:20px;">
<div class="row">
<q-input filled v-model="editObj.StartValue" class="col-5 q-pb-lg" mask="date">
</q-input>
<div style="margin:20px 12px 0">-</div>
<q-input filled v-model="editObj.EndValue" class="col-5 q-pb-lg" mask="date">
</q-input>
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="确认" @click="editShangke()" color="accent q-px-md"
style="font-weight:400 !important" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</td> </td>
<td v-for="(subItem,subIndex) in item.FullClassList"> <td v-for="(subItem,subIndex) in item.FullClassList">
{{subItem.ClassMoney}} {{subItem.ClassMoney}}
...@@ -132,7 +187,7 @@ ...@@ -132,7 +187,7 @@
</template> </template>
<template v-if="tabCheck=='second'"> <template v-if="tabCheck=='second'">
<div> <div>
<classFee></classFee>
</div> </div>
</template> </template>
</div> </div>
...@@ -140,12 +195,22 @@ ...@@ -140,12 +195,22 @@
<script> <script>
import { import {
SetTeachingRewardsInfo, SetTeachingRewardsInfo,
GetTeachingRewardsList GetTeachingRewardsList,
GetTeachingRewardsBaseInfo,
SetTeachingRewardsBase
} from '../../api/reward/index'; } from '../../api/reward/index';
import {
GetClassTypePageList
} from '../../api/system/index';
import classFee from '../../components/course/classFee'
export default { export default {
props: {}, props: {},
components: {}, components: {
classFee
},
data() { data() {
return { return {
tabCheck: 'first', //默认选第一个 tabCheck: 'first', //默认选第一个
...@@ -168,13 +233,33 @@ ...@@ -168,13 +233,33 @@
StartValue: '', StartValue: '',
EndValue: '', EndValue: '',
ClassMoney: "", ClassMoney: "",
PeopelNum:0 PeopelNum: 0
},
editObj: {
StartValue: '',
EndValue: ''
},
CommonIndex: -1,
isShowrowEdit: false,
isShowColEdit: false,
DropDownList:[], //社会班下拉数据
tempSchool:[], //选中的班级
setTeachMsg:{
Id:0,
Type:1,
BasicMoney:'',
BasicHour:'',
ClassTypeIds:''
} }
} }
}, },
created() {}, created() {},
mounted() { mounted() {
this.getInfo(); this.getInfo();
this.getBaseDropInfo();
this.GetClassTypePageList();
}, },
methods: { methods: {
getInfo() { getInfo() {
...@@ -287,54 +372,128 @@ ...@@ -287,54 +372,128 @@
}) })
return; return;
} }
let isExist=false; let isExist = false;
this.dataList.List.forEach(x=>{ this.dataList.List.forEach(x => {
x.FullClassList.forEach(y=>{ x.FullClassList.forEach(y => {
console.log(this.addBanObj.StartValue,'---',y.StartValue); console.log(this.addBanObj.StartValue, '---', y.StartValue);
console.log(this.addBanObj.EndValue,'---',y.EndValue); console.log(this.addBanObj.EndValue, '---', y.EndValue);
console.log(parseInt(this.addBanObj.StartValue)>y.StartValue); console.log(parseInt(this.addBanObj.StartValue) > y.StartValue);
console.log(parseInt(this.addBanObj.EndValue)<y.EndValue); console.log(parseInt(this.addBanObj.EndValue) < y.EndValue);
if((parseInt(this.addBanObj.StartValue)>y.StartValue)&&(parseInt(this.addBanObj.EndValue)<y.EndValue)){ if ((parseInt(this.addBanObj.StartValue) > y.StartValue) && (parseInt(this.addBanObj.EndValue) < y
.EndValue)) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `已经存在交集` message: `已经存在交集`
}) })
isExist=true isExist = true
}else{ } else {
isExist=false; isExist = false;
} }
}) })
if(!isExist){ if (!isExist) {
x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj))); x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj)));
} }
}) })
if(!isExist){ if (!isExist) {
this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj))); this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj)));
} }
this.isShowBanMenu=false; this.isShowBanMenu = false;
}, },
//删除列 //删除列
deleCole(index){ deleCole(index) {
this.FullClassRateList.splice(index,1); this.FullClassRateList.splice(index, 1);
this.dataList.List.forEach(x=>{ this.dataList.List.forEach(x => {
x.FullClassList.splice(index,1); x.FullClassList.splice(index, 1);
}) })
console.log(this.dataList,'dataList111');
}, },
//删除行 //删除行
deletRow(index){ deletRow(index) {
this.dataList.List.splice(index,1); this.dataList.List.splice(index, 1);
}, },
getReset(){ getReset() {
console.log('进入')
this.$forceUpdate(); this.$forceUpdate();
}, },
getDataItem(item, index) {
this.isShowrowEdit = true;
this.CommonIndex = index;
this.editObj.StartValue = item.StartValue;
this.editObj.EndValue = item.EndValue;
},
//修改上课率和满班率
editShangke() {
this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue;
this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowrowEdit = false;
},
//修改满班率
getColEdit(item,index){
this.isShowColEdit=true;
this.CommonIndex = index;
this.editObj.StartValue = item.StartValue;
this.editObj.EndValue = item.EndValue;
},
//保存修改满班率
editManBan(){
this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue;
this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowColEdit=false;
this.dataList.List.forEach(x=>{
x.FullClassList.forEach((y,index)=>{
if(index==this.CommonIndex){
y.StartValue = parseInt(this.editObj.StartValue);
y.EndValue = parseInt(this.editObj.EndValue)
}
})
})
},
//获取设置数据
getBaseDropInfo(){
let msg = {
Type:1
}
GetTeachingRewardsBaseInfo(msg).then(res => {
if (res.Code == 1) {
console.log(res,'数据');
this.setTeachMsg.Id = res.Data.Id;
this.setTeachMsg.BasicMoney = res.Data.BasicMoney;
this.setTeachMsg.BasicHour = res.Data.BasicHour;
}
})
},
//获取班级类型列表数据
GetClassTypePageList() {
let msg = {
pageIndex: 1,
pageSize: 999
};
GetClassTypePageList(msg).then(res => {
if (res.Code == 1) {
this.DropDownList = res.Data.PageData;
}
})
},
//保存上部
saveClass(){
this.setTeachMsg.ClassTypeIds = this.tempSchool.toString();
SetTeachingRewardsBase(this.setTeachMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
type: 'iconfont icon-chenggong',
color: 'accent',
position: "top",
message: `保存成功`
})
}
})
},
//保存奖金设置 //保存奖金设置
saveBonus() { saveBonus() {
let msg = { let msg = {
Type:1, Type: 1,
List:this.dataList.List List: this.dataList.List
} }
SetTeachingRewardsInfo(msg).then(res => { SetTeachingRewardsInfo(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
......
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