Commit e4a13a24 authored by zhengke's avatar zhengke

修改

parent 63641538
......@@ -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
......@@ -22,19 +22,24 @@
font-size: 12px;
border: 1px solid #E5E5E5;
}
.Classdel_Div i, .div_RowList i {
.Classdel_Div i,
.div_RowList i {
display: inline-block;
color:red;
color: red;
visibility: hidden;
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>
<template>
<div class="page-body">
......@@ -44,9 +49,23 @@
</q-tabs>
<template v-if="tabCheck=='first'">
<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">
<tr>
<th :colspan="FullClassRateList.length+3" style="width:100px;">社会班教师绩效计算规则(结课发放)</th>
<th :colspan="FullClassRateList.length+3">
社会班教师绩效计算规则(结课发放)
</th>
</tr>
<tr>
<td v-if="dataList.List&&dataList.List.length>0" :rowspan="dataList.List.length+3">平均上课率</td>
......@@ -54,8 +73,26 @@
</tr>
<tr>
<td></td>
<td v-for="(item,index) in FullClassRateList">
<div class="Classdel_Div">{{item.StartValue}}%-{{item.EndValue}}%<i @click="deleCole(index)" class="iconfont icon-shanchu"></i></div>
<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">
......@@ -82,12 +119,30 @@
</td>
</tr>
<tr v-for="(item,index) in dataList.List">
<td>
<td @click="getDataItem(item,index)">
<div class="div_RowList">
{{item.StartValue}}<span v-if="item.StartValue">%</span><span
v-if="item.StartValue&&item.EndValue">-</span>{{item.EndValue}}<span v-if="item.EndValue">%</span>
{{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 v-for="(subItem,subIndex) in item.FullClassList">
{{subItem.ClassMoney}}
......@@ -140,9 +195,15 @@
<script>
import {
SetTeachingRewardsInfo,
GetTeachingRewardsList
GetTeachingRewardsList,
GetTeachingRewardsBaseInfo,
SetTeachingRewardsBase
} from '../../api/reward/index';
import {
GetClassTypePageList
} from '../../api/system/index';
export default {
props: {},
components: {},
......@@ -168,13 +229,33 @@
StartValue: '',
EndValue: '',
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() {},
mounted() {
this.getInfo();
this.getBaseDropInfo();
this.GetClassTypePageList();
},
methods: {
getInfo() {
......@@ -287,54 +368,128 @@
})
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)){
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;
isExist = true
} else {
isExist = false;
}
})
if(!isExist){
if (!isExist) {
x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj)));
}
})
if(!isExist){
if (!isExist) {
this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj)));
}
this.isShowBanMenu=false;
this.isShowBanMenu = false;
},
//删除列
deleCole(index){
this.FullClassRateList.splice(index,1);
this.dataList.List.forEach(x=>{
x.FullClassList.splice(index,1);
deleCole(index) {
this.FullClassRateList.splice(index, 1);
this.dataList.List.forEach(x => {
x.FullClassList.splice(index, 1);
})
console.log(this.dataList,'dataList111');
},
//删除行
deletRow(index){
this.dataList.List.splice(index,1);
deletRow(index) {
this.dataList.List.splice(index, 1);
},
getReset(){
console.log('进入')
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:1,
List:this.dataList.List
Type: 1,
List: this.dataList.List
}
SetTeachingRewardsInfo(msg).then(res => {
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