Commit 44775ea3 authored by youjie's avatar youjie

no message

parent 8a9a2e5d
......@@ -36,7 +36,7 @@
<!-- <div class="q-ml-md" style="font-size: 12px; opacity: 0.5">{{ $t('hotel.col.more') }}</div> -->
</div>
</div>
<q-btn color="color" :label="$t('hotel.buy')" class="q-pa-none q-px-md" dense outline style="opacity: 0.5" />
<q-btn color="color" :label="$t('hotel.buy')" class="q-pa-none q-px-md" dense outline style="opacity: 0.5" @click="showOrderSubmitHandler(h,x)"/>
</div>
<div class="row justify-between q-mt-md q-pa-sm rounded-borders" style="background:rgba(255,255,255,.3)" v-if="x.PriceList[0].room.length>0">
<div class="price-item q-ma-none" v-for="y in x.PriceList[0].room">
......@@ -63,7 +63,7 @@ export default defineComponent({
require: true
}
},
setup(props) {
setup(props, context) {
const { t } = useI18n()
const data = reactive({
......@@ -80,6 +80,9 @@ export default defineComponent({
data.scrollStyle = useScrollModule().scrollStyle
const methods = {
showOrderSubmitHandler(row:any,col:any){
context.emit('update:modelValue',row,col)
},
setCurrentHotel(hotel:any) {
hotel.subList.forEach((x: any) => {
x.ShowMorePrice = false
......
......@@ -73,7 +73,7 @@
</template>
</q-table>
<q-dialog v-model="showPriceList">
<hotel-price-list :hotel="queryHotelObj"></hotel-price-list>
<hotel-price-list :hotel="queryHotelObj" @update:model-value="showOrderSubmitHandler"></hotel-price-list>
</q-dialog>
<q-dialog v-model="showOrderPreview" persistent>
<TableOperation :HotelRow="orderSubmitObj" :hotelInfor="orderSubmitItemObj" @close="showOrderPreview = false"></TableOperation>
......
<template>
<q-card flat class="q-pa-lg" style="shadow: 0px 0px 50px 0px rgba(82, 63, 105, 0.15); width: 50vw">
<q-card flat class="q-pa-lg" style="shadow: 0px 0px 50px 0px rgba(82, 63, 105, 0.15); width: 50vw" :style="{'width':$q.platform.is.desktop?'50vw':'100vw'}">
<div class="q-mb-xs">
<div class="">
<span class="text-primary text-h6">{{ parameters.HotelName }}</span>
......@@ -20,16 +20,19 @@
<div class="bg-grey-1 rounded-borders q-px-md q-py-sm" style="max-height: 35vh; overflow-y: auto">
<template v-for="(item, index) in parameters.DetailList">
<div class="row no-wrap items-center q-py-sm" :style="{ 'border-top': index > 0 && !item.Tips ? '1px dashed #ddd' : '' }">
<div class="q-pr-md col-2">
<div :class="{'row':$q.platform.is.desktop,'col-5':$q.platform.is.desktop,'q-pr-md':$q.platform.is.mobile,'col-6':$q.platform.is.mobile,'column':$q.platform.is.mobile}">
<div :class="{'q-pr-md':$q.platform.is.desktop,'col-4':$q.platform.is.desktop,}">
<div class="f12">{{ item.RoomName }}</div>
</div>
<div class="text-negative f12 col-3">
<div class="text-negative f12" :class="{'col-6':$q.platform.is.desktop,'q-pt-sm':$q.platform.is.mobile}">
<span class="fz10">¥</span>
<span class="din">{{ item.UPriceFormat }}</span>
<span class="text-dark" style="font-size: 12px">/{{ $t('unit.ren') }}</span>
</div>
<div class="q-pl-md col-4">
<q-input style="width: 100%" @update:model-value="changePeople" v-model="item.PeopleNumber" class="col q-mr-md q-px-sm" mask="#" reverse-fill-mask dense standout :label="$t('hotel.shopping.peopleNum')">
</div>
<div :class="{'row':$q.platform.is.desktop,'col':$q.platform.is.desktop,'q-pl-md':$q.platform.is.desktop,'column':$q.platform.is.mobile}">
<div :class="{'col-7':$q.platform.is.desktop}">
<q-input style="width: 100%" @update:model-value="changePeople" v-model="item.PeopleNumber" class="col" :class="{'q-mr-md':$q.platform.is.desktop,'q-px-sm':$q.platform.is.desktop,'q-pl-sm':$q.platform.is.desktop,}" mask="#" reverse-fill-mask dense standout :label="$t('hotel.shopping.peopleNum')">
<template v-slot:prepend>
<q-btn color="primary" size="sm" class="q-px-none" flat icon="remove" @click="addPeople(item, 0)" />
</template>
......@@ -38,13 +41,15 @@
</template>
</q-input>
</div>
<div class="text-center col">
<div :class="{'col':$q.platform.is.desktop,'text-center':$q.platform.is.desktop,'text-right':$q.platform.is.mobile,}">
<span class="f12 text-grey-6" v-html="$t('hotel.yg', { roomCount: item.Number })"></span>
</div>
</div>
</div>
</template>
</div>
<div class="row items-center justify-between q-pt-md">
<div class="q-pt-md" :class="{'row':$q.platform.is.desktop,'items-center':$q.platform.is.desktop,'justify-between':$q.platform.is.desktop,'column':$q.platform.is.mobile}
">
<div>
<div class="text-grey-6 fz12 row items-center">
<div class="q-mr-lg">
......@@ -64,7 +69,7 @@
{{$t('hotel.outbind')}}
</div>
</div>
<div class="row items-center q-pl-md">
<div class="row" :class="{'items-center':$q.platform.is.desktop,'q-pl-md':$q.platform.is.desktop,'justify-end':$q.platform.is.mobile,'q-pt-md':$q.platform.is.mobile}">
<div>
<q-btn flat dense color="dark" :label="$t('close')" class="q-mr-sm" @click="editor={}" v-close-popup/>
<q-btn unelevated dense color="negative" :disable="total==0" icon="shopping_cart" :label="$t('hotel.car.addShopping')" @click="join" />
......@@ -75,7 +80,7 @@
</template>
<script lang="ts">
import { defineComponent, ref, reactive, toRef, toRefs, provide, onMounted, inject, watch } from 'vue'
import { defineComponent, ref, reactive, toRef, toRefs, provide, onMounted, inject, watch, onMounted } from 'vue'
import { useI18n } from 'vue-i18n'
import { DirtionmaryHelper } from '../../../config/dictionary'
import { date } from 'quasar'
......@@ -135,7 +140,7 @@ export default defineComponent({
}
)
data.onlyNum = data.hotelInfor.RemainingInventory
// data.onlyNum = data.hotelInfor.RemainingInventory
// 今天购买数量
watch(data.parameters, (n, o) => {
methods.calculateNum()
......@@ -263,6 +268,9 @@ export default defineComponent({
}else{
methods.setInjectHandler()
}
onMounted(()=>{
data.onlyNum = data.hotelInfor.RemainingInventory
})
return { ...toRefs(data), ...methods,editor }
}
......
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