detail.vue 9.6 KB

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