Commit d462445d authored by youjie's avatar youjie

no message

parent 4a81f725
......@@ -133,6 +133,7 @@ import { useQuasar } from 'quasar'
export default defineComponent({
props: {},
setup(props, context) {
const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const orderstatus = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_STATUS) as any
const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any
const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any
......@@ -158,7 +159,7 @@ export default defineComponent({
currentI: 0,
currentS: 0,
RemainingInventory: 0,
HotelLength: 0,
// HotelLength: 0,
loading: false,
cacheHotels: [
{ Name: t('hotel.car.scattered'), ID: 1 },
......@@ -235,6 +236,7 @@ export default defineComponent({
localStorage.removeItem(DirtionmaryHelper.HOTEL_HOTELCARS_CACHE)
cars.value=[]
orderstatus.value = true
HotelLength.value = 0
context.emit('success')
} else {
message.errorMsg(r.data.message)
......@@ -247,9 +249,9 @@ export default defineComponent({
})
},
getLength() {
data.HotelLength = 0
HotelLength.value = 0
cars.value.forEach((item: any) => {
data.HotelLength += item.Hotels.length
HotelLength.value += item.Hotels.length
})
},
removeHotelHandler(x:number,y:number){
......@@ -274,7 +276,18 @@ export default defineComponent({
}
methods.getLength()
methods.getMoney()
return { ...toRefs(data), cars, TCNumRef, ContactNameRef, ContactNumberRef, ...methods, moneyFormat, info, panning, rightColor,}
return {
...toRefs(data),
cars,
TCNumRef,
ContactNameRef,
ContactNumberRef,
moneyFormat,
info,
panning,
rightColor,
HotelLength,
...methods }
}
})
</script>
......
......@@ -68,6 +68,7 @@ import { DirtionmaryHelper } from '../../../config/dictionary'
export default defineComponent({
components: { svgIcon, ListCar },
setup() {
const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any
const $q = useQuasar()
const qDateProxy = ref(null) as any
......@@ -89,7 +90,7 @@ export default defineComponent({
cacheHotels: [] as Array<any>,
hotelsRates: [] as Array<HotelRate>,
canHide: false,
HotelLength: 0
// HotelLength: 0
})
data.scrollStyle = useScrollModule().scrollStyle
const search = inject(DirtionmaryHelper.HOTEL_QUERY_PARAM) as any
......@@ -186,10 +187,10 @@ export default defineComponent({
data.rightCarOpen = false
},
getLength(){
data.HotelLength = 0
HotelLength.value = 0
if(cars.value.length>0){
cars.value.forEach((item:any)=>{
data.HotelLength+=item.Hotels.length
HotelLength.value+=item.Hotels.length
})
}
},
......@@ -222,7 +223,8 @@ export default defineComponent({
qNameProxy,
searchCnt,
search,
cars
cars,
HotelLength
}
}
})
......
......@@ -48,5 +48,10 @@ class DirtionmaryHelper {
* 酒店訂單確定下單狀態
*/
static readonly HOTEL_CAR_ORDER_STATUS = "hotelcarorderstatus"
/**
* 酒店訂單數量
*/
static readonly HOTEL_CAR_ORDER_LENGTH = "hotelcarorderlength"
}
export { userDictionmary,DirtionmaryHelper }
......@@ -50,6 +50,8 @@ export default defineComponent({
provide(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR,updateObj)
const orderstatus = ref(false)
provide(DirtionmaryHelper.HOTEL_CAR_ORDER_STATUS,orderstatus)
const HotelLength = ref(0)
provide(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH,HotelLength)
const menu=inject(DirtionmaryHelper.MENU_KEYS) as any
menu.value=2
......
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