orderDetails.vue 7.6 KB

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