Commit aff079dd authored by 罗超's avatar 罗超

完成部分调整

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