江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
6.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg pad">
  3. <view class="searchBox">
  4. <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
  5. </view>
  6. <view class="card">
  7. <view class="myClass">
  8. <view class="leftTxt">我的排课</view>
  9. <view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/mySchedule/mySchedule')">去管理</view>
  10. </view>
  11. </view>
  12. <view class="tabs">
  13. <view class="tab" v-for="(item,index) in tabArr" :key="index" :class="{active: params.status==item.id}"
  14. @click="changeTab(item)">{{ item.text }}</view>
  15. </view>
  16. <view class="screen_row">
  17. <view class="selectItem" @click="showSubject=true">
  18. <view class="text oneRowText">{{screen.subject}}</view>
  19. <view class="downIcon">
  20. <u-icon name="arrow-down"></u-icon>
  21. </view>
  22. </view>
  23. <view class="selectItem" @click="showCar=true">
  24. <view class="text oneRowText">{{screen.car}}</view>
  25. <view class="downIcon">
  26. <u-icon name="arrow-down"></u-icon>
  27. </view>
  28. </view>
  29. <view class="selectItem" @click="showDatePicker=true">
  30. <view class="text">{{screen.timer}}</view>
  31. <view class="downIcon">
  32. <u-icon name="arrow-down"></u-icon>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="list" v-if="list.length">
  37. <view class="card" v-for="(item,index) in list" :key="index">
  38. <appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail')" :item="item"/>
  39. </view>
  40. </view>
  41. <!-- <nodata v-if="!list.length"></nodata> -->
  42. <view style="padding-bottom: 20rpx;" v-if="list.length">
  43. <u-loadmore :status="status" />
  44. </view>
  45. <nodata v-if="!list.length&&status=='nomore'"></nodata>
  46. <UserTab name ='实操训练'></UserTab>
  47. <u-datetime-picker
  48. :show="showDatePicker"
  49. mode="date"
  50. :visibleItemCount="4"
  51. :minDate="1587524800000"
  52. :closeOnClickOverlay="false"
  53. @confirm="confirmDatePicker"
  54. @cancel="showDatePicker=false"
  55. ></u-datetime-picker>
  56. <!-- <u-picker :show="showC" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> -->
  57. <u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
  58. <u-picker :show="showSubject" :columns="subjectTxt" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false"></u-picker>
  59. </view>
  60. </template>
  61. <script>
  62. import { bookingMasterPage, } from '@/config/api.js'
  63. export default {
  64. data() {
  65. return {
  66. tabArr: [{
  67. text: '待上课',
  68. id: 0
  69. },
  70. {
  71. text: '已完成',
  72. id: 2
  73. },
  74. {
  75. text: '已取消',
  76. id: 9
  77. },
  78. ],//状态:0:未签到,1:已签到,2:已签退,3:已过期,9:已取消,示例值(2)
  79. currentTab: 1,
  80. screen: {
  81. subject: '训练科目',
  82. car: '预约车辆',
  83. timer: '预约时间'
  84. },
  85. status: 'loading',
  86. subjectTxt: [
  87. [
  88. {lab: '不限', id: 0},
  89. {lab: '科目二', id: 2},
  90. {lab: '科目三', id: 3},
  91. ]
  92. ],
  93. // :0:不限;2:科目二;3:科目三
  94. showDatePicker: false,
  95. showCar: false,
  96. showSubject: false,
  97. carArr: [
  98. [
  99. {lab: 'C1',id: 1},
  100. {lab: 'C2',id: 2},
  101. ]
  102. ],
  103. carArr: [
  104. [
  105. {lab: '浙A66666学',id: 1},
  106. {lab: '浙00007',id: 2},
  107. ]
  108. ],
  109. params: {
  110. pageNo: 1,
  111. pageSize: 20,
  112. status: 0,
  113. carNumber: '',
  114. bookingTime: []
  115. },
  116. list: []
  117. }
  118. },
  119. onLoad() {
  120. console.log('我的页面')
  121. this.params.coachId = this.vuex_coachId
  122. // this.bookingMasterPageFn()
  123. },
  124. onShow() {
  125. uni.hideTabBar();
  126. this.initList()
  127. },
  128. onPullDownRefresh() {
  129. this.initList()
  130. },
  131. onReachBottom() {
  132. if(this.list<this.total) {
  133. this.initList()
  134. }
  135. },
  136. methods: {
  137. async initList() {
  138. this.status = 'loading'
  139. this.list = []
  140. this.params.pageNo = 1
  141. this.bookingMasterPageFn()
  142. },
  143. async bookingMasterPageFn() {
  144. console.log(this.params)
  145. const {data: res } = await bookingMasterPage(this.params)
  146. // uni.$u.http.get('/api/admin-api/business/booking/master/page', this.params ).then(res => {
  147. // console.log(res)
  148. // }).catch(err => {
  149. // })
  150. this.params.pageNo ++
  151. this.list.push(...res.list)
  152. this.total = res.total
  153. if(this.list.length>=this.total) this.status = 'nomore'
  154. console.log(res)
  155. },
  156. changeTab(item) {
  157. this.params.status = item.id
  158. this.initList()
  159. },
  160. confirmDatePicker(val) {
  161. this.showDatePicker = false
  162. this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  163. this.params.beginTime = this.screen.timer+ ' 00:00:00'
  164. this.params.endTime = this.screen.timer+ ' 23:59:59'
  165. // this.params.bookingTime = [startTimer, endTimer]
  166. this.initList()
  167. },
  168. confirmCar(val) {
  169. let item = val.value[0]
  170. this.screen.car = item.lab
  171. this.params.carNumber = item.lab
  172. this.showCar = false
  173. this.initList()
  174. },
  175. confirmSubject(val) {
  176. let item = val.value[0]
  177. this.screen.subject = item.lab
  178. this.params.subject = item.id
  179. this.initList()
  180. this.showSubject = false
  181. }
  182. }
  183. }
  184. </script>
  185. <style lang="scss" scoped>
  186. .pageBgImg {
  187. .searchBox {
  188. padding: 140rpx 0 24rpx 0;
  189. }
  190. .card {
  191. padding: 0 28rpx;
  192. margin-bottom: 20rpx;
  193. .myClass {
  194. height: 108rpx;
  195. display: flex;
  196. justify-content: space-between;
  197. padding: 0 10rpx;
  198. align-items: center;
  199. .leftTxt {
  200. font-size: 32rpx;
  201. font-weight: 500;
  202. }
  203. .leftBtn {
  204. width: 192rpx;
  205. height: 60rpx;
  206. background: $themC; border-radius: 8rpx;
  207. line-height: 60rpx;
  208. text-align: center;
  209. font-weight: 500;
  210. color: #FFFFFF;
  211. }
  212. }
  213. }
  214. .tabs {
  215. height: 72rpx;
  216. background: #FFFFFF;
  217. border-radius: 16rpx;
  218. display: flex;
  219. line-height: 72rpx;
  220. text-align: center;
  221. color: #ADADAD;
  222. margin: 24rpx 0;
  223. .tab {
  224. flex: 1;
  225. text-align: center;
  226. &.active {
  227. background: rgba(25, 137, 250, 0.1);
  228. border: 2rpx solid #1989FA;
  229. color: $themC;
  230. border-radius: 16rpx;
  231. }
  232. }
  233. }
  234. .screen_row {
  235. display: flex;
  236. margin-bottom: 24rpx;
  237. width: 100%;
  238. justify-content: space-between;
  239. .selectItem {
  240. display: flex;
  241. padding: 0 18rpx;
  242. border: 2rpx solid rgba(25,137,250,0.3);
  243. height: 60rpx;
  244. border-radius: 16rpx;
  245. background-color: #FFFFFF;
  246. line-height: 60rpx;
  247. align-items: center;
  248. width: 29%;
  249. .text {
  250. color: $themC;
  251. flex: 1;
  252. white-space: nowrap;
  253. text-align: center;
  254. }
  255. .downIcon {
  256. width: 24rpx;
  257. }
  258. }
  259. }
  260. .list {
  261. .card {
  262. appointitem-operate {}
  263. }
  264. }
  265. }
  266. </style>