index.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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 @tap="toTurn">
  16. <text>{{resData.yrzNum}}</text>
  17. <text>已入住</text>
  18. </view>
  19. <view @tap="toTurn">
  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 @tap="toTurn">
  36. <text>{{resData.zrscNum}}</text>
  37. <text>昨日售出</text>
  38. </view>
  39. <view @tap="toTurn">
  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. toTurn(){
  175. uni.navigateTo({
  176. url:'/pages/home/condition'
  177. })
  178. }
  179. }
  180. }
  181. </script>
  182. <style scoped lang="less">
  183. .page{
  184. background: #F3F4F4;
  185. padding-bottom: 40rpx;
  186. box-sizing: border-box;
  187. .bg{
  188. width: 100%;
  189. height: 660rpx;
  190. background: url(https://i.ringzle.com/file/20240107/8bc656fc64fd4386a6b336a7dc8c86d0.png) no-repeat;
  191. background-size: 100% 100%;
  192. box-sizing: border-box;
  193. .b_money{
  194. display: flex;
  195. flex-direction: column;
  196. align-items: center;
  197. text{
  198. font-size: 56rpx;
  199. font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  200. font-weight: bold;
  201. color: #FFFFFF;
  202. &:last-child{
  203. font-size: 32rpx;
  204. font-family: PingFang SC, PingFang SC;
  205. font-weight: 400;
  206. margin-top: 21rpx;
  207. }
  208. }
  209. }
  210. .b_items{
  211. margin-top: 20rpx;
  212. display: flex;
  213. justify-content: space-around;
  214. flex-wrap: wrap;
  215. &>view{
  216. width: 25%;
  217. margin-top: 40rpx;
  218. display: flex;
  219. flex-direction: column;
  220. align-items: center;
  221. text{
  222. font-size: 40rpx;
  223. font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  224. font-weight: bold;
  225. color: #FFFFFF;
  226. &:last-child{
  227. font-size: 26rpx;
  228. font-family: PingFang SC, PingFang SC;
  229. font-weight: 400;
  230. margin-top: 10rpx;
  231. }
  232. }
  233. }
  234. }
  235. }
  236. .title{
  237. width: 100%;
  238. padding: 30rpx 30rpx 10rpx;
  239. box-sizing: border-box;
  240. display: flex;
  241. align-items: center;
  242. justify-content: space-between;
  243. &>text{
  244. font-size: 32rpx;
  245. font-family: PingFang SC, PingFang SC;
  246. font-weight: 800;
  247. color: #333333;
  248. }
  249. &>view{
  250. display: flex;
  251. align-items: center;
  252. text{
  253. font-size: 24rpx;
  254. font-family: PingFang SC, PingFang SC;
  255. font-weight: 400;
  256. color: #999999;
  257. margin-right: 10rpx;
  258. }
  259. }
  260. }
  261. .card{
  262. width: calc(100% - 60rpx);
  263. background: #FFFFFF;
  264. border-radius: 20rpx 20rpx 20rpx 20rpx;
  265. margin: 20rpx 30rpx 0;
  266. .c_top{
  267. width: 100%;
  268. padding: 30rpx;
  269. border-bottom: 1rpx solid #F1F1F1;
  270. box-sizing: border-box;
  271. display: flex;
  272. align-items: center;
  273. justify-content: space-between;
  274. text{
  275. font-size: 28rpx;
  276. font-family: PingFang SC, PingFang SC;
  277. font-weight: bold;
  278. color: #333333;
  279. &:last-child{
  280. font-size: 24rpx;
  281. font-family: PingFang SC, PingFang SC;
  282. font-weight: 400;
  283. }
  284. }
  285. }
  286. .c_middle{
  287. width: 100%;
  288. padding: 30rpx;
  289. border-bottom: 1rpx solid #F1F1F1;
  290. box-sizing: border-box;
  291. display: flex;
  292. position: relative;
  293. image{
  294. width: 180rpx;
  295. height: 180rpx;
  296. border-radius: 20rpx;
  297. }
  298. .cm_info{
  299. padding-left: 20rpx;
  300. .cmi_title{
  301. font-size: 28rpx;
  302. font-family: PingFang SC, PingFang SC;
  303. font-weight: bold;
  304. color: #333333;
  305. padding-bottom: 11rpx;
  306. }
  307. .cmi_pre{
  308. margin-top: 10rpx;
  309. display: flex;
  310. align-items: center;
  311. font-size: 24rpx;
  312. font-family: PingFang SC, PingFang SC;
  313. font-weight: 400;
  314. color: #777777;
  315. span{
  316. margin-left: 20rpx;
  317. }
  318. }
  319. }
  320. .cm_price{
  321. font-size: 32rpx;
  322. font-family: PingFang SC, PingFang SC;
  323. font-weight: bold;
  324. color: #F9423A;
  325. position: absolute;
  326. top: 50%;
  327. margin-top: -22.5rpx;
  328. right: 30rpx;
  329. }
  330. }
  331. .c_bottom{
  332. width: 100%;
  333. padding: 30rpx;
  334. box-sizing: border-box;
  335. display: flex;
  336. justify-content: flex-end;
  337. .btn{
  338. width: 160rpx;
  339. height: 56rpx;
  340. background: #1372FF;
  341. border-radius: 64rpx 64rpx 64rpx 64rpx;
  342. line-height: 56rpx;
  343. text-align: center;
  344. font-size: 24rpx;
  345. font-family: PingFang SC, PingFang SC;
  346. font-weight: 400;
  347. color: #FFFFFF;
  348. &.btn_xq{
  349. background: #FFFFFF;
  350. border: 1rpx solid #D1D1D1;
  351. font-size: 24rpx;
  352. color: #999999;
  353. }
  354. }
  355. }
  356. }
  357. .s_dzf{
  358. color: #F9423A !important;
  359. }
  360. .s_dqr{
  361. color: #FF9100 !important;
  362. }
  363. .s_yyd{
  364. color: #39CE77 !important;
  365. }
  366. .s_yrz{
  367. color: #1372FF !important;
  368. }
  369. .s_yqx{
  370. color: #4C5F76 !important;
  371. }
  372. .s_default{
  373. color: #111111 !important;
  374. }
  375. }
  376. /deep/.u-nav-slot{
  377. &>text{
  378. font-size: 34rpx;
  379. font-family: PingFang SC, PingFang SC;
  380. font-weight: bold;
  381. color: #FFFFFF;
  382. }
  383. .u-icon{
  384. margin: 8rpx 0 0 20rpx;
  385. }
  386. }
  387. </style>