Commit 7a6f9e9d authored by Tình Trương's avatar Tình Trương

update

* booking
* carousel
parent 3748fc66
...@@ -409,7 +409,8 @@ export type ListBooking = { ...@@ -409,7 +409,8 @@ export type ListBooking = {
fromTime: string; fromTime: string;
toTime: string; toTime: string;
status: number; status: number;
activeStatus: number; favoriteScore: number;
performStatus: number;
fee: string; fee: string;
}; };
......
...@@ -71,6 +71,7 @@ export default defineComponent({ ...@@ -71,6 +71,7 @@ export default defineComponent({
}; };
return { return {
autoplay: ref(true),
router, router,
slide, slide,
slideStory, slideStory,
......
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
v-if="banners.length" v-if="banners.length"
v-model="slide" v-model="slide"
:key="banners.length" :key="banners.length"
:autoplay="autoplay"
animated animated
arrows arrows
navigation
infinite infinite
height="30rem" height="30rem"
style="border: 2px solid #f1f1f1" style="border: 2px solid #f1f1f1"
...@@ -296,6 +296,7 @@ ...@@ -296,6 +296,7 @@
<q-carousel <q-carousel
v-else v-else
v-model="slideStory" v-model="slideStory"
:autoplay="autoplay"
animated animated
arrows arrows
infinite infinite
...@@ -318,8 +319,8 @@ ...@@ -318,8 +319,8 @@
> >
<div <div
style=" style="
background: center bottom; background: bottom;
text-align: justify; text-align: start;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -46,11 +46,6 @@ ...@@ -46,11 +46,6 @@
</div> </div>
<div class="col-8 fs-14">{{ detailInfoBooking.address }}</div> <div class="col-8 fs-14">{{ detailInfoBooking.address }}</div>
<div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.content') }}:
</div>
<div class="col-8 fs-14">{{ detailInfoBooking.content }}</div>
<div class="col-4 fs-14 color"> <div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.fromTime') }}: {{ $t('listBooking.titleColumnsTable.fromTime') }}:
</div> </div>
...@@ -66,71 +61,79 @@ ...@@ -66,71 +61,79 @@
</div> </div>
<div class="col-8 fs-14">{{ detailInfoBooking.fee }}</div> <div class="col-8 fs-14">{{ detailInfoBooking.fee }}</div>
<!-- <div class="col-4 fs-14 color"> <div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.like') }}: {{ $t('listBooking.titleColumnsTable.favoriteScore') }}:
</div>
<div class="col-8 fs-14">
{{ detailInfoBooking.favoriteScore }}
</div> </div>
<div class="col-8 fs-14">{{ detailInfoBooking.like }}</div> -->
<div class="col-4 fs-14 color"> <div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.activeStatus') }}: {{ $t('listBooking.titleColumnsTable.status') }}:
</div> </div>
<div class="col-8 fs-14"> <div class="col-8 fs-14">
<q-chip <q-chip
size="sm" size="sm"
color="secondary" color="secondary"
v-if="detailInfoBooking.activeStatus === 0" v-if="detailInfoBooking.status === 0"
>Chờ nhận</q-chip >Chờ nhận</q-chip
> >
<q-chip <q-chip
size="sm" size="sm"
color="info" color="info"
v-else-if="detailInfoBooking.status === 1" v-else-if="detailInfoBooking.status === 1"
>Đã thực hiện</q-chip >Đã nhận</q-chip
> >
<q-chip size="sm" color="warning" v-else>Từ chối</q-chip> <q-chip size="sm" color="warning" v-else>Từ chối</q-chip>
</div> </div>
<div class="col-4 fs-14 color"> <div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.status') }}: {{ $t('listBooking.titleColumnsTable.performStatus') }}:
</div> </div>
<div class="col-8 fs-14"> <div class="col-8 fs-14">
<q-chip <q-chip
size="sm" size="sm"
color="secondary" color="secondary"
v-if="detailInfoBooking.status === 0" v-if="detailInfoBooking.performStatus === 0"
>Chờ nhận</q-chip >Chờ nhận</q-chip
> >
<q-chip <q-chip
size="sm" size="sm"
color="info" color="info"
v-else-if="detailInfoBooking.status === 1" v-else-if="detailInfoBooking.performStatus === 1"
>Đã thực hiện</q-chip >Đã thực hiện</q-chip
> >
<q-chip <q-chip
size="sm" size="sm"
color="warning" color="warning"
v-else-if="detailInfoBooking.status === 2" v-else-if="detailInfoBooking.performStatus === 2"
>Chưa thực hiện</q-chip >Chưa thực hiện</q-chip
> >
<q-chip <q-chip
size="sm" size="sm"
color="warning" color="warning"
v-else-if="detailInfoBooking.status === 3" v-else-if="detailInfoBooking.performStatus === 3"
>Hoãn lịch</q-chip >Hoãn lịch</q-chip
> >
<q-chip <q-chip
size="sm" size="sm"
color="warning" color="warning"
v-else-if="detailInfoBooking.status === 4" v-else-if="detailInfoBooking.performStatus === 4"
>Hủy lịch</q-chip >Hủy lịch</q-chip
> >
<q-chip size="sm" color="secondary" v-else <q-chip size="sm" color="secondary" v-else
>Thay đổi lịch</q-chip >Thay đổi lịch</q-chip
> >
</div> </div>
<div class="col-4 fs-14 color">
{{ $t('listBooking.titleColumnsTable.content') }}:
</div>
<div class="col-8 fs-14">{{ detailInfoBooking.content }}</div>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator />
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn <q-btn
color="grey" color="grey"
......
...@@ -931,9 +931,9 @@ export default { ...@@ -931,9 +931,9 @@ export default {
fromTime: 'Thời gian bắt đầu', fromTime: 'Thời gian bắt đầu',
toTime: 'Thời gian kết thúc', toTime: 'Thời gian kết thúc',
fee: 'Giá', fee: 'Giá',
like: 'Số lượt thích', favoriteScore: 'Số lượt thích',
status: 'T.T Booking', status: 'T.T Booking',
activeStatus: 'T.T Thực hiện', performStatus: 'T.T Thực hiện',
action: 'Chức năng', action: 'Chức năng',
}, },
dialogLabel: { dialogLabel: {
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
<div class="col-2 sreach"> <div class="col-2 sreach">
<q-select <q-select
v-model="sreachStatus" v-model="sreachStatus"
:options="BookingStatus" :options="ListStatusBooking"
option-label="text" option-label="name"
option-value="value" option-value="id"
dense dense
outlined outlined
:label="$t('listBooking.titleColumnsTable.status')" :label="$t('listBooking.titleColumnsTable.status')"
...@@ -43,20 +43,20 @@ ...@@ -43,20 +43,20 @@
</div> </div>
<div class="col-2 sreach"> <div class="col-2 sreach">
<q-select <q-select
v-model="sreachActiveStatus" v-model="sreachPerformStatus"
:options="Status" :options="ListPerformStatus"
option-label="text" option-label="name"
option-value="value" option-value="id"
dense dense
outlined outlined
:label="$t('listBooking.titleColumnsTable.activeStatus')" :label="$t('listBooking.titleColumnsTable.performStatus')"
clearable clearable
></q-select> ></q-select>
</div> </div>
<div class="col-2 sreach"> <div class="col-2 sreach">
<!-- v-model="date[0]" -->
<q-input <q-input
v-model="date[0]"
:label="$t('listBooking.titleColumnsTable.fromTime')" :label="$t('listBooking.titleColumnsTable.fromTime')"
readonly readonly
dense dense
...@@ -69,8 +69,7 @@ ...@@ -69,8 +69,7 @@
transition-show="scale" transition-show="scale"
transition-hide="scale" transition-hide="scale"
> >
<!-- v-model="date[0]" --> <q-date v-model="date[0]" mask="DD/MM/YYYY" no-unset>
<q-date mask="DD/MM/YYYY" no-unset>
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn <q-btn
v-close-popup v-close-popup
...@@ -86,8 +85,8 @@ ...@@ -86,8 +85,8 @@
</q-input> </q-input>
</div> </div>
<div class="col-2 sreach"> <div class="col-2 sreach">
<!-- v-model="date[1]" -->
<q-input <q-input
v-model="date[1]"
:label="$t('listBooking.titleColumnsTable.toTime')" :label="$t('listBooking.titleColumnsTable.toTime')"
readonly readonly
dense dense
...@@ -100,8 +99,7 @@ ...@@ -100,8 +99,7 @@
transition-show="scale" transition-show="scale"
transition-hide="scale" transition-hide="scale"
> >
<!-- v-model="date[1]" --> <q-date v-model="date[1]" mask="DD/MM/YYYY" no-unset>
<q-date mask="DD/MM/YYYY" no-unset>
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn <q-btn
v-close-popup v-close-popup
...@@ -167,29 +165,29 @@ ...@@ -167,29 +165,29 @@
<template v-slot:body-cell-status="item"> <template v-slot:body-cell-status="item">
<q-td align="center"> <q-td align="center">
<template v-for="(data, idx) in BookingStatus"> <template v-for="(data, idx) in ListStatusBooking">
<q-chip <q-chip
v-if="item.row.status === data.value" v-if="item.row.status === data.id"
:key="`status-${idx}-${item}`" :key="`status-${idx}-${item}`"
size="sm" size="sm"
label label
:color="data.color" :color="data.color"
>{{ data.text }}</q-chip >{{ data.name }}</q-chip
> >
</template> </template>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-activeStatus="item"> <template v-slot:body-cell-performStatus="item">
<q-td align="center"> <q-td align="center">
<template v-for="(data, idx) in Status"> <template v-for="(data, idx) in ListPerformStatus">
<q-chip <q-chip
v-if="item.row.activeStatus === data.value" v-if="item.row.performStatus === data.id"
:key="`activeStatus-${idx}-${item}`" :key="`performStatus-${idx}-${item}`"
size="sm" size="sm"
label label
:color="data.color" :color="data.color"
>{{ data.text }}</q-chip >{{ data.name }}</q-chip
> >
</template> </template>
</q-td> </q-td>
...@@ -330,12 +328,12 @@ export default defineComponent({ ...@@ -330,12 +328,12 @@ export default defineComponent({
sortable: false, sortable: false,
}, },
{ {
name: 'like', name: 'favoriteScore',
field: 'like', field: 'favoriteScore',
required: true, required: true,
label: i18n.global.t('listBooking.titleColumnsTable.like'), label: i18n.global.t('listBooking.titleColumnsTable.favoriteScore'),
headerStyle: 'text-align: center !important; width: 9%', headerStyle: 'text-align: center !important; width: 7%',
align: 'left', align: 'center',
sortable: false, sortable: false,
}, },
{ {
...@@ -343,16 +341,16 @@ export default defineComponent({ ...@@ -343,16 +341,16 @@ export default defineComponent({
field: 'status', field: 'status',
required: true, required: true,
label: i18n.global.t('listBooking.titleColumnsTable.status'), label: i18n.global.t('listBooking.titleColumnsTable.status'),
headerStyle: 'text-align: center !important; width: 7%', headerStyle: 'text-align: center !important; width: 8%',
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
{ {
name: 'activeStatus', name: 'performStatus',
field: 'activeStatus', field: 'performStatus',
required: true, required: true,
label: i18n.global.t('listBooking.titleColumnsTable.activeStatus'), label: i18n.global.t('listBooking.titleColumnsTable.performStatus'),
headerStyle: 'text-align: center !important; width: 7%', headerStyle: 'text-align: center !important; width: 8%',
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
...@@ -367,31 +365,35 @@ export default defineComponent({ ...@@ -367,31 +365,35 @@ export default defineComponent({
}, },
]; ];
const BookingStatus = ref([ const ListStatusBooking = ref([
{ value: 0, text: 'Chờ nhận', color: 'secondary' }, { id: 0, name: 'Chờ nhận', color: 'secondary' },
{ value: 1, text: 'Đã nhận', color: 'info' }, { id: 1, name: 'Đã nhận', color: 'info' },
{ value: 2, text: 'Từ chối', color: 'warning' }, { id: 2, name: 'Từ chối', color: 'warning' },
]); ]);
const Status = ref([ const ListPerformStatus = ref([
{ value: 0, text: 'Chờ nhận', color: 'secondary' }, { id: 0, name: 'Chờ nhận', color: 'secondary' },
{ value: 1, text: 'Đã thực hiện', color: 'info' }, { id: 1, name: 'Đã thực hiện', color: 'info' },
{ value: 2, text: 'Chưa thực hiện', color: 'warning' }, { id: 2, name: 'Chưa thực hiện', color: 'warning' },
{ value: 3, text: 'Hoãn lịch', color: 'warning' }, { id: 3, name: 'Hoãn lịch', color: 'warning' },
{ value: 4, text: 'Hủy lịch', color: 'warning' }, { id: 4, name: 'Hủy lịch', color: 'warning' },
{ value: 5, text: 'Thay đổi lịch', color: 'secondary' }, { id: 5, name: 'Thay đổi lịch', color: 'secondary' },
]); ]);
const detailInfoBooking: Ref<ListBooking | null> = ref(null);
const showDialog = ref(false); const showDialog = ref(false);
const detailInfoBooking: Ref<ListBooking | null> = ref(null);
const listBooking: Ref<unknown[]> = ref([]); const listBooking: Ref<unknown[]> = ref([]);
const pageIndex = ref(1); const pageIndex = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(1); const totalPage = ref(1);
const sreachArtist: Ref<string | null> = ref(null); const sreachArtist: Ref<string | null> = ref(null);
const sreachUserName: Ref<string | null> = ref(null); const sreachUserName: Ref<string | null> = ref(null);
const sreachStatus = ref(null); const sreachStatus: Ref<
const sreachActiveStatus = ref(null); { id: number; name: string; color: string } | undefined
> = ref(undefined);
const sreachPerformStatus: Ref<
{ id: number; name: string; color: string } | undefined
> = ref(undefined);
const changePageSize = () => { const changePageSize = () => {
pageIndex.value = 1; pageIndex.value = 1;
void getListBooking(); void getListBooking();
...@@ -449,7 +451,9 @@ export default defineComponent({ ...@@ -449,7 +451,9 @@ export default defineComponent({
artistId: sreachArtist.value, artistId: sreachArtist.value,
custId: sreachUserName.value, custId: sreachUserName.value,
status: sreachStatus.value, status: sreachStatus.value,
performBooking: sreachActiveStatus.value, performBooking: sreachPerformStatus.value,
fromTime: moment(date.value[0], 'DD/MM/YYYY').format('DD/MM/YYYY'),
toTime: moment(date.value[1], 'DD/MM/YYYY').format('DD/MM/YYYY'),
}, },
})) as AxiosResponse<BaseResponseBody<PaginationResponse<ListBooking>>>; })) as AxiosResponse<BaseResponseBody<PaginationResponse<ListBooking>>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
...@@ -484,6 +488,7 @@ export default defineComponent({ ...@@ -484,6 +488,7 @@ export default defineComponent({
void getArrayCust(); void getArrayCust();
}); });
return { return {
date,
changeTime, changeTime,
customerOptions, customerOptions,
artistOptions, artistOptions,
...@@ -499,10 +504,10 @@ export default defineComponent({ ...@@ -499,10 +504,10 @@ export default defineComponent({
totalPage, totalPage,
changePageSize, changePageSize,
getListBooking, getListBooking,
BookingStatus, ListStatusBooking,
Status, ListPerformStatus,
sreachStatus, sreachStatus,
sreachActiveStatus, sreachPerformStatus,
}; };
}, },
}); });
......
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