index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <template>
  2. <view class="page" :style="{'min-height':(h-th)+'px'}">
  3. <u-navbar bgColor="transparent">
  4. <view class="u-nav-slot" slot="left" style="display: flex;" @tap="show=true">
  5. <text>{{name}}</text>
  6. <u-icon name="arrow-down" size="28" :bold="true" color="#fff"></u-icon>
  7. </view>
  8. </u-navbar>
  9. <view class="bg" :style="{'padding-top':(mt+30)+'px'}">
  10. <view class="b_money">
  11. <text>{{resData.orderMoney.toFixed(2)}}</text>
  12. <text>今日订单金额</text>
  13. </view>
  14. <view class="b_items">
  15. <view>
  16. <text>{{resData.yrzNum}}</text>
  17. <text>已入住</text>
  18. </view>
  19. <view>
  20. <text>{{resData.drzNum}}</text>
  21. <text>待入住</text>
  22. </view>
  23. <view>
  24. <text>{{resData.dqrNum}}</text>
  25. <text>待确认</text>
  26. </view>
  27. <view>
  28. <text>{{resData.dclNum}}</text>
  29. <text>待处理</text>
  30. </view>
  31. <view>
  32. <text>{{resData.zrddNum}}</text>
  33. <text>昨日订单</text>
  34. </view>
  35. <view>
  36. <text>{{resData.zrscNum}}</text>
  37. <text>昨日售出</text>
  38. </view>
  39. <view>
  40. <text>{{resData.zrkfNum}}</text>
  41. <text>昨日空房</text>
  42. </view>
  43. <view>
  44. <text>{{resData.rzl}}</text>
  45. <text>入住率</text>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="title">
  50. <text>今日新增</text>
  51. <view>
  52. <text>全部</text>
  53. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  54. </view>
  55. </view>
  56. <view class="card" v-for="(item,index) in list" :key="index">
  57. <view class="c_top">
  58. <text>订单号:{{item.no}}</text>
  59. <text :class="statusStyle[item.status]||'s_default'">{{statusCfg[item.status]}}</text>
  60. </view>
  61. <view class="c_middle">
  62. <image :src="item.img"></image>
  63. <view class="cm_info">
  64. <view class="cmi_title">{{item.name}}</view>
  65. <view class="cmi_pre">{{item.person}}</view>
  66. <view class="cmi_pre">{{item.phone}}</view>
  67. <view class="cmi_pre">{{item.date}}<span>{{item.nights}}</span></view>
  68. </view>
  69. <view class="cm_price">¥{{item.price.toFixed(2)}}</view>
  70. </view>
  71. <view class="c_bottom">
  72. <view class="btn" :class="item.status==0||item.status==4?'btn_xq':''">{{btnTextCfg[item.status]}}</view>
  73. </view>
  74. </view>
  75. <Tabbar :tabbarIndex="0"></Tabbar>
  76. <u-picker :show="show" :columns="nameList" @close="show=false" @cancel="show=false" @confirm="confirm"></u-picker>
  77. </view>
  78. </template>
  79. <script>
  80. export default {
  81. data() {
  82. return {
  83. name:'一家民宿',
  84. nameList:[['一家民宿','我家民宿','他家民宿']],
  85. show:false,
  86. list:[],
  87. resData:{
  88. orderMoney:66614,
  89. yrzNum:68,
  90. drzNum:0,
  91. dqrNum:12,
  92. dclNum:16,
  93. zrddNum:48,
  94. zrscNum:48,
  95. zrkfNum:20,
  96. rzl:'69.65%',
  97. list:[//status:0 待支付、1 待确认、2 已预订、3 已入住、4 已取消
  98. {
  99. no:'A20231213102359619119',
  100. status:2,
  101. img:'../../static/room1.png',
  102. name:'海景房-305',
  103. person:'李琳',
  104. phone:'13911924328',
  105. date:'03/11 - 03/12',
  106. price:1288,
  107. nights:'(共两晚)'
  108. },
  109. {
  110. no:'A20231213102359619119',
  111. status:3,
  112. img:'../../static/room2.png',
  113. name:'海景房-306',
  114. person:'郑一璇',
  115. phone:'15753988251',
  116. date:'03/11 - 03/12',
  117. price:1288,
  118. nights:'(共两晚)'
  119. },
  120. {
  121. no:'A20231213102359619119',
  122. status:4,
  123. img:'../../static/room3.png',
  124. name:'海景房-307',
  125. person:'钱萌',
  126. phone:'13710484614',
  127. date:'03/11 - 03/12',
  128. price:1288,
  129. nights:'(共两晚)'
  130. },
  131. {
  132. no:'A20231213102359619119',
  133. status:1,
  134. img:'../../static/room4.png',
  135. name:'海景房-308',
  136. person:'赵健民',
  137. phone:'15877425550',
  138. date:'03/11 - 03/12',
  139. price:1288,
  140. nights:'(共两晚)'
  141. },
  142. {
  143. no:'A20231213102359619119',
  144. status:0,
  145. img:'../../static/room5.png',
  146. name:'海景房-309',
  147. person:'李琳',
  148. phone:'13911924328',
  149. date:'03/11 - 03/12',
  150. price:1288,
  151. nights:'(共两晚)'
  152. }
  153. ]
  154. },
  155. statusCfg:{0:'待支付',1:'待确认',2:'已预订',3:'已入住',4:'已取消'},
  156. statusStyle:{0:'s_dzf',1:'s_dqr',2:'s_yyd',3:'s_yrz',4:'s_yqx'},
  157. btnTextCfg:{0:'详情',1:'确认订单',2:'办理入住',3:'办理退房',4:'详情'}
  158. }
  159. },
  160. onLoad() {
  161. this.getList();
  162. },
  163. onReachBottom() {
  164. console.log('触底啦~');
  165. },
  166. methods: {
  167. confirm(e){
  168. this.name = e.value[0];
  169. this.show = false;
  170. },
  171. getList(){
  172. this.list = this.resData.list;
  173. }
  174. }
  175. }
  176. </script>
  177. <style scoped lang="less">
  178. .page{
  179. background: #F3F4F4;
  180. padding-bottom: 40rpx;
  181. box-sizing: border-box;
  182. .bg{
  183. width: 100%;
  184. height: 660rpx;
  185. background: url(https://i.ringzle.com/file/20240107/8bc656fc64fd4386a6b336a7dc8c86d0.png) no-repeat;
  186. background-size: 100% 100%;
  187. box-sizing: border-box;
  188. .b_money{
  189. display: flex;
  190. flex-direction: column;
  191. align-items: center;
  192. text{
  193. font-size: 56rpx;
  194. font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  195. font-weight: bold;
  196. color: #FFFFFF;
  197. &:last-child{
  198. font-size: 32rpx;
  199. font-family: PingFang SC, PingFang SC;
  200. font-weight: 400;
  201. margin-top: 21rpx;
  202. }
  203. }
  204. }
  205. .b_items{
  206. margin-top: 20rpx;
  207. display: flex;
  208. justify-content: space-around;
  209. flex-wrap: wrap;
  210. &>view{
  211. width: 25%;
  212. margin-top: 40rpx;
  213. display: flex;
  214. flex-direction: column;
  215. align-items: center;
  216. text{
  217. font-size: 40rpx;
  218. font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  219. font-weight: bold;
  220. color: #FFFFFF;
  221. &:last-child{
  222. font-size: 26rpx;
  223. font-family: PingFang SC, PingFang SC;
  224. font-weight: 400;
  225. margin-top: 10rpx;
  226. }
  227. }
  228. }
  229. }
  230. }
  231. .title{
  232. width: 100%;
  233. padding: 30rpx 30rpx 10rpx;
  234. box-sizing: border-box;
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. &>text{
  239. font-size: 32rpx;
  240. font-family: PingFang SC, PingFang SC;
  241. font-weight: 800;
  242. color: #333333;
  243. }
  244. &>view{
  245. display: flex;
  246. align-items: center;
  247. text{
  248. font-size: 24rpx;
  249. font-family: PingFang SC, PingFang SC;
  250. font-weight: 400;
  251. color: #999999;
  252. margin-right: 10rpx;
  253. }
  254. }
  255. }
  256. .card{
  257. width: calc(100% - 60rpx);
  258. background: #FFFFFF;
  259. border-radius: 20rpx 20rpx 20rpx 20rpx;
  260. margin: 20rpx 30rpx 0;
  261. .c_top{
  262. width: 100%;
  263. padding: 30rpx;
  264. border-bottom: 1rpx solid #F1F1F1;
  265. box-sizing: border-box;
  266. display: flex;
  267. align-items: center;
  268. justify-content: space-between;
  269. text{
  270. font-size: 28rpx;
  271. font-family: PingFang SC, PingFang SC;
  272. font-weight: bold;
  273. color: #333333;
  274. &:last-child{
  275. font-size: 24rpx;
  276. font-family: PingFang SC, PingFang SC;
  277. font-weight: 400;
  278. }
  279. }
  280. }
  281. .c_middle{
  282. width: 100%;
  283. padding: 30rpx;
  284. border-bottom: 1rpx solid #F1F1F1;
  285. box-sizing: border-box;
  286. display: flex;
  287. position: relative;
  288. image{
  289. width: 180rpx;
  290. height: 180rpx;
  291. border-radius: 20rpx;
  292. }
  293. .cm_info{
  294. padding-left: 20rpx;
  295. .cmi_title{
  296. font-size: 28rpx;
  297. font-family: PingFang SC, PingFang SC;
  298. font-weight: bold;
  299. color: #333333;
  300. padding-bottom: 11rpx;
  301. }
  302. .cmi_pre{
  303. margin-top: 10rpx;
  304. display: flex;
  305. align-items: center;
  306. font-size: 24rpx;
  307. font-family: PingFang SC, PingFang SC;
  308. font-weight: 400;
  309. color: #777777;
  310. span{
  311. margin-left: 20rpx;
  312. }
  313. }
  314. }
  315. .cm_price{
  316. font-size: 32rpx;
  317. font-family: PingFang SC, PingFang SC;
  318. font-weight: bold;
  319. color: #F9423A;
  320. position: absolute;
  321. top: 50%;
  322. margin-top: -22.5rpx;
  323. right: 30rpx;
  324. }
  325. }
  326. .c_bottom{
  327. width: 100%;
  328. padding: 30rpx;
  329. box-sizing: border-box;
  330. display: flex;
  331. justify-content: flex-end;
  332. .btn{
  333. width: 160rpx;
  334. height: 56rpx;
  335. background: #1372FF;
  336. border-radius: 64rpx 64rpx 64rpx 64rpx;
  337. line-height: 56rpx;
  338. text-align: center;
  339. font-size: 24rpx;
  340. font-family: PingFang SC, PingFang SC;
  341. font-weight: 400;
  342. color: #FFFFFF;
  343. &.btn_xq{
  344. background: #FFFFFF;
  345. border: 1rpx solid #D1D1D1;
  346. font-size: 24rpx;
  347. color: #999999;
  348. }
  349. }
  350. }
  351. }
  352. .s_dzf{
  353. color: #F9423A !important;
  354. }
  355. .s_dqr{
  356. color: #FF9100 !important;
  357. }
  358. .s_yyd{
  359. color: #39CE77 !important;
  360. }
  361. .s_yrz{
  362. color: #1372FF !important;
  363. }
  364. .s_yqx{
  365. color: #4C5F76 !important;
  366. }
  367. .s_default{
  368. color: #111111 !important;
  369. }
  370. }
  371. /deep/.u-nav-slot{
  372. &>text{
  373. font-size: 34rpx;
  374. font-family: PingFang SC, PingFang SC;
  375. font-weight: bold;
  376. color: #FFFFFF;
  377. }
  378. .u-icon{
  379. margin: 8rpx 0 0 20rpx;
  380. }
  381. }
  382. </style>