|
|
|
<template>
|
|
|
|
<view class="v-pages-bg bgcolor p-b-24">
|
|
|
|
<form @submit="formSubmit" @reset="formReset">
|
|
|
|
<view class="v-card small container-fluid m-t-24">
|
|
|
|
{{orderInfo.startDate1}}{{orderInfo.dayNum}}晚{{orderInfo.endDate1}}
|
|
|
|
<view class="card-form">
|
|
|
|
{{orderInfo.houseName}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="v-card small container-fluid m-t-24">
|
|
|
|
<view class="card-title">
|
|
|
|
<view class="text"><text>入住信息</text></view>
|
|
|
|
</view>
|
|
|
|
<uni-row>
|
|
|
|
<uni-col :span="6">
|
|
|
|
<view class="content-box-label">房间数量</view>
|
|
|
|
</uni-col>
|
|
|
|
<uni-col class="content-box-col" :span="18">
|
|
|
|
<uni-easyinput :inputBorder="false" v-model="formData.roomNumber" placeholder="请输入房间数量" />
|
|
|
|
</uni-col>
|
|
|
|
</uni-row>
|
|
|
|
<uni-row>
|
|
|
|
<uni-col :span="6">
|
|
|
|
<view class="content-box-label">入住人</view>
|
|
|
|
</uni-col>
|
|
|
|
<uni-col class="content-box-col" :span="18">
|
|
|
|
<uni-easyinput :inputBorder="false" v-model="formData.phoneNumber" placeholder="请输入入住人姓名" />
|
|
|
|
</uni-col>
|
|
|
|
</uni-row>
|
|
|
|
<uni-row>
|
|
|
|
<uni-col :span="6">
|
|
|
|
<view class="content-box-label">身份证</view>
|
|
|
|
</uni-col>
|
|
|
|
<uni-col class="content-box-col" :span="18">
|
|
|
|
<uni-easyinput :inputBorder="false" v-model="formData.idtype" placeholder="请输入身份证号码" />
|
|
|
|
</uni-col>
|
|
|
|
</uni-row>
|
|
|
|
<uni-row>
|
|
|
|
<uni-col :span="6">
|
|
|
|
<view class="content-box-label">联系手机</view>
|
|
|
|
</uni-col>
|
|
|
|
<uni-col class="content-box-col" :span="18">
|
|
|
|
<uni-easyinput :inputBorder="false" v-model="formData.idCardNumber" placeholder="请输入手机号码" />
|
|
|
|
</uni-col>
|
|
|
|
</uni-row>
|
|
|
|
</view>
|
|
|
|
<view class="v-card small container-fluid m-t-24">
|
|
|
|
<view class="card-title">
|
|
|
|
<view class="text"><text>发票服务</text></view>
|
|
|
|
</view>
|
|
|
|
<view class="m-t-40 v-form-content">如需发票,请向酒店前台索取。</view>
|
|
|
|
</view>
|
|
|
|
<view class="v-card small container-fluid m-t-24">
|
|
|
|
<view class="card-title">
|
|
|
|
<view class="text"><text>下单说明</text></view>
|
|
|
|
</view>
|
|
|
|
<view class="m-t-40 v-form-content">订单需等待商家确认后才生效,订单确认结果以平台订单信息为准。</view>
|
|
|
|
</view>
|
|
|
|
<view class="v-order-submit row flex-align-center">
|
|
|
|
<view class="col price">
|
|
|
|
<text class="pre">总价</text>
|
|
|
|
<text class="text">¥</text>
|
|
|
|
<text class="number">{{orderInfo.housePrice}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="btn" @click="orderSubmit">提交订单</view>
|
|
|
|
</view>
|
|
|
|
</form>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
orderInfo: {},
|
|
|
|
formData: {
|
|
|
|
roomNumber: undefined,
|
|
|
|
phoneNumber: undefined,
|
|
|
|
idtype: undefined,
|
|
|
|
idCardNumber: undefined,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
const ticket = JSON.parse(decodeURIComponent(options.ticket));
|
|
|
|
this.orderInfo = ticket
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
orderSubmit() {
|
|
|
|
|
|
|
|
const userInfo = uni.getStorageSync("userInfo");
|
|
|
|
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {};
|
|
|
|
let appId = extConfig.app_id
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
openid: userInfo.openid,
|
|
|
|
appid: appId,
|
|
|
|
tenantId: this.tentId,
|
|
|
|
};
|
|
|
|
var data = {
|
|
|
|
"hotelId": this.orderInfo.hotelId,
|
|
|
|
"hotelName": this.orderInfo.hotelName,
|
|
|
|
"orderAmount": this.orderInfo.housePrice,
|
|
|
|
"checkTime": this.orderInfo.startDate,
|
|
|
|
"checkOutTime": this.orderInfo.endDate,
|
|
|
|
"bedId": this.orderInfo.id,
|
|
|
|
"roomsNums": Number(this.formData.roomNumber),
|
|
|
|
|
|
|
|
"mobile": "15512225250",
|
|
|
|
"openid": "111",
|
|
|
|
"appid": "2",
|
|
|
|
"tenantId": "1",
|
|
|
|
|
|
|
|
"checkInPersonInfoDTOList": [{
|
|
|
|
"name": "入住人1",
|
|
|
|
"phoneNumber": "15512225258",
|
|
|
|
"idtype": "1",
|
|
|
|
"idCardNumber": "130682991"
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
|
|
|
|
this.$Request.post(this.$config.createHotelOrder, data, 'json', null, false, null).then((res) => {
|
|
|
|
console.log("asdf",res)
|
|
|
|
if(res.code ==0){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/subPageC/orderHomestay/orderDetail?id="+res.data.id
|
|
|
|
});
|
|
|
|
}else if(res.code == 500){
|
|
|
|
uni.showToast({
|
|
|
|
title: res.data,
|
|
|
|
icon: 'none',
|
|
|
|
duration: 2000
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
</style>
|