Commit e8c481bd authored by youjie's avatar youjie

no message

parent 29d956b0
......@@ -5,6 +5,10 @@ import request from './request'
class HotelService {
//获取相似数据
static async GetHotelHotelBooking(param:any): Promise<HttpResponse> {
return request('dmc_post_Get_GetJAPAN_HotelBooking', param)
}
//获取相似数据
static async GetHotelRoomsList(param:any): Promise<HttpResponse> {
return request('dmc_post_Get_GetJAPAN_RoomsList', param)
......
......@@ -717,7 +717,7 @@ export default {
week4: '周四',
week5: '周五',
week6: '周六',
week7: '星期天',
week7: '周日',
zhiqian: '之前',
zhihou: '之后',
fangjianshuliang: '房间数量',
......
......@@ -88,7 +88,7 @@
<span class="text-grey-6">{{$t('v101.scatteredOrder.ruzhurenshu')}}</span>
<div class="q-pl-lg">
<span>{{$t('v101.scatteredOrder.chengren')}} {{auditNum}} {{$t('v101.scatteredOrder.ren')}}</span>
<span class="q-pl-lg">{{$t('v101.scatteredOrder.ertong')}} {{childNum}} {{$t('v101.scatteredOrder.ren')}}</span>
<span class="q-pl-lg" v-if="childNum>0">{{$t('v101.scatteredOrder.ertong')}} {{childNum}} {{$t('v101.scatteredOrder.ren')}}</span>
<span class="q-pl-lg" v-if="isBaoChild">{{$t('v101.scatteredOrder.noertong')}}</span>
</div>
</div>
......@@ -101,10 +101,10 @@
{{params.arrivalDate}}
</div>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy">
<q-date v-model="params.arrivalDate" mask="YYYY/MM/DD" :options="optionsFn" @range-end="dateRangeHandler"></q-date>
<q-date v-model="params.arrivalDate" mask="YYYY/MM/DD" :options="optionsFnStar" @update:model-value="dateRangeHandler"></q-date>
</q-popup-proxy>
</q-field>
<span class="q-ml-md">周六</span>
<span class="q-ml-md">{{checkInWeek}}</span>
<div class="q-ml-sm text-grey-6">
<span v-if="roomRateDetails.roomOptions&&roomRateDetails.roomOptions.checkIinStartTime">{{roomRateDetails.roomOptions.checkIinStartTime}}</span>
<span class="q-ml-sm">{{$t('v101.scatteredOrder.zhihou')}}</span>
......@@ -117,10 +117,10 @@
{{params.departureDate}}
</div>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy2">
<q-date v-model="params.departureDate" mask="YYYY/MM/DD" :options="optionsFn" @range-end="dateRangeHandler2"></q-date>
<q-date v-model="params.departureDate" mask="YYYY/MM/DD" :options="optionsFnEnd" @update:model-value="dateRangeHandler2"></q-date>
</q-popup-proxy>
</q-field>
<span class="q-ml-md">周六</span>
<span class="q-ml-md">{{checkOutWeek}}</span>
<div class="q-ml-sm text-grey-6">
<span v-if="roomRateDetails.roomOptions&&roomRateDetails.roomOptions.finalCheckInTime">{{roomRateDetails.roomOptions.finalCheckInTime}}</span>
<span class="q-ml-sm">{{$t('v101.scatteredOrder.zhiqian')}}</span>
......@@ -183,7 +183,7 @@
{{sureMsg.checkInTime}}
</div>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy3">
<q-time v-model="sureMsg.checkInTime" :rules="[ val => val && val.length > 0 || 'Please type something']"/>
<q-time v-model="sureMsg.checkInTime" :rules="[ val => val && val.length > 0 || 'Please type something']" @update:model-value="dateRangeHandler3" ref="checkInTime"/>
</q-popup-proxy>
</q-field>
</div>
......@@ -199,7 +199,8 @@
:label="$t('v101.scatteredOrder.xin')"
hint=""
lazy-rules
:rules="[ val => val && val.length > 0 || 'Please type something']"
:rules="[ val => val && val.length > 0 || ' ']"
ref="guestLastName"
/>
</div>
<div class="col-6">
......@@ -212,7 +213,8 @@
:label="$t('v101.scatteredOrder.ming')"
hint=""
lazy-rules
:rules="[ val => val && val.length > 0 || 'Please type something']"
:rules="[ val => val && val.length > 0 || ' ']"
ref="guestFirstName"
/>
</div>
......@@ -227,10 +229,11 @@
size="xs"
filled
v-model="sureMsg.guestAddress"
label="Your name"
label=""
hint=""
lazy-rules
:rules="[ val => val && val.length > 0 || 'Please type something']"
:rules="[ val => val && val.length > 0 || ' ']"
ref="guestAddress"
/>
</div>
<div class="col-6 row">
......@@ -241,10 +244,11 @@
size="xs"
filled
v-model="sureMsg.guestEmail"
label="Your name"
label=""
hint=""
lazy-rules
:rules="[ val => val && val.length > 0 || 'Please type something']"
:rules="[ val => val && val.length > 0 || ' ']"
ref="guestEmail"
/>
</div>
<div class="col-6 row">
......@@ -255,10 +259,11 @@
size="xs"
filled
v-model="sureMsg.guestPhoneNumber"
label="Your name"
label=""
hint=""
lazy-rules
:rules="[ val => val && val.length > 0 || 'Please type something']"
:rules="[ val => val && val.length > 0 || ' ']"
ref="guestPhoneNumber"
/>
</div>
<div class="col-12 row">
......@@ -272,7 +277,7 @@
autogrow
type="textarea"
v-model="sureMsg.guestRequest"
label="Your name"
label=""
hint=""
lazy-rules
/>
......@@ -335,8 +340,8 @@
dense
size="xs"
filled
v-model="name"
label="Your name"
v-model="ActivateCode"
label=""
hint=""
lazy-rules
/>
......@@ -387,8 +392,17 @@
const { t } = useI18n()
const qDateProxy = ref(null) as any
const qDateProxy2 = ref(null) as any
const qDateProxy3 = ref(null) as any
const checkInTime = ref(null) as any
const guestLastName = ref(null) as any
const guestFirstName = ref(null) as any
const guestAddress = ref(null) as any
const guestEmail = ref(null) as any
const guestPhoneNumber = ref(null) as any
// const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const data = reactive({
ActivateCode: '',//兑换码
params:{
// hotelId:'',
sort:1,
......@@ -455,6 +469,9 @@
pickerBeginDateAfter:'',//入住时间后可选范围
RoomTypeList: [] as Array<HotelArea>,//房间等级
scatteredRoomTypeList: [] as Array<HotelArea>,//散客房间类型
WeekList: [] as Array<HotelArea>,//周一至周日
checkInWeek: '',
checkOutWeek: '',
name: '',
age: '',
})
......@@ -468,10 +485,13 @@
data.params.searchroomGroup = data.getParamsMsg.searchroomGroup
data.params.imgUrl = data.getParamsMsg.imgUrl
data.urlParamsMsg = currentRouter.currentRoute.value.params
data.auditNum = data.getParamsMsg.auditNum
data.childNum = data.getParamsMsg.childNum
// data.dateRange = date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
// data.dateRange = date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
data.RoomTypeList = useHotel.getHotelRoomType()
data.scatteredRoomTypeList = useHotel.getHotelScatRoom()
data.WeekList = useHotel.getHotelWeek()
// data.dateRange.from = date.formatDate(date.addToDate(new Date(), { days: 8 }), 'YYYY/MM/DD')
// data.dateRangeFormat = data.dateRange
......@@ -483,7 +503,30 @@
// )
const methods = {
submitForm () {
if(data.submLoading) return
checkInTime.value.validate()
guestLastName.value.validate()
guestFirstName.value.validate()
guestAddress.value.validate()
guestEmail.value.validate()
guestPhoneNumber.value.validate()
return
data.loading = true
let param = Object.assign(data.sureMsg)
HotelService.GetHotelHotelBooking(param)
.then(r => {
if (r.data.resultCode == ApiResult.SUCCESS) {
message.successMsg(`${t('success')}`)
// localStorage.removeItem(DirtionmaryHelper.HOTEL_HOTELCARS_CACHE)
} else {
message.errorMsg(r.data.message)
}
data.submLoading = false
})
.catch(e => {
message.errorMsg(e.message)
data.submLoading = false
})
},
onReset () {
data.name.value = null
......@@ -504,8 +547,62 @@
// data.childNum = 1
// }
},
optionsFn(cd: any) {
return cd >= date.formatDate(date.addToDate(new Date(), { days: 8 }), 'YYYY/MM/DD')
//通过日期得到周几
getWeek(){
let arrivalDate = new Date(data.params.arrivalDate).getDay();
let departureDate = new Date(data.params.departureDate).getDay();
switch(arrivalDate){
case 0:
data.checkInWeek=data.WeekList[6].name
break;
case 1:
data.checkInWeek=data.WeekList[0].name
break;
case 2:
data.checkInWeek=data.WeekList[1].name
break;
case 3:
data.checkInWeek=data.WeekList[2].name
break;
case 4:
data.checkInWeek=data.WeekList[3].name
break;
case 5:
data.checkInWeek=data.WeekList[4].name
break;
case 6:
data.checkInWeek=data.WeekList[5].name
break;
}
switch(departureDate){
case 0:
data.checkOutWeek=data.WeekList[6].name
break;
case 1:
data.checkOutWeek=data.WeekList[0].name
break;
case 2:
data.checkOutWeek=data.WeekList[1].name
break;
case 3:
data.checkOutWeek=data.WeekList[2].name
break;
case 4:
data.checkOutWeek=data.WeekList[3].name
break;
case 5:
data.checkOutWeek=data.WeekList[4].name
break;
case 6:
data.checkOutWeek=data.WeekList[5].name
break;
}
},
optionsFnStar(cd: any) {
return cd <= date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
},
optionsFnEnd(cd: any) {
return cd >= date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
},
dateRangeHandler(e: any) {
if (qDateProxy.value) qDateProxy.value.hide()
......@@ -515,6 +612,9 @@
if (qDateProxy2.value) qDateProxy2.value.hide()
methods.initHotel()
},
dateRangeHandler3(e: any) {
if (qDateProxy3.value) qDateProxy3.value.hide()
},
//获取房间等级
getRoomType(type) {
let gradeType = "";
......@@ -575,6 +675,7 @@
return gradeType;
},
initHotel() {
methods.getWeek()
data.loading = true
let param = Object.assign(data.params,data.urlParamsMsg)
HotelService.GetHotelRoomsList(param)
......@@ -584,7 +685,6 @@
data.roomRateDetails = r.data.data.roomRateDetails
data.roomRateDetails.roomOptions.checkIinStartTime = data.roomRateDetails.roomOptions['check-inStartTime']
data.roomRateDetails.roomOptions.finalCheckInTime = data.roomRateDetails.roomOptions['finalCheck-inTime']
console.log(data.roomRateDetails.roomOptions.finalCheckInTime,'---1111')
if(Object.prototype.toString.call(data.dataList.roomGroup) == '[object Object]'){
let arr = [];
arr.push(data.dataList.roomGroup);
......@@ -703,7 +803,7 @@
methods.initHotel()
})
return { ...toRefs(data), ...methods,qDateProxy,qDateProxy2 }
return { ...toRefs(data), ...methods,qDateProxy,qDateProxy2,qDateProxy3 }
}
})
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment