orderInfo.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
  3. <c-nav-bar title="订单详情" :showIcon="false" :titleStyle="titleStyle"></c-nav-bar>
  4. <view class="body">
  5. <!-- 个人信息 -->
  6. <view class="uname">
  7. <text style="margin-right: 20rpx;">{{orderInfo.guestName}}</text>
  8. <text>{{orderInfo.guestPhone}}</text>
  9. </view>
  10. <!-- 房间信息 -->
  11. <view class="room">
  12. <!-- 房间/预定信息 -->
  13. <view class="reservations">
  14. <text style="font-size: 30rpx; color: #333333; font-weight: 700;">{{orderInfo.houseBaseName}}-{{orderInfo.roomNumber}}</text>
  15. <text style="font-size: 24rpx; color: #39CE77;" v-if="isOrderPanding">{{getStatusText()}}</text>
  16. </view>
  17. <!-- 时间/价格 -->
  18. <view class="time-price">
  19. <text style="font-size: 30rpx; color: #777;">{{orderInfo.arriveDate}}入住 {{orderInfo.num}}晚</text>
  20. <text style="font-size: 30rpx; color: #245BED;">¥{{orderInfo.orderAmount}}</text>
  21. </view>
  22. <!-- 入住人数 -->
  23. <view class="house-person">
  24. <text style="font-size: 30rpx; color: #777;">入住人</text>
  25. <view class="right" >
  26. <text style="font-size: 30rpx; color: #777; ">{{orderInfo.checkInNums}}人 </text>
  27. <u-icon name="arrow-right" @click.native="goStayCheck"></u-icon>
  28. <!-- <u-icon name="arrow-right" ></u-icon> -->
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 订单信息 -->
  33. <u-cell-group :border="false"
  34. customStyle="background-color: #fff;border-radius: 16rpx;width: 690rpx;margin:0 auto;">
  35. <u-cell>
  36. <text slot="icon" style="font-size: 30rpx; margin-right: 50rpx;">订单号</text>
  37. <view slot="title" class="title">
  38. <text>{{orderInfo.orderCode}}</text>
  39. </view>
  40. </u-cell>
  41. <u-cell>
  42. <text slot="icon" style="font-size: 30rpx; margin-right: 20rpx;">创建时间</text>
  43. <view slot="title" class="title">
  44. <text>{{orderInfo.orderTime}}</text>
  45. </view>
  46. </u-cell>
  47. <u-cell>
  48. <text slot="icon" style="font-size: 30rpx; margin-right: 20rpx;">办理员工</text>
  49. <view slot="title" class="title">
  50. <text>何伟婷</text>
  51. </view>
  52. </u-cell>
  53. <u-cell>
  54. <text slot="icon" style="font-size: 30rpx; margin-right: 20rpx;">取消原因</text>
  55. <view slot="title" class="title">
  56. <text>-</text>
  57. </view>
  58. </u-cell>
  59. <u-cell>
  60. <text slot="icon" style="font-size: 30rpx; margin-right: 80rpx;">备注</text>
  61. <view slot="title" class="title">
  62. <text>-</text>
  63. </view>
  64. </u-cell>
  65. </u-cell-group>
  66. <!-- 按钮 -->
  67. <view class="button">
  68. <button class="edit">编辑订单</button>
  69. <button class="goRoom">办理入住</button>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. export default{
  76. data(){
  77. return {
  78. orderId:'1744697594837209090',
  79. orderInfo:[]
  80. }
  81. },
  82. onLoad(){
  83. this.getOrderInfo()
  84. },
  85. methods:{
  86. // 获取数据
  87. getOrderInfo(){
  88. this.$api.get(`/merchant/hotel/order/getMerchantOrderInfo/${this.orderId}`,{
  89. orderId:'1744697594837209090',
  90. }).then((res)=>{
  91. // console.log(res)
  92. if(res.data.code==0){
  93. this.orderInfo = res.data.data
  94. console.log(this.orderInfo)
  95. }
  96. })
  97. },
  98. // 客房状态
  99. getStatusText(){
  100. if(this.orderInfo.orderStatus === -1){
  101. return '待确定'
  102. }else if(this.orderInfo.orderStatus ===1){
  103. return '已预订'
  104. }else if(this.orderInfo.orderStatus ===2){
  105. return '已入住'
  106. }else if(this.orderInfo.orderStatus ===3){
  107. return '已退房'
  108. }else if(this.orderInfo.orderStatus ===4){
  109. return '已取消'
  110. }else{
  111. return '状态异常'
  112. }
  113. },
  114. goStayCheck(){
  115. uni.navigateTo({
  116. url: '/pages/house/stayCheck'
  117. })
  118. // console.log(1111)
  119. }
  120. },
  121. computed:{
  122. isOrderPanding(){
  123. return this.orderInfo.orderStatus === 1
  124. }
  125. }
  126. }
  127. </script>
  128. <style lang="scss">
  129. .page {
  130. background: #F3F4F4;
  131. padding-bottom: 260rpx;
  132. box-sizing: border-box;
  133. overflow-y: auto;
  134. overflow-x: auto;
  135. }
  136. .body{
  137. padding-top: 20rpx;
  138. padding-left: 30rpx;
  139. padding-right: 30rpx;
  140. }
  141. .uname{
  142. width: 665rpx;
  143. height: 100rpx;
  144. line-height: 100rpx;
  145. background-color: #fff;
  146. padding-left: 30rpx;
  147. font-size: 30rpx;
  148. border-radius: 10rpx;
  149. }
  150. .room{
  151. margin-top: 20rpx;
  152. width: 92%;
  153. height: 246rpx;
  154. background-color: #fff;
  155. margin-bottom: 20rpx;
  156. border-radius: 10rpx;
  157. padding: 30rpx;
  158. }
  159. .orderTip{
  160. padding: 30rpx;
  161. padding-top: 0;
  162. width: 690rpx;
  163. height: 514rpx;
  164. background-color: #fff;
  165. border-radius: 10rpx;
  166. }
  167. .button{
  168. position: fixed;
  169. bottom: 120rpx;
  170. height: 96rpx;
  171. width: 690rpx;
  172. // background-color: teal;
  173. margin-top: 20rpx;
  174. display: flex;
  175. justify-content: space-between;
  176. border-radius: 10rpx;
  177. }
  178. .goRoom{
  179. // border-radius: ;
  180. width: 330rpx;
  181. height: 96rpx;
  182. border-radius: 48rpx;
  183. font-size: 34rpx;
  184. background-color: #1372FF;
  185. color: #fff;
  186. }
  187. .edit{
  188. width: 330rpx;
  189. height: 96rpx;
  190. border-radius: 48rpx;
  191. font-size: 34rpx;
  192. background-color: #E2EDFC;
  193. color: #1372FF;
  194. }
  195. .reservations{
  196. display: flex;
  197. justify-content: space-between;
  198. }
  199. .time-price{
  200. display: flex;
  201. justify-content: space-between;
  202. margin-top: 30rpx;
  203. }
  204. .house-person{
  205. display: flex;
  206. justify-content: space-between;
  207. margin-top: 30rpx;
  208. }
  209. .right{
  210. display: flex;
  211. }
  212. </style>