predetermine.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view>
  3. <Header @change="headerChange">
  4. <template #search>
  5. <u--input v-model="keyWord" placeholder="姓名/手机号" border="surround" shape="circle" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" fontSize="12px" :customStyle="{border:'1px solid #e2e2e2',padding:'0 10px',margin:'0 10px',borderRadius:'20px'}">
  6. </u--input>
  7. </template>
  8. <template #section>
  9. <u-subsection :list="list" mode="subsection" :current="current" @change="sectionChange"></u-subsection>
  10. </template>
  11. </Header>
  12. <Allpredetermine :keyWord="keyWord" v-if="current==0" ref="allpredetermine" />
  13. <ArrivalsDay :keyWord="keyWord" v-if="current==1" @changeList="selectArrivalsChange" />
  14. <u-subsection v-if="arrivalsCur" style="margin-top:10px" :list="checkRoom" mode="subsection" :current="currentRoom" @change="roomChange"></u-subsection>
  15. <div class="btn-add" v-else>
  16. <div class="btn-add-left">返回</div>
  17. <div class="btn-add-right">添加预定</div>
  18. </div>
  19. </view>
  20. </template>
  21. <script>
  22. import Allpredetermine from '@/components/predetermineList/allPredetermine.vue'
  23. import Header from '@/components/header.vue'
  24. import ArrivalsDay from '../../components/predetermineList/arrivalsDay.vue'
  25. export default {
  26. components: {
  27. Header,
  28. Allpredetermine,
  29. ArrivalsDay
  30. },
  31. data() {
  32. return {
  33. list: ['全部预定', '今日预抵', '预定未到', '远期房态', '今日已入住'],
  34. checkRoom:['查看详情', '拨打电话','开单入住', '预排房间'],
  35. current: 0,
  36. currentRoom: 0,
  37. arrivalsCur: false,
  38. keyWord: ''
  39. };
  40. },
  41. onLoad(options){
  42. if (options.current) {
  43. this.current = options.current
  44. }
  45. },
  46. methods:{
  47. sectionChange(i){
  48. console.log(i)
  49. this.current = i
  50. },
  51. roomChange(i){
  52. console.log(i)
  53. this.currentRoom = i
  54. },
  55. selectArrivalsChange(e){
  56. console.log(e);
  57. this.arrivalsCur = e
  58. },
  59. headerChange(e){
  60. console.log(e)
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. page{
  67. background-color: #f5f5f5;
  68. }
  69. .btn-add{
  70. width: 100%;
  71. height: 40px;
  72. display: flex;
  73. align-items: center;
  74. border: 1px solid rgb(60, 156, 255);
  75. border-radius: 5px;
  76. overflow: hidden;
  77. margin-top: 15px;
  78. }
  79. .btn-add-left{
  80. width: 50%;
  81. height: 100%;
  82. background-color: #fff;
  83. color: rgb(60, 156, 255);
  84. text-align: center;
  85. line-height: 40px;
  86. }
  87. .btn-add-right{
  88. width: 50%;
  89. height: 100%;
  90. background-color: rgb(60, 156, 255);
  91. color: #fff;
  92. text-align: center;
  93. line-height: 40px;
  94. }
  95. </style>