江西小程序管理端
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.

244 lines
5.6 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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="main">
  3. <view class="blueBg">
  4. <!-- <topNavbar title="预约记录"></topNavbar> -->
  5. <view class="pad">
  6. <view class="searchBox">
  7. <searchRow placeholder="搜索学员姓名、学员手机号、考场名称"></searchRow>
  8. </view>
  9. <view class="tabs">
  10. <view class="tab" @click="changeTab(0)" :class="{active: params.writtenoffStatus==0}">待核销</view>
  11. <view class="tab" @click="changeTab(1)" :class="{active: params.writtenoffStatus==1}">已核销</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="navs">
  16. <view class="nav" v-for="(item,index) in tabsList" :key="index" :class="{active: params.subject==item.id}" @click="changeNav(item)">{{ item.text }}</view>
  17. </view>
  18. <view class="pad">
  19. <view class="total_row">
  20. <view class="total"> <text v-if="total">{{total}}条记录</text></view>
  21. <view class="screen" @click="showDate=true">
  22. <view class="text">筛选</view>
  23. <view class="icon">
  24. <image src="@/static/images/coach/screen.png" mode=""></image>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="card" @click="goPage" v-for="(item,index) in list" :key="index">
  29. <appointItem :item="item"/>
  30. </view>
  31. </view>
  32. <view style="padding-bottom: 100rpx;" v-if="list.length">
  33. <u-loadmore :status="status" />
  34. </view>
  35. <nodata v-if="!list.length&&status=='nomore'"></nodata>
  36. <UserTab name ='预约记录'></UserTab>
  37. <u-popup :show="showDate" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true">
  38. <view class="popupBox">
  39. <view class="pad">
  40. <view class="car">
  41. <view class="h1">车型</view>
  42. <view class="car_row">
  43. <view class="carItem" @click="screenCarFn(1)" :class="{active: params.car==1}">C1</view>
  44. <view class="carItem" @click="screenCarFn(2)" :class="{active: params.car==2}">C2</view>
  45. </view>
  46. </view>
  47. <view class="h1" style="transform: translateY(30rpx);margin-bottom: 20rpx;">时间</view>
  48. </view>
  49. <timeScreen @selectDateClick="selectDateClick" @confirmDatePicker="confirmDatePicker" />
  50. </view>
  51. </u-popup>
  52. </view>
  53. </template>
  54. <script>
  55. import { examSimulationPages } from '@/config/api.js'
  56. export default {
  57. data() {
  58. return {
  59. tabsList: [
  60. {id: 0, text: '全部'},
  61. {id: 2, text: '科目二'},
  62. {id: 3, text: '科目三'},
  63. ],
  64. showDate: false,
  65. params: {
  66. pageNo: 1,
  67. pageSize: 20,
  68. coachId: 0,
  69. writtenoffStatus: 0,
  70. subject: 0,
  71. studentName: '',
  72. studentPhone: ''
  73. },
  74. list: [],
  75. status: 'loading',
  76. total: 20
  77. }
  78. },
  79. created() {
  80. this.params.coachId = this.vuex_userInfo.user.coachId
  81. // this.params.deptId = this.vuex_userInfo.user.deptId
  82. // this.examSimulationPagesFn()
  83. this.initList()
  84. },
  85. methods: {
  86. async examSimulationPagesFn() {
  87. let obj = Object.assign({},this.params)
  88. if(obj.subject==0) delete obj.subject
  89. const {data: res} = await examSimulationPages(obj)
  90. this.params.pageNo ++
  91. this.total = res.total
  92. this.list.push(...res.list)
  93. if(this.list.length>=this.total) this.status = 'nomore'
  94. console.log(res)
  95. },
  96. initList() {
  97. this.status = 'loading'
  98. this.list = []
  99. this.params.pageNo = 1
  100. this.examSimulationPagesFn()
  101. },
  102. changeTab(num) {
  103. this.params.writtenoffStatus = num
  104. this.initList()
  105. },
  106. changeNav(item) {
  107. this.params.subject = item.id
  108. this.initList()
  109. },
  110. goPage() {
  111. this.$goPage('/pages/recordEntry/examine/examineRecord/detail/detail')
  112. },
  113. confirmDatePicker() {
  114. this.showDate = true
  115. },
  116. // 选择筛选日期
  117. selectDateClick(val) {
  118. console.log(val)
  119. this.showDate = false
  120. },
  121. screenCarFn(num) {
  122. this.params.car = num
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .popupBox {
  129. .car {
  130. .h1 {
  131. line-height: 100rpx;
  132. }
  133. .car_row {
  134. display: flex;
  135. .carItem {
  136. width: 130rpx;
  137. height: 60rpx;
  138. background: rgba(25,137,250,0.1);
  139. border-radius: 8rpx;
  140. border: 2rpx solid #1989FA;
  141. text-align: center;
  142. line-height: 60rpx;
  143. color: $themC;
  144. margin-right: 58rpx;
  145. &.active {
  146. background: $themC;
  147. color: #fff;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. .main {
  154. width: 100%;
  155. min-height: 100vh;
  156. background: #f3f3f3;
  157. .blueBg {
  158. background: #1989FA;
  159. padding: 140rpx 0 20rpx 0;
  160. }
  161. .total_row {
  162. display: flex;
  163. justify-content: space-between;
  164. height: 82rpx;
  165. align-items: center;
  166. .total {
  167. font-size: 24rpx;
  168. color: #686B73;
  169. text-align: right;
  170. line-height: 82rpx;
  171. }
  172. .screen {
  173. display: flex;align-items: center;
  174. color: $themC;
  175. margin-left: 8rpx;
  176. font-size: 28rpx;
  177. .icon {
  178. width: 24rpx;
  179. height: 24rpx;
  180. }
  181. }
  182. }
  183. .card {
  184. padding: 0 20rpx;
  185. }
  186. }
  187. .searchBox {
  188. padding: 24rpx 0 20rpx 0;
  189. }
  190. .tabs {
  191. display: flex;
  192. width: 100%;
  193. height: 72rpx;
  194. background: #FFFFFF;
  195. border-radius: 16rpx;
  196. .tab {
  197. flex: 1;
  198. text-align: center;
  199. line-height: 72rpx;
  200. color: #ADADAD;
  201. font-size: 28rpx;
  202. &.active {
  203. background: rgba(25,137,250,0.1);
  204. border-radius: 16rpx;
  205. border: 2rpx solid #1989FA;
  206. color: $themC;
  207. font-weight: 600;
  208. }
  209. }
  210. }
  211. .navs {
  212. display: flex;
  213. justify-content: space-between;
  214. color: #fff;
  215. font-size: 28rpx;
  216. padding: 0rpx 108rpx 0rpx 130rpx;
  217. color: $themC;
  218. background: #fff;
  219. height: 100rpx;
  220. .nav {
  221. line-height: 100rpx;
  222. &.active {
  223. font-weight: 500;
  224. position: relative;
  225. &::before {
  226. position: absolute;
  227. left: 50%;
  228. transform: translateX(-50%);
  229. bottom: 20rpx;
  230. content: '';
  231. width: 56rpx;
  232. height: 6rpx;
  233. background: $themC;
  234. border-radius: 3rpx;
  235. }
  236. }
  237. }
  238. }
  239. </style>