Prechádzať zdrojové kódy

Merge branch '0609guide' into online

mo 2 rokov pred
rodič
commit
6aad25c69b

+ 212 - 0
src/components/CourseDetail.vue

@@ -0,0 +1,212 @@
+
+<template>
+    <div class="courseDetail">
+        <van-radio-group v-model="radioSelect">
+            <van-cell-group class="" v-for="(item, index) in dataList" :border="false" :key="index" @click="onDetail(item)">
+                <van-cell title-class="title-content" :center="true">
+                    <template slot="title">
+                        <div class="title-section" :class="[signStatus || (!signStatus && item.newCourseId && item.newCourseId != item.id) ? 'signInfo' : null]">
+                            <div class="title-info">
+                                <span class="teachMode">{{ item.teachMode == 'ONLINE' ? '线上' : null }}{{ item.teachMode == 'OFFLINE' ? '线下' : null }}</span>
+                                <span :class="['courseType', item.type]">{{ item.type | coursesType }}</span>
+                                <span style="line-height: 18px;vertical-align: bottom;">{{ item.name }}</span>
+                            </div>
+                            <div class="title-status" v-if="signStatus">
+                                <span class="teachMode" :class="[`sign${item.signInStatus}`]">{{ item.signInStatus | attendanceType }}</span>
+                            </div>
+                            <div class="title-status" v-if="!signStatus && item.newCourseId && item.newCourseId != item.id">
+                                <span class="teachMode sign1">被合并</span>
+                            </div>
+                        </div>
+                    </template>
+                    <template slot="label">
+                        <div style="padding: .05rem 0 0;">
+                            <p>
+                                <span>
+                                上课日期:{{item.startClassTime | formatDateExtend}}
+                                </span>
+                            </p>
+                            <!-- <p v-if="item.type != 'VIP' && item.type != 'PRACTICE'">
+                                所在乐团:{{ item.groupName }}
+                            </p> -->
+                            <p>
+                                <span v-if="item.teachMode == 'ONLINE'">
+                                    上课地点:网络教室
+                                </span>
+                                <span v-else>
+                                    上课地点:{{ item.schoolName }}
+                                </span>
+                              
+                            </p>
+                    
+                            <p v-if="teacherStatus">主讲老师:{{ item.teacherName }}</p>
+                        </div>
+                    </template>
+                </van-cell>
+                <van-cell :icon="icon_timer" :center="true" value-class="courseTimer">
+                    <!-- <template slot="default">
+                        <template v-if="radioStatus">
+                            <van-radio
+                                ref="radioes"
+                                :disabled="item.radioDisabled"
+                                :name="item.id"
+                                >
+                                    <template #icon="props">
+                                        <img v-if="!item.radioDisabled" class="img-icon" :src="props.checked ? activeButtonIcon : inactiveButtonIcon" />
+                                    </template>
+                                </van-radio>
+                        </template>
+                        <template v-else>
+                            <p>
+                                <span>到课:{{ item.studentNum }}/{{ item.totalStudentNum }}</span>
+                                <span>请假:{{ item.leaveStudentNum }}</span>
+                            </p>
+                        </template>
+                    </template> -->
+                    <template slot="title">{{ item.startClassTime | formatDate }} - {{ item.endClassTime | formatDate }}</template>
+                </van-cell>
+            </van-cell-group>
+        </van-radio-group>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'courseDetail',
+    props: {
+        dataList: {
+            type: Array,
+            default() {
+                return []
+            }
+        },
+        selectRadioId: {
+            type: [Number, String],
+            default() {
+                return null
+            }
+        },
+        signStatus: { // 是否显示签到状态
+            type: Boolean,
+            default() {
+                return false
+            }
+        },
+        radioStatus: { // 是否显示单选按钮
+            type: Boolean,
+            default() {
+                return false
+            }
+        },
+        teacherStatus: {
+            type: Boolean,
+            default() {
+                return false
+            }
+        }
+    },
+    data() {
+        return {
+            icon_timer: require('@/assets/images/common/icon_timer.png'),
+            radioSelect: this.selectRadioId || null
+        }
+    },
+    methods: {
+        onDetail(item) {
+            if(!item.radioDisabled) {
+                this.radioSelect = item.id;
+            }
+            this.$emit('onDetail', item)
+        }
+    },
+    watch: {
+        selectRadioId() {
+            this.radioSelect = this.selectRadioId
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+@import url('../assets/commonLess/variable');
+.courseDetail {
+    margin: 0 .12rem;
+    /deep/.van-cell__left-icon img {
+        padding-top: .03rem;
+    }
+    /deep/.van-cell__title {
+        font-size: .16rem;
+        color: #333333;
+    }
+    /deep/.van-cell-group {
+        margin-top: .15rem;
+        border-radius: .1rem;
+        overflow: hidden;
+    }
+    .title-content {
+        font-weight: bold;
+        flex: 1 auto;
+        padding-top: 5px;
+        .van-cell__label {
+            font-weight: 400;
+            margin-top: .06rem;
+            display: flex;
+            align-items: center;
+        }
+        .van-icon-location, .van-icon-video-o {
+            margin-right: .05rem;
+        }
+        .groupName {
+            display: block;
+            font-size: .14rem;
+            font-weight: 400;
+            padding-bottom: 0.04rem;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+        }
+    }
+    /deep/.van-cell__value, /deep/.van-cell__label {
+        color: #808080;
+        span {
+            padding-right: .1rem;
+        }
+    }
+
+    // .title-info {
+        // display: flex;
+        // align-items: center;
+        // line-height: 1.2;
+        // overflow: hidden;
+        // white-space: nowrap;
+        // text-overflow: ellipsis;
+    // }
+
+    .title-section {
+        display: flex;
+        justify-content: space-between;
+        align-items: baseline;
+        &.signInfo {
+            .title-info {
+                flex-basis: 80%;
+            }
+            .title-status {
+                flex-basis: 20%;
+                text-align: right;
+            }
+        }
+    }
+
+    .courseTimer {
+        display: flex;
+        justify-content: flex-end;
+    }
+}
+
+/deep/.van-radio__icon--disabled .van-icon {
+  border-color: transparent;
+  background: #fff;
+  color: transparent;
+}
+
+</style>

+ 1 - 1
src/constant/index.js

@@ -1,4 +1,4 @@
-export const courseType = {
+export const courseType = { 
   NORMAL: "声部课",
   SINGLE: "声部课",
   MIX: "合奏课",

+ 24 - 2
src/router/auditionRouter.js

@@ -62,8 +62,30 @@ let auditionRouter = [
         meta: {
             descrition: '布置训练',
             weight: 4 // 页面权重
-        }
-    }
+        },
+        
+    },
+    {
+        path: '/attendanceError',
+        name: 'attendanceError',
+        component: () => import(/* webpackChunkName:'ArrangeWork'*/'@/views/attendanceError/index.vue'),
+        meta: {
+            descrition: '学员考勤异常',
+            weight: 4 // 页面权重
+        },
+        
+    },
+    {
+        path: '/attendScheduleDetail',
+        name: 'attendScheduleDetail',
+        component: () => import(/* webpackChunkName:'ArrangeWork'*/'@/views/attendanceError/attendScheduleDetail.vue'),
+        meta: {
+            descrition: '考勤异常',
+            weight: 4 // 页面权重
+        },
+        
+    },
+    
 ]
 
 export default auditionRouter

+ 21 - 0
src/views/attendanceError/api.js

@@ -0,0 +1,21 @@
+import request from "@/helpers/request";
+import qs from 'qs'
+// const apiPrefix = '/api-teacher'
+
+
+export const attendanceErrorList = (data) => {
+    return request({
+        url:  '/student/studentAttendanceError',
+        method: 'post',
+        data: data
+    })
+}
+
+export const getAttendanceErrorStudent = (data) => {
+    return request({
+        url:  '/student/findStudentAttendance',
+        method: 'post',
+        data: data,
+        requestType: "form",
+    })
+}

+ 278 - 0
src/views/attendanceError/attendScheduleDetail.vue

@@ -0,0 +1,278 @@
+<template>
+    <div class="schedule">
+        <!-- <m-header :backUrl="backUrl" background /> -->
+        <div class="detailHeader">
+            <van-cell-group class="detailCard">
+                <van-cell style="padding: .18rpx; height: .12rpx;">
+                    <template #title>
+                        <div class="detailTitle">
+                            <span class="teachMode">{{ teachMode == 'ONLINE' ? '线上' : null }}{{ teachMode == 'OFFLINE' ? '线下' : null }}</span>
+                            <span :class="['courseType', type]">{{ type | coursesType }}</span>
+                            <span style="line-height: 1.2;vertical-align: bottom;">{{ className }}</span>
+                        </div>
+                        <p class="detailTime van-hairline--bottom">{{ startTimeFormat }} {{ startClassTime | formatDate }} - {{ endClassTime | formatDate }}</p>
+                    </template>
+                    <template #label>
+                        <div class="detailLabel">
+                            主讲老师:{{ teacherName }}<br />
+                            <!-- <p >最后提交时间:{{ lastDate }}</p> -->
+                        </div>
+                    </template>
+                </van-cell>
+            </van-cell-group>
+        </div>
+        <!-- <van-cell-group>
+            <van-cell :center="true" style="padding: .1rem .16rem;">
+                <template slot="title">
+                    <span style="padding-right: 0.1rem;">到课:{{ studentNum }}/{{ totalStudentNum }}</span>
+                    <span style="padding-right: 0.1rem;">请假:{{ leaveStudentNum }}</span>
+                    <span>欠费:{{ paymentNum }}</span>
+                </template>
+            </van-cell>
+        </van-cell-group> -->
+        <div class="recordDetail" v-if="dataShow">
+            考勤异常学员名单
+            <!-- <span style="padding-right: 0.1rem;">到课:{{ studentNum }}/{{ totalStudentNum }}</span>
+            <span style="padding-right: 0.1rem;">请假:{{ leaveStudentNum }}</span>
+            <span>欠费:{{ paymentNum }}</span> -->
+        </div>
+        <van-list v-model="loading" v-if="dataShow" key="data"
+            :finished="finished"
+            finished-text=" "
+            :immediate-check="false"
+            @load="getFindStudentAttendance">
+            <van-cell-group v-for="(item, index) in dataList" :key="index" style="margin-top: 0">
+                <van-cell style="align-items: center;padding: .15rem .12rem;">
+                    <template #icon>
+                        <van-image :src="item.avatar ? item.avatar : avatar" style="width: .32rem; height: .32rem; border-radius: 50%; overflow: hidden;">
+                            <template v-slot:loading>
+                                <van-loading type="spinner" size="20" />
+                            </template>
+                        </van-image>
+                    </template>
+                    <template #title>
+                        <span style="padding-left: 0.05rem" :class="[item.paymentStatus == 'NON_PAYMENT' ? 'red' : null]">{{ item.username }}</span>
+                    </template>
+                    <template #default>
+                        <!-- <p v-if="item.courseSchedule && item.courseSchedule.status != 'NOT_START'" style="font-weight: 500;">
+                            <span v-if="!item.status">
+                                未签到
+                            </span>
+                            <span v-else-if="item.status == 'NORMAL'" style="color: #FF802C">
+                                {{ item.status | clockingIn }}
+                            </span>
+                            <span v-else-if="item.status == 'LEAVE'" style="color: #FF802C">
+                                {{ item.status | clockingIn }}
+                            </span>
+                            <span v-else-if="item.status == 'TRUANT'" style="color: #FF4444">
+                                {{ item.status | clockingIn }}
+                            </span>
+                            <span v-else>
+                                {{ item.status | clockingIn }}
+                            </span>
+                        </p> -->
+                        <p>
+                        <span class="backVisit" @click="gotoVisit(item)">回访</span>
+                        </p>
+                    </template>
+                </van-cell>
+            </van-cell-group>
+        </van-list>
+        <m-empty class="empty" v-else key="data" msg="暂无数据" />
+    </div>
+</template>
+<script>
+import MHeader from '@/components/MHeader'
+import dayjs from 'dayjs'
+import MEmpty from '@/components/MEmpty'
+import { utilDate } from '@/common/util'
+// import setLoading from '@/common/loading'
+import { getAttendanceErrorStudent } from './api'
+export default {
+    name: 'schedule',
+    components: { MHeader, MEmpty },
+    data() {
+        const query = this.$route.query
+        return {
+            id: query.id,
+            studentNum: query.studentNum,
+            teacherName: query.teacherName,
+            totalStudentNum: query.totalStudentNum,
+            leaveStudentNum: query.leaveStudentNum,
+            startClassTime: query.startClassTime,
+            teachMode: query.teachMode,
+            type: query.type,
+            paymentNum: 0,
+            startTimeFormat: dayjs(query.startClassTime).format('MM月DD日'),
+            endClassTime: query.endClassTime,
+            lastDate: null,
+            className: query.name,
+            loading: false,
+            finished: false,
+            params: {
+                date: utilDate(new Date()),
+                page: 1,
+                rows: 10
+            },
+            dataShow: true, // 是否有数据
+            dataList: [],
+            backUrl: {
+                status: true,
+                path: '/schedule'
+            },
+            avatar: require('../../assets/images/icon_student.png'),
+        }
+    },
+    mounted() {
+        this.getFindStudentAttendance()
+    },
+    methods: {
+        async getFindStudentAttendance() {
+            // let params = this.params
+            await getAttendanceErrorStudent({ search: this.id*1 }).then(res => {
+           
+                let result = res.data
+              
+                this.loading = false
+        
+                if(res.code == 200) {
+                    // 重点这句,判断是不是重复请求了
+                    // if (this.dataList.length > 0 && result.data.pageNo == 1) {
+                    //     return;
+                    // }
+                    // params.page = result.data.pageNo
+                  
+                    this.dataList =result
+                   
+                    this.finished = true
+                //     this.dataList.forEach(item => {
+                //         if(item.paymentStatus == 'NON_PAYMENT') {
+                //             this.paymentNum += 1
+                //         }
+                //     })
+                //     if(params.page >= result.data.totalPage) {
+                //         this.finished = true
+                //     }
+                //     this.params.page++
+                // } else {
+                //     this.finished = true
+                }
+                // 判断是否有数据
+                if(this.dataList.length <= 0) {
+                    this.dataShow = false
+                }
+
+                // this.lastDate = this.dataList[0] && this.dataList[0].updateTime ? dayjs(this.dataList[0].updateTime).format('MM-DD hh:mm') : null
+            })
+        },
+        gotoVisit(row){
+            this.$router.push({ path: "/addVisit",query:{name:'考勤回访',isAttError:true,info:{userId:row.userId,objectId:row.id,username:row.username, type:'常规回访',purpose:'考勤申诉'}},})  
+        }
+    }
+}
+</script>
+<style lang='less' scoped>
+@import url("../../assets/commonLess/variable.less");
+.link { color: @whiteColor; }
+.schedule {
+    min-height: 100vh;
+}
+/deep/.empty {
+    .icon {
+        margin-top: .2rem;
+    }
+}
+.recordDetail {
+    margin-top: .06rem;
+    padding: .15rem .1rem .1rem;
+    font-size: .14rem;
+    color: #808080;
+}
+.backVisit {
+    color: #01C1B5;
+    cursor: pointer;
+}
+/deep/.van-cell__title {
+    font-size: .16rem;
+    color: @mFontColor;
+}
+/deep/.van-cell-group {
+    margin-top: .05rem;
+}
+.title-content {
+    font-weight: bold;
+    flex: 1 auto;
+    max-width: 82%;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    .van-cell__label {
+        font-weight: 400;
+        margin-top: .06rem;
+        display: flex;
+        align-items: center;
+    }
+    .van-icon-location, .van-icon-video-o {
+        margin-right: .05rem;
+    }
+    .groupName {
+        display: block;
+        font-size: .14rem;
+        font-weight: 400;
+        padding-bottom: 0.04rem;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+}
+/deep/.van-cell__value, /deep/.van-cell__label {
+    color: @tFontColor;
+    span {
+        padding-right: .1rem;
+    }
+}
+
+.red {
+    color: red;
+}
+
+.detailHeader {
+    background-color: #01C1B5;
+    height: 1rem;
+    padding-top: .1rem;
+    position: relative;
+    .detailCard {
+        position: absolute;
+        top: .1rem;
+        left: 0;
+        width: calc(100% - .24rem);
+        margin: 0 .12rem;
+        border-radius: .1rem;
+        overflow: hidden;
+    }
+    .detailTitle {
+        font-size: .18rem;
+        line-height: 1.5;
+        font-weight: 500;
+        padding-bottom: .05rem;
+        color: #333;
+        display: flex;
+        align-items: center;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+    .detailTime {
+        color: #333;
+        padding: .06rem 0;
+        font-size: .16rem;
+    }
+    .detailLabel {
+        color: #666;
+        font-size: .13rem;
+        line-height: 1.7;
+        padding: .08rem 0 .02rem;
+    }
+}
+
+</style>

+ 153 - 0
src/views/attendanceError/index.vue

@@ -0,0 +1,153 @@
+<template>
+    <div class="schedule">
+        <!-- <m-header :backUrl="backUrl" /> -->
+        <van-dropdown-menu :close-on-click-outside="false" active-color="#01C1B5"> 
+      <van-dropdown-item
+        v-model="value1"
+        @change="onTypeChange" 
+        title="课程类型"
+        :options="option1"
+      />
+    
+    </van-dropdown-menu>
+        <van-list v-model="loading" v-if="dataShow" key="data"
+            :finished="finished"
+            :immediate-check="false"
+            finished-text="- 没有更多内容 -"
+            @load="getDailySchedule">
+            <course-detail :dataList="dataList" @onDetail="onDetail" />
+        </van-list>
+        <m-empty class="empty" v-else  />
+    </div>
+</template>
+<script>
+import MHeader from '@/components/MHeader'
+import dayjs from 'dayjs'
+import MEmpty from '@/components/MEmpty'
+import { attendanceErrorList }  from './api'
+
+import setLoading from '@/common/loading'
+// import { getCourseScheduleDateByMonth } from '@/api/teacher'
+import CourseDetail from '@/components/CourseDetail'
+export default {
+    name: 'schedule',
+    components: { MHeader, MEmpty, CourseDetail },
+    data() {
+        return {
+            loading: false,
+            finished: false,
+            value1:'全部',
+            params: {
+                page: 1,
+                rows: 10
+            },
+            dataShow: true, // 是否有数据
+            dataList: [],
+            backUrl: {
+                status: true,
+                path: '/home'
+            },
+            getMonthDay: [],
+            option1: [
+        { text: "全部", value: "全部" },
+        { text: "声部课", value: "SINGLE" },
+        { text: "集训声部课", value: "TRAINING_SINGLE" },
+        { text: "合奏课", value: "MIX" },
+        { text: "集训合奏课", value: "TRAINING_MIX" },
+        { text: "基础技能课", value: "HIGH" },
+        { text: "线上基础技能课", value: "HIGH_ONLINE" },
+        { text: "课堂课", value: "CLASSROOM" },
+        { text: "综合课", value: "COMPREHENSIVE" },
+        { text: "VIP课", value: "VIP" },
+        { text: "网管课", value: "PRACTICE" },
+        { text: "试听课", value: "DEMO" },
+      ],
+        }
+    },
+    mounted() {
+        this.getDailySchedule()
+        // this.getCourseMonth(this.params.date)
+    },
+    methods: {
+        onDetail(item) {
+            this.$router.push({
+                path: '/attendScheduleDetail',
+                query: {
+                    id: item.id,
+                    studentNum: item.studentNum,
+                    teacherName: item.teacherName,
+                    leaveStudentNum: item.leaveStudentNum,
+                    totalStudentNum: item.totalStudentNum,
+                    startClassTime: item.startClassTime,
+                    endClassTime: item.endClassTime,
+                    teachMode: item.teachMode,
+                    type: item.type,
+                    name: item.name
+                }
+            })
+        },
+        async getDailySchedule() {
+            let params = this.params
+            if(this.value1 =='全部'){
+                params.courseType = null 
+            }else{
+                params.courseType = this.value1 
+            }
+            await attendanceErrorList(params).then(res => {
+                this.dataShow = true;
+                let result = res.data
+                this.loading = false
+                if(res.code == 200) {
+                    params.page = result.pageNo
+                    this.dataList = result.rows;
+                    this.finished = true
+                    // if(params.page >= result.data.totalPage) {
+                    //     this.finished = true
+                    // }
+                    // this.params.page++
+                // } else {
+                //     this.finished = true
+                // }
+                // 判断是否有数据
+                if(this.dataList.length <= 0) {
+                    this.dataShow = false
+                }}
+            })
+        },
+        onTypeChange(){
+            this.purposeStatus = true;
+          this.getDailySchedule()
+        }
+        // async getCourseMonth(month) {
+        //     setLoading(true)
+        //     try {
+        //         await getCourseScheduleDateByMonth({ month: month }).then(res => {
+        //             let result = res.data
+        //             if(result.code == 200) {
+        //                 this.getMonthDay = []
+        //                 result.data.forEach(item => {
+        //                     this.getMonthDay.push(dayjs(item).format('DD'))
+        //                 })
+        //             }
+        //         })
+        //         setLoading(false)
+        //     } catch(err) {
+        //         setLoading(false)
+        //     }
+        // }
+    }
+}
+</script>
+<style lang='less' scoped>
+@import url("../../assets/commonLess/variable.less");
+.schedule {
+    min-height: 100vh;
+}
+.link { color: @whiteColor; }
+/deep/.empty {
+    .icon {
+        margin-top: .2rem;
+    }
+}
+
+</style>

+ 41 - 15
src/views/visitManager/addVisit.vue

@@ -13,15 +13,15 @@
       <van-field label="回访类型" @click="onChange('type')" v-model="form.type" readonly input-align="right" :is-link="id || userId ? false : true" placeholder="请选择" />
       <van-field label="回访目的" @click="onChange('purpose')" v-model="form.purpose" readonly input-align="right" :is-link="id || userId ? false : true" placeholder="请选择" />
       <van-field v-if="form.type == '小课回访'" label="学员状态" @click="onChange('feedbackType')" v-model="form.feedbackTypeName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" />
-      <!-- <van-field v-if="form.type == '小课回访' && (form.feedbackType == 'THINKING' || form.feedbackType == 'LOST')" label="反馈详情" @click="onChange('feedbackTypeDesc')" v-model="form.feedbackTypeDescName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" /> -->
+      <van-field v-if="form.purpose == '考勤申诉'" label="家长反馈" @click="onChange('feedbackTypeDesc')" v-model="form.feedbackTypeDescName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" />
       <van-field label="问题状态" @click="onChange('probStatus')" v-model="form.probStatusName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" />
     </van-cell-group>
 
-    <van-cell-group>
+    <van-cell-group v-if="form.purpose!='考勤申诉'">
       <div class="dot"></div>
       <van-field label="当前学生情况" class="textarea" :readonly="id ? true : false" v-model="form.overview" rows="2" autosize type="textarea" maxlength="400" placeholder="请输入留言" :show-word-limit="id ? false : true" />
     </van-cell-group>
-    <van-cell-group>
+    <van-cell-group v-if="!form.feedbackTypeDescName || form.feedbackTypeDescName=='其他'">
       <div class="dot"></div>
       <van-field label="沟通后家长反馈" class="textarea" :readonly="id ? true : false" v-model="form.feedback" rows="2" autosize type="textarea" maxlength="400" placeholder="请输入留言" :show-word-limit="id ? false : true" />
     </van-cell-group>
@@ -116,6 +116,7 @@ export default {
       inside: query.inside || 0,
       visitFlag: Number(query.visitFlag) || 0,
       uploader: [],
+      isAttError:false,
       dataForm: {
         // 时间下拉框
         status: false,
@@ -148,7 +149,10 @@ export default {
         visiterType: "TEACHER",
         feedbackTypeDesc: "",
         feedbackType: "",
-        probStatus: "",
+        probStatus: 0,
+        probStatusName:'待跟进',
+        objectId:''
+        
       },
       loading: false,
       finished: false,
@@ -179,14 +183,10 @@ export default {
         { name: "暂停", value: "PAUSE" },
         { name: "沉睡", value: "SLEEPY" },
         { name: "流失", value: "LOST" },
+        { name: "假期上课", value: "HOLIDAY_COURSE" },
     
       ],
-      feedbackTypeDescList: [
-        { name: "价格原因", value: "PRICE" },
-        { name: "时间原因", value: "TIME" },
-        { name: "教学不满意", value: "TEACHING" },
-        { name: "其他", value: "OTHER" },
-      ],
+      feedbackTypeDescList: [{ name: "生病", value: "SICK" }, { name: "有事", value: "SOMETHING" }, { name: "不想参加", value: "NO_PARTICIPATE" }, { name: "其他", value: "OTHER" }],
       probStatusList: [
         { name: "已解决", value: 1 },
         { name: "待跟进", value: 0 },
@@ -202,6 +202,16 @@ export default {
     if (browser().android || browser().iPhone) {
       this.statusList.headerStatus = false;
     }
+    if(params.isAttError){
+
+      this.isAttError = params.isAttError
+      this.studentName= params.info.username || null;
+      // studentPhone: params.phone || null,
+      this.form.studentId = params.info.userId || null;
+      this.form.type = params.info.type
+      this.form.purpose = params.info.purpose
+      this.form.objectId = params.info.objectId
+    }
     document.title = this.name || "新增回访记录";
     this.__init();
   },
@@ -246,7 +256,8 @@ export default {
           if (form.feedbackTypeDesc) {
             form.feedbackTypeDescName = "";
             this.feedbackTypeDescList.forEach((item) => {
-              if (item.value == form.feedbackType) {
+              if (item.value == form.feedbackTypeDesc) {
+              
                 form.feedbackTypeDescName = item.name;
               }
             });
@@ -298,11 +309,17 @@ export default {
         this.$toast("请选择回访时间");
         return;
       } else if (!form.feedbackType && form.type == "小课回访") {
+        this.$toast("请选择学员状态");
+        return;
+      } else if (!form.feedbackTypeDesc && form.purpose == "考勤申诉") {
         this.$toast("请选择家长反馈");
         return;
-      } else if (!(form.probStatus + "")) {
+      } else if (!(form.probStatus+'')) {
         this.$toast("请选择问题状态");
         return;
+      }else if(!form.feedback&&form.feedbackTypeDesc=='OTHER'){
+        this.$toast("请填写家长反馈");
+        return
       }
       if (this.clickStatus) {
         return;
@@ -318,6 +335,7 @@ export default {
       let params = {
         ...form,
         visitTime,
+     
         attachments: attachmentsList.join(","),
       };
       // 待回访时要传的参数
@@ -332,6 +350,8 @@ export default {
         setTimeout(() => {
           if (this.inside) {
             this.onAppBack();
+          }else if(this.isAttError){
+            this.$router.back()
           } else if (this.userId) {
             let { visitFlag, ...query } = this.$route.query;
             visitFlag = 0;
@@ -369,9 +389,10 @@ export default {
       }
     },
     onCheckStudent() {
-      if (this.id || this.userId || this.studentId || this.beforeId) {
+      if (this.id || this.userId || this.studentId || this.beforeId || this.isAttError) {
         return;
       }
+
       this.statusList.studentStatus = true;
     },
     onChange(type) {
@@ -381,11 +402,15 @@ export default {
       if ((this.userId || this.beforeId) && type != "probStatus") {
         return;
       }
+      if(this.isAttError && (type=='type' || type=='purpose')){
+        return
+      }
       let visit = this.visit;
       let form = this.form;
       if (type == "type") {
         visit.data = this.typeList;
       } else if (type == "purpose") {
+        
         if (form.type == "其它") {
           visit.data = [{ name: "其它" }, { name: "会员续费" }];
         } else if (form.type == "课程推荐") {
@@ -474,8 +499,8 @@ export default {
         form.purpose = null;
         form.feedbackTypeDescName = null;
         form.feedbackTypeDesc = null;
-        form.probStatus = null;
-        form.probStatusName = null;
+        // form.probStatus = 0;
+        // form.probStatusName = null;
         form.feedbackTypeDescName = null;
         form.feedbackTypeDesc = null;
       } else if (visit.type == "purpose") {
@@ -486,6 +511,7 @@ export default {
       } else if (visit.type == "feedbackTypeDesc") {
         form.feedbackTypeDescName = value.name;
         form.feedbackTypeDesc = value.value;
+        form.feedback = ''
       } else if (visit.type == "probStatus") {
         form.probStatus = value.value;
         form.probStatusName = value.name;

+ 0 - 1
src/views/visitManager/afterVisitList.vue

@@ -206,7 +206,6 @@ export default {
       dataForm.type = type;
     },
     chioseDate(value) {
-      console.log(value, "chioseDate");
       let dataForm = this.dataForm;
       if (dataForm.type == "showStart") {
         this.formatStartTime = dayjs(value).format("YYYY/MM/DD");