orderDetails.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <view class="orderDetails">
  3. <view class="list" @click="goOrderDetail">
  4. <view class="list-top">
  5. <view class="" style="font-size: 36rpx;font-weight: bold;color: #1E9F6A;">
  6. <!-- 待付款 --> {{orderinfo.status_text}}
  7. </view>
  8. <view class="" style="font-size: 22rpx;margin-top: 28rpx;">
  9. 订单号 {{orderinfo.code}}
  10. </view>
  11. </view>
  12. <view class="listcenter">
  13. <view class="l">
  14. <view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
  15. <!-- 夕阳红康养团7日游 -->{{orderinfo.good_name}}
  16. </view>
  17. <view class="" style="margin: 20rpx 0 20rpx;font-size: 22rpx;color: #333333;">
  18. 日期:{{orderinfo.start_at}} ~ {{orderinfo.end_at}}
  19. </view>
  20. <view class="" style="color: #333333;">
  21. <!-- 标间床位 1人 -->
  22. <text >{{orderinfo.room.name}}</text>
  23. <text style="margin-left:160rpx ;">
  24. x {{orderinfo.cohabits.length}} (人)
  25. </text>
  26. </view>
  27. </view>
  28. <view class="r">
  29. <view class="">
  30. <image :src="orderinfo.cover_picture" mode="widthFix"></image>
  31. </view>
  32. <view class="" style="margin: 28rpx 0 16rpx;">
  33. ¥{{orderinfo.price}}
  34. </view>
  35. <view class="" >
  36. 合计 <text style="font-size: 36rpx;font-weight: 600;color: #333333;">¥{{orderinfo.amount}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="list-bottom" >
  41. <view style="margin-top: 10rpx;" v-for="item,index in orderinfo.travelers" :key="index">
  42. <view class="listIcon" style="margin-bottom: 20rpx;">
  43. <image src="../../static/orderListicon/user@2x.png" mode="widthFix"></image>
  44. <text class="">
  45. {{item.name}}
  46. </text>
  47. </view>
  48. <view class="listIcon" @click="goaggMes">
  49. <image src="../../static/orderListicon/mobile@2x.png" mode="widthFix"></image>
  50. <text class="">
  51. {{item.phone}}
  52. </text>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="travel">
  58. <view class="travelList">
  59. <view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;margin-bottom: 70rpx;">
  60. 出行人列表
  61. </view>
  62. <image src="../../static/orderListicon/users02@2x.png" mode="widthFix"></image>
  63. </view>
  64. <view class="" v-for="item,index in orderinfo.travelers" :key="index">
  65. <view class="">{{item.name}}</view>
  66. <view class="" style="margin: 30rpx 0;">证件类型:{{item.certificate_type_text}}</view>
  67. <view class="">性别:{{item.gender_text}}</view>
  68. <view class="" style="margin: 30rpx 0;">证件号码:{{item.certificate_no}}</view>
  69. </view>
  70. </view>
  71. <view class="room">
  72. <view class=" title" >
  73. <view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;">
  74. 同住人列表
  75. </view>
  76. <image src="../../static/orderListicon/users02@2x.png" mode="widthFix"></image>
  77. </view>
  78. <view class="roomList" v-for="item,index in orderinfo.cohabits" :key="index">
  79. <view class="" >
  80. 同住人{{index+1}}
  81. </view>
  82. <view class="">
  83. {{item}}
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 待出行 -->
  88. <view class="navbar">
  89. <view class="navbar-item" @click="goafter" v-if="state==1">
  90. <image src="../../static/orderListicon/login.png" mode="heightFix"></image>
  91. <view class="">
  92. 申请退款
  93. </view>
  94. </view>
  95. <view class="line">
  96. </view>
  97. <view class="navbar-item">
  98. <image src="../../static/orderListicon/bookmark.png" mode="heightFix"></image>
  99. <view class="" @click="goguide">
  100. 专属森林向导
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 待付款 -->
  105. <view class="navbar" v-if="state==0">
  106. <view class="navbar-item">
  107. <image src="../../static/orderListicon/box-cancel.png" mode="heightFix"></image>
  108. <text class="">
  109. 取消订单
  110. </text>
  111. </view>
  112. <view class="line">
  113. </view>
  114. <view class="navbar-item">
  115. <image src="../../static/orderListicon/notepad.png" mode="heightFix"></image>
  116. <text class="">
  117. 去支付
  118. </text>
  119. </view>
  120. <view class="line">
  121. </view>
  122. <view class="navbar-item">
  123. <image src="../../static/orderListicon/bookmark.png" mode="heightFix"></image>
  124. <text class="">
  125. 专属森林向导
  126. </text>
  127. </view>
  128. </view>
  129. <!-- 已退订 已完成 -->
  130. <!-- <view class="navbar" v-if="state==2">
  131. <view class="navbar-item">
  132. <image src="../../static/orderListicon/login.png" mode="heightFix"></image>
  133. <text class="">
  134. 退款详情
  135. </text>
  136. </view>
  137. </view> -->
  138. </view>
  139. </template>
  140. <script>
  141. export default{
  142. data(){
  143. return{
  144. // 0待付款 1待出行 2退框
  145. state:0,
  146. orderinfo:{}
  147. }
  148. },
  149. onLoad(options) {
  150. // if(options.id==1){
  151. // this.state=0
  152. // }if(options.id==2){
  153. // this.state=1
  154. // }if(options.id==3){
  155. // this.state=2
  156. // }
  157. this.init(options.id)
  158. },
  159. methods:{
  160. init(id){
  161. uni.$u.http.post('/api/order/show',{order_id:id},{
  162. custom: {
  163. auth: true
  164. }
  165. }).then((res) => {
  166. console.log(res)
  167. this.orderinfo=res
  168. }).catch((err) => {
  169. console.log( err)
  170. })
  171. },
  172. goguide(){
  173. uni.navigateTo({
  174. url:"./guide"
  175. })
  176. },
  177. // 退款
  178. goafter(){
  179. uni.navigateTo({
  180. url:"./applyAfterSale"
  181. })
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="less">
  187. page{
  188. background-color: #F4F4F4;
  189. font-size: 28rpx;
  190. font-family: PingFang-SC-Bold, PingFang-SC;
  191. }
  192. .list{
  193. box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.02);
  194. border-radius: 16rpx 16rpx 16rpx 56rpx;
  195. background-color: #FFFFFF;
  196. // padding: 30rpx;
  197. margin: 57rpx 30rpx;
  198. .list-top{
  199. padding-bottom: 20rpx;
  200. border-bottom: 1px solid #efefef;
  201. padding: 30rpx;
  202. }
  203. .listcenter{
  204. display: flex;
  205. justify-content: space-between;
  206. // margin: 24rpx 0 40rpx;
  207. padding: 30rpx;
  208. .r{
  209. text-align: right;
  210. .image{
  211. // width: 140rpx;
  212. }
  213. image{
  214. width: 140rpx;
  215. height: 84rpx;
  216. border-radius: 6rpx;
  217. }
  218. }
  219. }
  220. .list-bottom{
  221. border-top: 1rpx solid #E3E3E3;
  222. border-radius: 0px 0px 16rpx 56rpx;
  223. background-color: #FBFBFB;
  224. padding: 30rpx 0 30rpx 60rpx;
  225. color: #1E9F6A;
  226. font-weight: 600;
  227. .listIcon{
  228. display: flex;
  229. align-items: center;
  230. font-size: 26rpx;
  231. }
  232. image{
  233. width: 24rpx;
  234. margin-right: 10rpx;
  235. }
  236. }
  237. }
  238. .travel{
  239. margin:0 60rpx;
  240. .travelList{
  241. display: flex;
  242. justify-content: space-between;
  243. image{
  244. width: 48rpx;
  245. }
  246. }
  247. }
  248. .room{
  249. .title{
  250. display: flex;
  251. justify-content: space-between;
  252. align-items: center;
  253. border-bottom: 1px solid #E3E3E3;
  254. padding: 30rpx;
  255. margin: 50rpx 30rpx 30rpx;
  256. image{
  257. width: 48rpx;
  258. }
  259. }
  260. .roomList{
  261. display: flex;
  262. justify-content: space-between;
  263. align-items: center;
  264. margin: 20rpx 60rpx;
  265. }
  266. margin-bottom:200rpx;
  267. }
  268. .navbar{
  269. // margin-top: 104rpx;
  270. width: 100%;
  271. height: 104rpx;
  272. background: #1E9F6A;
  273. border-radius: 16rpx 16rpx 0px 0px;
  274. position: fixed;
  275. left: 0;
  276. bottom: 0;
  277. display: flex;
  278. align-items: center;
  279. .line{
  280. width: 1px;
  281. height: 24rpx;
  282. background-color: #FFFFFF;
  283. }
  284. .navbar-item{
  285. display: flex;
  286. color:#FFFFFF ;
  287. flex: 1;
  288. align-items: center;
  289. justify-content: center;
  290. image{
  291. height: 28rpx;
  292. margin-right: 10rpx;
  293. }
  294. }
  295. }
  296. </style>