Commit e4a13a24 authored by zhengke's avatar zhengke

修改

parent 63641538
...@@ -23,4 +23,27 @@ export function SetTeachingRewardsInfo(data) { ...@@ -23,4 +23,27 @@ export function SetTeachingRewardsInfo(data) {
data data
}) })
} }
\ No newline at end of file /**
* 获取下拉数据
* @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 @@ ...@@ -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}}
...@@ -140,9 +195,15 @@ ...@@ -140,9 +195,15 @@
<script> <script>
import { import {
SetTeachingRewardsInfo, SetTeachingRewardsInfo,
GetTeachingRewardsList GetTeachingRewardsList,
GetTeachingRewardsBaseInfo,
SetTeachingRewardsBase
} from '../../api/reward/index'; } from '../../api/reward/index';
import {
GetClassTypePageList
} from '../../api/system/index';
export default { export default {
props: {}, props: {},
components: {}, components: {},
...@@ -168,13 +229,33 @@ ...@@ -168,13 +229,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() {
...@@ -259,7 +340,7 @@ ...@@ -259,7 +340,7 @@
}, },
//添加列 //添加列
addColList() { addColList() {
console.log('来了老弟'); console.log('来了老弟');
if (this.addBanObj.StartValue == '') { if (this.addBanObj.StartValue == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -287,62 +368,136 @@ ...@@ -287,62 +368,136 @@
}) })
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) {
this.$q.notify({ this.$q.notify({
type: 'iconfont icon-chenggong', type: 'iconfont icon-chenggong',
color: 'accent', color: 'accent',
position: "top", position: "top",
message: `保存成功` message: `保存成功`
}) })
this.getInfo(); this.getInfo();
} }
......
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