|
@@ -1,160 +1,260 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <u-navbar title="请假条详情"></u-navbar>
|
|
|
|
|
|
+ <u-navbar title="请假条申请"></u-navbar>
|
|
<view class="infos">
|
|
<view class="infos">
|
|
- <view class="item">
|
|
|
|
|
|
+ <view class="item" @click="classShow=true">
|
|
<view class="title">
|
|
<view class="title">
|
|
<text class="asterisk">*</text>
|
|
<text class="asterisk">*</text>
|
|
<text>所属班级</text>
|
|
<text>所属班级</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
- <text>郭健康毛笔楷书班</text>
|
|
|
|
- <text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
|
|
|
+ <text>{{className}}</text>
|
|
|
|
+ <text class="icon">
|
|
|
|
+ <u-icon name="arrow-right" color="#c8c8c8"></u-icon>
|
|
|
|
+ </text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="item">
|
|
|
|
|
|
+ <u-select v-model="classShow" mode="single-column" :list="classList" @confirm="classConfirm"></u-select>
|
|
|
|
+
|
|
|
|
+ <view class="item" @click="courseShow=true">
|
|
<view class="title">
|
|
<view class="title">
|
|
<text class="asterisk">*</text>
|
|
<text class="asterisk">*</text>
|
|
- <text>请假日期</text>
|
|
|
|
|
|
+ <text>请假课次日期</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
<text>2023-01-03 周一</text>
|
|
<text>2023-01-03 周一</text>
|
|
- <text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
|
|
|
+ <text class="icon">
|
|
|
|
+ <u-icon name="arrow-right" color="#c8c8c8"></u-icon>
|
|
|
|
+ </text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="item">
|
|
|
|
|
|
+ <u-select v-model="courseShow" mode="mutil-column-auto" :list="courseList" @confirm="courseConfirm"></u-select>
|
|
|
|
+ <!-- <view class="item">
|
|
<view class="title indent">
|
|
<view class="title indent">
|
|
-
|
|
|
|
<text>请假课次</text>
|
|
<text>请假课次</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
<text>第20节</text>
|
|
<text>第20节</text>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="title indent">
|
|
<view class="title indent">
|
|
-
|
|
|
|
<text>授课老师</text>
|
|
<text>授课老师</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
- <text>郭健康</text>
|
|
|
|
-
|
|
|
|
|
|
+ <text>{{teacherName}}</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="infos">
|
|
<view class="infos">
|
|
- <view class="item">
|
|
|
|
|
|
+ <!-- <view class="item">
|
|
<view class="title">
|
|
<view class="title">
|
|
<text class="asterisk">*</text>
|
|
<text class="asterisk">*</text>
|
|
<text>请假类型</text>
|
|
<text>请假类型</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
<text>病假</text>
|
|
<text>病假</text>
|
|
- <text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
|
|
|
+ <text class="icon">
|
|
|
|
+ <u-icon name="arrow-right" color="#c8c8c8"></u-icon>
|
|
|
|
+ </text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
|
|
+ </view> -->
|
|
<view class="reason">
|
|
<view class="reason">
|
|
<view class="title">
|
|
<view class="title">
|
|
<text class="asterisk">*</text>
|
|
<text class="asterisk">*</text>
|
|
<text>请假事由</text>
|
|
<text>请假事由</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value">
|
|
<view class="value">
|
|
<textarea name="" id="" cols="30" rows="10" placeholder="请假申请"></textarea>
|
|
<textarea name="" id="" cols="30" rows="10" placeholder="请假申请"></textarea>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="upload-pictures">
|
|
|
|
|
|
+ <!-- <view class="upload-pictures">
|
|
<view class="title indent">
|
|
<view class="title indent">
|
|
-
|
|
|
|
<text>上传图片</text>
|
|
<text>上传图片</text>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="value ">
|
|
<view class="value ">
|
|
<img src="../../../assets/img/fas fa-camera Copy@1x.png" alt="">
|
|
<img src="../../../assets/img/fas fa-camera Copy@1x.png" alt="">
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
|
|
+ </view> -->
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="btn">
|
|
|
|
+ <button>提交请假条</button>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <view class="btn">
|
|
|
|
- <button >提交请假条</button>
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import * as sickNoteApi from '@/apis/parents/sickNote.js'
|
|
|
|
+ import * as courseApi from '@/apis/parents/course.js'
|
|
|
|
+ import * as classScheduleApi from '@/apis/parents/classSchedule.js'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
-
|
|
|
|
|
|
+ studentId: '',
|
|
|
|
+ classList: [],
|
|
|
|
+ classShow: false,
|
|
|
|
+ teacherName: '请选择班级',
|
|
|
|
+ className: '请选择班级',
|
|
|
|
+ courseList: [],
|
|
|
|
+ classId: '',
|
|
|
|
+ list: [],
|
|
|
|
+ courseShow: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onReady() {
|
|
|
|
+ if (this.carhelp.getStudentId()) {
|
|
|
|
+ this.studentId = this.carhelp.getStudentId().studentId;
|
|
|
|
+ this.getLoadMyBuyLog();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ courseConfirm(e) {
|
|
|
|
+ console.log(e)
|
|
|
|
+ },
|
|
|
|
+ getCourseList() {
|
|
|
|
+ this.courseList = [];
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+ classScheduleApi.loadMySchedule({
|
|
|
|
+ studentId: this.studentId,
|
|
|
|
+ classId: this.classId,
|
|
|
|
+ startDate: '2023-02-24',
|
|
|
|
+ endDate: '2023-03-31'
|
|
|
|
+ }).then((response) => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ var list = response.data;
|
|
|
|
+
|
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
|
+ this.courseList.push({
|
|
|
|
+ value: list[i].classId,
|
|
|
|
+ label: list[i].courseDate,
|
|
|
|
+ children: []
|
|
|
|
+ })
|
|
|
|
+ for (var j = 0; j < this.courseList.length; j++) {
|
|
|
|
+ if(this.courseList[j].label == list[i].courseDate) {
|
|
|
|
+ this.courseList[j].children.push({
|
|
|
|
+ value: list[i].sheetId,
|
|
|
|
+ label: list[i].coursePeriods
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (var i = 0; i < this.courseList.length; i++) {
|
|
|
|
+ for (var j = 0; j < this.courseList.length; j++) {
|
|
|
|
+ if(this.courseList[i].label == this.courseList[j].label && i != j) {
|
|
|
|
+ if(this.courseList[i].children.length > this.courseList[j].children.length) {
|
|
|
|
+ this.courseList.splice(j, 1);
|
|
|
|
+ } else {
|
|
|
|
+ this.courseList.splice(i, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ classConfirm(e) {
|
|
|
|
+ this.classId = e[0].value;
|
|
|
|
+ this.className = e[0].label;
|
|
|
|
+ for (var i = 0; i < this.list.length; i++) {
|
|
|
|
+ if(this.list[i].classId == e[0].value) {
|
|
|
|
+ this.teacherName = this.list[i].teacherName;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.getCourseList();
|
|
|
|
+ },
|
|
|
|
+ getLoadMyBuyLog() {
|
|
|
|
+ this.classList = [];
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+ courseApi.loadMyBuyLog({
|
|
|
|
+ studentId: this.studentId,
|
|
|
|
+ year: '',
|
|
|
|
+ courseId: '',
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10000
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.list = res.data.data;
|
|
|
|
+ var clist = res.data.data;
|
|
|
|
+ for (var i = 0; i < clist.length; i++) {
|
|
|
|
+ this.classList.push({
|
|
|
|
+ value: clist[i].classId,
|
|
|
|
+ label: clist[i].className,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
- .infos{
|
|
|
|
- padding: 0px 15px ;
|
|
|
|
|
|
+ .infos {
|
|
|
|
+ padding: 0px 15px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
margin-bottom: 12px;
|
|
margin-bottom: 12px;
|
|
- .item{
|
|
|
|
|
|
+
|
|
|
|
+ .item {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
border-bottom: 1px solid rgba(244, 244, 244, 1);
|
|
border-bottom: 1px solid rgba(244, 244, 244, 1);
|
|
padding: 12px 0;
|
|
padding: 12px 0;
|
|
- .title{
|
|
|
|
|
|
+
|
|
|
|
+ .title {
|
|
color: #333333;
|
|
color: #333333;
|
|
-
|
|
|
|
- .asterisk{
|
|
|
|
|
|
+
|
|
|
|
+ .asterisk {
|
|
color: rgba(244, 68, 68, 1);
|
|
color: rgba(244, 68, 68, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .value{
|
|
|
|
|
|
+
|
|
|
|
+ .value {
|
|
color: rgba(51, 51, 51, 1);
|
|
color: rgba(51, 51, 51, 1);
|
|
- .icon{
|
|
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
margin-left: 4px;
|
|
margin-left: 4px;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
- .reason{
|
|
|
|
- .title{
|
|
|
|
|
|
+
|
|
|
|
+ .reason {
|
|
|
|
+ .title {
|
|
margin-bottom: 12px;
|
|
margin-bottom: 12px;
|
|
}
|
|
}
|
|
- uni-textarea{
|
|
|
|
|
|
+
|
|
|
|
+ uni-textarea {
|
|
width: 696rpx;
|
|
width: 696rpx;
|
|
height: 120rpx;
|
|
height: 120rpx;
|
|
text-indent: 8px;
|
|
text-indent: 8px;
|
|
font-size: 14px
|
|
font-size: 14px
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .upload-pictures{
|
|
|
|
|
|
+
|
|
|
|
+ .upload-pictures {
|
|
padding-bottom: 29px;
|
|
padding-bottom: 29px;
|
|
- .value{
|
|
|
|
|
|
+
|
|
|
|
+ .value {
|
|
margin-top: 12px;
|
|
margin-top: 12px;
|
|
width: 120rpx;
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
height: 120rpx;
|
|
@@ -163,24 +263,28 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
padding: 36rpx;
|
|
padding: 36rpx;
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
- img{
|
|
|
|
|
|
+
|
|
|
|
+ img {
|
|
width: 48rpx;
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
height: 48rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .indent{
|
|
|
|
|
|
+
|
|
|
|
+ .indent {
|
|
text-indent: 8px;
|
|
text-indent: 8px;
|
|
}
|
|
}
|
|
- .btn{
|
|
|
|
|
|
+
|
|
|
|
+ .btn {
|
|
position: fixed;
|
|
position: fixed;
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
padding: 10px 12px;
|
|
padding: 10px 12px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
- button{
|
|
|
|
|
|
+
|
|
|
|
+ button {
|
|
border-radius: 50px;
|
|
border-radius: 50px;
|
|
background-color: rgba(13, 186, 199, 1);
|
|
background-color: rgba(13, 186, 199, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
@@ -188,5 +292,4 @@
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|