createOrder.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
  3. <c-nav-bar title="新增订单" :showIcon="false"></c-nav-bar>
  4. <view class="box">
  5. <view class="tit">预订信息</view>
  6. <u-cell-group :border="false"
  7. customStyle="background-color: #fff;border-radius: 16rpx;width: 94%;margin:0 auto;">
  8. <u-cell>
  9. <text slot="icon" style="font-size: 30rpx">姓名</text>
  10. <view slot="title" class="title">
  11. <u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
  12. placeholder="请输入姓名" v-model="dataForm.guestName"></u--input>
  13. </view>
  14. </u-cell>
  15. <u-cell>
  16. <text slot="icon" style="font-size: 30rpx">手机号码</text>
  17. <view slot="title" class="title">
  18. <u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
  19. placeholder="请输入手机号码" v-model="dataForm.guestPhone"></u--input>
  20. </view>
  21. </u-cell>
  22. <u-cell isLink="true" @click="showLaiyuan=true">
  23. <text slot="icon" style="font-size: 30rpx">订单来源</text>
  24. <view slot="title" class="title">
  25. {{dataForm.guestSourceName}}
  26. </view>
  27. </u-cell>
  28. </u-cell-group>
  29. </view>
  30. <u-picker :itemHeight="88" :immediateChange="true" :show="showLaiyuan" :columns="laiyuan" title="来源选择"
  31. keyName="guestSource" :defaultIndex="passengerDefault" @cancel="areaShow=false;"
  32. @confirm="passengerConfirm"></u-picker>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. showLaiyuan: false,
  40. passengerDefault: [0],
  41. dataForm: {
  42. arriveDate: "",
  43. detailFormList: [{
  44. breakfastAmount: 0,
  45. checkInPersonList: [],
  46. checkInType: 0,
  47. id: 0,
  48. otherAmount: 0,
  49. roomAmount: 0,
  50. roomIds: "",
  51. roomNumber: "",
  52. }, ],
  53. guestName: "",
  54. guestPhone: "",
  55. guestSourceId: null,
  56. guestSourceName: null,
  57. homestayId: '1711268640588517378',
  58. houseBaseId: 0,
  59. leaveDate: "",
  60. num: 0,
  61. orderStatus: null,
  62. remarks: "",
  63. },
  64. roomId: '',
  65. laiyuan: []
  66. }
  67. },
  68. onLoad(opt) {
  69. this.roomId = opt.roomId.split(',');
  70. this.getInfo();
  71. this.getLaiyuan();
  72. },
  73. methods: {
  74. getLaiyuan() {
  75. this.$api.get("/merchant/hotel/room/state/getSourceDownBox", {
  76. homestayId: '1711268640588517378',
  77. })
  78. .then((res) => {
  79. if (res.data.code == 0) {
  80. this.laiyuan = [res.data.data];
  81. }
  82. });
  83. },
  84. getInfo() {
  85. this.$api.post('/merchant/hotel/order/getRoomInfoList', this.roomId).then(res => {
  86. console.log(res)
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style lang="scss">
  93. .page {
  94. background: #F3F4F4;
  95. padding-bottom: 260rpx;
  96. box-sizing: border-box;
  97. overflow-y: auto;
  98. overflow-x: auto;
  99. }
  100. .box{
  101. background-color: #fff;
  102. margin: 0 auto 20rpx;
  103. border-radius: 10rpx;
  104. width: 96%;
  105. padding: 0 30rpx;
  106. }
  107. .tit {
  108. font-size: 32rpx;
  109. font-weight: bold;
  110. color: #333;
  111. }
  112. </style>