update

parent 97f2f68f
...@@ -67,7 +67,7 @@ export type ArtistInfoType = { ...@@ -67,7 +67,7 @@ export type ArtistInfoType = {
banners: BannerType[]; banners: BannerType[];
products: ProductType[]; products: ProductType[];
schedules: SchedulesType[]; schedules: SchedulesType[];
musicTypeDto:MusicType[]; musicTypeDto: MusicType[];
provinceDto: ProvinceType[]; provinceDto: ProvinceType[];
stories: StoriesType[]; stories: StoriesType[];
mnName: string | null; mnName: string | null;
...@@ -79,21 +79,24 @@ export type ArtistInfoType = { ...@@ -79,21 +79,24 @@ export type ArtistInfoType = {
mnIns: string | null; mnIns: string | null;
mnWhatsapp: string | null; mnWhatsapp: string | null;
favoriteScore: number; favoriteScore: number;
artistOwner: {
name: string;
};
};
export type ProvinceType = {
name: string;
fullname: string;
code: string;
level: string;
};
export type MusicType = {
id: number;
name: string;
status: number;
code: string;
numIndex: number;
}; };
export type ProvinceType = {
name: string,
fullname: string,
code: string,
level: string,
};
export type MusicType = {
id:number,
name: string,
status: number,
code: string,
numIndex: number,
};
export type FieldType = { export type FieldType = {
id: number; id: number;
name: string; name: string;
...@@ -102,16 +105,14 @@ export type FieldType = { ...@@ -102,16 +105,14 @@ export type FieldType = {
numIndex: number; numIndex: number;
}; };
export type ClassificationOptions = { export type ClassificationOptions = {
id: number; id: number;
name: string; name: string;
status:number | null; status: number | null;
description: string | null; description: string | null;
numIndex: number; numIndex: number;
}; };
export type NationalityType = { export type NationalityType = {
id: number; id: number;
name: string; name: string;
...@@ -268,11 +269,9 @@ export type DetailUnit = { ...@@ -268,11 +269,9 @@ export type DetailUnit = {
password: string; password: string;
fields: Array<FieldType>; fields: Array<FieldType>;
contracts: Array<Contract>; contracts: Array<Contract>;
classification: Array<ClassificationOptions> classification: Array<ClassificationOptions>;
}; };
export type CustomerType = { export type CustomerType = {
id: number; id: number;
code: string | null; code: string | null;
...@@ -463,11 +462,9 @@ export type ListArrayArtist = { ...@@ -463,11 +462,9 @@ export type ListArrayArtist = {
artistName: string; artistName: string;
}; };
export type ListDeposit = { export type ListDeposit = {
artistBookingDepositDtos: [] artistBookingDepositDtos: [];
}; };
export type ListArrayCust = { export type ListArrayCust = {
id: number; id: number;
fullName: string; fullName: string;
...@@ -620,18 +617,18 @@ export type ListBannerConfig = { ...@@ -620,18 +617,18 @@ export type ListBannerConfig = {
updateTime: string; updateTime: string;
}; };
export type ListHomeConfig = { export type ListHomeConfig = {
artistId: number, artistId: number;
artistName: { artistName: {
artistName: string, artistName: string;
id: number id: number;
}, };
code: string, code: string;
embeddedUrl: string, embeddedUrl: string;
id: number, id: number;
imageUrl: string, imageUrl: string;
name: string name: string;
} };
export type DetailBannerConfig = { export type DetailBannerConfig = {
id: number; id: number;
...@@ -675,8 +672,8 @@ export type AddBannerConfig = { ...@@ -675,8 +672,8 @@ export type AddBannerConfig = {
}; };
export type listTypeFormalityDeposit = { export type listTypeFormalityDeposit = {
id: number; id: number;
name:string name: string;
} };
export type ListConfigPartner = { export type ListConfigPartner = {
id: number; id: number;
name: string; name: string;
......
...@@ -165,8 +165,7 @@ ...@@ -165,8 +165,7 @@
<!-- nghệ sỹ --> <!-- nghệ sỹ -->
<div class="row"> <div class="row">
<div class="col-auto text-h6 text-weight-regular flex q-ml-md"> <div class="col-auto text-h6 text-weight-regular flex q-ml-md">
{{ $t('managingUnitAdd.titleAdd') {{ $t('managingUnitAdd.titleAdd') }}
}}
</div> </div>
<q-space></q-space> <q-space></q-space>
<div class="col-auto"> <div class="col-auto">
...@@ -836,8 +835,8 @@ export default defineComponent({ ...@@ -836,8 +835,8 @@ export default defineComponent({
const newArtistList = [...props.artistList]; const newArtistList = [...props.artistList];
if (selectedContract.value) { if (selectedContract.value) {
newArtistList[selectedContract.value.index] = { newArtistList[selectedContract.value.index] = {
contractFrom: contractTimeFrom.value, contractFrom: `${contractTimeFrom.value} 00:00:00`,
contractTo: contractTimeTo.value, contractTo: `${contractTimeTo.value} 00:00:00`,
timeAdd: `${contractTimeFrom.value} - ${contractTimeTo.value}`, timeAdd: `${contractTimeFrom.value} - ${contractTimeTo.value}`,
status: artistStatus.value, status: artistStatus.value,
artistId: artistName.value?.id, artistId: artistName.value?.id,
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
@update:model-value="$emit('update:birthday', $event)" @update:model-value="$emit('update:birthday', $event)"
:label="$t('userPage.dialogLabel.fieldLabels.birthday')" :label="$t('userPage.dialogLabel.fieldLabels.birthday')"
outlined outlined
readonly
hide-bottom-space hide-bottom-space
> >
<template v-slot:append> <template v-slot:append>
......
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
hide-bottom-space hide-bottom-space
></q-input> ></q-input>
...@@ -98,7 +97,7 @@ ...@@ -98,7 +97,7 @@
@update:model-value="$emit('update:birthday', $event)" @update:model-value="$emit('update:birthday', $event)"
:label="$t('userPage.dialogLabel.fieldLabels.birthday')" :label="$t('userPage.dialogLabel.fieldLabels.birthday')"
outlined outlined
readonly
hide-bottom-space hide-bottom-space
> >
<template v-slot:append> <template v-slot:append>
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
v-model:mn-whatsapp="mnWhatsapp" v-model:mn-whatsapp="mnWhatsapp"
v-model:favorite-score="favoriteScore" v-model:favorite-score="favoriteScore"
v-model:check_infoBooking="check_infoBooking" v-model:check_infoBooking="check_infoBooking"
v-model:unitName="unitName"
:accountRules="accountRules" :accountRules="accountRules"
:errorMessmnBookingPhone="errorMessmnBookingPhone" :errorMessmnBookingPhone="errorMessmnBookingPhone"
:errorMessmnBookingEmail="errorMessmnBookingEmail" :errorMessmnBookingEmail="errorMessmnBookingEmail"
......
...@@ -103,6 +103,7 @@ export default defineComponent({ ...@@ -103,6 +103,7 @@ export default defineComponent({
const artistName: Ref<string | null> = ref(null); const artistName: Ref<string | null> = ref(null);
const birthday: Ref<string | null> = ref(null); const birthday: Ref<string | null> = ref(null);
const sex: Ref<number | null> = ref(null); const sex: Ref<number | null> = ref(null);
const unitName: Ref<string | null> = ref(null);
const nationality: Ref<NationalityType> = ref({ const nationality: Ref<NationalityType> = ref({
id: 1, id: 1,
name: 'Việt Nam', name: 'Việt Nam',
...@@ -377,6 +378,7 @@ export default defineComponent({ ...@@ -377,6 +378,7 @@ export default defineComponent({
email.value = ArtistInformation.email; email.value = ArtistInformation.email;
facebook.value = ArtistInformation.facebook; facebook.value = ArtistInformation.facebook;
facebookMessage.value = ArtistInformation.facebookMessage; facebookMessage.value = ArtistInformation.facebookMessage;
unitName.value = ArtistInformation.artistOwner?.name
instagram.value = ArtistInformation.instagram; instagram.value = ArtistInformation.instagram;
whatsapp.value = ArtistInformation.whatsapp; whatsapp.value = ArtistInformation.whatsapp;
mnName.value = ArtistInformation.mnName; mnName.value = ArtistInformation.mnName;
...@@ -995,7 +997,7 @@ export default defineComponent({ ...@@ -995,7 +997,7 @@ export default defineComponent({
sex, sex,
nationality, nationality,
address, address,
unitName,
status, status,
fields, fields,
works, works,
......
...@@ -458,7 +458,7 @@ export default defineComponent({ ...@@ -458,7 +458,7 @@ export default defineComponent({
email: unitEmail.value, email: unitEmail.value,
phoneNumber: unitPhoneNumber.value, phoneNumber: unitPhoneNumber.value,
status: unitStatus.value, status: unitStatus.value,
classification: unitField.value, classification: unitField.value === null ? null : unitField.value,
userName: unitUserName.value, userName: unitUserName.value,
password: unitPassword.value, password: unitPassword.value,
contracts: unitArtistList.value, contracts: unitArtistList.value,
......
...@@ -367,6 +367,8 @@ export default defineComponent({ ...@@ -367,6 +367,8 @@ export default defineComponent({
pageIndex: pageIndex.value, pageIndex: pageIndex.value,
pageSize: pageSize.value, pageSize: pageSize.value,
customerLevel: levelSelected.value?.id, customerLevel: levelSelected.value?.id,
companyName: companyNameSelected.value,
taxCode: taxCodeSelected.value,
}, },
})) as AxiosResponse< })) as AxiosResponse<
BaseResponseBody<PaginationResponse<CustomerType>> BaseResponseBody<PaginationResponse<CustomerType>>
......
<template> <template>
<div class="row q-col-gutter-sm flex-center q-mt-sm"> <div class="row q-col-gutter-sm flex-center q-mt-sm">
<q-space></q-space> <q-space></q-space>
<div class="col-2"> <div class="col-2">
<q-input <q-input
v-model="fullNameKeyword" v-model="fullNameKeyword"
dense dense
outlined outlined
:label="$t('artist.tableColumnsArtist.artistName')" label="Tên nghệ sỹ/nghệ danh"
clearable clearable
></q-input> ></q-input>
</div> </div>
...@@ -57,6 +58,16 @@ ...@@ -57,6 +58,16 @@
> >
</q-btn> </q-btn>
</div> </div>
<div class="col-auto">
<q-btn
@click="openDialogFilter = true"
square
color="primary"
icon="mdi-plus"
>
<q-tooltip :offset="[20, 10]">Bộ lọc nâng cao</q-tooltip>
</q-btn>
</div>
<div class="col-auto"> <div class="col-auto">
<q-btn <q-btn
class="q-mr-md" class="q-mr-md"
...@@ -130,6 +141,108 @@ ...@@ -130,6 +141,108 @@
</template> </template>
</q-table> </q-table>
</div> </div>
<q-dialog v-model="openDialogFilter" persistent>
<q-card style="min-width: 550px">
<q-card-section style="border-bottom: 1px solid #5d319e">
<div style="font-size: 20px">Bộ lọc nâng cao</div>
</q-card-section>
<!-- <div class="row">
<div class="col-6 px-4" >
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Chi phí từ"
clearable
></q-input>
</div>
<div class="col-6">
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Chi phí đến"
clearable
></q-input>
</div>
<div class="col-6">
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Cấp độ"
clearable
></q-input>
</div>
<div class="col-6"></div>
<div class="col-6"></div>
<div class="col-6"></div>
<div class="col-12"></div>
</div> -->
<q-card-section
class="overflow-auto"
style="max-height: calc(100vh - 15rem)"
>
<div class="row q-col-gutter-sm">
<div class="col-6" style="padding: 12px">
<q-input
v-model="costFrom"
dense
outlined
label="Chi phí từ"
clearable
></q-input>
</div>
<div class="col-6" style="padding: 12px">
<q-input
v-model="costTo"
dense
outlined
label="Chi phí đến"
clearable
></q-input>
</div>
<!-- <div class="col-6" style="padding: 12px">
<q-input
v-model="level"
dense
outlined
label="Cấp độ"
clearable
></q-input>
</div> -->
<div class="col-12" style="padding: 8px 12px 8px 12px">
<q-select
v-model="musics"
:options="musicOptions"
option-value="id"
option-label="name"
label="Thể loại"
outlined
hide-bottom-space
clearable
dense
map-options
use-input
use-chips
type="text"
></q-select>
</div>
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn flat color="primary" v-close-popup>Đóng</q-btn>
<q-btn flat color="primary" v-close-popup @click="filter">Lưu</q-btn>
</q-card-actions>
</q-card>
</q-dialog>
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<Pagination <Pagination
v-model:currentPage="pageIndex" v-model:currentPage="pageIndex"
...@@ -172,7 +285,6 @@ ...@@ -172,7 +285,6 @@
:nationality-options="nationalityOptions" :nationality-options="nationalityOptions"
:profession-options="professionOptions" :profession-options="professionOptions"
:artist-level-options="artistLevelOptions" :artist-level-options="artistLevelOptions"
:work-options="workOptions" :work-options="workOptions"
@click:CloseBtn="isOpenNewArtistDialog = false" @click:CloseBtn="isOpenNewArtistDialog = false"
></AddNewArtistDialog> ></AddNewArtistDialog>
...@@ -192,8 +304,7 @@ import { ...@@ -192,8 +304,7 @@ import {
QualificationType, QualificationType,
WorkType, WorkType,
ProvinceType, ProvinceType,
MusicType MusicType,
} from 'src/assets/type'; } from 'src/assets/type';
import Pagination from 'components/pagination/index.vue'; import Pagination from 'components/pagination/index.vue';
import { api, BaseResponseBody } from 'src/boot/axios'; import { api, BaseResponseBody } from 'src/boot/axios';
...@@ -223,7 +334,7 @@ export default defineComponent({ ...@@ -223,7 +334,7 @@ export default defineComponent({
align: 'left', align: 'left',
sortable: false, sortable: false,
}, },
{ {
name: 'accountName', name: 'accountName',
field: 'accountName', field: 'accountName',
required: true, required: true,
...@@ -315,6 +426,7 @@ export default defineComponent({ ...@@ -315,6 +426,7 @@ export default defineComponent({
}, },
]; ];
const openDialogFilter = ref(false);
const userTableRowsArtist: Ref<unknown[]> = ref([]); const userTableRowsArtist: Ref<unknown[]> = ref([]);
const pageIndex = ref(1); const pageIndex = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
...@@ -326,6 +438,8 @@ export default defineComponent({ ...@@ -326,6 +438,8 @@ export default defineComponent({
{ id: 3, name: 'Khác' }, { id: 3, name: 'Khác' },
]); ]);
const configImg = config; const configImg = config;
const musics: Ref<MusicType | null> = ref(null);
const fieldOptions: Ref<FieldType[]> = ref([]); const fieldOptions: Ref<FieldType[]> = ref([]);
const nationalityOptions: Ref<NationalityType[]> = ref([]); const nationalityOptions: Ref<NationalityType[]> = ref([]);
const professionOptions: Ref<QualificationType[]> = ref([]); const professionOptions: Ref<QualificationType[]> = ref([]);
...@@ -365,7 +479,14 @@ export default defineComponent({ ...@@ -365,7 +479,14 @@ export default defineComponent({
const mnFbmess: Ref<string | null> = ref(null); const mnFbmess: Ref<string | null> = ref(null);
const mnIns: Ref<string | null> = ref(null); const mnIns: Ref<string | null> = ref(null);
const mnWhatsapp: Ref<string | null> = ref(null); const mnWhatsapp: Ref<string | null> = ref(null);
const costFrom = ref(0);
const costTo = ref(100000000);
// const level: Ref<string | null> = ref(null);
const filter = () => {
void getListArtists();
};
const getListArtists = async () => { const getListArtists = async () => {
try { try {
...@@ -378,7 +499,10 @@ export default defineComponent({ ...@@ -378,7 +499,10 @@ export default defineComponent({
name: fullNameKeyword.value, name: fullNameKeyword.value,
field: fieldSelected.value?.id, field: fieldSelected.value?.id,
qualification: professionSelected.value?.id, qualification: professionSelected.value?.id,
address: provinceSelected.value?.name address: provinceSelected.value?.name,
musicTypeDto: musics.value?.id,
fromMoney: costFrom.value,
toMoney: costTo.value,
}, },
})) as AxiosResponse< })) as AxiosResponse<
BaseResponseBody<PaginationResponse<ArtistInfoType>> BaseResponseBody<PaginationResponse<ArtistInfoType>>
...@@ -414,7 +538,7 @@ export default defineComponent({ ...@@ -414,7 +538,7 @@ export default defineComponent({
} }
}; };
/// xếp hạng /// xếp hạng
const getArtistLevelOptions = async () => { const getArtistLevelOptions = async () => {
const response = (await api({ const response = (await api({
...@@ -426,33 +550,29 @@ export default defineComponent({ ...@@ -426,33 +550,29 @@ export default defineComponent({
artistLevelOptions.value = response.data.data; artistLevelOptions.value = response.data.data;
} }
}; };
// thể loại
const getMusicTypeOptions = async () => {
const response = (await api ({
url: API_PATHS.getMusicTypeOptions,
method: 'GET',
params: {},
})) as AxiosResponse<BaseResponseBody<MusicType[]>>;
if(response.data.error.code === config.API_RES_CODE.OK.code) {
musicOptions.value = response.data.data
}
}; // thể loại
const getMusicTypeOptions = async () => {
const getProvinceOptions = async () => { const response = (await api({
const response = (await api ({ url: API_PATHS.getMusicTypeOptions,
url : API_PATHS.getProvinceOptions,
method: 'GET', method: 'GET',
params: {}, params: {},
})) as AxiosResponse<BaseResponseBody<ProvinceType[]>>; })) as AxiosResponse<BaseResponseBody<MusicType[]>>;
if(response.data.error.code === config.API_RES_CODE.OK.code){ if (response.data.error.code === config.API_RES_CODE.OK.code) {
musicOptions.value = response.data.data;
provinceOptions.value = response.data.data
} }
} };
const getProvinceOptions = async () => {
const response = (await api({
url: API_PATHS.getProvinceOptions,
method: 'GET',
params: {},
})) as AxiosResponse<BaseResponseBody<ProvinceType[]>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) {
provinceOptions.value = response.data.data;
}
};
const getQualificationOptions = async () => { const getQualificationOptions = async () => {
const response = (await api({ const response = (await api({
...@@ -520,9 +640,9 @@ export default defineComponent({ ...@@ -520,9 +640,9 @@ export default defineComponent({
void getWorkOptions(); void getWorkOptions();
void getProvinceOptions(); void getProvinceOptions();
void getMusicTypeOptions(); void getMusicTypeOptions();
}); });
return { return {
openDialogFilter,
configImg, configImg,
userTableColumnsArtist, userTableColumnsArtist,
userTableRowsArtist, userTableRowsArtist,
...@@ -546,6 +666,7 @@ export default defineComponent({ ...@@ -546,6 +666,7 @@ export default defineComponent({
phoneNumber, phoneNumber,
email, email,
facebook, facebook,
musics,
facebookMessage, facebookMessage,
instagram, instagram,
whatsapp, whatsapp,
...@@ -569,18 +690,22 @@ export default defineComponent({ ...@@ -569,18 +690,22 @@ export default defineComponent({
provinceSelected, provinceSelected,
artistLevelOptions, artistLevelOptions,
provinceOptions, provinceOptions,
costFrom,
costTo,
// level,
getProvinceOptions, getProvinceOptions,
getMusicTypeOptions, getMusicTypeOptions,
getFieldOptions, getFieldOptions,
nationalityOptions, nationalityOptions,
getNationalityOptions, getNationalityOptions,
workOptions, workOptions,
musicOptions, musicOptions,
getArtistLevelOptions, getArtistLevelOptions,
getQualificationOptions, getQualificationOptions,
getWorkOptions, getWorkOptions,
confirmDeleteArtist, confirmDeleteArtist,
deleteArtist, deleteArtist,
filter,
}; };
}, },
}); });
......
...@@ -89,7 +89,7 @@ export default defineComponent({ ...@@ -89,7 +89,7 @@ export default defineComponent({
}, },
]; ];
const userTableRows: Ref<UserObject[]> = ref([]); const userTableRows: Ref<UserObject[]> = ref([]);
const keyword = ref(''); const keyword:Ref<string | null> = ref(null);
const showDialog = ref(false); const showDialog = ref(false);
const showDialogUpdate = ref(false); const showDialogUpdate = ref(false);
...@@ -116,6 +116,10 @@ export default defineComponent({ ...@@ -116,6 +116,10 @@ export default defineComponent({
const listScheduleAccess = ref(['Chưa có lịch truy cập']); const listScheduleAccess = ref(['Chưa có lịch truy cập']);
const $store = useStore(); const $store = useStore();
const searchItem = () =>{
void getListUsers()
}
const getListUsers = async () => { const getListUsers = async () => {
try { try {
const response = (await api({ const response = (await api({
...@@ -124,7 +128,7 @@ export default defineComponent({ ...@@ -124,7 +128,7 @@ export default defineComponent({
params: { params: {
pageIndex: pageIndex.value, pageIndex: pageIndex.value,
pageSize: pageSize.value, pageSize: pageSize.value,
name: keyword.value.trim(), name: keyword.value?.trim(),
}, },
})) as AxiosResponse<BaseResponseBody<PaginationResponse<UserObject>>>; })) as AxiosResponse<BaseResponseBody<PaginationResponse<UserObject>>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
...@@ -424,6 +428,7 @@ export default defineComponent({ ...@@ -424,6 +428,7 @@ export default defineComponent({
openAddUserDialog, openAddUserDialog,
getListUsers, getListUsers,
changePageSize, changePageSize,
searchItem
}; };
}, },
}); });
...@@ -12,15 +12,16 @@ ...@@ -12,15 +12,16 @@
outlined outlined
:label="$t('userPage.tableColumns.keywordSearch')" :label="$t('userPage.tableColumns.keywordSearch')"
clearable clearable
></q-input> ></q-input>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<q-btn <q-btn
color="primary" color="primary"
no-caps
:label="$t('crudActions.search')" :label="$t('crudActions.search')"
style="width: 100px" style="width: 100px"
@click="getListUsers" @click="searchItem"
> >
</q-btn> </q-btn>
</div> </div>
......
...@@ -810,7 +810,7 @@ export default defineComponent({ ...@@ -810,7 +810,7 @@ export default defineComponent({
url: API_PATHS.addArtist, url: API_PATHS.addArtist,
method: 'POST', method: 'POST',
data: { data: {
musicTypeDto:musics.value , musicTypeDto: musics.value,
id: route.params.id, id: route.params.id,
avatar: avatarUploaded.value, avatar: avatarUploaded.value,
artistCode: artistCode.value, artistCode: artistCode.value,
......
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