Browse Source

考场预约记录

master
unknown 11 months ago
parent
commit
65baab56be
  1. 32
      config/api.js
  2. 2
      manifest.json
  3. 379
      pages/carEntry/examineAppointment/comp/pickDate.vue
  4. 15
      pages/carEntry/examineAppointment/comp/step1.vue
  5. 37
      pages/carEntry/examineAppointment/comp/step2.vue
  6. 40
      pages/carEntry/examineAppointment/comp/step3.vue
  7. 168
      pages/carEntry/examineAppointment/comp/step4.vue
  8. 72
      pages/carEntry/examineAppointment/examineAppointment.vue
  9. 6
      pages/carEntry/operaAppointment/operaAppointment.vue
  10. 161
      pages/carEntry/simulateAppointment/comp/step1.vue
  11. 191
      pages/carEntry/simulateAppointment/comp/step2.vue
  12. 13
      pages/carEntry/simulateAppointment/simulateAppointment.vue
  13. 21
      pages/mineEntry/myAppointment/comp/examin.vue
  14. 47
      pages/mineEntry/myAppointment/detail/detail.vue
  15. 25
      pages/mineEntry/myAppointment/detail/examin.vue
  16. 44
      pages/mineEntry/myAppointment/myAppointment.vue
  17. 9
      pages/mineEntry/myOrder/detail/detail.vue
  18. 2
      pages/tabbar/index/index.vue

32
config/api.js

@ -98,6 +98,38 @@ export const getCardType = (params) => http.get('system/dict/cardType', {params}
export const getSignContract = (data) => http.post('business/contract/signContract', data) export const getSignContract = (data) => http.post('business/contract/signContract', data)
// 查询学员合同签署状态 // 查询学员合同签署状态
export const getContractStatus = (params) => http.get('business/contract/getContractStatus', {params}) export const getContractStatus = (params) => http.get('business/contract/getContractStatus', {params})
// 1获得模拟预约点
export const simulationPoint = (params) => http.get('business/booking/simulation-point/page', {params})
// 2获得模拟器排课
export const simulationClass = (params) => http.get('business/booking/simulation-class/get', {params})
// 3获得模拟器
export const simulationDevices = (params) => http.get('business/booking/simulation-devices/list', {params})
// 1新增实操预约记录
export const masterCreate = (data) => http.post('business/booking/master/create', data)
// 1获得考场
export const examSitePage = (params) => http.get('business/exam-site/list', {params})
// 2获得车辆
export const examCarPage = (params) => http.get('business/exam-car/page', {params})
// 3 获得考场模拟排课
export const examSimulationClass = (params) => http.get('business/exam-simulation-class/get', {params})
// 4 创建预约
export const examSimulationCreate = (data) => http.post('business/exam-simulation-record/create', data)
// 5查看考场模拟记录
export const examSimulationRecord = (params) => http.get('business/exam-simulation-record/page', {params})
// 6 考场模拟详情
export const examSimulationGet = (params) => http.get('business/exam-simulation-record/get', {params})
// 7取消预约
export const cancelSimulation = (data) => http.put(`business/exam-simulation-record/cancelSimulation`, data)
// 1获得实操预约排课
export const scheduleClass = (params) => http.get('business/booking/schedule-class/get', {params})

2
manifest.json

@ -94,7 +94,7 @@
"proxy" : { "proxy" : {
"/api" : { "/api" : {
// "target" : "http://192.168.1.26:48080/", // "target" : "http://192.168.1.26:48080/",
"target" : "http://192.168.1.36:48080/",
"target" : "http://192.168.1.39:48080/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

379
pages/carEntry/examineAppointment/comp/pickDate.vue

@ -0,0 +1,379 @@
<template>
<view class="step1">
<view class="card">
<view class="dateBox">
<view class="month-row">
<view class="month" @click="show=true">{{ currentMonth }}</view>
<view class="arrow">
<u-icon name="arrow-down" :size="12" :color="'#1989FA'"></u-icon>
</view>
</view>
<view class="date_row">
<view class="icon left" @click="changeDateIndex(-1)">
<u-icon name="arrow-left" :size="12" :color="'#fff'"></u-icon>
</view>
<view class="dateArr" >
<view class="dateWidth" v-for="(item,index) in dateArr[currentDay]" :key="index" @click="chooseDate(item)" >
<view class="date" :class="{active: chooseDay==item.date}">
<!-- <view class="dian"></view> -->
<view class="week">{{ item.week }}</view>
<view class="num">{{ item.num }}</view>
</view>
</view>
</view>
<view class="icon right" @click="changeDateIndex(1)">
<u-icon name="arrow-right" :size="12" :color="'#fff'"></u-icon>
</view>
</view>
</view>
</view>
<view class="card" >
<view class="timeCon">
<view class="h2" v-if="timerArr.length">上午</view>
<view class="time_box">
<view class="time_item" v-for="(item,index) in timerArr" :key="index" @click="chooseCourse(item)" :class="{active: courseIds==item.id, disable: item.status!=0}" >
<view class="flex" v-if="item.status==0">
<view class="lab">{{ item.appointmentAlreadyCount ||0 }} <text>/</text> {{ item.appointmentSum}} </view>
<view class="iconArrowBg" v-if="item.appointmentAlreadyCount">
<u-icon name="arrow-right" :size="10" :color="'#fff'"></u-icon>
</view>
</view>
<view class="lab" v-else>{{ statusTxt[item.status] }}</view>
<view class="time">{{ item.classTime }}</view>
</view>
</view>
<view class="h2" v-if="timerArr2.length">下午</view>
<view class="time_box">
<view class="time_item" v-for="(item,index) in timerArr2" :key="index" @click="chooseCourse(item)" :class="{active: courseIds==item.id, disable: item.status!=0}">
<view class="flex" v-if="item.status==0">
<view class="lab">{{ item.appointmentAlreadyCount ||0 }} <text>/</text> {{ item.appointmentSum}} </view>
<view class="iconArrowBg" v-if="item.appointmentAlreadyCount">
<u-icon name="arrow-right" :size="10" :color="'#fff'"></u-icon>
</view>
</view>
<view class="lab" v-else>{{ statusTxt[item.status] }}</view>
<view class="time">{{ item.classTime }}</view>
</view>
</view>
</view>
</view>
<view class="card" v-if="!timerArr2.length&&!timerArr.length">
<nodata>暂无预约排课</nodata>
</view>
<u-datetime-picker
:show="show"
v-model="chooseMonth"
:minDate="minDate"
:maxDate="maxDate"
mode="year-month"
@confirm="changeMonth"
></u-datetime-picker>
</view>
</template>
<script>
import { getDates, getMonthsBetweenDates } from '@/config/utils.js'
import { examSimulationClass } from '@/config/api.js'
export default {
props: ['step', 'FormData'],
data() {
return {
maxDate: 0,
minDate: 0,
monthArr: [],
show: false,
dateArr: [],
currentDay: 0,//
chooseDay: '',
chooseMonth: '',
timerArr: [],
statusTxt: ['可预约', '未开放', '已过期', '已约满', '已约过'], //0 1,2,3
timerArr2: [],
chooseTimerId: '',
endDate: null,
startDate: null,
courseIds: '',
radioVal: '',
}
},
mounted() {
this.initDate()
},
computed: {
currentMonth() {
let tiemr = new Date(this.chooseDay) * 1
return this.$u.date(tiemr, 'yyyy.mm')
}
},
watch: {
courseIds: {
handler(val) {
let allTimer = [...this.timerArr,...this.timerArr2]
let total = allTimer.reduce((pre, item)=>{
if(item.status==1) {
pre.push(item.classTime)
}
return pre
},[])
if(total.length==this.courseIds.length) {
this.radioVal = 0
}
}
}
},
methods: {
//
async examSimulationClassFn() {
let obj = { "examSiteId": this.FormData.examSiteId, "examCarId": this.FormData.carId, "trainType": this.FormData.trainType, "subject": this.FormData.subject, "classDate": this.chooseDay}
const {data: res} = await examSimulationClass(obj)
this.timerArr = res.afternoonSimulationClass
this.timerArr2 = res.morningSimulationClass
//
if(this.chooseDay==this.dateArr[0][0].date) {
let arr = [...this.timerArr,...this.timerArr2]
arr.forEach(item=>{
let timer = new Date() * 1
let date = this.chooseDay+' '+(item.classTime.split('-')[0])
date = date.replace(/-/g,'/');
let timer2 = new Date(date).getTime();
// console.log(timer)
// console.log(timer2)
// console.log(date)
if(timer>timer2) {
item.status = 2
}
})
}
},
//
async initDate() {
this.startDate = this.$u.timeFormat(new Date()*1, 'yyyy-mm-dd');
this.maxDate = this.endDate = new Date('2023-11-30')*1
this.minDate = new Date()*1
this.dateArr = getDates(this.startDate, this.endDate);
this.chooseDay = this.dateArr[0][0].date
console.log(this.dateArr)
this.examSimulationClassFn()
},
//
changeMonth(val) {
let startDate = this.$u.date(val.value, 'yyyy-mm-dd')
for(let i=0; i<this.dateArr.length; i++) {
for(let j=0; j<this.dateArr[i].length; j++) {
let date = this.dateArr[i][j].date
if(startDate==date) {
this.currentDay = i
this.chooseDay = date
}
}
}
this.show = false
},
//
chooseDate(item) {
this.chooseDay = item.date
this.examSimulationClassFn()
// console.log('*****')
// console.log(this.chooseDay)
},
changeDateIndex(num) {
if(this.currentDay==0&&num==-1) return this.$u.toast('已是可选最小日期')
if(this.currentDay==this.dateArr.length-1&&num==1) return this.$u.toast('已是可选最大日期')
this.currentDay = this.currentDay + num
this.chooseDay = this.dateArr[this.currentDay][0].date
},
chooseCourse(item) {
this.FormData.courseIds = this.courseIds = item.id
this.FormData.classDate = item.classDate
this.FormData.classTime = item.classTime
console.log(item)
},
}
}
</script>
<style lang="scss" scoped>
.card {
width: 100%;
margin-bottom: 24rpx;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx;
color: $themC;
}
.arrow {
margin-left: 6rpx;
}
}
.date_row {
width: 100%;
height: 100rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
.dateArr {
display: flex;
padding: 0 70rpx;
// justify-content: space-between;
&.oneDate {
justify-content: center;
}
.dateWidth {
width: 20%;
display: flex;
justify-content: center;
}
.date {
width: 74rpx;
height: 100rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #333;
.dian {
width: 12rpx;
height: 12rpx;
background: #D8D8D8;
border-radius: 50%;
&.active {
background: #1989FA;
}
}
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
.week {
}
.num {
margin-top: 4rpx;
}
}
}
}
}
}
.card {
.timeCon {
padding: 0 24rpx 40rpx 24rpx;
}
.h2 {
line-height: 90rpx;
font-weight: 500;
color: #333;
}
.time_box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
&::after{
display:block;
content:"";
width: 32%;
height:0px;
}
.time_item {
width: 30%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 12rpx;
margin-bottom: 20rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
&.disable {
opacity: 0.4;
}
.lab {
font-size: 28rpx;
font-weight: 500;
}
.time {
font-size: 24rpx;
margin-top: 4rpx;
}
}
}
}
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
margin: 108rpx auto 50rpx auto;
}
.iconArrowBg {
background: #D8D8D8;
width: 26rpx;
height: 26rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-left: 4px;
}
.step2 {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 40px;
.btnBg {
width: 310rpx;
}
}
</style>

15
pages/carEntry/examineAppointment/comp/step1.vue

@ -1,13 +1,13 @@
<template> <template>
<view class="step2"> <view class="step2">
<view class="card" v-for="(item,index) in 10" :key="index" :class="{active: index==2}">
<view class="card" v-for="(item,index) in list" :key="index" :class="{active: siteId==item.id}" @click="chooseSite(item)">
<view class="leftTxt"> <view class="leftTxt">
<view class="name oneRowText">某某模拟驾驶馆</view>
<view class="adr">江西省江西市江西区尚坤丁兰国际1190</view>
<view class="name oneRowText">{{ item.name}}</view>
<view class="adr">{{ item.address }}</view>
</view> </view>
<view class="icon"> <view class="icon">
<image src="@/static/images/car/btn_daohang.png" mode=""></image>
<!-- <image src="@/static/images/car/btn_daohang_cli.png" mode=""></image> -->
<image src="@/static/images/car/btn_daohang_cli.png" mode="" v-if="siteId==item.id"></image>
<image src="@/static/images/car/btn_daohang.png" mode="" v-else></image>
</view> </view>
</view> </view>
<view class="poz_btn"> <view class="poz_btn">
@ -20,9 +20,14 @@
<script> <script>
export default { export default {
props: ['list', 'siteId'],
methods: { methods: {
changeStep(val) { changeStep(val) {
if(!this.siteId) return this.$u.toast('请选择考场')
this.$emit('changeStep', val) this.$emit('changeStep', val)
},
chooseSite(item) {
this.$emit('chooseSite', item)
} }
} }
} }

37
pages/carEntry/examineAppointment/comp/step2.vue

@ -2,9 +2,9 @@
<view class="step3"> <view class="step3">
<view class="card"> <view class="card">
<view class="list"> <view class="list">
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: index==1}">
<view class="num">{{index+1}}号车</view>
<view class="text">{{ item.text }}</view>
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: carId==item.id}" @click="chooseCar(item)">
<view class="num">{{item.carNumber}}号车</view>
<view class="text">{{ item.licnum }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -19,27 +19,32 @@
<script> <script>
export default { export default {
props: ['list', 'carId'],
data() { data() {
return { return {
list: [{
text: '00001',
id: 1
},
{
text: '00002',
id: 1
},
{
text: '00003',
id: 1
},
],
// list: [{
// text: '00001',
// id: 1
// },
// {
// text: '00002',
// id: 1
// },
// {
// text: '00003',
// id: 1
// },
// ],
show: true show: true
} }
}, },
methods: { methods: {
changeStep(val) { changeStep(val) {
if(val==3&&!this.carId) return this.$u.toast('请选择车辆')
this.$emit('changeStep', val) this.$emit('changeStep', val)
},
chooseCar(item) {
this.$emit('chooseCar', item)
} }
} }
} }

40
pages/carEntry/examineAppointment/comp/step3.vue

@ -1,10 +1,10 @@
<template> <template>
<view class="step1"> <view class="step1">
<pickDateTimer/>
<pickDateTimer :FormData="FormData"/>
<view class="btn_row"> <view class="btn_row">
<view class="border btn" @click="changeStep(3)">返回上一步</view>
<view class="border btn" @click="changeStep(2)">返回上一步</view>
<view class="btn" @click="show=true">确认预约</view> <view class="btn" @click="show=true">确认预约</view>
</view> </view>
@ -14,32 +14,32 @@
<view class="content"> <view class="content">
<view class="row"> <view class="row">
<view class="lab">预约类型</view> <view class="lab">预约类型</view>
<view class="val">xxx</view>
<view class="val">考场模拟训练预约</view>
</view> </view>
<view class="row"> <view class="row">
<view class="lab">预约科目</view> <view class="lab">预约科目</view>
<view class="val">xxx</view>
<view class="val">{{ FormData.subject==2?'科目二':'科目三'}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="lab">预约考场</view> <view class="lab">预约考场</view>
<view class="val">2023/08/08 08:009:00</view>
<view class="val">{{ FormData.classDate }}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="lab">预约车型</view> <view class="lab">预约车型</view>
<view class="val">xxx</view>
<view class="val">{{FormData.trainType }}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="lab">预约车辆</view> <view class="lab">预约车辆</view>
<view class="val">xxx</view>
<view class="val">{{ FormData.licnum }}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="lab">预约时间</view> <view class="lab">预约时间</view>
<view class="val">2023/08/08 08:009:00</view>
<view class="val">{{ FormData.classDate }} {{FormData.classTime}}</view>
</view> </view>
</view> </view>
<view class="btn_row"> <view class="btn_row">
<view class="border btn" @click="show = false">返回修改</view> <view class="border btn" @click="show = false">返回修改</view>
<view class="btn">确认</view>
<view class="btn" @click="examSimulationCreateFn">确认</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
@ -47,17 +47,37 @@
</template> </template>
<script> <script>
import pickDateTimer from './pickDate'
import { examSimulationCreate } from '@/config/api.js'
export default { export default {
components: {pickDateTimer},
props: ['step','FormData'],
data() { data() {
return { return {
show: false show: false
} }
}, },
methods: { methods: {
changeStep(val) { changeStep(val) {
this.$emit('changeStep', val) this.$emit('changeStep', val)
},
async examSimulationCreateFn() {
if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间')
let obj = {
"studentId": this.userId,
"classDetailId": this.FormData.courseIds
}
const res = await examSimulationCreate(obj)
if(res.code==0) {
this.show = false
this.$u.toast('预约成功')
setTimeout(()=>{
this.$goPage('/pages/mineEntry/myAppointment/myAppointment?currentTab=3')
},1500)
} }
console.log(res)
}
} }
} }
</script> </script>

168
pages/carEntry/examineAppointment/comp/step4.vue

@ -1,168 +0,0 @@
<template>
<view class="step1">
<pickDateTimer/>
<view class="btn_row">
<view class="border btn" @click="changeStep(3)">返回上一步</view>
<view class="btn" @click="show=true">确认预约</view>
</view>
<u-popup :show="show" mode="center" :round="8">
<view class="popupCon">
<view class="h2">再次确认预约信息</view>
<view class="content">
<view class="row">
<view class="lab">预约类型</view>
<view class="val">xxx</view>
</view>
<view class="row">
<view class="lab">预约科目</view>
<view class="val">xxx</view>
</view>
<view class="row">
<view class="lab">预约考场</view>
<view class="val">2023/08/08 08:009:00</view>
</view>
<view class="row">
<view class="lab">预约车型</view>
<view class="val">xxx</view>
</view>
<view class="row">
<view class="lab">预约车辆</view>
<view class="val">xxx</view>
</view>
<view class="row">
<view class="lab">预约时间</view>
<view class="val">2023/08/08 08:009:00</view>
</view>
</view>
<view class="btn_row">
<view class="border btn" @click="show = false">返回修改</view>
<view class="btn">确认</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
show: false
}
},
methods: {
changeStep(val) {
this.$emit('changeStep', val)
}
}
}
</script>
<style lang="scss" scoped>
.card {
width: 100%;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx;
color: $themC;
}
.arrow {
margin-left: 6rpx;
}
}
.date_row {
width: 100%;
height: 100rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
}
}
}
.popupCon {
padding: 30rpx 50rpx;
.h2 {
font-weight: 600;
color: #333333;
line-height: 70rpx;
font-size: 36rpx;
text-align: center;
}
.content {
padding-bottom: 20rpx;
.row {
padding: 22rpx 0;
display: flex;
font-size: 28rpx;
align-items: center;
.lab {
width: 180rpx;
color: #686B73;
}
.val {
flex: 1;
font-weight: 500;
}
}
}
}
.btn_row {
display: flex;
justify-content: space-between;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
color: $themC;
}
}
}
</style>

72
pages/carEntry/examineAppointment/examineAppointment.vue

@ -33,9 +33,9 @@
</view> </view>
</view> </view>
<step1 v-if="currentStep==1" @changeStep="changeStep"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep"></step3>
<step1 v-if="currentStep==1" @changeStep="changeStep" :list="siteList" @chooseSite="chooseSite" :siteId="FormData.examSiteId"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep" :list="carList" @chooseCar="chooseCar" :carId="FormData.carId"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData"></step3>
<!-- <step4 v-if="currentStep==4" @changeStep="changeStep"></step4> --> <!-- <step4 v-if="currentStep==4" @changeStep="changeStep"></step4> -->
<!-- <step5 v-if="currentStep==5" @changeStep="changeStep"></step5> --> <!-- <step5 v-if="currentStep==5" @changeStep="changeStep"></step5> -->
</view> </view>
@ -46,16 +46,76 @@
import step1 from './comp/step1' import step1 from './comp/step1'
import step2 from './comp/step2' import step2 from './comp/step2'
import step3 from './comp/step3' import step3 from './comp/step3'
import step4 from './comp/step4'
import { examSitePage, examSimulationClass, examCarPage, } from '@/config/api'
// import step5 from './comp/step5' // import step5 from './comp/step5'
export default { export default {
components: { step1, step2, step3, step4,},
components: { step1, step2, step3,},
data() { data() {
return { return {
currentStep: 1
currentStep: 1,
siteParams: {
siteType: '2',
carType: 'C1',
longitude: '',
latitude: ''
},
carParams: { "pageNo": 1, "pageSize": 10, "carType": 'C1',},
FormData: {
examSiteId: '',
carId: '',
subject: 2,
classDate: '',
classTime: '',
licnum: '',
siteName: '',
trainType: 'C1'
},
siteList: [],
carList: [],
carTotal: 20
} }
}, },
onLoad(options) {
if(options.subject) this.FormData.subject = options.subject
this.FormData.trainType = this.vuex_userInfo.trainType
// this.carType =
let vuex_cityInfo = this.$store.state.user.vuex_cityInfo
if(!vuex_cityInfo.lat) {
this.$store.dispatch('getCity')
}else {
this.siteParams.latitude = vuex_cityInfo.lat
this.siteParams.longitude = vuex_cityInfo.lng
}
this.examSitePageFn()
},
methods: { methods: {
//
chooseCar(item) {
this.FormData.carId = item.id
this.FormData.carId = item.id
this.FormData.licnum = item.licnum
console.log(this.FormData.carId)
},
//
chooseSite(item) {
this.FormData.examSiteId = item.id
this.FormData.siteName = item.name
this.examCarPageFn()
},
//
async examSitePageFn() {
const {data: res} = await examSitePage(this.siteParams)
this.siteList = res
},
//
async examCarPageFn() {
this.carParams.examId = this.FormData.examSiteId
const {data: res} = await examCarPage(this.carParams)
this.carParams.pageNo++
this.carList.push(...res.list)
this.carTotal = res.total
},
changeStep(num) { changeStep(num) {
this.currentStep = num this.currentStep = num
} }

6
pages/carEntry/operaAppointment/operaAppointment.vue

@ -33,6 +33,7 @@
import step2 from './comp/step2' import step2 from './comp/step2'
import step3 from './comp/step3' import step3 from './comp/step3'
import step4 from './comp/step4' import step4 from './comp/step4'
import { scheduleClass } from '@/config/api.js'
export default { export default {
components: { coachInfo, step2, step3, step4 }, components: { coachInfo, step2, step3, step4 },
data() { data() {
@ -51,10 +52,15 @@
this.title = '实操训练科目三预约' this.title = '实操训练科目三预约'
this.currentStep = 2 this.currentStep = 2
} }
this.scheduleClassFn()
}, },
methods: { methods: {
changeStep(num) { changeStep(num) {
this.currentStep = num this.currentStep = num
},
async scheduleClassFn() {
let obj = { "coachId": this.vuex_userInfo.coachId, "subject": 2, "classDate": "2023-10-30", "studentId": this.userId}
const {data: res} = await scheduleClass(obj)
} }
} }
} }

161
pages/carEntry/simulateAppointment/comp/step1.vue

@ -1,160 +1,67 @@
<template> <template>
<view class="step1">
<pickDateTimer/>
<view class="step2">
<view class="card" v-for="(item,index) in 10" :key="index" :class="{active: index==2}">
<view class="leftTxt">
<view class="name oneRowText">某某模拟驾驶馆</view>
<view class="adr">江西省江西市江西区尚坤丁兰国际1190</view>
</view>
<view class="icon">
<image src="@/static/images/index/telephone.png" mode=""></image>
<!-- <image src="@/static/images/index/telephone_cli.png" mode=""></image> -->
</view>
</view>
<view class="poz_btn">
<view class="btn_row" >
<!-- <view class="border btn" @click="changeStep(1)">返回上一步</view> -->
<view class="btn" @click="changeStep(2)">下一步</view> <view class="btn" @click="changeStep(2)">下一步</view>
</view> </view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() {
return {
}
},
mounted() {
},
methods: { methods: {
changeStep(val) { changeStep(val) {
this.$emit('changeStep', val) this.$emit('changeStep', val)
},
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card {
width: 100%;
margin-bottom: 24rpx;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx;
color: $themC;
}
.arrow {
margin-left: 6rpx;
}
}
.date_row {
.step2 {
width: 100%; width: 100%;
height: 100rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
.dateArr {
display: flex;
padding: 0 70rpx;
// justify-content: space-between;
&.oneDate {
justify-content: center;
}
.dateWidth {
width: 20%;
display: flex;
justify-content: center;
}
.date {
width: 74rpx;
height: 100rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
.week {
}
.num {
margin-top: 4rpx;
}
}
}
}
}
}
padding-bottom: 120rpx;
.card { .card {
.timeCon {
padding: 0 24rpx 40rpx 24rpx;
}
.h2 {
line-height: 90rpx;
font-weight: 500;
color: #333;
}
.time_box {
padding: 28rpx 36rpx;
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
.time_item {
width: 30%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
border-radius: 12rpx;
color: #333;
margin-bottom: 20rpx;
&.active { &.active {
background: rgba(25,137,250,0.1); background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA; border: 2rpx solid #1989FA;
color: $themC; color: $themC;
} }
&.disable {
opacity: 0.4;
}
.lab {
font-size: 28rpx;
font-weight: 500;
.leftTxt {
width: 0;
flex: 1;
.name {
font-size: 32rpx;
font-weight: 600;
} }
.time {
.adr {
font-size: 24rpx; font-size: 24rpx;
margin-top: 4rpx;
margin-top: 8rpx;
}
} }
.icon {
width: 72rpx;
height: 72rpx;
} }
} }
} }

191
pages/carEntry/simulateAppointment/comp/step2.vue

@ -1,15 +1,8 @@
<template> <template>
<view class="step2">
<view class="card" v-for="(item,index) in 10" :key="index" :class="{active: index==2}">
<view class="leftTxt">
<view class="name oneRowText">某某模拟驾驶馆</view>
<view class="adr">江西省江西市江西区尚坤丁兰国际1190</view>
</view>
<view class="icon">
<image src="@/static/images/index/telephone.png" mode=""></image>
<!-- <image src="@/static/images/index/telephone_cli.png" mode=""></image> -->
</view>
</view>
<view class="step1">
<pickDateTimer/>
<view class="poz_btn"> <view class="poz_btn">
<view class="btn_row" > <view class="btn_row" >
<view class="border btn" @click="changeStep(1)">返回上一步</view> <view class="border btn" @click="changeStep(1)">返回上一步</view>
@ -21,10 +14,20 @@
<script> <script>
export default { export default {
data() {
return {
}
},
mounted() {
},
methods: { methods: {
changeStep(val) { changeStep(val) {
this.$emit('changeStep', val) this.$emit('changeStep', val)
}
},
} }
} }
</script> </script>
@ -37,60 +40,158 @@
padding: 12rpx 32rpx; padding: 12rpx 32rpx;
width: 100%; width: 100%;
background: #F6F6F6; background: #F6F6F6;
}
.step2 {
width: 100%;
padding-bottom: 120rpx;
.card {
padding: 28rpx 36rpx;
.btn_row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
&.active {
padding-bottom: 20rpx;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1); background: rgba(25, 137, 250, 0.1);
border: 2rpx solid #1989FA;
border: 2rpx solid $themC;
color: $themC; color: $themC;
} }
.leftTxt {
width: 0;
flex: 1;
.name {
}
}
}
.card {
width: 100%;
margin-bottom: 24rpx;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600;
color: $themC;
} }
.adr {
font-size: 24rpx;
margin-top: 8rpx;
.arrow {
margin-left: 6rpx;
} }
} }
.date_row {
width: 100%;
height: 100rpx;
position: relative;
.icon { .icon {
width: 72rpx;
height: 72rpx;
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
} }
&.right {
right: 16rpx;
} }
} }
.btn_row {
.dateArr {
display: flex; display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
padding: 0 70rpx;
// justify-content: space-between;
&.oneDate {
justify-content: center;
}
.dateWidth {
width: 20%;
display: flex;
justify-content: center;
}
.date {
width: 74rpx;
height: 100rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx; font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
.week {
&.border {
}
.num {
margin-top: 4rpx;
}
}
}
}
}
}
.card {
.timeCon {
padding: 0 24rpx 40rpx 24rpx;
}
.h2 {
line-height: 90rpx;
font-weight: 500;
color: #333;
}
.time_box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.time_item {
width: 30%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 12rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1); background: rgba(25,137,250,0.1);
border: 2rpx solid $themC;
border: 2rpx solid #1989FA;
color: $themC; color: $themC;
} }
&.disable {
opacity: 0.4;
}
.lab {
font-size: 28rpx;
font-weight: 500;
}
.time {
font-size: 24rpx;
margin-top: 4rpx;
}
} }
} }
}
</style> </style>

13
pages/carEntry/simulateAppointment/simulateAppointment.vue

@ -17,8 +17,8 @@
</view> </view>
</view> </view>
<view class="step_text"> <view class="step_text">
<view class="txt">预约时间</view>
<view class="txt">选择模拟驾驶馆</view> <view class="txt">选择模拟驾驶馆</view>
<view class="txt">预约时间</view>
<view class="txt">选择模拟器</view> <view class="txt">选择模拟器</view>
</view> </view>
</view> </view>
@ -34,6 +34,7 @@
import step1 from './comp/step1' import step1 from './comp/step1'
import step2 from './comp/step2' import step2 from './comp/step2'
import step3 from './comp/step3' import step3 from './comp/step3'
import { simulationDevices, simulationPoint } from '@/config/api.js'
export default { export default {
components: { step1, step2, step3 }, components: { step1, step2, step3 },
data() { data() {
@ -41,9 +42,19 @@
currentStep: 1 currentStep: 1
} }
}, },
created() {
this.simulationPointFn()
},
methods: { methods: {
changeStep(num) { changeStep(num) {
this.currentStep = num this.currentStep = num
},
//
async simulationPointFn() {
const {data: res} = await simulationPoint({schoolId: this.vuex_userInfo.schoolId,lat: this.vuex_cityInfo.lat,lng: this.vuex_cityInfo.lng})
},
async simulationDevicesFn() {
const {data: res} = await simulationDevices()
} }
} }
} }

21
pages/mineEntry/myAppointment/comp/examin.vue

@ -3,11 +3,11 @@
<view class="consultItem"> <view class="consultItem">
<view class="top_row"> <view class="top_row">
<view class="flex"> <view class="flex">
<view class="tag">科目三考场模拟</view>
<view class="schoolName">xx考场</view>
<view class="tag" v-if="item.subject==2">科目二考场模拟</view>
<view class="tag" v-if="item.subject==3">科目三考场模拟</view>
</view> </view>
<view class="status"> <view class="status">
<view class="text">待处理</view>
<view class="text"> {{item.writtenoffStatus==0?'待处理': '已完成'}}</view>
<view class="icon"> <view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon>
</view> </view>
@ -19,9 +19,9 @@
<view class="icon"> <view class="icon">
<image src="@/static/images/car/ic_chexing.png" mode=""></image> <image src="@/static/images/car/ic_chexing.png" mode=""></image>
</view> </view>
<view class="lab">所选车型</view>
<view class="lab">所选考场</view>
</view> </view>
<view class="name">C1</view>
<view class="name">{{ item.examSiteName}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="leftLab"> <view class="leftLab">
@ -30,20 +30,25 @@
</view> </view>
<view class="lab">预约时间</view> <view class="lab">预约时间</view>
</view> </view>
<view class="name">2023/08/08 10:00:00</view>
<view class="name">{{item.classTime}}</view>
</view> </view>
</view> </view>
<view class="border_bottom"> <view class="border_bottom">
<view class="dateBox"> <view class="dateBox">
<view class="date">完成时间2022-01-04</view>
<!-- <view class="date">完成时间2022-01-04</view> -->
<view class="date" v-if="item.cancelTime&&item.recordStatus==9">取消时间{{ item.cancelTime }}</view>
<!-- <view class="date">处理时间2022-01-04</view> --> <!-- <view class="date">处理时间2022-01-04</view> -->
</view> </view>
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')">去评价</view>
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')" v-if="item.writtenoffStatus==1">去评价</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: ['item']
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

47
pages/mineEntry/myAppointment/detail/detail.vue

@ -6,17 +6,17 @@
<view class="card"> <view class="card">
<imitate v-if="type==1"/> <imitate v-if="type==1"/>
<opera v-else-if="type==2"/> <opera v-else-if="type==2"/>
<examin v-else-if="type==3"/>
<examin v-else-if="type==3" :info="info"/>
</view> </view>
<view class="btnCon"> <view class="btnCon">
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')">去评价</view>
<view class="btnBorder" @click="show=true">取消预约</view>
<view class="btnBorder">申请退款</view>
<view class="btnBg" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')" v-if="info.writtenoffStatus==2">去评价</view>
<view class="btnBorder" @click="show=true" v-if="info.recordStatus==0">取消预约</view>
<view class="btnBorder" v-if="info.payStatus==1">申请退款</view>
</view> </view>
</view> </view>
<u-popup :show="show" mode="center" :round="20" @>
<cancelReservation @popupBtnClick="show=false"/>
<u-popup :show="show" mode="center" :round="20" >
<cancelReservation @popupBtnClick="popupBtnClick"/>
</u-popup> </u-popup>
</view> </view>
</template> </template>
@ -25,12 +25,45 @@
import imitate from './imitate' import imitate from './imitate'
import opera from './opera' import opera from './opera'
import examin from './examin' import examin from './examin'
import { examSimulationGet, cancelSimulation } from "@/config/api.js"
export default { export default {
components: { imitate, opera, examin}, components: { imitate, opera, examin},
data() { data() {
return { return {
type: 1, type: 1,
show: false
show: false,
id: '',
info: ''
}
},
onLoad(options) {
this.type = options.type
this.id = options.id
if(this.type==3) {
this.examSimulationGetFn()
}
},
methods: {
async examSimulationGetFn() {
const {data: res} = await examSimulationGet({id: this.id})
this.info = res
},
//
async cancelSimulationFn() {
const {data: res} = await cancelSimulation({id: this.id})
if(res.code==0) {
this.$u.toast('取消成功')
this.examSimulationGetFn()
}
},
//
popupBtnClick(val) {
if(val==1) {
this.cancelSimulationFn()
}else {
this.show = false
}
console.log(val)
} }
} }
} }

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

@ -3,14 +3,13 @@
<view class="consultItem"> <view class="consultItem">
<view class="top_row"> <view class="top_row">
<view class="flex"> <view class="flex">
<view class="tag">科目三考场模拟</view>
<view class="schoolName">xx考场</view>
<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>
<view class="status"> <view class="status">
<view class="text">待处理</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon>
</view>
<view class="text" v-if="info.recordStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[info.recordStatus]}}</view>
</view> </view>
</view> </view>
<view class="target"> <view class="target">
@ -21,7 +20,7 @@
</view> </view>
<view class="lab">所选车型</view> <view class="lab">所选车型</view>
</view> </view>
<view class="name">C1</view>
<view class="name">{{info.trainType}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="leftLab"> <view class="leftLab">
@ -30,18 +29,26 @@
</view> </view>
<view class="lab">预约时间</view> <view class="lab">预约时间</view>
</view> </view>
<view class="name">2023/08/08 10:00:00</view>
<view class="name">{{ info.classTime }}</view>
</view> </view>
</view> </view>
<view class="border_bottom"> <view class="border_bottom">
<view class="dateBox"> <view class="dateBox">
<view class="date">提交预约时间2022-01-04</view>
<view class="date">提交预约时间{{ $u.timeFormat(info.createTime, 'yyyy-mm-dd')}}</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: ['info'],
data() {
return {
statusTxt: ['未签到','已签到','已签退','旷课','已取消',''],//012退39
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

44
pages/mineEntry/myAppointment/myAppointment.vue

@ -9,9 +9,9 @@
<view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view> <view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view>
</view> </view>
<view class="navs"> <view class="navs">
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav===item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view> </view>
<view class="recordTotal">100条记录</view>
<view class="recordTotal">{{total}}条记录</view>
<view class="tabCon" v-show="currentTab==1"> <view class="tabCon" v-show="currentTab==1">
<view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')"> <view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')">
@ -26,8 +26,8 @@
</view> </view>
<view class="tabCon" v-if="currentTab==3"> <view class="tabCon" v-if="currentTab==3">
<view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')">
<examin></examin>
<view class="card" v-for="(item,index) in examList" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail?type=3&id='+item.id)">
<examin :item="item"></examin>
</view> </view>
</view> </view>
@ -40,6 +40,7 @@
import imitate from './comp/imitate' import imitate from './comp/imitate'
import opera from './comp/opera' import opera from './comp/opera'
import examin from './comp/examin' import examin from './comp/examin'
import { examSimulationRecord } from '@/config/api.js'
export default { export default {
components: { imitate, opera, examin}, components: { imitate, opera, examin},
data() { data() {
@ -50,23 +51,46 @@
{text: '考场模拟',id: 3}, {text: '考场模拟',id: 3},
], ],
navList: [ navList: [
{text: '全部', id: 0},
{text: '已完成', id: 1},
{text: '待完成', id: 2},
{text: '已取消', id: 3},
{text: '已过期', id: 4},
{text: '全部', id: -1},
{text: '已签到', id: 1},
{text: '待完成', id: 0},
{text: '已取消', id: 9},
{text: '已过期', id: 3},
], ],
currentTab: 1,
// 012退39
currentTab: 3,
currentNav: 0, currentNav: 0,
examParams: { "pageNo": 1, "pageSize": 10, "keyWord": "", "status": '',},
examList: [],
total: 20
} }
}, },
onLoad(options) {
if(options.currentTab) this.currentTab = options.currentTab
this.examSimulationRecordFn()
},
methods: { methods: {
changeTab(item) { changeTab(item) {
this.currentTab = item.id this.currentTab = item.id
}, },
changeNav(item) { changeNav(item) {
this.currentNav = item.id this.currentNav = item.id
this.examList = []
this.examParams.pageNo = 1
if(item.id==-1) {
this.examParams.status = ''
}else {
this.examParams.status = this.currentNav
}
this.examSimulationRecordFn()
}, },
//
async examSimulationRecordFn() {
const {data: res} = await examSimulationRecord(this.examParams)
this.examParams.pageNo ++
this.examList.push(...res.list)
this.total = res.total
}
} }
} }
</script> </script>

9
pages/mineEntry/myOrder/detail/detail.vue

@ -81,15 +81,6 @@
<view class="label hui">学驾培训费</view> <view class="label hui">学驾培训费</view>
<view class="value hui">2000.02</view> <view class="value hui">2000.02</view>
</view> </view>
<view class="rows">
<view class="flex">
<view class="label hui">代收费</view>
<view class="feeIcon">
<image src="@/static/images/car/ic_fangshi.png" mode=""></image>
</view>
</view>
<view class="value hui">2000.02</view>
</view>
</view> </view>
<view class="border_bottom"> <view class="border_bottom">
<view class="rows"> <view class="rows">

2
pages/tabbar/index/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="main pageBg"> <view class="main pageBg">
<button @click="$goPage('/pages/userCenter/login/face')">进入人脸识别</button>
<!-- <button @click="$goPage('/pages/userCenter/login/face')">进入人脸识别</button> -->
<view style="background-color: #2170FD; width: 100%;height: 20rpx;"></view> <view style="background-color: #2170FD; width: 100%;height: 20rpx;"></view>
<!-- <u-navbar title=" " :bgColor="bgColor" :autoBack="false"> <!-- <u-navbar title=" " :bgColor="bgColor" :autoBack="false">
<view class="" slot="left"> <view class="" slot="left">

Loading…
Cancel
Save