index.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <template>
  2. <!-- 54是搜索框整体高度 52是tab的整体高度 不展示搜索框时需去除54-->
  3. <view class="page" :style="{'min-height':h+'px','padding-top':(mt+54+52)+'px'}">
  4. <!-- 头部 -->
  5. <!-- <u-navbar title="酒店民宿订单" :leftIconSize="36" bgColor="#ffffff" leftIconColor="#333333" :titleStyle="titleStyle"
  6. @leftClick="returnBack"></u-navbar> -->
  7. <c-nav-bar title="我的订单"></c-nav-bar>
  8. <TopTabs :list="list" @changeTab="changeTab" :top="mt" :placeholder="'输入关键字'" @sousuo="sousuo"></TopTabs>
  9. <view class="list">
  10. <view v-for="(item,index) in orderList" :key="index" cc v-if="FormData.orderStatus==item.orderStatus"
  11. @click.stop="orderDeatils(item)">
  12. <view class="item">
  13. <text class="status s3" v-if="item.orderStatus=='-1'">待确定</text>
  14. <text class="status disabled" v-if="item.orderStatus=='5'">已退款</text>
  15. <text class="status s2" v-if="item.orderStatus=='-2'">待付款</text>
  16. <text class="status s3" v-if="item.orderStatus=='1'">待使用</text>
  17. <text class="status s3" v-if="item.orderStatus=='2'||item.orderStatus=='3'">已使用</text>
  18. <text class="status disabled" v-if="item.orderStatus=='4'">已取消</text>
  19. <view class="head">
  20. <!-- <image src="../../../static/scenicSpots/ticketIcon_.png" v-if="status=='0'"></image> -->
  21. <!-- <image src="../../../static/scenicSpots/ticketIcon.png" v-else></image> -->
  22. <image src="../../../static/my/jd_ms.png" mode="" v-if="item.orderStatus=='0'"></image>
  23. <image src="../../../static/my/jd_ms.png" mode="" v-else></image>
  24. <text>酒店民宿</text>
  25. </view>
  26. <view class="mid">
  27. <view class="name" :class="item.orderStatus=='-3'?'disabled':''">{{item.homestayName}}</view>
  28. <view class="date">入离日期 {{item.arriveDate}} 至 {{item.leaveDate}} </view>
  29. <view class="des">{{item.houseBaseName}}</view>
  30. </view>
  31. <view class="price" :class="item.orderStatus=='0'?'disabled':''">¥{{item.orderAmount}}</view>
  32. <view class="btns">
  33. <template v-if="item.orderStatus==1">
  34. <view @click.stop="toStatus0(item)">
  35. 取消
  36. </view>
  37. <!-- <view @click.stop="GoRefund(item)">
  38. 申请退订
  39. </view> -->
  40. <view @click.stop="applyAfterSales(item)">
  41. 再次预订
  42. </view>
  43. </template>
  44. <template v-if="item.orderStatus==-2">
  45. <view @click.stop="toStatus0(item)">
  46. 取消
  47. </view>
  48. <view @click.stop="GoToPay(item)" style="color: #0DBFFD;">
  49. 去支付
  50. </view>
  51. </template>
  52. <template v-if="item.orderStatus==3||item.orderStatus==2">
  53. <!-- <view @click.stop="applyAfterSales(item)">
  54. 删除
  55. </view> -->
  56. <view @click.stop="toEvaluate(item)">
  57. 评价
  58. </view>
  59. <view @click.stop="applyAfterSales(item)">
  60. 再次预订
  61. </view>
  62. </template>
  63. <template v-if="item.orderStatus==5||item.orderStatus==4">
  64. <!-- <view @click.stop="applyAfterSales(item)">
  65. 删除
  66. </view> -->
  67. <view @click.stop="applyAfterSales(item)">
  68. 再次预订
  69. </view>
  70. </template>
  71. <template v-if="item.orderStatus==-1">
  72. <view @click.stop="GoRefund(item)">
  73. 取消
  74. </view>
  75. <view @click.stop="applyAfterSales(item)">
  76. 再次预订
  77. </view>
  78. </template>
  79. </view>
  80. </view>
  81. </view>
  82. <view v-else @click.stop="orderDeatils(item)">
  83. <view class="item">
  84. <text class="status s3" v-if="item.orderStatus=='-1'">待确定</text>
  85. <text class="status disabled" v-if="item.orderStatus=='5'">已退款</text>
  86. <text class="status s2" v-if="item.orderStatus=='-2'">待付款</text>
  87. <text class="status s3" v-if="item.orderStatus=='1'">待使用</text>
  88. <text class="status s3" v-if="item.orderStatus=='2'||item.orderStatus=='3'">已使用</text>
  89. <text class="status disabled" v-if="item.orderStatus=='4'">已取消</text>
  90. <view class="head">
  91. <!-- <image src="../../../static/scenicSpots/ticketIcon_.png" v-if="status=='0'"></image> -->
  92. <!-- <image src="../../../static/scenicSpots/ticketIcon.png" v-else></image> -->
  93. <image src="../../../static/my/jd_ms.png" mode="" v-if="item.orderStatus=='0'"></image>
  94. <image src="../../../static/my/jd_ms.png" mode="" v-else></image>
  95. <text>酒店民宿</text>
  96. </view>
  97. <view class="mid">
  98. <view class="name" :class="item.orderStatus=='0'?'disabled':''">{{item.homestayName}}</view>
  99. <view class="date">入离日期 {{item.arriveDate}} 至 {{item.leaveDate}} </view>
  100. <view class="des">{{item.houseBaseName}}</view>
  101. </view>
  102. <view class="price" :class="item.orderStatus=='0'?'disabled':''">¥{{item.orderAmount}}</view>
  103. <view class="btns">
  104. <template v-if="item.orderStatus==1">
  105. <view @click.stop="toStatus0(item)">
  106. 取消
  107. </view>
  108. <!-- <view @click.stop="GoRefund(item)">
  109. 申请退订
  110. </view> -->
  111. <view @click.stop="applyAfterSales(item)">
  112. 再次预订
  113. </view>
  114. </template>
  115. <template v-if="item.orderStatus==-2">
  116. <view @click.stop="toStatus0(item)">
  117. 取消
  118. </view>
  119. <view @click.stop="GoToPay(item)" style="color: #0DBFFD;">
  120. 去支付
  121. </view>
  122. </template>
  123. <template v-if="item.orderStatus==3||item.orderStatus==2">
  124. <!-- <view @click.stop="applyAfterSales(item)">
  125. 删除
  126. </view> -->
  127. <view @click.stop="toEvaluate(item)">
  128. 评价
  129. </view>
  130. <view @click.stop="applyAfterSales(item)">
  131. 再次预订
  132. </view>
  133. </template>
  134. <template v-if="item.orderStatus==5||item.orderStatus==4">
  135. <!-- <view @click.stop="applyAfterSales(item)">
  136. 删除
  137. </view> -->
  138. <view @click.stop="applyAfterSales(item)">
  139. 再次预订
  140. </view>
  141. </template>
  142. <template v-if="item.orderStatus==-1">
  143. <view @click.stop="GoRefund(item)">
  144. 取消
  145. </view>
  146. <view @click.stop="applyAfterSales(item)">
  147. 再次预订
  148. </view>
  149. </template>
  150. </view>
  151. </view>
  152. <!-- <view class="tip">{{orderList.length>0?'已显示全部订单':'暂无订单'}}</view> -->
  153. </view>
  154. </view>
  155. <!-- <view class="tip"> -->
  156. <!-- {{orderList.length>0?'已显示全部订单':'暂无订单'}} -->
  157. <!-- <nodata v-if="orderList.length === 0"></nodata> -->
  158. <!-- </view> -->
  159. <!-- 取消弹框 -->
  160. <!-- <u-modal :show="showAgree" :title="title" :content='content' showCancelButton="true" confirmText='确定'
  161. confirmColor='#0cbffd' @confirm="confirm" @cancel='cancel'></u-modal> -->
  162. <!-- <u-toast ref="uToast"></u-toast> -->
  163. </view>
  164. </template>
  165. <script>
  166. // import nodata from '@/compoments/NoData/index.vue'
  167. // import TopTabs from '@/compoments/TopTabs/topTabs.vue';
  168. export default {
  169. components: {
  170. // TopTabs,
  171. // nodata
  172. },
  173. data() {
  174. return {
  175. // mt: uni.getSystemInfoSync().statusBarHeight + 44,
  176. h: uni.getSystemInfoSync().windowHeight,
  177. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  178. titleStyle: {
  179. fontSize: '36rpx',
  180. fontWeight: "bold",
  181. color: "#333333"
  182. },
  183. list: [{
  184. name: '全部'
  185. }, {
  186. name: '待付款'
  187. }, {
  188. name: '待使用'
  189. }, {
  190. name: '退款'
  191. }],
  192. }
  193. },
  194. onLoad() {
  195. },
  196. onReachBottom() {
  197. },
  198. methods: {
  199. }
  200. }
  201. </script>
  202. <style lang="less">
  203. .orderList {
  204. box-sizing: border-box;
  205. background-color: #fff;
  206. .u-tabs__wrapper__nav__line {
  207. // left: 20rpx !important
  208. }
  209. }
  210. .u-button {
  211. height: 60rpx !important;
  212. }
  213. .tip {
  214. width: 100%;
  215. text-align: center;
  216. font-size: 24rpx;
  217. font-family: PingFangSC-Regular, PingFang SC;
  218. font-weight: 400;
  219. color: #AAAAAA;
  220. line-height: 33rpx;
  221. margin: 56rpx 0;
  222. }
  223. </style>
  224. <style lang="scss">
  225. page {
  226. background-color: #F5F8FA;
  227. }
  228. .disabled {
  229. color: #AAA !important
  230. }
  231. .list {
  232. padding: 0 24rpx;
  233. .item {
  234. background-color: #fff;
  235. margin-top: 20rpx;
  236. border-radius: 16rpx;
  237. padding: 36rpx 24rpx 0;
  238. position: relative;
  239. .status {
  240. right: 24rpx;
  241. top: 40rpx;
  242. font-size: 26rpx;
  243. color: #AAA;
  244. position: absolute;
  245. &.s2 {
  246. color: #FF7D01;
  247. }
  248. &.s3 {
  249. color: #01B9F9
  250. }
  251. }
  252. .head {
  253. color: #111;
  254. image {
  255. width: 36rpx;
  256. height: 36rpx;
  257. margin-right: 20rpx;
  258. vertical-align: middle;
  259. }
  260. text {
  261. vertical-align: middle;
  262. }
  263. }
  264. .mid {
  265. padding: 24rpx 50rpx 40rpx 56rpx;
  266. border-bottom: 1rpx solid #EFEFEF;
  267. .name {
  268. font-size: 32rpx;
  269. }
  270. .date {
  271. margin: 30rpx 0;
  272. color: #AAAAAA;
  273. }
  274. .des {
  275. color: #AAAAAA;
  276. }
  277. }
  278. .btns {
  279. display: flex;
  280. align-items: center;
  281. justify-content: flex-end;
  282. &>view {
  283. // margin: 24rpx 0 0 24rpx;
  284. margin: 24rpx;
  285. width: 148rpx;
  286. height: 56rpx;
  287. border: 1rpx solid #EFEFEF;
  288. border-radius: 28rpx;
  289. line-height: 56rpx;
  290. text-align: center;
  291. font-size: 24rpx;
  292. font-family: PingFangSC-Regular, PingFang SC;
  293. font-weight: 400;
  294. color: #333333;
  295. }
  296. }
  297. .price {
  298. position: absolute;
  299. right: 24rpx;
  300. bottom: 144rpx;
  301. font-size: 32rpx;
  302. color: #111;
  303. font-weight: 600;
  304. }
  305. }
  306. }
  307. .ml12 {
  308. height: 56rpx;
  309. width: 148rpx;
  310. line-height: 56rpx;
  311. display: inline-block;
  312. margin-left: 24rpx;
  313. }
  314. </style>