Commit 49597999 authored by youjie's avatar youjie

no message

parent fc89c9b2
......@@ -128,7 +128,7 @@ import { DirtionmaryHelper } from '../../../config/dictionary'
import message from '../../../utils/message'
import { ApiResult } from '../../../@types/enumHelper'
import HotelService from '../../../api/hotel'
import { moneyFormat } from '../../../utils/tools'
import { moneyFormat, dateDiffer } from '../../../utils/tools'
import { useQuasar } from 'quasar'
export default defineComponent({
props: {},
......@@ -136,6 +136,12 @@ 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)
}
});
HotelLength.value = cars.value.length
const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any
const { t } = useI18n()
const TCNumRef = ref(null) as any
......
......@@ -63,6 +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 ListCar from "./ListCar.vue"
import { DirtionmaryHelper } from '../../../config/dictionary'
export default defineComponent({
......@@ -70,6 +71,12 @@ 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)
}
});
HotelLength.value = cars.value.length
const $q = useQuasar()
const qDateProxy = ref(null) as any
const qNameProxy = ref(null) as any
......
......@@ -92,7 +92,7 @@ import { useI18n } from 'vue-i18n'
import { DirtionmaryHelper } from '../../../config/dictionary'
import { date } from 'quasar'
import message from '../../../utils/message'
import { moneyFormat } from '../../../utils/tools'
import { moneyFormat, dateDiffer } from '../../../utils/tools'
export default defineComponent({
props: {
HotelRow: {
......@@ -110,6 +110,12 @@ 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)
}
});
HotelLength.value = cars.value.length
const editor = inject(DirtionmaryHelper.HOTEL_UPDATEHOTEL_CAR) as any
const data = reactive({
HotelRow: {} as any,
......
......@@ -38,7 +38,7 @@ export default defineComponent({
ContactName:'',
ContactNumber:''
})
search.OrderId = currentRouter.currentRoute.value.params.orderId
search.OrderId = currentRouter.value.params.orderId
provide(DirtionmaryHelper.HOTEL_ORDER_SEARCH,search)
const menu=inject(DirtionmaryHelper.MENU_KEYS) as any
......
......@@ -17,6 +17,21 @@ export interface DateType{
text:string
}
/**
* @description 计算距离天数
*/
export function dateDiffer(DateEnd: string) {
//date1结束时间
let date1 = new Date(DateEnd);
//date2当前时间
let date2 = new Date();
date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
const diff = date1.getTime() - date2.getTime(); //目标时间减去当前时间
const diffDate = diff / (24 * 60 * 60 * 1000); //计算当前时间与结束时间之间相差天数
return diffDate
}
/**
* @description 将枚举转为数组
* @param objEnum 枚举对象
......
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