Commit d3ed1754 authored by 罗超's avatar 罗超

提繳更新

parent d2ca652a
......@@ -14,6 +14,7 @@
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="icon" type="image/ico" href="favicon.ico">
<script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script>
</head>
<body>
<!-- quasar:entry-point -->
......
......@@ -11,7 +11,9 @@ export enum RoleType {
}
export enum ApiResult{
'SUCCESS' = 1,
'FAILED' = 0
'FAILED' = 0,
'TOKEN_INVALID' = 10000,
'TOKEN_ILLEGAL' = 10001,
}
/**
* @description 常用异常结果常量定义
......@@ -34,4 +36,4 @@ export enum ScaleType {
'21-50人' = 2,
'51-100人' = 3,
'100人以上' = 4
}
\ No newline at end of file
}
......@@ -8,6 +8,9 @@ import router from '../router'
// import Store from '../store'
// import { Notify } from 'quasar'
import * as OpenCC from 'opencc-js'
import { ApiResult } from 'src/@types/enumHelper';
import { dispatchAction } from 'src/store/utils';
import { UserActionsType } from 'src/store/modules/user/actions';
let {locale,t} =i18n.global
let converterTW = OpenCC.Converter({ from: 'cn', to: 'tw' }) //转繁
let datas: AxiosResponse // 接收需要转繁数据
......@@ -70,7 +73,7 @@ const getErrorCode2text = (response: AxiosResponse): string => {
*/
const service = Axios.create({
baseURL: process.env.BASE_APP_API,
timeout: 10000,
timeout: 20000,
headers: {
'User-Type': 'bus',
'Content-Type': 'application/json;charset=UTF-8'
......@@ -85,7 +88,7 @@ const service = Axios.create({
*/
service.interceptors.request.use(
async (config: AxiosRequestConfig) => {
// 如果是获取token接口:
// if (config.url === '/auth/oauth/token') {
// //TODO:用户登录的特殊处理,
......@@ -118,10 +121,15 @@ service.interceptors.request.use(
* @returns {}
*/
service.interceptors.response.use(
/** 请求有响应 */
async (response: AxiosResponse) => {
if (response.status === 200) {
if(response.data.resultCode == ApiResult.TOKEN_ILLEGAL || response.data.resultCode == ApiResult.TOKEN_INVALID){
//router.push('/auth/login')
dispatchAction<UserActionsType>('user', 'setUserSignout', null)
window.location.reload()
}
if(locale.value=='zhTW'){
let stringifyData = converterTW(JSON.stringify(response))
datas = JSON.parse(stringifyData)
......
......@@ -48,6 +48,16 @@ class HotelService {
return request('dict_post_GetMyCustomerOrderInfo', {OrderId})
}
/**
* 獲取酒店訂單詳情
* @param hotelID 酒店編號
* @returns
*/
static async GetHotelDetail(hotelID: number): Promise<HttpResponse> {
return request('hotel_post_GetAll', {hotelID})
}
static async GetHasStockHotelList(): Promise<HttpResponse> {
let params={
IsMoreThanZero: 0,
......
......@@ -12,7 +12,7 @@
<span class="din text-primary">{{HotelLength}}</span>
{{$t('hotel.car.title2')}}
</span>
<div v-if="$q.platform.is.desktop" class="q-pa-sm" :class="{'draw-close':$q.platform.is.desktop,'draw-close-modile':$q.platform.is.mobile}">
<div v-if="$q.platform.is.desktop" v-close-popup class="q-pa-sm" :class="{'draw-close':$q.platform.is.desktop,'draw-close-modile':$q.platform.is.mobile}">
<q-icon name="close" size="26px"></q-icon>
</div>
</div>
......
......@@ -22,11 +22,11 @@
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td style="width:200px;" class="cursor-pointer ListTable-title">
<q-td style="width:200px;" class="cursor-pointer ListTable-title" @click="showHotelDetailHandler(props.row.HotelId)">
<div class="ellipsis-3-lines" style="padding: 7px 16px;width: 200px;white-space: break-spaces;">
{{ props.row.HotelName }}
</div>
<hotelCard class="ListTable-show" v-if="props.rowIndex==0"></hotelCard>
<!-- <hotelCard class="ListTable-show" v-if="props.rowIndex==0"></hotelCard> -->
</q-td>
<q-td>
<div class="td-item">{{ $t('hotel.table.price') }}</div>
......@@ -80,10 +80,10 @@
<hotel-price-list :hotel="queryHotelObj" @update:model-value="showOrderSubmitHandler"></hotel-price-list>
</q-dialog>
<q-dialog v-model="showOrderPreview" persistent>
<TableOperation :HotelRow="orderSubmitObj" :hotelInfor="orderSubmitItemObj" @close="showOrderPreview = false"></TableOperation>
<table-operation :HotelRow="orderSubmitObj" :hotelInfor="orderSubmitItemObj" @close="showOrderPreview = false"></table-operation>
</q-dialog>
<q-dialog v-model="showHotelDetails" persistent>
<hotelDetails></hotelDetails>
<hotel-details :hotelId="showHotelDetailId"></hotel-details>
</q-dialog>
</div>
</template>
......@@ -154,7 +154,8 @@ export default defineComponent({
orderSubmitObj:{} as any,
orderSubmitItemObj:{} as any,
showOrderPreview: false,
showHotelDetails: true
showHotelDetails: false,
showHotelDetailId: 0
})
......@@ -232,6 +233,10 @@ export default defineComponent({
data.orderSubmitObj = row
data.orderSubmitItemObj = col
data.showOrderPreview = true
},
showHotelDetailHandler(hotelId:number){
data.showHotelDetailId=hotelId
data.showHotelDetails = true
}
}
methods.calcDateRangeCols()
......@@ -249,7 +254,7 @@ export default defineComponent({
display: block;
}
.ListTable-show{
/* position: absolute;
/* position: absolute;
left: 0;
top:80px;
z-index: 9999; */
......
......@@ -27,48 +27,31 @@
<span class="fz15 q-pl-sm">{{$t('hotel.col.low')}}</span>
</div>
</div>
</q-card>
</q-card>
</template>
<script lang="ts">
import { defineComponent, ref, reactive, toRefs, provide, onMounted, inject, watch, onBeforeUnmount, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import useScrollModule from '../../../module/scrollbar/scrollModule'
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 { useQuasar } from 'quasar'
export default defineComponent({
props: {},
setup(props, context) {
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
const { t } = useI18n()
const TCNumRef = ref(null) as any
const ContactNameRef = ref(null) as any
const ContactNumberRef = ref(null) as any
const $q = useQuasar()
const data = reactive({
scrollStyle:{} as any
})
data.scrollStyle = useScrollModule().scrollStyle
const info = ref(null)
const panning = ref(false)
// 今天购买数量
watch(cars.value, (n, o) => {
methods.getMoney()
})
const methods = {
}
return { ...toRefs(data), cars, TCNumRef, ContactNameRef, ContactNumberRef, ...methods, moneyFormat, info, panning,}
return { ...toRefs(data), ...methods}
}
})
</script>
<style>
.hotelCard-img{
width: 228px;
......@@ -76,10 +59,9 @@
overflow: hidden;
}
.hotelCard-title{
width: 100%;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -34,7 +34,8 @@
<div class="row items-center justify-between">
<div class="f12 text-grey-6">{{ $t('hotelorder.search.orderNum') }}{{ x.OrderNo }}</div>
<div class="q-ml-md">
<q-btn color="dark" flat size="sm" :label="$t('hotelorder.copy')" v-if="copyId != x.OrderId" @click="setCopyHandler(x)" />
<q-btn color="dark" flat size="sm" :label="$t('hotelorder.copy')" v-if="copyId != x.OrderId"
@click="setCopyHandler(x)" />
<q-btn color="cyan" outline size="sm" :label="$t('hotelorder.copyed')" v-else></q-btn>
</div>
</div>
......@@ -193,30 +194,29 @@
<div class="q-mt-md f12 text-grey-6">{{ $t('noneData') }}</div>
</div>
<q-dialog v-model="PaymentDialog">
<div class="rounded-borders bg-white q-px-lg q-pb-lg q-pt-lg" :style="{'width': $q.platform.is.desktop?'450px':'450px'}">
<div class="orderListDialog-title row justify-center q-pb-xs ">
<span class="text-weight-bold">{{$t('hotelorder.dialog.title')}}</span>
<q-icon class="orderListDialog-close text-grey" name="close" @click="PaymentDialog=false"></q-icon>
<div class="rounded-borders bg-white q-pb-lg q-pt-lg" style="width: 450px">
<div class="orderListDialog-title row justify-center q-pb-xs">
<span class="text-weight-bold">{{ $t('hotelorder.dialog.title') }}</span>
<q-icon class="orderListDialog-close text-grey" name="close" @click="PaymentDialog = false"></q-icon>
</div>
<div class="orderListDialog-bg column rounded-borders q-ma-lg q-py-lg q-px-lg">
<div class="orderListDialog-img">
<div class="row items-end q-pb-md">
<span class="text-grey-3">{{$t('hotelorder.dialog.AccountName')}}:</span>
<span class="text-weight-bold text-white" style="font-size: 18px;">張三</span>
<span class="text-grey-3">{{ $t('hotelorder.dialog.AccountName') }}:</span>
<span class="text-weight-bold text-white" style="font-size: 18px">張三</span>
</div>
<div class="row items-center justify-between q-pb-sm">
<div>
<span class="text-grey-3">{{$t('hotelorder.dialog.account')}}:</span>
<span class="text-cyan-12 text-weight-bold" style="font-size: 18px;">7489327279423</span>
</div>
<q-btn size="xs" color="cyan-12 q-ml-sm">
<span class="text-dark">{{$t('hotelorder.dialog.copy')}}</span></q-btn>
<div class="q-pb-sm" :class="{'row items-center justify-between':$q.platform.is.desktop}">
<div :class="{'q-mb-sm':$q.platform.is.mobile,'col':$q.platform.is.desktop}" >
<span class="text-grey-3">{{ $t('hotelorder.dialog.account') }}:</span>
<span class="text-cyan-12 text-weight-bold din" style="font-size: 18px">7489 3272 7942 311</span>
</div >
<q-btn :class="{'q-ml-xl':$q.platform.is.mobile}" unelevated size="xs" class="bg-blue-11 text-white" v-if="copyId != -1" :label="$t('hotelorder.dialog.copy')" @click="setCopyHandler(null,'開戶名:張三,帳戶:7489 3272 7942 311')"></q-btn>
<q-btn :class="{'q-ml-xl':$q.platform.is.mobile}" icon="check" unelevated size="xs" class="bg-blue-11 text-white" :label="$t('hotelorder.copyed')" v-else></q-btn>
</div>
</div>
</div>
<div class="row justify-center q-pb-lg q-px-lg q-mx-lg">
<span class="text-center text-grey-8 q-px-lg">{{$t('hotelorder.dialog.prompt')}}</span>
<div class="row justify-center q-pb-lg">
<span class="text-center f12 text-grey-6 q-px-lg">{{ $t('hotelorder.dialog.prompt') }}</span>
</div>
</div>
</q-dialog>
......@@ -232,7 +232,7 @@ import { RoomType, StandardStatus } from '../../../../@types'
import { getHotelOrderStatus, getHotelRoomType, moneyFormat } from '../../../../utils/tools'
import { useI18n } from 'vue-i18n'
import svgIcon from '../../../global/svg-icon.vue'
import { useQuasar } from 'quasar'
import { copyToClipboard, useQuasar } from 'quasar'
import { currentRouter } from '../../../../router'
import { UploadFileInfo } from 'naive-ui'
import { slice } from 'lodash'
......@@ -341,12 +341,6 @@ export default defineComponent({
data.loading = false
})
},
setCopyHandler(order: any) {
data.copyId = order.OrderId
setTimeout(() => {
data.copyId = 0
}, 2000)
},
setShowWarnHander(id: number) {
data.expendsOrderId = id == data.expendsOrderId ? 0 : id
},
......@@ -370,35 +364,49 @@ export default defineComponent({
handleFinish(options: { file: UploadFileInfo; event?: ProgressEvent }) {
data.loading = false
let r = (options.event?.target as XMLHttpRequest).response
if(r){
let res=JSON.parse(r)
if(res.resultCode == ApiResult.SUCCESS && res.data){
if (r) {
let res = JSON.parse(r)
if (res.resultCode == ApiResult.SUCCESS && res.data) {
methods.setGuestListHandler(res.data)
}else{
} else {
message.errorMsg(t('upload.failed'))
data.loading=false
data.loading = false
}
}else{
} else {
message.errorMsg(t('upload.failed'))
data.loading=false
data.loading = false
}
},
setGuestListHandler(url: string) {
HotelService.SetGuestFile(data.uploadOrderId, url)
.then(r => {
if (r.data.resultCode == ApiResult.SUCCESS) {
message.successMsg(t('upload.success'))
let order = data.orders.find(x => x.OrderId == data.uploadOrderId)
order.GuestFileList = [url]
} else {
message.errorMsg(t('upload.failed'))
}
data.loading = false
})
.catch(r => {
data.loading = false
message.errorMsg(r.message)
})
},
setCopyHandler(order: any,ctx?:string) {
if(ctx){
data.copyId = -1
copyToClipboard(ctx)
}else{
data.copyId = order.OrderId
copyToClipboard(order.OrderNo)
}
setTimeout(() => {
data.copyId = 0
}, 2000)
},
setGuestListHandler(url:string){
HotelService.SetGuestFile(data.uploadOrderId,url).then(r=>{
if(r.data.resultCode == ApiResult.SUCCESS){
message.successMsg(t('upload.success'))
let order = data.orders.find(x=>x.OrderId==data.uploadOrderId)
order.GuestFileList=[url]
}else{
message.errorMsg(t('upload.failed'))
}
data.loading=false
}).catch(r=>{
data.loading=false
message.errorMsg(r.message)
})
}
}
methods.init()
......
<template>
<q-card flat class="bg-white q-pa-none"
style="shadow: 0px 0px 50px 0px rgba(82, 63, 105, 0.15)"
<q-card flat class="bg-white q-pa-none light-shadow" style="border:1px solid #EEE"
:style="{'width':$q.platform.is.desktop?'375px':'350px'}">
<div class="Notifications-bg">
<div class="q-pa-lg row items-center">
<span class="text-white text-weight-bold text-h6 q-mr-sm q-pl-sm">{{$t('Notifications.title')}}</span>
<div class="text-grey-1 f12 q-pl-sm">24 {{$t('Notifications.subtitle')}}</div>
<div class="text-grey-1 f12 q-pl-sm">0 {{$t('Notifications.subtitle')}}</div>
</div>
</div>
<div class="Notifications-height q-py-md">
<div class="Notifications-height q-py-md" style="display:none">
<q-scroll-area :thumb-style="scrollStyle.thumbStyle" :bar-style="scrollStyle.barStyle" class="full-height">
<q-list>
<q-item v-for="(item,index) in menus" class="rounded-borders q-py-md">
......@@ -27,12 +26,16 @@
</div>
</q-item-section>
</q-item>
</q-list>
</q-list>
</q-scroll-area>
</div>
<div class="text-center q-my-xl">
{{$t('noneNotify')}}
</div>
</q-card>
</template>
<script lang="ts">
import { defineComponent, ref, reactive, toRefs, provide, onMounted } from 'vue'
import { useMenus, Menu } from '../../utils/menus'
......@@ -66,7 +69,7 @@
if(data.langs && data.langs.length>0){
data.currentLang = data.langs.find(x=> x.langLocale==locale.value) ?? {};
}
// 切换语言
const methods = {
getLanguage (val:SitLang) {
......@@ -81,13 +84,13 @@
}
}
onMounted(()=>{
})
return {...toRefs(data),...methods}
}
})
</script>
<style>
.Notifications-height{
height: 325px;
......@@ -142,4 +145,4 @@
line-height: 18px;
border-radius: 6px;
}
</style>
\ No newline at end of file
</style>
......@@ -14,6 +14,8 @@ export default {
noneData: "沒有找到相關的數據",
loading: "正在加載數據",
verified: '已認證',
noneFax:'無傳真信息',
noneNotify:'暫無通知消息',
personal:{
pageTitle: "個人檔案",
trading: '累積交易額',
......@@ -47,6 +49,17 @@ export default {
"down":"下載",
"reload":"重新上傳"
},
hd:{
item:{
a:'入湯稅',
b:'城市稅',
c:'停車場',
d:'預約截止天數',
e:'是否含餐',
f:'酒店類型',
g:'設施服務'
}
},
dialog:{
titles:{
hotel:"移除酒店警示",
......
......@@ -57,10 +57,10 @@
<div class="col" :class="{'text-center q-mb-md':$q.platform.is.mobile}">
<img src="../../assets/images/lg-logo.png" style="width:80%;" />
</div>
<div class="text-grey-6 text-weight-bold col" :class="{'text-right':$q.platform.is.desktop,'text-center':$q.platform.is.mobile}">
<!-- <div class="text-grey-6 text-weight-bold col" :class="{'text-right':$q.platform.is.desktop,'text-center':$q.platform.is.mobile}">
<span>{{$t("login.notaccess")}}</span>
<router-link :to="{ path: '/auth/regist' }" class="text-primary pfb text-subtitle">{{$t("login.registlink")}}</router-link>
</div>
</div> -->
</div>
<div class="q-py-xxl full-width">
<div class="text-h3 text-weight-bold">{{$t("login.title")}}</div>
......@@ -131,7 +131,7 @@ export default defineComponent({
//TODO: 缺陷,验证与提交应该使用Form表单来完成,不应该进行单个验证
let { userModel, usernameRef, passwordRef, userValidateRule, loginSubmit, stateManager } = useLgoinModule()
let { setTitle } = useMetaModule()
const dtNow = new Date().getFullYear()
const {locale,t } = useI18n();
setTitle(t("login.pageTitle"))
......@@ -143,7 +143,7 @@ export default defineComponent({
if(data.langs && data.langs.length>0){
data.currentLang = data.langs.find(x=> x.langLocale==locale.value) ?? {};
}
// 切换语言
const getLanguage = (val:any) => {
locale.value = val.langLocale;
......
......@@ -73,13 +73,13 @@
<div class="q-px-lg">
<div class="q-mt-lg row items-center">
<div class="col-5 f12 text-grey-500">{{ $t('personal.TravelAgency') }}</div>
<div class="col text-subtitle2">{{ customerInfo.customerName??$t('台灣雄獅旅行社') }}</div>
<div class="col text-subtitle2">{{ customerInfo.customerName }}</div>
</div>
</div>
<div class="q-px-lg">
<div class="q-mt-lg row items-center">
<div class="col-5 f12 text-grey-500">{{ $t('personal.post') }}</div>
<div class="col text-subtitle2">{{ customerInfo.contact??userInfo.name }}</div>
<div class="col text-subtitle2">{{ customerInfo.contact }}</div>
</div>
</div>
<div class="q-px-lg">
......@@ -101,13 +101,13 @@
<div class="q-px-lg">
<div class="q-mt-lg row items-center">
<div class="col-5 f12 text-grey-500">{{ $t('personal.LINEID') }}</div>
<div class="col text-subtitle2 text-weight-bolder">{{ customerInfo.lineId ?? $t('091 004 022 9') }}</div>
<div class="col text-subtitle2 text-weight-bolder">{{ customerInfo.lineId}}</div>
</div>
</div>
<div class="q-px-lg">
<div class="q-mt-lg row items-center">
<div class="col-5 f12 text-grey-500">{{ $t('personal.Phone') }}</div>
<div class="col text-subtitle2 text-weight-bolder">{{ customerInfo.contactNumber ?? $t('+886 910040229') }}</div>
<div class="col text-subtitle2 text-weight-bolder">{{ customerInfo.contactNumber }}</div>
</div>
</div>
<div class="q-px-lg">
......
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