index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view class="safeArea">
  3. <view class="appointment">
  4. <view class="appointmentItem appointmentHead">
  5. <view class="imgBox"><image :src="$method.splitImgHost(listData.splitImgHost)"></image></view>
  6. <u-line color="#EEEEEE" />
  7. <view class="title">{{ listData.applyName }}</view>
  8. </view>
  9. <view class="appointmentItem appointmentTime">
  10. <view class="item">
  11. <view class="labelName">报名时间:</view>
  12. <view class="valName">{{ $method.timestampToTime(listData.applyStartTime) }} ~ {{ $method.timestampToTime(listData.applyEndTime) }}</view>
  13. </view>
  14. <u-line color="#EEEEEE" />
  15. <view class="item">
  16. <view class="labelName">温馨提示:</view>
  17. <view class="valName">{{ listData.applyIntroduce }}</view>
  18. </view>
  19. </view>
  20. <view class="appointmentItem appointmentMajor">
  21. <view class="top">
  22. <view class="labelName">报考专业:</view>
  23. <view class="valName">{{ listData.major }}</view>
  24. </view>
  25. </view>
  26. <view class="appointmentItem appointmentInfo">
  27. <view class="item">
  28. <text class="labelName">
  29. <text style="opacity: 0;">姓</text>
  30. 名:
  31. </text>
  32. {{ listData.realname }}
  33. </view>
  34. <u-line color="#EEEEEE" />
  35. <view class="item">
  36. <text class="labelName">身份证:</text>
  37. {{ listData.idCard }}
  38. </view>
  39. </view>
  40. <view class="appointmentItem appointmentType">
  41. <view class="item">
  42. <view class="labelName">学员类型:</view>
  43. <u-radio-group placement="column" v-model="radioInfo">
  44. <u-radio
  45. :customStyle="{ marginBottom: '8px' }"
  46. v-for="(item, index) in radiolist"
  47. :key="index"
  48. :name="item.name"
  49. v-if="listData.applyStatus.indexOf(item.name) !== -1"
  50. >
  51. {{ item.label }}
  52. </u-radio>
  53. </u-radio-group>
  54. </view>
  55. </view>
  56. <view class="btn" @click="next">下一步</view>
  57. </view>
  58. <!-- 弹框-->
  59. <u-popup v-model="showTip" mode="center" class="tipModel">
  60. <view class="tipBox">
  61. <view class="title">温馨提示</view>
  62. <view class="main">
  63. <view class="item">您所报考的【设备安装施工员】专业,</view>
  64. <view class="item">考试次数已经用完。</view>
  65. <view class="item">需要预约考试的补考学员,</view>
  66. <view class="item">请先购买补考机会。</view>
  67. </view>
  68. <view class="btn">
  69. <view class="btn1 cancel" @click="showTip = false">知道了</view>
  70. <view class="btn1 submit" @click="submit">马上缴费</view>
  71. </view>
  72. </view>
  73. </u-popup>
  74. </view>
  75. </template>
  76. <script>
  77. import { mapGetters } from 'vuex';
  78. export default {
  79. data() {
  80. return {
  81. showTip: false,
  82. radiolist: [{ name: '1', label: '非补考学员' }, { name: '2', label: '补考学员' }],
  83. goodsId: 0,
  84. gradeId: 0,
  85. applyStatus: '',
  86. listData: {
  87. applyStatus: []
  88. }, //页面数据
  89. radioInfo: ''
  90. };
  91. },
  92. onLoad(option) {
  93. this.goodsId = Number(option.goodsId);
  94. this.gradeId = Number(option.gradeId);
  95. this.getInfo();
  96. },
  97. methods: {
  98. getInfo() {
  99. var data = {
  100. goodsId: this.goodsId,
  101. gradeId: this.gradeId
  102. };
  103. this.$api.getApplysubscribe(data).then(res => {
  104. if (res.data.data.applyStatus) {
  105. res.data.data.applyStatus = res.data.data.applyStatus.split(',');
  106. }
  107. this.listData = res.data.data;
  108. });
  109. },
  110. next() {
  111. if (!this.radioInfo) {
  112. uni.showToast({
  113. title: '请选择您的考试身份',
  114. icon: 'none'
  115. });
  116. return;
  117. }
  118. let data = {
  119. applyId: this.listData.applyId,
  120. applyStatus: this.radioInfo,
  121. goodsId: this.goodsId,
  122. gradeId: this.gradeId
  123. };
  124. this.$api.getApplysubscribeNext(data).then(res => {
  125. if (res.data.code === 500) {
  126. uni.showModal({
  127. content: res.data.msg,
  128. showCancel: false
  129. });
  130. } else {
  131. if (res.data.data === 1 || res.data.data === 2) {
  132. this.$navTo.togo('/pages2/appointment/order', {
  133. applyId: this.listData.applyId,
  134. applyStatus: this.radioInfo,
  135. goodsId: this.goodsId,
  136. dataId:res.data.data
  137. });
  138. }
  139. if (res.data.data === 3) {
  140. this.showTip = true;
  141. }
  142. }
  143. });
  144. },
  145. submit() {}
  146. }
  147. };
  148. </script>
  149. <style>
  150. page {
  151. background-color: #eaeef1;
  152. }
  153. .appointmentType .u-radio__label {
  154. margin-left: 16rpx !important;
  155. margin-right: 116rpx !important;
  156. }
  157. .tipModel .u-mode-center-box {
  158. background-color: transparent !important;
  159. }
  160. </style>
  161. <style scoped lang="scss">
  162. .appointment {
  163. padding: 16rpx;
  164. .appointmentItem {
  165. background: #ffffff;
  166. border-radius: 16rpx;
  167. margin-bottom: 16rpx;
  168. .item {
  169. padding: 24rpx 0;
  170. }
  171. .labelName {
  172. font-size: 28rpx;
  173. font-family: PingFang SC;
  174. font-weight: 500;
  175. color: #999999;
  176. margin-bottom: 16rpx;
  177. line-height: 1;
  178. }
  179. .valName {
  180. font-size: 30rpx;
  181. font-family: PingFang SC;
  182. font-weight: 500;
  183. color: #333333;
  184. }
  185. }
  186. .appointmentHead {
  187. padding-top: 16rpx;
  188. .imgBox {
  189. width: 590rpx;
  190. height: 232rpx;
  191. margin: 0 auto;
  192. background: #ccc;
  193. overflow: hidden;
  194. }
  195. .title {
  196. padding: 24rpx 28rpx 31rpx 31rpx;
  197. font-size: 30rpx;
  198. font-weight: bold;
  199. font-family: PingFang SC;
  200. color: #333333;
  201. }
  202. }
  203. .appointmentTime {
  204. padding: 10rpx 30rpx 0;
  205. }
  206. .appointmentMajor {
  207. padding: 34rpx 30rpx 24rpx;
  208. }
  209. .appointmentInfo {
  210. padding: 8rpx 30rpx;
  211. }
  212. .appointmentType {
  213. padding: 8rpx 30rpx 4rpx;
  214. .u-radio__label {
  215. margin-left: 16rpx;
  216. margin-right: 116rpx;
  217. }
  218. }
  219. .btn {
  220. width: 526rpx;
  221. height: 80rpx;
  222. line-height: 80rpx;
  223. background: #007aff;
  224. border-radius: 40rpx;
  225. font-size: 30rpx;
  226. font-family: PingFang SC;
  227. font-weight: bold;
  228. color: #ffffff;
  229. margin: 40rpx auto;
  230. text-align: center;
  231. }
  232. }
  233. .tipBox {
  234. width: 640rpx;
  235. padding: 30rpx 36rpx 40rpx;
  236. background: #ffffff;
  237. border-radius: 24rpx;
  238. font-family: PingFang SC;
  239. .title {
  240. text-align: center;
  241. font-size: 30rpx;
  242. font-weight: bold;
  243. color: #333333;
  244. margin-bottom: 40rpx;
  245. }
  246. .main {
  247. font-size: 30rpx;
  248. font-weight: 500;
  249. color: #666666;
  250. line-height: 48rpx;
  251. margin-bottom: 40rpx;
  252. }
  253. .btn {
  254. display: flex;
  255. justify-content: center;
  256. .btn1 {
  257. width: 200rpx;
  258. height: 80rpx;
  259. line-height: 80rpx;
  260. text-align: center;
  261. background: #f5f5f5;
  262. border-radius: 40px;
  263. font-size: 30rpx;
  264. font-weight: bold;
  265. color: #007aff;
  266. margin: 0 20rpx;
  267. &.submit {
  268. background: #007aff;
  269. color: #fff;
  270. }
  271. }
  272. }
  273. }
  274. </style>