detail.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <view class="order-detail">
  3. <view class="content info">
  4. <view class="order-info">
  5. <!-- <image class="icon" :src="info.goodsList[0].goodsInfo.goodsPath" mode=""></image> -->
  6. <view class="shop-info">
  7. <view class="title">
  8. {{ info.goodsList[0].goodsInfo.activityName }}
  9. </view>
  10. <view class="goods-desc">
  11. 活动时间: {{ info.goodsList[0].goodsInfo.activityStartTime }} 至 {{ info.goodsList[0].goodsInfo.activityEndTime
  12. }}
  13. </view>
  14. <view class="price-box">
  15. <view class="goods-desc">
  16. 报名人数:
  17. </view>
  18. <view class="goods-desc">
  19. {{ signupDetailList.length || 0 }}人
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="content">
  26. <view class="title"> 报名信息 </view>
  27. <view v-for="(item, index) in signupDetailList">
  28. <view class="item" v-for=" obj in item">
  29. <view class="label"> {{ obj.name }} </view>
  30. <view class="value" v-for="o in obj.value" v-if="!obj.isImg">
  31. {{ o }}
  32. </view>
  33. <view class="value" v-else>
  34. <image v-for="(img, index) in obj.value" @click="clickImg(obj.value, index)" :src="img" mode="widthFix"
  35. style="width: 150rpx; height: 150rpx;"></image>
  36. </view>
  37. </view>
  38. <!-- uniapp 下划线 -->
  39. <u-divider v-if="signupDetailList.length - 1 != index"></u-divider>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import { qrCode } from "@/api/order.js";
  46. import { payDetails, queryPayOrder, unRefund } from "@/api/payment.js";
  47. import { getActivityOrdersByOrderNo } from '@/api/activity.js'
  48. export default {
  49. data() {
  50. return {
  51. isVisual: false, //是否是虚拟商品
  52. codeData: "123",
  53. show: false,
  54. isJumped: false,
  55. loading: false,
  56. btnLoading: false,
  57. oldBright: 0,
  58. info: {
  59. goodsList: [{ goodsState: "" }],
  60. payment: {
  61. paymentWay: "",
  62. pay: false
  63. },
  64. extend: "",
  65. },
  66. dataCollectVo: null,
  67. signupDetail: null,
  68. signupDetailList: [],
  69. isNotTime: false,
  70. };
  71. },
  72. watch: {
  73. // isNotTime(val) {
  74. // if(this.isNotTime){
  75. // this.payDetails(this.info.orderNo)
  76. // }
  77. // }
  78. },
  79. filters: {
  80. },
  81. computed: {
  82. },
  83. methods: {
  84. clickImg(list, index) {
  85. uni.previewImage({
  86. urls: list,
  87. current: list[index]
  88. })
  89. },
  90. // 获取订单详情
  91. payDetails(orderNo) {
  92. payDetails(orderNo).then((res) => {
  93. this.info = res.content;
  94. this.$forceUpdate()
  95. // 查询报名的人数信息
  96. // getOrderDetail()
  97. getActivityOrdersByOrderNo({
  98. orderNo: orderNo,
  99. }).then(({ content }) => {
  100. const { list, dataCollectVo } = content;
  101. try {
  102. this.signupDetail = list.map(e => e.signupDetail);
  103. // 报名信息
  104. this.signupDetailList = this.signupDetail.map(e => {
  105. const list = JSON.parse(e);
  106. console.log('list', list);
  107. return list.map(e => {
  108. // 判断是否为附件
  109. let type = e.hasOwnProperty('uploadType') && !!e.uploadType ? true : false;
  110. return {
  111. name: e.dataName,
  112. value: e.content,
  113. isImg: type
  114. }
  115. })
  116. })
  117. console.log('报名信息', this.signupDetail);
  118. // 表单模板数据
  119. this.dataCollectVo = dataCollectVo.data;
  120. this.$forceUpdate()
  121. } catch (error) {
  122. uni.showToast({
  123. title: "获取报名信息失败。",
  124. icon: "error",
  125. });
  126. }
  127. })
  128. });
  129. },
  130. },
  131. onReady() { },
  132. onLoad(options) {
  133. this.info.orderNo = options.id;
  134. },
  135. onShow() {
  136. this.payDetails(this.info.orderNo);
  137. },
  138. created() {
  139. // this.info = JSON.parse(uni.getStorageSync('order'))
  140. },
  141. };
  142. </script>
  143. <style lang="scss">
  144. .order-detail {
  145. background: #f9f9f9;
  146. min-height: 100vh;
  147. // padding-bottom: 100rpx;
  148. .status-box {
  149. padding: 24rpx 24rpx 4rpx;
  150. display: flex;
  151. justify-content: space-between;
  152. .text-box {
  153. color: #181818;
  154. .status {
  155. font-weight: bold;
  156. font-size: 32rpx;
  157. display: flex;
  158. .u-count-down__text {
  159. color: #ff4d3a !important;
  160. }
  161. }
  162. .notice {
  163. font-size: 24rpx;
  164. margin-top: 20rpx;
  165. }
  166. }
  167. }
  168. .progress {
  169. .progress-title {
  170. font-weight: 600;
  171. font-size: 32rpx;
  172. color: #181818;
  173. }
  174. .progress-desc {
  175. font-weight: 300;
  176. font-size: 24rpx;
  177. color: #aaaaaa;
  178. margin-top: 15rpx;
  179. }
  180. }
  181. .shop-box {
  182. width: 690rpx;
  183. // margin: 0 30rpx;
  184. // padding: 24rpx 24rpx 30rpx;
  185. background: #fff;
  186. border-radius: 16rpx;
  187. margin-top: -30rpx;
  188. box-sizing: border-box;
  189. .shop-name {
  190. font-weight: 600;
  191. font-size: 32rpx;
  192. color: #181818;
  193. width: 100%;
  194. white-space: nowrap;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. }
  198. .address {
  199. font-weight: 300;
  200. font-size: 24rpx;
  201. color: #aaaaaa;
  202. margin-top: 20rpx;
  203. width: 100%;
  204. white-space: nowrap;
  205. overflow: hidden;
  206. text-overflow: ellipsis;
  207. }
  208. }
  209. .black {
  210. color: #222222 !important;
  211. }
  212. .red {
  213. color: red !important;
  214. }
  215. .fs28 {
  216. font-size: 28rpx !important;
  217. font-weight: bold;
  218. }
  219. .code-box {
  220. display: flex;
  221. align-items: center;
  222. justify-content: space-between;
  223. .left {
  224. .title {
  225. font-weight: 500;
  226. font-size: 28rpx;
  227. color: #222222;
  228. }
  229. .codeNum {
  230. font-weight: 300;
  231. font-size: 24rpx;
  232. color: #aaaaaa;
  233. margin-top: 15rpx;
  234. }
  235. }
  236. .code-btn {
  237. display: flex;
  238. align-items: center;
  239. font-weight: 300;
  240. font-size: 24rpx;
  241. color: #aaaaaa;
  242. .jiantou {
  243. width: 24rpx;
  244. height: 24rpx;
  245. }
  246. }
  247. }
  248. .input-box {
  249. margin: 20rpx 30rpx;
  250. padding: 28rpx 24rpx;
  251. background: #ffffff;
  252. border-radius: 16rpx 16rpx 16rpx 16rpx;
  253. display: flex;
  254. align-items: center;
  255. justify-content: space-between;
  256. .label {
  257. color: #222;
  258. font-size: 28rpx;
  259. }
  260. .value {
  261. font-size: 28rpx;
  262. color: #aaaaaa;
  263. }
  264. }
  265. .input-box-address {
  266. margin: 20rpx 30rpx;
  267. padding: 28rpx 24rpx;
  268. background: #ffffff;
  269. border-radius: 16rpx 16rpx 16rpx 16rpx;
  270. // display: flex;
  271. // align-items: center;
  272. // justify-content: space-between;
  273. .value {
  274. color: #222;
  275. font-size: 28rpx;
  276. }
  277. .label {
  278. font-size: 28rpx;
  279. margin: 10rpx 0;
  280. color: #aaaaaa;
  281. }
  282. }
  283. .content {
  284. margin: 20rpx 30rpx;
  285. padding: 28rpx 24rpx;
  286. border-radius: 16rpx;
  287. background: #fff;
  288. .title {
  289. font-weight: 600;
  290. font-size: 28rpx;
  291. color: #222222;
  292. }
  293. .item {
  294. display: flex;
  295. align-items: center;
  296. justify-content: space-between;
  297. margin-top: 28rpx;
  298. .label {
  299. color: #222222;
  300. font-size: 28rpx;
  301. }
  302. .value {
  303. color: #999999;
  304. font-size: 28rpx;
  305. }
  306. }
  307. }
  308. .pay-btn {
  309. position: fixed;
  310. bottom: 30px;
  311. left: 4%;
  312. background: $uni-color-primary;
  313. width: 688rpx;
  314. height: 80rpx;
  315. line-height: 80rpx;
  316. border-radius: 46rpx;
  317. color: #fff;
  318. margin-top: 50rpx;
  319. }
  320. .refund-box {
  321. .refund-msg {
  322. font-weight: 300;
  323. font-size: 24rpx;
  324. color: #222222;
  325. margin-top: 15rpx;
  326. line-height: 40rpx;
  327. }
  328. }
  329. .apply-box {
  330. position: relative;
  331. .label {
  332. font-weight: 600;
  333. font-size: 28rpx;
  334. color: #222222;
  335. }
  336. .value {
  337. color: #999999;
  338. font-size: 24rpx;
  339. margin-top: 15rpx;
  340. }
  341. .jiantou {
  342. position: absolute;
  343. top: 50%;
  344. right: 24rpx;
  345. transform: translateY(-50%);
  346. width: 24rpx;
  347. height: 24rpx;
  348. }
  349. }
  350. .info {
  351. .order-info {
  352. display: flex;
  353. .icon {
  354. width: 164rpx;
  355. height: 164rpx;
  356. border-radius: 16rpx;
  357. flex-shrink: 0;
  358. }
  359. .shop-info {
  360. display: flex;
  361. flex-direction: column;
  362. justify-content: space-between;
  363. padding-left: 24rpx;
  364. flex: 1;
  365. box-sizing: border-box;
  366. .title {
  367. color: #181818;
  368. font-size: 28rpx;
  369. width: 450rpx;
  370. white-space: nowrap;
  371. overflow: hidden;
  372. text-overflow: ellipsis;
  373. }
  374. .price-box {
  375. display: flex;
  376. align-items: center;
  377. justify-content: space-between;
  378. .price {
  379. color: #181818;
  380. font-size: 32rpx;
  381. font-weight: bold;
  382. }
  383. }
  384. .start-time,
  385. .goods-desc {
  386. font-size: 24rpx;
  387. color: #aaaaaa;
  388. width: 560rpx;
  389. white-space: nowrap;
  390. overflow: hidden;
  391. text-overflow: ellipsis;
  392. }
  393. }
  394. }
  395. }
  396. .wrap {
  397. display: flex;
  398. justify-content: center;
  399. align-items: center;
  400. height: 100vh;
  401. overflow: hidden;
  402. }
  403. }
  404. </style>