Commit aff079dd authored by 罗超's avatar 罗超

完成部分调整

parent def92ea4
...@@ -136,11 +136,11 @@ export default defineComponent({ ...@@ -136,11 +136,11 @@ export default defineComponent({
const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const orderstatus = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_STATUS) as any const orderstatus = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_STATUS) as any
const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any
cars&&cars.value.forEach((item:any,index:Number) => { // cars&&cars.value.forEach((item:any,index:Number) => {
if(dateDiffer(item.Date)<15){ // if(dateDiffer(item.Date)<15){
cars.value.splice(index,1) // cars.value.splice(index,1)
} // }
}); // });
HotelLength.value = cars.value.length HotelLength.value = cars.value.length
const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any
const { t } = useI18n() const { t } = useI18n()
...@@ -275,15 +275,15 @@ export default defineComponent({ ...@@ -275,15 +275,15 @@ export default defineComponent({
} }
} }
methods.getMoney() methods.getMoney()
return { return {
...toRefs(data), ...toRefs(data),
cars, cars,
TCNumRef, TCNumRef,
ContactNameRef, ContactNameRef,
ContactNumberRef, ContactNumberRef,
moneyFormat, moneyFormat,
info, info,
panning, panning,
rightColor, rightColor,
HotelLength, HotelLength,
...methods } ...methods }
......
...@@ -63,7 +63,7 @@ import { date } from 'quasar' ...@@ -63,7 +63,7 @@ import { date } from 'quasar'
import { HotelRate, useHotel } from '../../../utils/hotelRate' import { HotelRate, useHotel } from '../../../utils/hotelRate'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import useScrollModule from '../../../module/scrollbar/scrollModule' import useScrollModule from '../../../module/scrollbar/scrollModule'
import { dateDiffer } from '../../../utils/tools' // import { dateDiffer } from '../../../utils/tools'
import ListCar from "./ListCar.vue" import ListCar from "./ListCar.vue"
import { DirtionmaryHelper } from '../../../config/dictionary' import { DirtionmaryHelper } from '../../../config/dictionary'
export default defineComponent({ export default defineComponent({
...@@ -71,11 +71,11 @@ export default defineComponent({ ...@@ -71,11 +71,11 @@ export default defineComponent({
setup() { setup() {
const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any
cars&&cars.value.forEach((item:any,index:Number) => { // cars&&cars.value.forEach((item:any,index:Number) => {
if(dateDiffer(item.Date)<15){ // if(dateDiffer(item.Date)<15){
cars.value.splice(index,1) // cars.value.splice(index,1)
} // }
}); // });
HotelLength.value = cars.value.length HotelLength.value = cars.value.length
const $q = useQuasar() const $q = useQuasar()
const qDateProxy = ref(null) as any const qDateProxy = ref(null) as any
...@@ -213,7 +213,7 @@ export default defineComponent({ ...@@ -213,7 +213,7 @@ export default defineComponent({
watch(HotelLength, (n, o) => { watch(HotelLength, (n, o) => {
HotelLength.value = n HotelLength.value = n
}) })
onMounted(()=>{ onMounted(()=>{
HotelLength.value = cars.value.length HotelLength.value = cars.value.length
}) })
......
...@@ -110,11 +110,11 @@ export default defineComponent({ ...@@ -110,11 +110,11 @@ export default defineComponent({
const qDateProxyOpera = ref<any>(null) const qDateProxyOpera = ref<any>(null)
const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any const cars = inject(DirtionmaryHelper.HOTEL_CAR_LIST) as any
cars&&cars.value.forEach((item:any,index:Number) => { // cars&&cars.value.forEach((item:any,index:Number) => {
if(dateDiffer(item.Date)<15){ // if(dateDiffer(item.Date)<15){
cars.value.splice(index,1) // cars.value.splice(index,1)
} // }
}); // });
HotelLength.value = cars.value.length HotelLength.value = cars.value.length
const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any
const data = reactive({ const data = reactive({
......
...@@ -15,6 +15,7 @@ import { defineComponent, inject, provide, reactive, ref, toRefs } from 'vue' ...@@ -15,6 +15,7 @@ import { defineComponent, inject, provide, reactive, ref, toRefs } from 'vue'
import { DirtionmaryHelper } from '../../config/dictionary' import { DirtionmaryHelper } from '../../config/dictionary'
import ListHeader from '../../components/hotel/list/ListHeader.vue' import ListHeader from '../../components/hotel/list/ListHeader.vue'
import ListTable from '../../components/hotel/list/ListTable.vue' import ListTable from '../../components/hotel/list/ListTable.vue'
import { date } from 'quasar'
export default defineComponent({ export default defineComponent({
components: { svgIcon, ListHeader, ListTable }, components: { svgIcon, ListHeader, ListTable },
setup() { setup() {
...@@ -41,10 +42,11 @@ export default defineComponent({ ...@@ -41,10 +42,11 @@ export default defineComponent({
provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search) provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search)
const HotelCarList = ref<Array<any>>([]) const HotelCarList = ref<Array<any>>([])
const cacheCars = localStorage.getItem(DirtionmaryHelper.HOTEL_HOTELCARS_CACHE) const cacheCars = localStorage.getItem(DirtionmaryHelper.HOTEL_HOTELCARS_CACHE)
if(cacheCars){ if(cacheCars){
HotelCarList.value = JSON.parse(cacheCars) let cacheCarArray = JSON.parse(cacheCars)//.filter((x:any)=>date.getDateDiff(new Date(x.Date),new Date(), 'days')>=15 )
HotelCarList.value = cacheCarArray
} }
provide(DirtionmaryHelper.HOTEL_CAR_LIST, HotelCarList) provide(DirtionmaryHelper.HOTEL_CAR_LIST, HotelCarList)
const updateObj = ref<any>({}) const updateObj = ref<any>({})
......
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