Browse Source

首页结算统计接口对接

master
unknown 4 months ago
parent
commit
4ff4845bc7
  1. 36
      common/css/app.scss
  2. 9
      config/api.js
  3. 3
      config/request.js
  4. 2
      config/site.config.js
  5. 8
      manifest.json
  6. 3
      pages/indexEntry/settlement/detail/detail.vue
  7. 228
      pages/indexEntry/settlement/settlement.vue
  8. 263
      pages/login/login - 副本.vue
  9. 27
      pages/login/login.vue
  10. 1
      pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue
  11. 1
      pages/recordEntry/operate/mySchedule/mySchedule.vue
  12. 3
      pages/recordEntry/operate/todayStudent/todayStudent.vue
  13. 4
      pages/recordEntry/student/addStudent/addStudent.vue
  14. 4
      pages/recordEntry/student/addStudent/searchStudent.vue
  15. 3
      pages/recordEntry/student/studentDetail/studentDetail.vue
  16. 20
      pages/tabbar/mine/index.vue
  17. 53
      pages/tabbar/operateTrain/index.vue
  18. 56
      pages/tabbar/statistics/comp/operateCoach.vue
  19. 20
      pages/tabbar/statistics/comp/stage.vue
  20. 104
      pages/tabbar/statistics/index.vue
  21. 4
      pages/tabbar/student/index.vue
  22. 3
      pages/userCenter/forgetPwd/forgetPwd.vue
  23. 3
      pages/userCenter/myCar/myCar.vue
  24. 3
      pages/userCenter/myCar/notBound/notBound.vue
  25. 32
      pages/userCenter/personaInfo/personaInfo.vue
  26. 3
      pages/userCenter/refund/refund.vue
  27. 14
      pages/userCenter/scanCode/scanCode.vue
  28. 23
      pages/userCenter/scanCode/scanCodeSchool.vue
  29. 4
      pages/userCenter/schoolCoach/coachComment/coachComment.vue
  30. 3
      pages/userCenter/schoolCoach/schoolCoach.vue
  31. 3
      pages/userCenter/schoolSite/schoolSite.vue
  32. 3
      pages/userCenter/settled/settled.vue
  33. 13
      pages/userCenter/studentComment/studentComment.vue
  34. 2
      store/modules/user.js

36
common/css/app.scss

@ -42,9 +42,10 @@ view {
.pageBgImg {
font-size: 28rpx;;
color: #333;
background: url('http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/topPageBg.png') #F6F6F6 no-repeat;
background-size: 100% 324rpx;
min-height: 100vh;
background: #F6F6F6;
background-color: #1989fa;
width: 100%;
height: 324rpx;
}
.pad {
padding: 0 28rpx;
@ -119,21 +120,20 @@ image {
}
/* 通用 */
::-webkit-input-placeholder { color:#ADADAD; }
::-moz-placeholder { color:#ADADAD; } /* firefox 19+ */
:-ms-input-placeholder { color:#ADADAD; } /* ie */
input:-moz-placeholder { color:#ADADAD; }
::-webkit-input-placeholder { color:#BBBBBB; }
::-moz-placeholder { color:#BBBBBB; } /* firefox 19+ */
:-ms-input-placeholder { color:#BBBBBB; } /* ie */
input:-moz-placeholder { color:#BBBBBB; }
input::-webkit-input-placeholder {
color: #BBBBBB !important;
}
input::-moz-input-placeholder {
color: #BBBBBB !important;
}
input::-ms-input-placeholder {
color: #BBBBBB !important;
}
input::-webkit-input-placeholder { color: #CDCDCD !important; }
input::-moz-input-placeholder { color: #CDCDCD !important; }
input::-ms-input-placeholder { color: #CDCDCD !important; }
// /* webkit专用 */
.input1::-webkit-input-placeholder { color:#00f; }
// #input2::-webkit-input-placeholder { color:#090; background:lightgreen; text-transform:uppercase; }
// #input3::-webkit-input-placeholder { font-style:italic; text-decoration:overline; color:#999; }
// /* mozilla专用 */
// #input1::-moz-placeholder { color:#00f; }
// #input2::-moz-placeholder { color:#090; background:lightgreen; text-transform:uppercase; }
// #input3::-moz-placeholder { font-style:italic; text-decoration:overline; color:#999; }

9
config/api.js

@ -5,6 +5,15 @@
export const getStudentDynamics = (data) => http.post('business/coach/getStudentDynamics', data)
// 登录后查看是不是要签名
export const needSign = (data) => http.post('business/coach/needSign', data)
// 获得当日结算统计
export const getSettlementStatistics = (data) => http.post('business/coach/getSettlementStatistics', data)
// 获得教练的学员结算列表
export const settle_list = (data) => http.post('business/coach/settle_list', data)

3
config/request.js

@ -25,8 +25,9 @@ module.exports = (vm) => {
if(contentTypeIndex) {
// alert(contentTypeIndex)
config.header['content-type'] = ContentType[contentTypeIndex]
}
}else {
config.header['content-type'] = 'application/json;charset=utf-8'
}
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头

2
config/site.config.js

@ -3,7 +3,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
// WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.37:8318/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://123.6.232.1:8099/',//非代理地址
// TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/',
httpPrefix: 'app-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'

8
manifest.json

@ -2,8 +2,8 @@
"name" : "洛阳驾校端",
"appid" : "__UNI__BD23957",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.1",
"versionCode" : 101,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -86,8 +86,8 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.1.38:8318/",
// "target" : "http://work.lyjppt.com:8099/",
"target" : "http://192.168.1.43:8318/",
// "target" : "http://123.6.232.1:8099",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {

3
pages/indexEntry/settlement/detail/detail.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg ">
<topNavbar title="结算明细"></topNavbar>
<view class="pad">
@ -49,6 +51,7 @@
</view>
</view>
</view>
</view>
</template>
<script>

228
pages/indexEntry/settlement/settlement.vue

@ -1,165 +1,175 @@
<template>
<!-- 结算明细 -->
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="结算明细"></topNavbar>
<view class="pad">
<searchRow placeholder="搜索学员姓名/学员手机号"/>
</view>
<scroll-view class="scroll-view_w" scroll-x="true" scroll-with-animation :scroll-into-view="'tab'+currentTab" scroll-left="140">
<searchRow placeholder="搜索学员姓名/学员手机号" @searchFn="searchFn"/>
<view class="tabs">
<view class="tab" v-for="(item,index) in tabData" :key="index" @click="changeTab(item)" :class="{active: currentTab==item.id}" :id="'tab'+item.id">{{ item.text }}</view>
<view class="rightPad"></view>
<view class="tab" v-for="(item,index) in tabData" :key="index" @click="changeTab(item)"
:class="{active: params.payStep==item.id}" :id="'tab'+item.id">{{ item.text }}</view>
</view>
</view>
<!-- <scroll-view class="scroll-view_w" scroll-x="true" scroll-with-animation
:scroll-into-view="'tab'+params.payStep" scroll-left="140"> -->
<!-- </scroll-view> -->
</view>
</scroll-view>
<view class="content pad">
<view class="month_row" @click="showDate=true">
<!-- <view class="month">8</view>
<view class="unit"></view> -->
<view class="month_row" @click="showDatePicker=true">
<view class="month">{{params.searchMonth}}</view>
<!-- <view class="unit"></view> -->
<view class="">{{ selectDate }}</view>
<view class="iconFont">
<u-icon name="arrow-down" color="#686B73" size="14"></u-icon>
</view>
</view>
<view class="total">结算金额共计</view>
<view class="record">
<view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/indexEntry/settlement/detail/detail')">
<stage/>
</view>
</view>
</view>
<u-popup :show="showDate" mode="bottom" :round="20" >
<view class="popupCon">
<view class="popTab">
<view class="tabItem" :class="{active: currentPopTab==1}" @click="changePopTab(1)">月份选择</view>
<view class="tabItem" :class="{active: currentPopTab==2}" @click="changePopTab(2)">自定义时间</view>
<view class="total">结算金额共计: 待对接</view>
<view class="record" v-if="list.length">
<view class="card" v-for="(item,index) in list" :key="index"
@click="$goPage('/pages/indexEntry/settlement/detail/detail')">
<stage :item="item"/>
</view>
<view class="timer">
<view class="tabCon" v-if="currentPopTab==1">
<view class="dateBtn" @click="showDatePickerFn(1)" :class="{hui: !date1}">{{ date1 }}</view>
<!-- <u-datetime-picker-my
:show="show"
v-model="value1"
mode="year-month"
:showToolbar="false"
:visibleItemCount="4"
@confirm="confirm"
></u-datetime-picker-my> -->
</view>
<view class="tabCon" v-else>
<view class="dateBtn" :class="{hui: !date2}" @click="showDatePickerFn(2)">{{ date2 }}</view>
<view class="to"></view>
<view class="dateBtn" :class="{hui: !date3}" @click="showDatePickerFn(3)">{{ date3 }}</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
<view class="btnBg" @click="selectDateClick">确定</view>
<!-- <u-picker-my></u-picker-my> -->
</view>
</view>
</u-popup>
<u-datetime-picker
:show="showDatePicker"
v-model="value1"
mode="year-month"
:visibleItemCount="4"
:closeOnClickOverlay="false"
@confirm="confirmDatePicker"
@cancel="cancelDatePicker"
></u-datetime-picker>
<u-datetime-picker :show="showDatePicker" v-model="value1" mode="year-month" :visibleItemCount="4"
:closeOnClickOverlay="false" @confirm="confirmDatePicker" @cancel="cancelDatePicker"></u-datetime-picker>
</view>
</template>
<script>
import stage from '../../tabbar/statistics/comp/stage.vue'
import {
settle_list
} from '@/config/api.js'
export default {
components: { stage },
components: {
stage
},
data() {
return {
date3: '',
date2: '',
date1: '',
value1: '',
showDate: false,
showDatePicker: false,
show: false,
tabData: [{
text: '全部',
id: 10
},
{
text: '阶段一',
id: 0
},
{
text: '阶段',
text: '阶段一',
id: 1
},
{
text: '阶段',
text: '阶段',
id: 2
},
{
text: '阶段',
text: '阶段',
id: 3
},
{
text: '阶段',
text: '阶段',
id: 4
},
{
text: '阶段六',
id: 5
},
}
],
currentTab: 2,
currentPopTab: 2,
currentBtnDate: 1,
selectDate: '',//
selectDate: '', //
params: {
"pageNo": 1,
"pageSize": 20,
"queryCondition": "",
// "coachId": '',
"payStep": 0,
"searchMonth": ''
},
list: [],
status: 'loading'
}
},
onLoad() {
this.params.searchMonth = uni.$u.timeFormat(Date.now(), 'yyyy/mm');
this.initList()
},
onPullDownRefresh() {
this.initList()
},
onReachBottom() {
if(this.total>this.list.length) {
this.settle_listFn()
}
},
methods: {
// tab
changeTab(val) {
this.currentTab = val.id
searchFn(val) {
this.params.queryCondition = val
this.initList()
},
//
changePopTab(num) {
this.currentPopTab = num
initList() {
this.list = []
this.params.pageNo = 1
this.settle_listFn()
},
// 1
showDatePickerFn(num) {
this.showDate = false
this.showDatePicker = true
this.currentBtnDate = num
// tab
changeTab(val) {
if(this.params.payStep == val.id) return
this.params.payStep = val.id
this.initList()
},
// 2
//
confirmDatePicker(val) {
this.showDate = true
this.showDatePicker = false
let date = uni.$u.date(val.value, 'yyyy-mm-dd')
if(this.currentBtnDate==1) {
date = uni.$u.date(val.value, 'yyyy-mm')
}
this['date'+this.currentBtnDate] = date
let date = uni.$u.date(val.value, 'yyyy/mm')
this.params.searchMonth = date
this.initList()
},
// 3使
selectDateClick() {
this.showDate = false
this.selectDate = this['date'+this.currentBtnDate]
//
async settle_listFn() {
let obj = Object.assign({},this.params)
if(obj.payStep==0) delete obj.payStep
obj.searchMonth = obj.searchMonth.replace('/','')
// delete obj.searchMonth
const {
data: res
} = await settle_list(obj)
let list = res.list
this.params.pageNo ++
if(list&&list.length) {
this.list.push(...list)
}
if(this.list.length>=res.total) {
this.status='nomore'
}
this.total = res.total
}
}
}
</script>
<style lang="scss" scoped>
.scroll-view_w {
width: 100%;
margin: 30rpx 0 40rpx 0;
.pageBgImg {
height: 100%;
}
// .scroll-view_w {
// width: 100%;
// margin: 30rpx 0 0rpx 0;
.tabs {
display: flex;
flex-wrap: nowrap;
padding: 0 0rpx 10rpx 32rpx;
width: auto;
justify-content: space-between;
padding: 30rpx 0;
width: 100%;
.tab {
width: 108rpx;
width: 118rpx;
height: 60rpx;
border-radius: 8rpx;
border: 2rpx solid #FFFFFF;
@ -167,7 +177,6 @@
color: #fff;
text-align: center;
line-height: 60rpx;
margin-right: 28rpx;
flex-shrink: 0;
&.active {
@ -179,44 +188,51 @@
width: 96rpx;
}
}
.rightPad {
min-width: 10rpx;
height: 60rpx;
}
}
}
// }
.month_row {
display: flex;
align-items: center;
color: $themC;
padding: 20rpx 0 0rpx 0;
.month {
font-size: 50rpx;
font-weight: 600;
font-size: 36rpx;
margin-right: 10rpx;
// font-weight: 600;
}
.unit {
font-size: 30rpx;
margin: 0 4rpx;
}
}
.total {
padding: 20rpx 0;
}
.card {
margin-bottom: 24rpx;
}
.popupCon {
height: 430rpx;
.popTab {
display: flex;
padding: 40rpx 32rpx;
.tabItem {
font-size: 32rpx;
color: #333;
margin-right: 60rpx;
&.active {
color: $themC;
position: relative;
&::before {
content: '';
position: absolute;
@ -233,11 +249,13 @@
}
}
.tabCon {
display: flex;
align-items: center;
padding-left: 32rpx;
padding-top: 20rpx;
.dateBtn {
width: 280rpx;
height: 80rpx;
@ -247,10 +265,12 @@
text-align: center;
color: $themC;
font-size: 32rpx;
&.hui {
border: 2rpx solid #E8E9EC;
}
}
.to {
font-size: 32rpx;
margin: 0 40rpx;

263
pages/login/login - 副本.vue

@ -1,263 +0,0 @@
<template>
<view class="main">
<view class="u-back-top">
<view class="backBox">
<u-icon name="arrow-left" color="#333" size="28"></u-icon>
</view>
</view>
<view class="title">
<image :src="imgUrl" mode=""></image>
</view>
<view class="form">
<view class="form-item" @click="tenantClick">
<mySelect :value="FormData.tenantName" placeholder="请选择服务地区"/>
</view>
<view class="form-item">
<view class="inputBox my">
<u--input placeholder="请输入登录账号" border="none" clearable v-model="FormData.username"></u--input>
</view>
</view>
<view class="form-item">
<view class="inputBox my">
<u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input>
</view>
</view>
<view class="forgetTps"> <text @click="$u.toast('请联系管理员重置密码!')">忘记密码</text></view>
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </view>
<!-- <view class="radioWrap">
<u-checkbox-group >
<u-checkbox v-model="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" ></u-checkbox>
</u-checkbox-group>
<view class="privacyText">
<text>用户协议</text> <text>隐私协议</text>
</view>
</view> -->
</view>
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @cancel="show=false" @close="show=false"></u-picker>
<u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet>
</view>
</template>
<script>
import { loginPwd, tenantPage } from '@/config/api.js'
import { imgUrl } from '@/config/site.config.js'
export default {
data() {
return {
isCheck: false,
codeText: '获取验证码',
FormData: {
username: '',
password: '',
tenantName: ''
},
imgUrl: imgUrl+'loginTitle.png',
codeOn: false,
show: false,
columnsArea: [],
list: [],
title: '请选择您要登录的角色',
showRole: false,
roleObj: {}
}
},
onLoad() {
this.tenantPageFn()
this.roleObj = this.$store.state.user.vuex_role
},
onPullDownRefresh() {
this.tenantPageFn()
},
computed: {
btnHighlight() {
let { FormData } = this
return FormData.username.length>3&&FormData.password.length>3&&FormData.tenantName
}
},
methods: {
tenantClick() {
if(!this.columnsArea.length) return this.$u.toast('没有获得服务地区,请下拉刷新重新加载')
this.show = true
},
selectClick(item) {
this.showRole = false
this.chooseIdentity(item.name)
// alert(item.name)
},
chooseIdentity(name) {
let url = '/pages/tabbar/statistics/index'
this.$store.commit('upDateIdentity', name)
if(name=='实操教练') {
url = '/pages/tabbar/student/index'
}else if(name=='模拟器老师') {
url = '/pages/tabbar/examSimulation/index'
}
uni.reLaunch({
url
})
},
confirmArea(val) {
let item = val.value[0]
this.FormData.tenantName =item.name
this.$store.commit('upDateTenantId', item.id)
this.show = false
},
async tenantPageFn() {
let obj = {
pageNo: 1,
pageSize: 100,
status: 0
}
const {data: res} = await tenantPage(obj)
this.columnsArea = [res.list]
console.log(res)
},
//
groupChangeEnvnt(e) {
this.isCheck = e.value
console.log('是否选择协议', this.isCheck)
},
//
async goSms() {
const {
FormData
} = this
if (!FormData.phone) return this.$u.toast('请输入手机号');
if (!this.isPhone) return this.$u.toast('手机号格式有误');
if (this.codeOn) return
const data = await getLoginCode({
codeType: 1,
phone: FormData.phone,
})
console.log(data)
//
var time = 60;
var timer = setInterval(() => {
time--;
this.codeText = time + "秒后重新发送"
this.codeOn = true;
if (time == 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeOn = false;
}
}, 1000);
},
async submitFn() {
// return
if(!this.btnHighlight) return
const {data: res} = await loginPwd(this.FormData)
this.$store.commit('update_vuex_loginInfo', res)
// this.chooseIdentity('')
// return
await this.$store.dispatch('getUserInfo')
console.log(this.role)
this.list = []
this.role.forEach((item)=>{
let obj = {
name: this.roleObj[item]
}
this.list.push(obj)
})
if(this.list.length>1) {
this.showRole = true
}else {
this.chooseIdentity(this.list[0].name)
}
console.log(this.list)
}
}
}
</script>
<style lang="scss" scoped>
.main {
width: 100%;
min-height: 100vh;
// background: url('http://192.168.1.20:81/zhili/image/20230922/f5e2cfaf05f441c1b9f897e7dc284f1d.png') no-repeat;
// background-size: 100% 360rpx;
.u-back-top {
padding: 32rpx 0 0 0;
.backBox {
padding: 24rpx;
}
}
.title {
width: 658rpx;
height: 94rpx;
margin: 100rpx auto 100rpx auto;
}
.form {
padding: 0 46rpx;
.form-item {
height: 112rpx;
background: #F4F7FF;
border-radius: 16rpx;
width: 100%;
line-height: 112rpx;
display: flex;
margin-bottom: 40rpx;
padding: 0 40rpx;
.prefix {
display: flex;
align-items: center;
font-size: 32rpx;
color: #333;
font-weight: 600;
}
.inputBox {
flex: 1;
}
.code {
color: #BBBBBB;
margin-left: 30rpx;
&.active {
color: $themC
}
}
}
.forgetTps {
font-size: 28rpx;
color: $themC;
margin-top: -20rpx;
text-align: right;
}
.loginBtn {
width: 100%;
height: 112rpx;
background: rgba(25,137,250,0.3);
border-radius: 16rpx;
text-align: center;
line-height: 112rpx;
font-size: 32rpx;
font-weight: 600;
color: #fff;
margin-top: 100rpx;
&.active {
background: rgba(25,137,250,1);
}
}
.radioWrap {
display: flex;
align-items: center;
margin-top: 40rpx;
.privacyText {
font-size: 24rpx;
color: #888E94;
text {
color: $themC;
}
}
}
}
}
</style>

27
pages/login/login.vue

@ -17,12 +17,14 @@
</view>
</view>
<view class="inputBox my">
<u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<!-- <u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input> -->
<input v-model="FormData.phone" placeholder="请输入手机号" type="number" maxlength="11" >
</view>
</view>
<view class="form-item">
<view class="inputBox my">
<u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input>
<!-- <u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input> -->
<input type="text" placeholder="请输入验证码" v-model="FormData.code">
</view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
</view>
@ -63,10 +65,11 @@
return uni.$u.test.mobile(this.FormData.phone)
},
btnHighlight() {
return this.isPhone&&uni.$u.test.code(this.FormData.code, 4)
return this.isPhone&&this.FormData.code*1>999
}
},
methods: {
//
changeRadio(val) {
this.isCheck = val
@ -112,13 +115,14 @@
this.$store.commit('update_vuex_loginInfo',res.data)
await this.$store.dispatch('getUserInfo')
if(res.userType==5) {
this.showRole = true
}else {
if(res.userType==3) this.$store.commit('upDateIdentity', '实操教练')
if(res.userType==4) this.$store.commit('upDateIdentity', '校长')
uni.switchTab({
url: '/pages/tabbar/statistics/index'
})
}else {
this.showRole = true
}
},
selectClick(item) {
this.showRole = false
@ -140,6 +144,9 @@
min-height: 100vh;
// background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat;
// background-size: 100% 360rpx;
.uni-input-placeholder {
color: #BBBBBB !important;
}
.u-back-top {
padding: 32rpx 0 0 0;
.backBox {
@ -176,6 +183,14 @@
.inputBox {
flex: 1;
input {
display: block;
width: 100%;
height: 100%;
display: block;
line-height: 112rpx;
font-size: 30rpx;
}
}
.code {
color: #BBBBBB;

1
pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue

@ -221,6 +221,7 @@
//
chooseDate(item) {
this.chooseDay = item.date
this.radioVal = ''
this.scheduleClassGetFn()
// console.log('*****')
// console.log(this.chooseDay)

1
pages/recordEntry/operate/mySchedule/mySchedule.vue

@ -64,6 +64,7 @@
}else {
let pickDateRef = this.$refs.pickDateRef
if(!pickDateRef.timerArr.length||!pickDateRef.timerArr2.length) return this.$u.toast('没有排课计划,请添加排课计划')
pickDateRef.radioVal = ''
this.step = val
}
// this.$emit('changeStep', val)

3
pages/recordEntry/operate/todayStudent/todayStudent.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="上课学员"></topNavbar>
<view class="con" v-if="list&&list.length">
@ -58,6 +60,7 @@
</view>
<nodata v-else style="margin-top: 320rpx;"></nodata>
</view>
</view>
</template>
<script>

4
pages/recordEntry/student/addStudent/addStudent.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="选择学员"></topNavbar>
<view class="pad">
@ -25,7 +27,7 @@
<view class="btnBg" @click="studentBindCoachFn">确认学员</view>
</view>
</view>
</view>
</view>
</template>

4
pages/recordEntry/student/addStudent/searchStudent.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="选择学员"></topNavbar>
<view class="pad">
@ -24,7 +26,7 @@
<view class="btnBg" @click="addSearchSudent">确认学员</view>
</view>
</view>
</view>
</view>
</template>

3
pages/recordEntry/student/studentDetail/studentDetail.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="学员详情"></topNavbar>
<view class="pad" >
@ -16,6 +18,7 @@
</view>
</view>
</view>
</view>
</template>
<script>

20
pages/tabbar/mine/index.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<view class="status_bar"></view>
<view class="" style="height: 44rpx;"></view>
@ -28,10 +30,12 @@
</view>
</view>
<u-action-sheet :actions="list" title="请选择您要登录的角色" :show="showRole" @select="selectClick" @close="showRole=false" ></u-action-sheet>
<UserTab name ='我的'></UserTab>
</view>
</view>
</template>
<script>
@ -49,9 +53,23 @@
},
onShow() {
uni.hideTabBar();
this.test()
// this.getIpAddress()
},
methods: {
test() {
let a = 1
function fn () {
let a = 2
function fn2 () {
let a = 3
console.log(a)
}
fn2()
console.log(a)
}
fn()
},
goPage(item) {
// if(item.text=='') {
// uni.switchTab({
@ -77,7 +95,7 @@
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
{text: '我的签名', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/signature/signature'},
// {text: '', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/signature/signature'},
// {text: '退', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
]

53
pages/tabbar/operateTrain/index.vue

@ -1,20 +1,21 @@
<template>
<view class="pageBg">
<view class="pageBgImg pad">
<view class="status_bar"></view>
<view class="" style="height: 44rpx;"></view>
<view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
<searchRow placeholder="搜索学员姓名、学员手机号" @searchFn="searchFn"></searchRow>
</view>
<view class="card">
<view class="myClass">
<view class="leftTxt">我的排课</view>
<view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/mySchedule/mySchedule')">去管理</view>
</view>
<!-- <view class="myClass">
<view class="leftTxt">今日预约学员</view>
<view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/todayStudent/todayStudent')">去管理</view>
</view> -->
</view>
</view>
<div class="pad">
<view class="tabs">
<view class="tab" v-for="(item,index) in tabArr" :key="index" :class="{active: params.status==item.id}"
@click="changeTab(item)">{{ item.text }}</view>
@ -39,35 +40,25 @@
</view>
</view>
</view>
<view class="list" v-if="list.length">
<view class="card" v-for="(item,index) in list" :key="index">
<appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail?id='+item.id)" :item="item"/>
</view>
</view>
<!-- <nodata v-if="!list.length"></nodata> -->
<view style="padding-bottom: 100rpx;" v-if="list.length">
<view v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
<UserTab name ='实操训练'></UserTab>
</div>
<!-- <u-datetime-picker
:show="showDatePicker"
mode="date"
:closeOnClickOverlay="true"
:visibleItemCount="4"
:minDate="1587524800000"
@confirm="confirmDatePicker"
@cancel="cancelDate"
cancelText="不限日期"
@close="showDatePicker=false"
></u-datetime-picker> -->
<u-calendar :show="showDatePicker" ref="calendar" @confirm="confirmDatePicker" @close="cancelDate" :minDate="minDate" :maxDate="maxDate"></u-calendar>
<u-picker :show="showCar" :columns="carColumns" keyName="licnum" @confirm="confirmCar" @cancel="showCar=false" :closeOnClickOverlay="true" @close="showCar=false"></u-picker>
<u-picker :show="showSubject" :columns="subjectTxt" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false" :closeOnClickOverlay="true" @close="showSubject=false"></u-picker>
</view>
</template>
@ -145,6 +136,23 @@
}
},
methods: {
searchFn(val) {
// isPhone = this. uni.$u.test.mobile(this.FormData.phone)
if(/^\d+$/.test(val)) {
//
if( !this.$u.test.mobile(val)) return this.$u.toast('请输入正确的电话号码')
this.params.studentName = ''
this.params.studentPhone = val
}else {
//
this.params.studentPhone = ''
this.params.studentName = val
}
this.status = 'loading'
this.list = []
this.params.pageNo = 1
this.bookingMasterPageFn()
},
cancelDate() {
this.showDatePicker=false
this.params.bookingStartTime = ''
@ -156,6 +164,8 @@
this.status = 'loading'
this.list = []
this.params.pageNo = 1
this.params.studentName = ''
this.params.studentPhone = ''
this.bookingMasterPageFn()
},
async bookingMasterPageFn() {
@ -218,7 +228,12 @@
</script>
<style lang="scss" scoped>
.pageBg {
padding-bottom: 100rpx;
.pageBgImg {
height: 100%;
padding-bottom: 30rpx;
}
.searchBox {
padding: 24rpx 0;
}
@ -254,7 +269,7 @@
line-height: 72rpx;
text-align: center;
color: #ADADAD;
margin: 24rpx 0;
margin: -24rpx 0 24rpx 0;
.tab {
flex: 1;
text-align: center;

56
pages/tabbar/statistics/comp/operateCoach.vue

@ -14,10 +14,10 @@
</view>
<view class="card priceBox">
<view class="blueLab">今日已结算金额</view>
<view class="price">36333.66</view>
<view class="price">{{statistics.amount}}</view>
<view class="flex-b">
<view class="data">截止2023/08/08 11:00:00</view>
<view class="refresh">
<view class="data">截止{{statistics.refreshDate}}</view>
<view class="refresh" @click="getSettlementStatisticsFn">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
@ -28,24 +28,24 @@
<view class="h1"> 结算统计</view>
<view class="tab_box">
<tabDate/>
<tabDate />
</view>
<view class="card">
<view class="chart">
<columnChart/>
<columnChart />
</view>
</view>
<view class="flex-b">
<view class="h1">结算明细</view>
<moreRight text="更多"/>
<moreRight text="更多" @click.native="$goPage('/pages/indexEntry/settlement/settlement')"/>
</view>
<view class="record">
<view class="card" v-for="(item,index) in 10" :key="index">
<stage/>
<view class="card" v-for="(item,index) in list" :key="index">
<stage :item="item"/>
</view>
</view>
<view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
<UserTab name ='统计'></UserTab>
<UserTab name='统计'></UserTab>
</view>
</template>
@ -53,22 +53,54 @@
import stage from './stage'
import columnChart from './columnChart'
import tabDate from './tabDate'
import {
getSettlementStatistics,
settle_list
} from '@/config/api.js'
export default {
components: { stage, columnChart, tabDate },
components: {
stage,
columnChart,
tabDate
},
data() {
return {
value1: '',
currentTab: 1,
statistics: {},
list: []
}
},
onLoad() {
mounted() {
this.getSettlementStatisticsFn()
this.settle_listFn()
},
methods: {
tabClick(num) {
this.currentTab = num
},
async getSettlementStatisticsFn() {
let obj = {
searchDateType: uni.$u.timeFormat(Date.now(), 'yyyy/mm'),
// coachId: this.vuex_coachId || ''
}
const {
data: res
} = await getSettlementStatistics(obj)
this.statistics = res
console.log(res)
},
async settle_listFn() {
let obj = {
"pageNo": 1,
"pageSize": 10,
}
const {
data: res
} = await settle_list(obj)
this.list = res.list || []
}
}
}
</script>

20
pages/tabbar/statistics/comp/stage.vue

@ -1,17 +1,25 @@
<template>
<view class="li">
<view class="name_row">
<view class="name">张三三</view>
<view class="price">+¥1,130.86</view>
<view class="name">{{item.studentName}}</view>
<view class="price"><text >¥ </text> {{item.amount}}</view>
</view>
<view class="stage">
<view>第一阶段</view>
<view>2023/08/08 10:55:21</view>
<view>{{item.payStep}}</view>
<view>{{item.tradeDate}}</view>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
type: Object,
default: {}
}
}
}
</script>
<style lang="scss" scoped>
@ -34,6 +42,10 @@
font-size: 32rpx;
color: $themC;
font-weight: 500;
text {
margin: 0 2rpx 0 0rpx;
font-size: 24rpx;
}
}
}

104
pages/tabbar/statistics/index.vue

@ -1,8 +1,56 @@
<template>
<view class="main" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }">
<operateCoach v-if="identity=='实操教练'"/>
<principal v-if="identity=='校长'||identity=='驾校财务'"/>
<!-- <operateCoach v-if="identity=='实操教练'"/>
<principal v-if="identity=='校长'||identity=='驾校财务'"/> -->
<view class="content">
<view class="status_bar"></view>
<view class="" style="height: 30rpx;"></view>
<view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.name }}教练</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.schoolName }}</view>
<!-- <view class="tag">合作教练</view> -->
</view>
</view>
<view class="card priceBox">
<view class="blueLab">今日已结算金额</view>
<view class="price">{{statistics.amount}}</view>
<view class="flex-b">
<view class="data">截止{{statistics.refreshDate}}</view>
<view class="refresh" @click="getSettlementStatisticsFn">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="h1"> 结算统计</view>
<view class="tab_box">
<tabDate />
</view>
<view class="card">
<view class="chart">
<columnChart />
</view>
</view>
<view class="flex-b">
<view class="h1">结算明细</view>
<moreRight text="更多" @click.native="$goPage('/pages/indexEntry/settlement/settlement')"/>
</view>
<view class="record">
<view class="card" v-for="(item,index) in list" :key="index">
<stage :item="item"/>
</view>
</view>
<view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
</view>
<UserTab name ='统计'></UserTab>
<u-popup :show="show" mode="center" round="20rpx">
@ -14,18 +62,29 @@
</view>
</template>
<script>
import operateCoach from './comp/operateCoach'
import principal from './comp/principal'
import stage from './comp/stage'
import columnChart from './comp/columnChart'
import tabDate from './comp/tabDate'
import { imgUrl } from '@/config/site.config'
import { needSign } from '@/config/api.js'
import {
getSettlementStatistics,
settle_list
} from '@/config/api.js'
export default {
components: {
operateCoach,
principal
stage,
columnChart,
tabDate
},
data() {
return {
value1: '',
currentTab: 1,
statistics: {},
list: [],
imgUrl: imgUrl+'indexTopBanner.png',
backgroundSize: '100% 492rpx',
show: false,
@ -33,11 +92,17 @@
},
onShow() {
uni.hideTabBar();
this.getSettlementStatisticsFn()
this.settle_listFn()
},
onLoad() {
this.needSignFn()
},
mounted() {
},
methods: {
//
async needSignFn() {
const {data: res} = await needSign()
if(res) {
@ -47,12 +112,39 @@
goPage() {
this.show = false
this.$goPage('/pages/userCenter/signature/signature')
},
tabClick(num) {
this.currentTab = num
},
async getSettlementStatisticsFn() {
let obj = {
searchDateType: uni.$u.timeFormat(Date.now(), 'yyyymm'),
// coachId: this.vuex_coachId || ''
}
const {
data: res
} = await getSettlementStatistics(obj)
this.statistics = res
console.log(res)
},
async settle_listFn() {
let obj = {
"pageNo": 1,
"pageSize": 10,
}
const {
data: res
} = await settle_list(obj)
this.list = res.list || []
}
}
}
</script>
<style lang="scss" scoped>
@import './comp/comp.scss';
.box {
padding: 40rpx 50rpx;
text-align: center;

4
pages/tabbar/student/index.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg pad" >
<!-- <view class="pad" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }" > -->
<view class="status_bar"></view>
@ -98,6 +100,7 @@
<u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
<u-picker :show="showClass" :columns="classArr" keyName="name" @confirm="confirmClass" @cancel="showClass=false"></u-picker>
</view>
</view>
</template>
<script>
@ -233,7 +236,6 @@
<style lang="scss" scoped>
.pad {
min-height: 100vh;
padding-bottom: 110rpx;
}
.card {

3
pages/userCenter/forgetPwd/forgetPwd.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="修改密码"></topNavbar>
<view class="form pad">
@ -29,6 +31,7 @@
<view class="btnBg" :class="{hui: !highlight}" @click="updatePasswordFn">确认修改</view>
</view>
</view>
</view>
</template>
<script>

3
pages/userCenter/myCar/myCar.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="我的车辆"></topNavbar>
<view class="pad">
@ -31,6 +33,7 @@
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
</template>
<script>

3
pages/userCenter/myCar/notBound/notBound.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="未绑定的车辆"></topNavbar>
<view class="pad">
@ -22,6 +24,7 @@
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
</view>
</template>
<script>

32
pages/userCenter/personaInfo/personaInfo.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="人个中心"></topNavbar>
<view class="pad">
@ -36,13 +38,14 @@
</view> -->
<view class="btnBox">
<view class="logout" @click="$goPage('/pages/login/login')">退出登录</view>
<view class="logout" @click="$goPage('/pages/userCenter/forgetPwd/forgetPwd')">修改密码</view>
<view class="logout" @click="loginOut">退出登录</view>
<!-- <view class="logout" @click="$goPage('/pages/userCenter/forgetPwd/forgetPwd')">修改密码</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
@ -70,6 +73,9 @@
console.error('Invalid phone number format');
return phoneNumber;
}
},
loginOut() {
this.$store.commit('goLogin')
}
}
}
@ -93,23 +99,27 @@
}
}
.btnBox {
display: flex;
justify-content: center;
flex-direction: column;
// display: flex;
// justify-content: center;
// flex-direction: column;
// width: 100%;
// align-items: center;
// margin: 188rpx 0;
position: fixed;
bottom: 20rpx;
left: 0;
padding: 0 30rpx;
width: 100%;
align-items: center;
margin: 188rpx 0;
}
.logout {
width: 396rpx;
height: 72rpx;
width: 100%;
height: 100rpx;
background: #FFFFFF;
border-radius: 8rpx;
border: 2rpx solid #E8E9EC;
font-size: 28rpx;
color: #ADADAD;
text-align: center;
line-height: 72rpx;
margin-bottom: 30rpx;
line-height: 100rpx;
}
</style>

3
pages/userCenter/refund/refund.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="学员退款"></topNavbar>
<view class="pad">
@ -12,6 +14,7 @@
</view>
</view>
</view>
</view>
</template>
<script>

14
pages/userCenter/scanCode/scanCode.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="个人二维码"></topNavbar>
<view class="pad">
@ -22,6 +24,7 @@
</view> -->
</view>
</view>
</view>
</template>
<script>
@ -57,18 +60,7 @@
// this.refresh = null
},
methods: {
test() {
function newObj(name) {
this.name = name
}
let myname = new newObj('joe')
const dep = this.depClone(myname, newObj)
console.log(dep)
},
depClone(obj, fu) {
let protoType = fu.protoType
},
changeTab(item) {
if(item.id==this.currentType) return
this.currentType = item.id

23
pages/userCenter/scanCode/scanCodeSchool.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="驾校二维码"></topNavbar>
<view class="pad">
@ -18,6 +20,7 @@
</view>
</view>
</view>
</view>
</template>
<script>
@ -32,7 +35,7 @@
this.$nextTick(()=>{
this.refresh()
})
this.test()
},
methods: {
refresh() {
@ -42,7 +45,6 @@
schoolId,
schoolName: encodeURIComponent(schoolName),
QrType: 1,
isSchool: 1,
})
// canvas
@ -59,7 +61,21 @@
// canvas
qr.drawCanvas();
}
},
test() {
// ,,
let reg = /^哈*$/
let b = reg.test('哈哈')
//
let reg2 = /^哈*$/
let b2 = reg2.test('') //false
let reg3 = new RegExp(/^1\d{10}$/)
let b3 = reg3.test('18267103167') //false
console.log( b3)
},
}
}
</script>
@ -91,4 +107,5 @@
margin-left: 6rpx;
}
}
</style>

4
pages/userCenter/schoolCoach/coachComment/coachComment.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="教练详情"></topNavbar>
<view class="pad">
@ -11,7 +13,7 @@
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
</view>
</template>

3
pages/userCenter/schoolCoach/schoolCoach.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="驾校教练"></topNavbar>
<view class="pad">
@ -28,6 +30,7 @@
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
</template>

3
pages/userCenter/schoolSite/schoolSite.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="驾校场地"></topNavbar>
<view class="pad">
@ -30,6 +32,7 @@
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
</template>

3
pages/userCenter/settled/settled.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<view class="searchBox">
<topNavbar title="待结算记录"></topNavbar>
@ -54,6 +56,7 @@
</view>
</view>
</view>
</template>
<script>

13
pages/userCenter/studentComment/studentComment.vue

@ -1,4 +1,6 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="学员评价"></topNavbar>
<view class="pad">
@ -11,6 +13,10 @@
<view class="tab" :class="{active: this.params.condition==2}" @click="changeTab(2)">有图{{ totalType.total3 }}</view>
<view class="tab" :class="{active: this.params.condition==3}" @click="changeTab(3)">有视频{{ totalType.total4 }}</view>
</view>
</view>
</view>
<div class="pad">
<view class="list">
<view class="card" v-for="(item,index) in list" :key="index">
<commentItem :item="item" />
@ -21,7 +27,7 @@
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'" style="margin-top: 100rpx;"></nodata>
</view>
</div>
</view>
</template>
@ -136,7 +142,10 @@
<style lang="scss" scoped>
.pageBgImg {
height: auto;
padding-bottom: 10rpx;
}
.card {
padding: 28rpx;
margin-bottom: 20rpx;

2
store/modules/user.js

@ -3,7 +3,7 @@ import addApi from '../../common/sdk/qqmap-wx-jssdk.min.js'; // 引入
const user = {
state: {
identity: uni.getStorageSync('identity')?uni.getStorageSync('identity'):1,
identity: uni.getStorageSync('identity')?uni.getStorageSync('identity'):'实操教练',
vuex_cityInfo: uni.getStorageSync('vuex_cityInfo') ? uni.getStorageSync('vuex_cityInfo') : {city: '杭州市'},
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {user:{}},
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},

Loading…
Cancel
Save