diff --git a/src/api/mall/product/hotelZax.ts b/src/api/mall/product/hotelZax.ts new file mode 100644 index 00000000..e6150791 --- /dev/null +++ b/src/api/mall/product/hotelZax.ts @@ -0,0 +1,219 @@ +import request from '@/config/axios' + +export interface HotelZaxRoomVO { + id?: number + hotelId?: number + hotelCode?: string + roomTypeCode?: string + roomTypeName?: string + bedType?: string + capacity?: number + roomNumber?: number +} + +export interface HotelZaxProductVO { + id?: number + hotelId?: number + hotelCode?: string + roomTypeCode?: string + productCode?: string + productName?: string + priceCode?: string + cancelCode?: string + mealType?: number + mealCount?: number + sellPrice?: number + stock?: number +} + +export interface HotelZaxVO { + id?: number + hotelCode?: string + hotelName?: string + groupCode?: string + coverImage?: string + carouselImages?: string + address?: string + district?: string + districtAdcode?: number + bizArea?: string + starLevel?: number + score?: number + facilityTags?: string + longitude?: number + latitude?: number + phone?: string + minSellPrice?: number + status?: string + supplierUpdateTime?: string + syncedAt?: string + intro?: string + roomCount?: number + productCount?: number + rooms?: HotelZaxRoomVO[] + products?: HotelZaxProductVO[] +} + +export interface HotelZaxPageReq { + pageNo: number + pageSize: number + hotelName?: string + hotelCode?: string + status?: string + district?: string + districtAdcode?: number +} + +export const getHotelZaxPage = (params: HotelZaxPageReq) => { + return request.get({ url: '/product/hotel-zax/page', params }) +} + +export const getHotelZax = (id: number) => { + return request.get({ url: '/product/hotel-zax/get', params: { id } }) +} + +export const updateHotelZax = (data: HotelZaxVO) => { + return request.put({ url: '/product/hotel-zax/update', data }) +} + +export const updateHotelZaxStatus = (id: number, status: string) => { + return request.put({ url: '/product/hotel-zax/update-status', data: { id, status } }) +} + +export const saveHotelZaxRoom = (data: HotelZaxRoomVO) => { + return request.post({ url: '/product/hotel-zax/room/save', data }) +} + +export const deleteHotelZaxRoom = (hotelId: number, roomId: number) => { + return request.delete({ url: '/product/hotel-zax/room/delete', params: { hotelId, roomId } }) +} + +export const saveHotelZaxProduct = (data: HotelZaxProductVO) => { + return request.post({ url: '/product/hotel-zax/product/save', data }) +} + +export const deleteHotelZaxProduct = (hotelId: number, productId: number) => { + return request.delete({ url: '/product/hotel-zax/product/delete', params: { hotelId, productId } }) +} + +export interface HotelZaxDailyVO { + id?: number + hotelId?: number + hotelCode?: string + productId?: number + productCode?: string + roomTypeCode?: string + stayDate?: string + costPrice?: number + sellPrice?: number + stock?: number + sold?: number + remainStock?: number + dailyStatus?: number +} + +export interface HotelZaxDailyPageReq { + pageNo: number + pageSize: number + hotelId: number + productCode?: string + stayFrom?: string + stayTo?: string +} + +export const getHotelZaxDailyPage = (params: HotelZaxDailyPageReq) => { + return request.get({ url: '/product/hotel-zax/daily/page', params }) +} + +export const saveHotelZaxDaily = (data: HotelZaxDailyVO) => { + return request.post({ url: '/product/hotel-zax/daily/save', data }) +} + +export const batchHotelZaxDaily = (data: { + hotelId: number + mode: 'FILL' | 'ADJUST' + startDate: string + endDate: string + productCodes?: string[] + costPrice?: number + sellPrice?: number + stock?: number + dailyStatus?: number + fillMissing?: boolean +}) => { + return request.post({ url: '/product/hotel-zax/daily/batch', data }) +} + +export const deleteHotelZaxDaily = (hotelId: number, dailyId: number) => { + return request.delete({ url: '/product/hotel-zax/daily/delete', params: { hotelId, dailyId } }) +} + +export const syncHotelZaxDaily = (hotelId: number) => { + return request.post({ url: '/product/hotel-zax/daily/sync', params: { hotelId } }) +} + +export const getHotelZaxSyncCursor = () => { + return request.get({ url: '/product/hotel-zax/sync-cursor' }) +} + +/** full=true:按当前资安心授权范围全量拉(改授权后必须全量,否则增量水位会显示 0) */ +export const syncHotelZax = (full = true) => { + return request.post({ url: '/product/hotel-zax/sync', params: { full } }) +} + +export const resetHotelZaxCursor = () => { + return request.post({ url: '/product/hotel-zax/reset-cursor' }) +} + +export interface HotelZaxOrderVO { + id?: number + userId?: number + channelNo?: string + orderNo?: string + platformNo?: string + orderStatus?: string + bookStatus?: string + hotelCode?: string + hotelName?: string + productCode?: string + productName?: string + roomTypeCode?: string + checkInDate?: string + checkOutDate?: string + nights?: number + roomCount?: number + contactName?: string + contactPhone?: string + guestJson?: string + payOrderId?: number + payStatus?: boolean + payTime?: string + sellAmount?: number + failMsg?: string + createTime?: string +} + +export interface HotelZaxOrderPageReq { + pageNo: number + pageSize: number + hotelName?: string + hotelCode?: string + channelNo?: string + orderNo?: string + orderStatus?: string + payStatus?: boolean + contactPhone?: string + userId?: number +} + +export const getHotelZaxOrderPage = (params: HotelZaxOrderPageReq) => { + return request.get({ url: '/product/hotel-zax/order/page', params }) +} + +export const getHotelZaxOrder = (id: number) => { + return request.get({ url: '/product/hotel-zax/order/get', params: { id } }) +} + +export const cancelHotelZaxOrder = (id: number, reason?: string) => { + return request.post({ url: '/product/hotel-zax/order/cancel', params: { id, reason } }) +} diff --git a/src/views/mall/product/hotelZax/HotelZaxDetail.vue b/src/views/mall/product/hotelZax/HotelZaxDetail.vue new file mode 100644 index 00000000..22a63eff --- /dev/null +++ b/src/views/mall/product/hotelZax/HotelZaxDetail.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/src/views/mall/product/hotelZax/HotelZaxForm.vue b/src/views/mall/product/hotelZax/HotelZaxForm.vue new file mode 100644 index 00000000..cc661a9f --- /dev/null +++ b/src/views/mall/product/hotelZax/HotelZaxForm.vue @@ -0,0 +1,259 @@ + + + diff --git a/src/views/mall/product/hotelZax/HotelZaxInventory.vue b/src/views/mall/product/hotelZax/HotelZaxInventory.vue new file mode 100644 index 00000000..0b54afa6 --- /dev/null +++ b/src/views/mall/product/hotelZax/HotelZaxInventory.vue @@ -0,0 +1,675 @@ + + + diff --git a/src/views/mall/product/hotelZax/index.vue b/src/views/mall/product/hotelZax/index.vue new file mode 100644 index 00000000..5e69835f --- /dev/null +++ b/src/views/mall/product/hotelZax/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/src/views/mall/product/hotelZaxOrder/index.vue b/src/views/mall/product/hotelZaxOrder/index.vue new file mode 100644 index 00000000..1eb15b94 --- /dev/null +++ b/src/views/mall/product/hotelZaxOrder/index.vue @@ -0,0 +1,244 @@ + + +