conversion.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <!-- 订单兑换 -->
  2. <template>
  3. <view class="conversion">
  4. <!-- <Header :title="title"></Header>
  5. <view class="" style="height: 94upx;"></view> -->
  6. <view class="order-detail-content">
  7. <view class="order-message">
  8. <view class="title">订单信息</view>
  9. <view class="ordername titlebar"
  10. >产品名称:<text class="txt">{{ orderDetail.goodsName }}</text></view
  11. >
  12. <view class="shopname titlebar">店铺名称:<text class="txt">{{ orderDetail.shopName }}</text></view>
  13. <view class="waternum titlebar" v-if="orderDetail.outOrderNo === '1'">流水号:<text class="txt">{{ orderDetail.outOrderNo }}</text></view>
  14. <view class="ordernum titlebar"
  15. >订单号:<text class="txt">{{ orderDetail.ordersNo }}</text></view
  16. >
  17. <view class="phonenum titlebar"
  18. >手机号:<text class="txt">{{ orderDetail.buyPhone }}</text></view
  19. >
  20. <view class="goindate titlebar"
  21. >入园日期:<text class="txt">{{ orderDetail.timePart ? orderDetail.timePart : orderDetail.palyTime }}</text></view
  22. >
  23. <view class="price titlebar"
  24. >产品价格:<text class="txt">{{
  25. orderDetail.ordersPrice | doMoney
  26. }}</text></view
  27. >
  28. <view class="buynum titlebar"
  29. >购买数量:<text class="txt">{{
  30. orderDetail.playManList.length
  31. }}</text></view
  32. >
  33. <view class="palytime titlebar"
  34. >游玩时间:<text class="txt">{{ orderDetail.timePart ? orderDetail.timePart : orderDetail.palyTime }}</text></view
  35. >
  36. <view class="orderstatus titlebar"
  37. >订单状态:<text class="txt">{{ orderDetail.statusName }}</text>
  38. </view>
  39. <view class="titlebar chechNum"
  40. >核销次数:<text class="txt">{{ orderDetail.checkList.length }} / {{ orderDetail.checkNum}} </text></view
  41. >
  42. <view class="titlebar checkedTime" v-for="(item,index) in orderDetail.checkList" :key="index">
  43. 核销时间:<text class="txt">{{ item.checkTime }}</text>
  44. </view>
  45. <view class="tourist" v-if="orderDetail.playManList[0].name">
  46. <view class="title">游客信息</view>
  47. <view
  48. class="tourist-warp"
  49. v-for="(item, index) in orderDetail.playManList"
  50. :key="index"
  51. >
  52. <view class="name touristbar"
  53. >姓名:<text class="txt">{{ item.name }}</text></view
  54. >
  55. <view class="idcard touristbar"
  56. >身份证:<text class="txt">{{ item.idcard }}</text></view
  57. >
  58. </view>
  59. </view>
  60. </view>
  61. <view class="paymessage">
  62. <view class="title">支付信息</view>
  63. <view class="shoppric"
  64. >产品价格:<text class="money"
  65. >{{ orderDetail.ordersPrice | doMoney}}</text
  66. ></view
  67. >
  68. <view class="realitypirc"
  69. >实付金额:<text class="money"
  70. >{{ orderDetail.ordersPrice | doMoney}}</text
  71. ></view
  72. >
  73. </view>
  74. <view class="btns">
  75. <view class="btn cancel" @tap="cancelChange">取消兑换</view>
  76. <view class="btn convert" @tap="sureconvert">确认兑换</view>
  77. </view>
  78. </view>
  79. <rf-loading v-if="loading"></rf-loading>
  80. </view>
  81. </template>
  82. <script>
  83. let showCode = true
  84. import Header from '../components/header.vue';
  85. export default {
  86. components: {
  87. Header
  88. },
  89. data() {
  90. return {
  91. title: '订单兑换',
  92. loading: false,
  93. isShowMask: true,
  94. iconShow: false,
  95. masktxt: '是的',
  96. orderDetail: uni.getStorageSync('orderDetail'),
  97. };
  98. },
  99. filters :{
  100. doMoney (val){
  101. return `¥${val/100}`
  102. }
  103. },
  104. onLoad() {
  105. console.log(this.orderDetail);
  106. },
  107. methods: {
  108. // 取消兑换
  109. cancelChange() {
  110. this.$mRouter.back();
  111. },
  112. // 确认兑换
  113. sureconvert() {
  114. let _self = this
  115. uni.showModal({
  116. content: '是否兑换?',
  117. success: confirmRes => {
  118. if (confirmRes.confirm) {
  119. if (!_self.orderDetail.qrcode) {
  120. _self.$mHelper.toast('非自营订单无法兑换!')
  121. return
  122. }
  123. _self.$http.get('/orders/verOrdersByNo/' + _self.orderDetail.qrcode)
  124. .then((res) => {
  125. console.log(res);
  126. if (res.code === 200 ) {
  127. _self.$mHelper.toast('兑换成功!');
  128. setTimeout(() => {
  129. _self.$mRouter.back()
  130. }, 500);
  131. }
  132. }).catch(err0r=>{
  133. _self.$mHelper.toast(res.msg);
  134. });
  135. } else {
  136. _self.$mHelper.toast('兑换取消')
  137. }
  138. }
  139. });
  140. },
  141. },
  142. };
  143. </script>
  144. <style lang="scss" scoped>
  145. .conversion {
  146. .order-detail-content {
  147. padding: 24upx 32upx 44upx;
  148. .order-message {
  149. background-color: #ffffff;
  150. padding: 31upx 33upx 35upx;
  151. border-radius: 17upx;
  152. .title {
  153. font-size: 34upx;
  154. color: #111111;
  155. }
  156. .titlebar {
  157. font-size: 28upx;
  158. color: #666666;
  159. letter-spacing: 2upx;
  160. margin-top: 12upx;
  161. .txt {
  162. margin-left: 10upx;
  163. font-size: 28upx;
  164. }
  165. }
  166. .ordername {
  167. margin-top: 15upx;
  168. }
  169. .orderstatus {
  170. border-top: 1px solid #e1e1e1;
  171. padding-top: 22upx;
  172. // height: 98upx;
  173. // line-height: 98upx;
  174. }
  175. .checkedTime {
  176. &:last-child {
  177. padding-bottom: 22upx;
  178. border-bottom: 1px solid #e1e1e1;
  179. }
  180. }
  181. .tourist {
  182. .tourist-warp {
  183. padding-bottom: 20upx;
  184. border-bottom: 1px solid #e1e1e1;
  185. &:last-child {
  186. border-bottom: none;
  187. }
  188. }
  189. .title {
  190. padding: 15upx 0;
  191. font-size: 34upx;
  192. color: #111111;
  193. }
  194. .touristbar {
  195. color: #666666;
  196. }
  197. .txt {
  198. margin-left: 10upx;
  199. font-size: 28upx;
  200. }
  201. }
  202. }
  203. .paymessage {
  204. background-color: #ffffff;
  205. padding: 31upx 33upx 35upx;
  206. border-radius: 17upx;
  207. margin-top: 24upx;
  208. .title {
  209. font-size: 34upx;
  210. color: #111111;
  211. }
  212. .shoppric {
  213. color: #666666;
  214. margin-top: 20upx;
  215. .money {
  216. margin-left: 10upx;
  217. }
  218. }
  219. .realitypirc {
  220. color: #666666;
  221. font-size: 28upx;
  222. margin-top: 20upx;
  223. border-top: 1upx solid #e1e1e1;
  224. padding-top: 20upx;
  225. .money {
  226. margin-left: 10upx;
  227. color: #fa4141;
  228. }
  229. }
  230. }
  231. .btns {
  232. display: flex;
  233. justify-content: center;
  234. align-items: center;
  235. margin-top: 40upx;
  236. .btn {
  237. width: 321upx;
  238. height: 92upx;
  239. box-sizing: border-box;
  240. text-align: center;
  241. line-height: 92upx;
  242. font-size: 38upx;
  243. letter-spacing: 2upx;
  244. color: #7a7c7c;
  245. margin-right: 31upx;
  246. background-color: #fff;
  247. border: 1px solid #e2e2e2;
  248. border-radius: 10upx;
  249. }
  250. .convert {
  251. margin-right: 0;
  252. background-color: #a95cff;
  253. color: #ffffff;
  254. border: none;
  255. }
  256. }
  257. }
  258. }
  259. </style>