Commit f5e12f1d authored by zhengke's avatar zhengke

修改

parent 63473145
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</th> </th>
</tr> </tr>
<tr> <tr>
<td v-if="dataList.List&&dataList.List.length>0" :rowspan="(dataList.List.length*2)+3">平均上课率</td> <td style="width:200px;" v-if="dataList.List&&dataList.List.length>0" :rowspan="(dataList.List.length*2)+3">平均上课率</td>
<td :colspan="FullClassRateList.length+3">满班率</td> <td :colspan="FullClassRateList.length+3">满班率</td>
</tr> </tr>
<tr> <tr>
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
</q-input> </q-input>
</div> </div>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowColEdit=false"
style="font-weight:400 !important" />
<q-btn label="确认" @click="editManBan()" color="accent q-px-md" style="font-weight:400 !important" /> <q-btn label="确认" @click="editManBan()" color="accent q-px-md" style="font-weight:400 !important" />
</q-card-actions> </q-card-actions>
</div> </div>
...@@ -413,6 +415,48 @@ ...@@ -413,6 +415,48 @@
}, },
//修改上课率和满班率 //修改上课率和满班率
editShangke() { editShangke() {
if (this.editObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小上课率`
})
return;
}
if (this.editObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大上课率`
})
return;
}
if (this.editObj.StartValue == this.editObj.EndValue) {
this.editObj.EndValue = ''
}
if (parseInt(this.editObj.StartValue) > parseInt(this.editObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小满班率不能大于最大满班率`
})
return;
}
let NewArr = JSON.parse(JSON.stringify(this.dataList.List));
NewArr.splice(this.CommonIndex,1);
for (var i = 0; i < NewArr.length; i++) {
if (((parseInt(this.editObj.StartValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.StartValue) <= NewArr[i].EndValue)) ||
((parseInt(this.editObj.EndValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.EndValue) <= NewArr[i].EndValue))) {
this.$q.notify({
type: 'negative',
position: "top",
message: `已经存在交集`
})
return;
}
}
this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue; this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue;
this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue; this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowrowEdit = false; this.isShowrowEdit = false;
...@@ -426,6 +470,48 @@ ...@@ -426,6 +470,48 @@
}, },
//保存修改满班率 //保存修改满班率
editManBan() { editManBan() {
if (this.editObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小满班率`
})
return;
}
if (this.editObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大满班率`
})
return;
}
if (this.editObj.StartValue == this.editObj.EndValue) {
this.editObj.EndValue = ''
}
if (parseInt(this.editObj.StartValue) > parseInt(this.editObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小满班率不能大于最大满班率`
})
return;
}
let NewArr = JSON.parse(JSON.stringify(this.FullClassRateList));
NewArr.splice(this.CommonIndex,1);
for (var i = 0; i < NewArr.length; i++) {
if (((parseInt(this.editObj.StartValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.StartValue) <= NewArr[i].EndValue)) ||
((parseInt(this.editObj.EndValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.EndValue) <= NewArr[i].EndValue))) {
this.$q.notify({
type: 'negative',
position: "top",
message: `已经存在交集`
})
return;
}
}
this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue; this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue;
this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue; this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowColEdit = false; this.isShowColEdit = false;
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</th> </th>
</tr> </tr>
<tr> <tr>
<td v-if="dataList.List&&dataList.List.length>0" :rowspan="dataList.List.length+3">平均上课率</td> <td style="width:200px;" v-if="dataList.List&&dataList.List.length>0" :rowspan="dataList.List.length+3">平均上课率</td>
<td :colspan="FullClassRateList.length+2">满班率</td> <td :colspan="FullClassRateList.length+2">满班率</td>
</tr> </tr>
<tr> <tr>
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
</q-input> </q-input>
</div> </div>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowColEdit=false"
style="font-weight:400 !important" />
<q-btn label="确认" @click="editManBan()" color="accent q-px-md" <q-btn label="确认" @click="editManBan()" color="accent q-px-md"
style="font-weight:400 !important" /> style="font-weight:400 !important" />
</q-card-actions> </q-card-actions>
...@@ -119,7 +121,7 @@ ...@@ -119,7 +121,7 @@
</td> </td>
</tr> </tr>
<tr v-for="(item,index) in dataList.List"> <tr v-for="(item,index) in dataList.List">
<td @click="getDataItem(item,index)"> <td @click="getDataItem(item,index)" style="width:200px;">
<div class="div_RowList"> <div class="div_RowList">
{{item.StartValue}}<span v-if="item.StartValue>=0">%</span><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.StartValue>=0&&item.EndValue>=0">-</span>{{item.EndValue}}<span
...@@ -267,7 +269,6 @@ ...@@ -267,7 +269,6 @@
Type: 1 Type: 1
} }
GetTeachingRewardsList(msg).then(res => { GetTeachingRewardsList(msg).then(res => {
console.log(res, '数据');
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
if (this.dataList.FullClassRateList.length > 0) { if (this.dataList.FullClassRateList.length > 0) {
...@@ -355,7 +356,6 @@ ...@@ -355,7 +356,6 @@
}, },
//添加列 //添加列
addColList() { addColList() {
console.log('来了老弟');
if (this.addBanObj.StartValue == '') { if (this.addBanObj.StartValue == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
} }
} }
this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj))); this.FullClassRateList.push(JSON.parse(JSON.stringify(this.addBanObj)));
this.dataList.List.forEach(x=>{ this.dataList.List.forEach(x => {
x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj))); x.FullClassList.push(JSON.parse(JSON.stringify(this.addBanObj)));
}) })
this.isShowBanMenu = false; this.isShowBanMenu = false;
...@@ -425,6 +425,48 @@ ...@@ -425,6 +425,48 @@
}, },
//修改上课率和满班率 //修改上课率和满班率
editShangke() { editShangke() {
if (this.editObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小上课率`
})
return;
}
if (this.editObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大上课率`
})
return;
}
if (this.editObj.StartValue == this.editObj.EndValue) {
this.editObj.EndValue = ''
}
if (parseInt(this.editObj.StartValue) > parseInt(this.editObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小满班率不能大于最大满班率`
})
return;
}
let NewArr = JSON.parse(JSON.stringify(this.dataList.List));
NewArr.splice(this.CommonIndex,1);
for (var i = 0; i < NewArr.length; i++) {
if (((parseInt(this.editObj.StartValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.StartValue) <= NewArr[i].EndValue)) ||
((parseInt(this.editObj.EndValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.EndValue) <= NewArr[i].EndValue))) {
this.$q.notify({
type: 'negative',
position: "top",
message: `已经存在交集`
})
return;
}
}
this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue; this.dataList.List[this.CommonIndex].StartValue = this.editObj.StartValue;
this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue; this.dataList.List[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowrowEdit = false; this.isShowrowEdit = false;
...@@ -438,6 +480,48 @@ ...@@ -438,6 +480,48 @@
}, },
//保存修改满班率 //保存修改满班率
editManBan() { editManBan() {
if (this.editObj.StartValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最小满班率`
})
return;
}
if (this.editObj.EndValue == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写最大满班率`
})
return;
}
if (this.editObj.StartValue == this.editObj.EndValue) {
this.editObj.EndValue = ''
}
if (parseInt(this.editObj.StartValue) > parseInt(this.editObj.EndValue)) {
this.$q.notify({
type: 'negative',
position: "top",
message: `最小满班率不能大于最大满班率`
})
return;
}
let NewArr = JSON.parse(JSON.stringify(this.FullClassRateList));
NewArr.splice(this.CommonIndex,1);
for (var i = 0; i < NewArr.length; i++) {
if (((parseInt(this.editObj.StartValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.StartValue) <= NewArr[i].EndValue)) ||
((parseInt(this.editObj.EndValue) >= NewArr[i].StartValue) && (parseInt(this.editObj
.EndValue) <= NewArr[i].EndValue))) {
this.$q.notify({
type: 'negative',
position: "top",
message: `已经存在交集`
})
return;
}
}
this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue; this.FullClassRateList[this.CommonIndex].StartValue = this.editObj.StartValue;
this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue; this.FullClassRateList[this.CommonIndex].EndValue = this.editObj.EndValue;
this.isShowColEdit = false; this.isShowColEdit = false;
...@@ -457,7 +541,6 @@ ...@@ -457,7 +541,6 @@
} }
GetTeachingRewardsBaseInfo(msg).then(res => { GetTeachingRewardsBaseInfo(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
console.log(res, '数据');
this.setTeachMsg.Id = res.Data.Id; this.setTeachMsg.Id = res.Data.Id;
this.setTeachMsg.BasicMoney = res.Data.BasicMoney; this.setTeachMsg.BasicMoney = res.Data.BasicMoney;
this.setTeachMsg.BasicHour = res.Data.BasicHour; this.setTeachMsg.BasicHour = res.Data.BasicHour;
......
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