|
@@ -38,9 +38,8 @@
|
|
|
</view>
|
|
|
</u-card>
|
|
|
<u-card :title="'事假(' + getStudentsNumber(2) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
|
|
|
- <u-grid :col="3" slot="body" :border="false">
|
|
|
+ <u-grid :col="3" slot="body" :border="false" v-if="classInfo.studentLeaveRecordList.length">
|
|
|
<u-grid-item v-for="(item, index) in classInfo.studentLeaveRecordList" :key="index" :custom-style="gridCustomStyle">
|
|
|
- <!-- <view class="class-student-col" :class="item.agreeType == 1 ? 'student-active' : ''" @click="handleleaveClick(item.leaveRecordId)"> -->
|
|
|
<view class="class-student-col" @click="handleleaveClick(item)">
|
|
|
{{item.name}}
|
|
|
<u-icon :name="item.agreeType == 1 ? 'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
|
|
@@ -48,8 +47,18 @@
|
|
|
</u-grid-item>
|
|
|
</u-grid>
|
|
|
</u-card>
|
|
|
- <u-card :title="'续费卡(' + getStudentsNumber(3) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
|
|
|
- <u-grid :col="3" slot="body" :border="false">
|
|
|
+ <u-card :title="'病假结束确认(' + getStudentsNumber(3) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
|
|
|
+ <u-grid :col="3" slot="body" :border="false" v-if="classInfo.studentLeaveList.length">
|
|
|
+ <u-grid-item v-for="(item, index) in classInfo.studentLeaveList" :key="index" :custom-style="gridCustomStyle">
|
|
|
+ <view class="class-student-col" @click="handleOtherClick(item)">
|
|
|
+ {{item.name}}
|
|
|
+ <u-icon :name="item.agreeType == 1 ? 'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
|
|
|
+ </view>
|
|
|
+ </u-grid-item>
|
|
|
+ </u-grid>
|
|
|
+ </u-card>
|
|
|
+ <u-card :title="'续费卡(' + getStudentsNumber(4) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
|
|
|
+ <u-grid :col="3" slot="body" :border="false" v-if="classInfo.studentRenewList.length">
|
|
|
<u-grid-item v-for="(item, index) in classInfo.studentRenewList" :key="index" :custom-style="gridCustomStyle">
|
|
|
<view class="class-student-col" :class="item.state ? 'student-active' : ''" @click="handleVtCardClick(item)">
|
|
|
{{item.name}}
|
|
@@ -94,6 +103,12 @@
|
|
|
<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="handleAgreeClick">同意</u-button>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <!-- 病假确认 -->
|
|
|
+ <u-modal v-model="leaveOtherShow" content="提示" show-cancel-button @confirm="handleEndClick">
|
|
|
+ <view style="text-align: center;margin: 10px 0;">
|
|
|
+ 是否确认{{ studentName }}的病假结束?
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
<!-- 续费卡 -->
|
|
|
<u-popup v-model="vtCardShow" mode="center" border-radius="30" width="600rpx">
|
|
|
<view class="common-title">续费卡</view>
|
|
@@ -132,6 +147,7 @@
|
|
|
return {
|
|
|
classId: '',
|
|
|
studentId: '',
|
|
|
+ studentName: '',
|
|
|
classInfo: {
|
|
|
name: '',
|
|
|
classStartDate: '',
|
|
@@ -164,6 +180,7 @@
|
|
|
},
|
|
|
leaveShow: false,
|
|
|
leaveForm: {},
|
|
|
+ leaveOtherShow: false,
|
|
|
vtCardShow: false,
|
|
|
vtCardId: '',
|
|
|
vtCardValue: '',
|
|
@@ -172,10 +189,11 @@
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.classId = options.id
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
this.initialize()
|
|
|
this.getClassShow()
|
|
|
},
|
|
|
- onReady() {},
|
|
|
onPullDownRefresh() {
|
|
|
this.initialize()
|
|
|
this.getClassShow()
|
|
@@ -269,9 +287,36 @@
|
|
|
case 2:
|
|
|
return this.classInfo.studentLeaveRecordList.length
|
|
|
case 3:
|
|
|
+ return this.classInfo.studentLeaveList.length
|
|
|
+ case 4:
|
|
|
return this.classInfo.studentRenewList.length
|
|
|
}
|
|
|
},
|
|
|
+ handleOtherClick(item) {
|
|
|
+ this.studentId = item.id
|
|
|
+ this.studentName = item.name
|
|
|
+ this.leaveOtherShow = true
|
|
|
+ },
|
|
|
+ // 病假知晓
|
|
|
+ handleEndClick() {
|
|
|
+ NET.request(API.leaveLessonsEndOk,{
|
|
|
+ classId:parseInt(this.classId), studentId:parseInt(this.studentId)
|
|
|
+ },'POST').then(res=> {
|
|
|
+ if(res.status == 10000) {
|
|
|
+ this.$refs.uTips.show({
|
|
|
+ title: res.message,
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.initialize()
|
|
|
+ this.getClassShow()
|
|
|
+ } else {
|
|
|
+ this.$refs.uTips.show({
|
|
|
+ title: res.message,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 事假信息
|
|
|
handleleaveClick(item) {
|
|
|
if(item.agreeType == 1) return
|