Browse Source

签到修改

master
unknown 2 months ago
parent
commit
dd075368a9
  1. 3
      config/api.js
  2. 4
      config/request.js
  3. 4
      pages/carEntry/operaAppointment/comp/coachInfo.vue
  4. 6
      pages/carEntry/operaAppointment/comp/step1.vue
  5. 25
      pages/carEntry/operaAppointment/operaAppointment.vue
  6. 2
      pages/indexEntry/findShcool/coachComment/coachInfo.vue
  7. 26
      pages/indexEntry/signIn/signAndOut/signAndOut.vue
  8. 3
      pages/mineEntry/myAppointment/comp/comp.scss
  9. 70
      pages/mineEntry/myAppointment/detail/detail.vue
  10. 57
      pages/mineEntry/myAppointment/detail/examin.vue
  11. 61
      pages/mineEntry/myAppointment/detail/imitate.vue
  12. 8
      pages/mineEntry/myAppointment/detail/opera.vue
  13. 2
      pages/mineEntry/myAppointment/myAppointment.vue
  14. 1
      pages/mineEntry/myForecastName/myForecastName.vue
  15. BIN
      static/images/car/coachIcon.png

3
config/api.js

@ -206,6 +206,9 @@ export const signOutAuth = (data) => http.post('business/student/sign/outAuth',
export const signOut = (data) => http.post('business/student/sign/out', data)
// 支付
export const getStudentByPayment = (params={}) => http.get('app/student-record/getStudentByPayment', {params})
// 补签
export const reSignOut = (data) => http.data('app/business/student/sign/reSignOut', data)

4
config/request.js

@ -44,8 +44,8 @@ module.exports = (vm) => {
// 响应拦截
uni.$u.http.interceptors.response.use(async (response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data
// console.log('请求结果')
// console.log(data)
console.log('请求结果')
console.log(data)
if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') {
await refreshToken()
let obj = response.config

4
pages/carEntry/operaAppointment/comp/coachInfo.vue

@ -9,10 +9,10 @@
<view class="rightTxt">
<view class="name_row">
<view class="name">{{ FormData.coachName }}</view>
<view class="tag active" v-if="vuex_userInfo.coachId==FormData.coachId">已绑定</view>
<view class="tag active" v-if="vuex_userInfo.coachId&&vuex_userInfo.coachId==FormData.coachId">已绑定</view>
<view class="tag" v-else>未绑定</view>
</view>
<moreRight text="预约其它教练课程"/>
<!-- <moreRight text="预约其它教练课程"/> -->
</view>
</view>
</view>

6
pages/carEntry/operaAppointment/comp/step1.vue

@ -1,6 +1,6 @@
<template>
<view class="step1">
<coachInfo @click.native="showStep2" :FormData="FormData"/>
<coachInfo :FormData="FormData"/>
<view class="h1">预约时间</view>
<pickDate :FormData="FormData" @updatedForm="updatedForm"/>
<view class="" v-if="showCarList.length">
@ -67,9 +67,7 @@
}
this.$emit('openPopup', num)
},
showStep2() {
this.$emit('showStep2')
},
updatedForm(val) {
this.$emit('updatedForm', val)
}

25
pages/carEntry/operaAppointment/operaAppointment.vue

@ -2,8 +2,8 @@
<view class="pageBgImg">
<topNavbar :title="title"></topNavbar>
<view class="pad" style="padding-bottom: 60rpx;">
<step1 v-if="currentStep==1" @openPopup="openPopup" :FormData="FormData" @showStep2="showStep2" @updatedForm="updatedForm"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData" ref="step2Ref" @updatedForm="updatedForm"></step2>
<step1 @openPopup="openPopup" :FormData="FormData" @updatedForm="updatedForm"></step1>
<!-- <step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData" ref="step2Ref" @updatedForm="updatedForm"></step2> -->
</view>
<u-popup :show="show" mode="center" :round="8">
@ -47,13 +47,13 @@
<script>
import step1 from './comp/step1'
import step2 from './comp/step2'
// import step2 from './comp/step2'
import { masterCreate } from '@/config/api.js'
export default {
components: { step1, step2,},
components: { step1, },
data() {
return {
currentStep: 1,
// currentStep: 1,
title: '实操训练预约',
FormData: {
carId: '',
@ -91,9 +91,7 @@
},
onReachBottom() {
if(this.currentStep==2) {
this.$refs.step2Ref.addCoachPage()
}
},
methods: {
updatedForm(val) {
@ -101,9 +99,9 @@
console.log(val)
this.FormData = val
},
changeStep(num) {
this.currentStep = num
},
// changeStep(num) {
// this.currentStep = num
// },
openPopup() {
this.FormData.classDate = this.FormData.courseArr[0].classDate
this.FormData.showSiteName = [...new Set(this.FormData.courseArr.map(item=>item.siteName))]
@ -118,9 +116,7 @@
}
this.show = true
},
showStep2() {
this.currentStep = 2
},
async masterCreateFn() {
this.show = false
let obj = {
@ -128,6 +124,7 @@
"coachId": this.FormData.coachId,
"classDate": this.FormData.classDate,
"selectScheduleClass": this.FormData.courseArr.map(item=>item.id),
subject: this.subject
// classId: [this.FormData.courseIds]
}
const {data: res} = await masterCreate(obj)

2
pages/indexEntry/findShcool/coachComment/coachInfo.vue

@ -31,6 +31,8 @@
return imageExtensions.test(path);
},
async goSign() {
console.log('没有数据??')
console.log(this.item)
this.$store.commit('upDateSchoolCoach', this.item)
this.$store.commit('upDateSchoolClass', {})
this.$u.utils.clickSignUp()

26
pages/indexEntry/signIn/signAndOut/signAndOut.vue

@ -64,7 +64,7 @@
</template>
<script>
import { getInitBodyFaceVerify, getDescribeBodyFaceVerify, operationSigin, vailStudentInfo, signOutAuth, signOut } from '@/config/api.js'
import { getInitBodyFaceVerify, getDescribeBodyFaceVerify, operationSigin, vailStudentInfo, signOutAuth, signOut, reSignOut } from '@/config/api.js'
export default {
data() {
return {
@ -73,7 +73,8 @@
step1: false,
step2: false,
step3: false,
params: {}
params: {},
count: 0
}
},
onLoad(options) {
@ -108,11 +109,25 @@
}
console.log(this.params)
const res = await fn(this.params)
console.log('第一步校验信息')
console.log(res)
console.log(res.msg)
if(res.code=='200240213') {
this.stepFailureReason = res.msg
if(res.msg=='学员未签退,请先签退') {
if(!this.count) {
this.count ++
console.log('来这了?')
const res2 = await reSignOut({coachId: this.params.coachId})
console.log('来这没有?')
this.vailStudentInfoFn()
console.log('补签结果')
console.log(res2)
}
}
}
console.log('第一步校验结果')
console.log(res)
if(res.code==0) {
this.step1 = true
this.params.key = res.data
@ -175,7 +190,7 @@
if(res.code==0) {
this.step3 = true
let msg = '签到成功'
if(this.params.type==2) {
if(this.params.type==3) {
msg = '签退成功'
}
this.$u.toast(msg)
@ -186,6 +201,7 @@
},
//
Recertification() {
if(!this.step1) return
if(!this.step2) {
// this.siginFn()
this.getInitFaceVerifyFn()

3
pages/mineEntry/myAppointment/comp/comp.scss

@ -36,6 +36,7 @@
.status {
display: flex;
align-items: center;
justify-content: flex-end;
width: 140rpx;
flex-shrink: 0;
text-align: right;
@ -62,7 +63,7 @@
.icon {
width: 30rpx;
height: 30rpx;
height: 32rpx;
}
.lab {

70
pages/mineEntry/myAppointment/detail/detail.vue

@ -4,18 +4,11 @@
<!-- 详情 -->
<view class="pad">
<view class="card">
<imitate v-if="type==1" :info="info"/>
<opera v-else-if="type==2" :info="info" ref="operaRef"/>
<examin v-else-if="type==3" :info="info"/>
<opera :info="info" ref="operaRef"/>
</view>
<view class="btnCon" v-if="type!=2">
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')" v-if="info.writtenoffStatus==2">去评价</view>
<view class="btnBorder" @click="canceClick" v-if="info.recordStatus==0">取消预约</view>
<view class="btnBorder" v-if="info.payStatus==1">申请退款</view>
</view>
<view class="btnCon" v-else>
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')" v-if="info.loginStatus==2">去评价</view>
<view class="btnCon" >
<!-- <view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')" v-if="info.loginStatus==2">去评价</view> -->
<view class="btnBorder" @click="canceClick" v-if="info.loginStatus==0">取消预约</view>
</view>
</view>
@ -26,12 +19,10 @@
</template>
<script>
import imitate from './imitate'
import opera from './opera'
import examin from './examin'
import { examSimulationGet, cancelSimulation, simulationDetail, cancelSimulationDevice, masterDetail, masterCancelBooking } from "@/config/api.js"
import { masterDetail, masterCancelBooking } from "@/config/api.js"
export default {
components: { imitate, opera, examin},
components: { opera, },
data() {
return {
type: 1,
@ -41,22 +32,10 @@
}
},
onLoad(options) {
this.type = options.type
this.id = options.id
if(this.type==3) {
this.examSimulationGetFn()
}else if(this.type==1) {
this.simulationDetailFn()
}else {
this.masterDetailFn()
}
this.masterDetailFn()
},
methods: {
//
async examSimulationGetFn() {
const {data: res} = await examSimulationGet({id: this.id})
this.info = res
},
//
async masterDetailFn() {
const {data: res} = await masterDetail({id: this.id})
@ -65,28 +44,6 @@
})
this.info = res
},
//
async simulationDetailFn(item) {
const {data: res} = await simulationDetail({id: this.id})
this.info = res
},
//
async cancelSimulationFn() {
const res = await cancelSimulation({id: this.id})
console.log('没来到这里?')
// console.log(res)
// if(res.code==0) {
this.$u.toast('取消成功')
this.examSimulationGetFn()
// }
},
//
async cancelSimulationDeviceFn() {
const {data: res} = await cancelSimulationDevice({id: this.id})
this.$u.toast('取消成功')
this.simulationDetailFn()
},
//
async masterCancelBookingFn() {
let ids = this.$refs.operaRef.ids
@ -99,22 +56,13 @@
//
popupBtnClick(val) {
if(val==1) {
if(this.type==1) {
this.cancelSimulationDeviceFn()
}else if(this.type==3) {
this.cancelSimulationFn()
}else {
this.masterCancelBookingFn()
}
this.masterCancelBookingFn()
}
this.show = false
console.log(val)
},
canceClick() {
if(this.type==2) {
let ids = this.$refs.operaRef.ids
if(!ids.length) return this.$u.toast('请选择取消时间段')
}
let ids = this.$refs.operaRef.ids
if(!ids.length) return this.$u.toast('请选择取消时间段')
this.show=true
}
}

57
pages/mineEntry/myAppointment/detail/examin.vue

@ -1,57 +0,0 @@
<template>
<!-- 模拟器 -->
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag" v-if="info.subject==2">科目二考场模拟</view>
<view class="tag" v-if="info.subject==3">科目三考场模拟</view>
<view class="schoolName">{{info.examSiteName}}</view>
</view>
<view class="status">
<view class="text" v-if="info.recordStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[info.recordStatus]}}</view>
</view>
</view>
<view class="target">
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_chexing.png" mode=""></image>
</view>
<view class="lab">所选车型</view>
</view>
<view class="name">{{info.trainType}}</view>
</view>
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_shijian.png" mode=""></image>
</view>
<view class="lab">预约时间</view>
</view>
<view class="name">{{ info.classTime }}</view>
</view>
</view>
<view class="border_bottom">
<view class="dateBox">
<view class="date">提交预约时间{{ $u.timeFormat(info.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.cancelTime">取消时间{{ $u.timeFormat(info.cancelTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
statusTxt: ['未签到','已签到','已签退','旷课','已取消',''],//012退39
}
}
}
</script>
<style lang="scss" scoped>
@import '../comp/comp.scss';
</style>

61
pages/mineEntry/myAppointment/detail/imitate.vue

@ -1,61 +0,0 @@
<template>
<!-- 模拟器 -->
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag">模拟器</view>
<view class="schoolName">{{info.name}}</view>
</view>
<view class="status">
<view class="text" v-if="info.recordStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[info.recordStatus]}}</view>
<!-- <view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view> -->
</view>
</view>
<view class="target">
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_banxing.png" mode=""></image>
</view>
<view class="lab">模拟器编号</view>
</view>
<view class="name">{{info.deviceNum}}</view>
</view>
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_shijian.png" mode=""></image>
</view>
<view class="lab">预约时间</view>
</view>
<view class="name">{{info.classTime}}</view>
</view>
</view>
<view class="border_bottom">
<view class="dateBox">
<view class="date">提交预约时间{{$u.timeFormat(info.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.cancelTime&&info.recordStatus==9">取消时间{{ $u.timeFormat(info.cancelTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.recordStatus==2">完成时间{{$u.timeFormat(info.signOutTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.recordStatus==2">核销人员目前没有字段</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
statusTxt: ['未签到','已签到','已签退','旷课','已取消',''],//012退39
}
}
}
</script>
<style lang="scss" scoped>
@import '../comp/comp.scss';
</style>

8
pages/mineEntry/myAppointment/detail/opera.vue

@ -18,7 +18,7 @@
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_chexing.png" mode=""></image>
<image src="@/static/images/car/coachIcon.png" mode="aspectFill"></image>
</view>
<view class="lab">预约教练</view>
</view>
@ -27,7 +27,7 @@
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_chexing.png" mode=""></image>
<image src="@/static/images/car/ic_chexing.png" mode="aspectFill"></image>
</view>
<view class="lab">预约车辆</view>
</view>
@ -36,7 +36,7 @@
<view class="row">
<view class="leftLab">
<view class="icon">
<image src="@/static/images/car/ic_shijian.png" mode=""></image>
<image src="@/static/images/car/ic_shijian.png" mode="aspectFill"></image>
</view>
<view class="lab">预约日期</view>
</view>
@ -45,7 +45,7 @@
<view class="row rowBotton" v-for="(item,index) in info.bookingDetailRespVOS" :key="index" :class="{blue: (item.loginStatus==1||item.loginStatus==1),hui: (item.loginStatus==3||item.loginStatus==9)}">
<view class="leftLab" v-if="index==0">
<view class="icon">
<image src="@/static/images/car/ic_shijian.png" mode=""></image>
<image src="@/static/images/car/listIcon.png" mode="aspectFill"></image>
</view>
<view class="lab">预约时段</view>
</view>

2
pages/mineEntry/myAppointment/myAppointment.vue

@ -10,7 +10,7 @@
</view>
<view class="recordTotal" ><text v-if="total">{{total}}条记录</text></view>
<view class="card" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail?type=2&id='+item.id)">
<view class="card" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail?id='+item.id)">
<opera :item="item"></opera>
</view>

1
pages/mineEntry/myForecastName/myForecastName.vue

@ -53,6 +53,7 @@
console.log(res)
},
itemClickFn(item) {
return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
if(item.applyStep==3) {
this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+item.trainingSchoolId+'&trainingApplyId='+ item.trainingApplyId)
}else if(item.applyStep==4) {

BIN
static/images/car/coachIcon.png

After

Width: 32  |  Height: 28  |  Size: 957 B

Loading…
Cancel
Save