Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
68a80dbf
Commit
68a80dbf
authored
Jul 07, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0c261995
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
991 additions
and
637 deletions
+991
-637
configurations.example.ts
src/assets/configurations.example.ts
+2
-0
enums.ts
src/assets/enums.ts
+2
-1
type.ts
src/assets/type.ts
+14
-0
AddHotProductDialog.ts
...s/artist-information/AddHotProduct/AddHotProductDialog.ts
+14
-2
index.vue
src/components/artist-information/AddHotProduct/index.vue
+12
-0
index.vue
src/components/artist-information/UpdateHotProduct/index.vue
+12
-0
updateHotProduc.ts
...ts/artist-information/UpdateHotProduct/updateHotProduc.ts
+13
-1
index.vue
...onents/artist-information/VAB-account/add-story/index.vue
+9
-0
index.vue
src/components/artist-information/VAB-account/index.vue
+8
-4
HotProduct.ts
src/components/artist-information/hot-product/HotProduct.ts
+8
-0
AddNewCustomerDialog.ts
.../customer/add-new-customer-dialog/AddNewCustomerDialog.ts
+1
-0
index.vue
src/components/customer/add-new-customer-dialog/index.vue
+13
-4
UpdateNewCustomerDialog.ts
...mer/update-new-customer-dialog/UpdateNewCustomerDialog.ts
+1
-0
index.vue
src/components/customer/update-new-customer-dialog/index.vue
+11
-4
index.vue
src/components/detailBooking/index.vue
+131
-0
index.vue
...components/units-manager/add-update-unit-dialog/index.vue
+13
-5
index.ts
src/i18n/vi/index.ts
+23
-15
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+0
-7
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+15
-34
ListBooking.ts
src/pages/danh-sach-booking/ListBooking.ts
+0
-144
index.vue
src/pages/danh-sach-booking/index.vue
+312
-26
customer.ts
src/pages/khach-hang/customer.ts
+0
-354
index.vue
src/pages/khach-hang/index.vue
+356
-1
index.vue
src/pages/linh-vuc-hoat-dong/index.vue
+3
-11
AddArtist.ts
src/pages/them-nghe-sy/AddArtist.ts
+18
-17
index.vue
src/pages/them-nghe-sy/index.vue
+0
-7
No files found.
src/assets/configurations.example.ts
View file @
68a80dbf
...
@@ -80,4 +80,6 @@ export enum API_PATHS {
...
@@ -80,4 +80,6 @@ export enum API_PATHS {
deleteCategoryPost
=
'postCategory/delete'
,
deleteCategoryPost
=
'postCategory/delete'
,
detailCategoryPost
=
'postCategory/detail'
,
detailCategoryPost
=
'postCategory/detail'
,
updateCategoryPost
=
'postCategory/update'
,
updateCategoryPost
=
'postCategory/update'
,
getListBooking
=
'booking'
,
getBookingDetail
=
'booking/detail'
,
}
}
src/assets/enums.ts
View file @
68a80dbf
...
@@ -37,9 +37,10 @@ export enum BannerStatus {
...
@@ -37,9 +37,10 @@ export enum BannerStatus {
export
enum
BookingStatus
{
export
enum
BookingStatus
{
active
=
1
,
active
=
1
,
inactive
=
2
,
inactive
=
2
,
waitBooking
=
0
,
}
}
export
enum
ActiveStatus
{
export
enum
ActiveStatus
{
active
=
1
,
active
=
1
,
inactive
=
1
,
inactive
=
0
,
}
}
src/assets/type.ts
View file @
68a80dbf
...
@@ -398,3 +398,17 @@ export type MenuType = {
...
@@ -398,3 +398,17 @@ export type MenuType = {
updateBy
:
string
|
null
;
updateBy
:
string
|
null
;
updateTime
:
string
|
null
;
updateTime
:
string
|
null
;
};
};
export
type
ListBooking
=
{
id
:
number
;
bookingCode
:
number
;
artistName
:
string
;
userName
:
string
;
content
:
string
;
address
:
string
;
fromTime
:
string
;
toTime
:
string
;
status
:
number
;
activeStatus
:
number
;
fee
:
string
;
};
src/components/artist-information/AddHotProduct/AddHotProductDialog.ts
View file @
68a80dbf
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
// import { isEmail } from '../../../boot/functions';
// import { isMobilePhone } from '../../../boot/functions';
import
UploadImage
from
'../../upload-image/index.vue'
;
import
UploadImage
from
'../../upload-image/index.vue'
;
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -18,6 +16,7 @@ export default defineComponent({
...
@@ -18,6 +16,7 @@ export default defineComponent({
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
file
:
Ref
<
File
|
string
>
=
ref
(
''
);
const
file
:
Ref
<
File
|
string
>
=
ref
(
''
);
const
name
:
Ref
<
string
>
=
ref
(
''
);
const
code
:
Ref
<
string
>
=
ref
(
''
);
const
code
:
Ref
<
string
>
=
ref
(
''
);
const
embeddedUrl
:
Ref
<
string
>
=
ref
(
''
);
const
embeddedUrl
:
Ref
<
string
>
=
ref
(
''
);
const
urlFileLocal
:
Ref
<
string
>
=
ref
(
''
);
const
urlFileLocal
:
Ref
<
string
>
=
ref
(
''
);
...
@@ -37,6 +36,7 @@ export default defineComponent({
...
@@ -37,6 +36,7 @@ export default defineComponent({
const
ResetData
=
()
=>
{
const
ResetData
=
()
=>
{
file
.
value
=
''
;
file
.
value
=
''
;
code
.
value
=
''
;
code
.
value
=
''
;
name
.
value
=
''
;
embeddedUrl
.
value
=
''
;
embeddedUrl
.
value
=
''
;
urlFileLocal
.
value
=
''
;
urlFileLocal
.
value
=
''
;
status
.
value
=
2
;
status
.
value
=
2
;
...
@@ -45,12 +45,22 @@ export default defineComponent({
...
@@ -45,12 +45,22 @@ export default defineComponent({
context
.
emit
(
'click:CloseBtnAddHotProduct'
);
context
.
emit
(
'click:CloseBtnAddHotProduct'
);
context
.
emit
(
'insertData'
,
{
context
.
emit
(
'insertData'
,
{
file
:
file
.
value
,
file
:
file
.
value
,
name
:
name
.
value
,
code
:
code
.
value
,
code
:
code
.
value
,
status
:
status
.
value
,
status
:
status
.
value
,
embeddedUrl
:
embeddedUrl
.
value
,
embeddedUrl
:
embeddedUrl
.
value
,
imageUrl
:
urlFileLocal
.
value
,
imageUrl
:
urlFileLocal
.
value
,
});
});
};
};
const
product_name
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireProducName'
),
];
const
product_code
=
[
const
product_code
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -71,10 +81,12 @@ export default defineComponent({
...
@@ -71,10 +81,12 @@ export default defineComponent({
SubmitData
,
SubmitData
,
urlFileLocal
,
urlFileLocal
,
file
,
file
,
name
,
code
,
code
,
embeddedUrl
,
embeddedUrl
,
status
,
status
,
ResetData
,
ResetData
,
product_name
,
product_code
,
product_code
,
url_embed
,
url_embed
,
};
};
...
...
src/components/artist-information/AddHotProduct/index.vue
View file @
68a80dbf
...
@@ -31,6 +31,18 @@
...
@@ -31,6 +31,18 @@
:isBtn=
"true"
:isBtn=
"true"
@
selectedFile=
"uploadAvatar"
@
selectedFile=
"uploadAvatar"
></UploadImage>
></UploadImage>
<q-input
v-model=
"name"
label=
"
Tên sản phẩm
"
:rules=
"product_name"
type=
"text"
class=
"q-my-sm"
outlined
hide-bottom-space
clearable
></q-input>
<q-input
<q-input
v-model=
"code"
v-model=
"code"
label=
"
label=
"
...
...
src/components/artist-information/UpdateHotProduct/index.vue
View file @
68a80dbf
...
@@ -34,6 +34,18 @@
...
@@ -34,6 +34,18 @@
:isBtn=
"true"
:isBtn=
"true"
@
selectedFile=
"uploadAvatar"
@
selectedFile=
"uploadAvatar"
></UploadImage>
></UploadImage>
<q-input
v-model=
"name"
label=
"
Tên sản phẩm
"
:rules=
"product_name"
type=
"text"
class=
"q-my-sm"
outlined
hide-bottom-space
clearable
></q-input>
<q-input
<q-input
v-model=
"code"
v-model=
"code"
label=
"
label=
"
...
...
src/components/artist-information/UpdateHotProduct/updateHotProduc.ts
View file @
68a80dbf
...
@@ -24,6 +24,7 @@ export default defineComponent({
...
@@ -24,6 +24,7 @@ export default defineComponent({
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
configImg
=
config
;
const
configImg
=
config
;
const
file
:
Ref
<
File
|
string
>
=
ref
(
''
);
const
file
:
Ref
<
File
|
string
>
=
ref
(
''
);
const
name
:
Ref
<
string
>
=
ref
(
''
);
const
code
:
Ref
<
string
>
=
ref
(
''
);
const
code
:
Ref
<
string
>
=
ref
(
''
);
const
embeddedUrl
:
Ref
<
string
>
=
ref
(
''
);
const
embeddedUrl
:
Ref
<
string
>
=
ref
(
''
);
const
urlFileLocal
:
Ref
<
string
>
=
ref
(
''
);
const
urlFileLocal
:
Ref
<
string
>
=
ref
(
''
);
...
@@ -41,6 +42,7 @@ export default defineComponent({
...
@@ -41,6 +42,7 @@ export default defineComponent({
(
value
)
=>
{
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
id
.
value
=
props
.
dataUpdate
?.
id
as
number
;
id
.
value
=
props
.
dataUpdate
?.
id
as
number
;
name
.
value
=
props
.
dataUpdate
?.
name
as
string
;
code
.
value
=
props
.
dataUpdate
?.
code
as
string
;
code
.
value
=
props
.
dataUpdate
?.
code
as
string
;
embeddedUrl
.
value
=
props
.
dataUpdate
?.
embeddedUrl
as
string
;
embeddedUrl
.
value
=
props
.
dataUpdate
?.
embeddedUrl
as
string
;
status
.
value
=
props
.
dataUpdate
?.
status
as
number
;
status
.
value
=
props
.
dataUpdate
?.
status
as
number
;
...
@@ -54,6 +56,7 @@ export default defineComponent({
...
@@ -54,6 +56,7 @@ export default defineComponent({
);
);
const
ResetData
=
()
=>
{
const
ResetData
=
()
=>
{
file
.
value
=
''
;
file
.
value
=
''
;
name
.
value
=
''
;
code
.
value
=
''
;
code
.
value
=
''
;
embeddedUrl
.
value
=
''
;
embeddedUrl
.
value
=
''
;
urlFileLocal
.
value
=
''
;
urlFileLocal
.
value
=
''
;
...
@@ -63,6 +66,7 @@ export default defineComponent({
...
@@ -63,6 +66,7 @@ export default defineComponent({
context
.
emit
(
'click:CloseBtnUpdateHotProduct'
);
context
.
emit
(
'click:CloseBtnUpdateHotProduct'
);
context
.
emit
(
'UpdateData'
,
{
context
.
emit
(
'UpdateData'
,
{
file
:
file
.
value
,
file
:
file
.
value
,
name
:
name
.
value
,
code
:
code
.
value
,
code
:
code
.
value
,
status
:
status
.
value
,
status
:
status
.
value
,
embeddedUrl
:
embeddedUrl
.
value
,
embeddedUrl
:
embeddedUrl
.
value
,
...
@@ -70,6 +74,13 @@ export default defineComponent({
...
@@ -70,6 +74,13 @@ export default defineComponent({
id
:
id
.
value
,
id
:
id
.
value
,
});
});
};
};
const
product_name
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireProducName'
),
];
const
product_code
=
[
const
product_code
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -90,15 +101,16 @@ export default defineComponent({
...
@@ -90,15 +101,16 @@ export default defineComponent({
SubbmitDataUpdate
,
SubbmitDataUpdate
,
urlFileLocal
,
urlFileLocal
,
file
,
file
,
name
,
code
,
code
,
embeddedUrl
,
embeddedUrl
,
status
,
status
,
ResetData
,
ResetData
,
product_name
,
product_code
,
product_code
,
url_embed
,
url_embed
,
id
,
id
,
configImg
,
configImg
,
imageAPI
,
imageAPI
,
};
};
},
},
...
...
src/components/artist-information/VAB-account/add-story/index.vue
View file @
68a80dbf
...
@@ -33,6 +33,15 @@
...
@@ -33,6 +33,15 @@
:isBtn=
"true"
:isBtn=
"true"
></UploadImage>
></UploadImage>
<q-input
label=
"Tiêu đề"
hide-bottom-space
type=
"text"
class=
"q-my-sm"
outlined
clearable
></q-input>
<q-input
<q-input
v-model=
"content"
v-model=
"content"
label=
"Nội dung"
label=
"Nội dung"
...
...
src/components/artist-information/VAB-account/index.vue
View file @
68a80dbf
...
@@ -208,7 +208,9 @@
...
@@ -208,7 +208,9 @@
<div
<div
@
click=
"$emit('openDialogUploadEmbed')"
@
click=
"$emit('openDialogUploadEmbed')"
class=
"flex flex-center"
class=
"flex flex-center"
:style=
"socialEmbedded !== null ? 'height: 85%;' : 'height: 85%'"
:style=
"
socialEmbedded !== null ? 'height: 580px;' : 'height: 580px'
"
>
>
<iframe
<iframe
v-if=
"socialEmbedded !== null"
v-if=
"socialEmbedded !== null"
...
@@ -256,7 +258,7 @@
...
@@ -256,7 +258,7 @@
</div>
</div>
<div
<div
class=
"flex flex-center"
class=
"flex flex-center"
:style=
"stories.length ? 'height:
85%' : 'height: 85%
;'"
:style=
"stories.length ? 'height:
580px' : 'height: 580px
;'"
bordered
bordered
v-if=
"!stories.length"
v-if=
"!stories.length"
>
>
...
@@ -315,9 +317,11 @@
...
@@ -315,9 +317,11 @@
@
click=
"deleteStory(storyIdx)"
@
click=
"deleteStory(storyIdx)"
></q-icon>
></q-icon>
</div>
</div>
<q-input
outlined
type=
"text"
class=
"q-py-sm"
readonly
></q-input>
<q-input
<q-input
outlined
type=
"textarea"
type=
"textarea"
class=
"q-p
x
-sm"
class=
"q-p
y
-sm"
:model-value=
"story.content"
:model-value=
"story.content"
@
update:model-value=
"$emit('update:content', $event)"
@
update:model-value=
"$emit('update:content', $event)"
readonly
readonly
...
@@ -329,7 +333,7 @@
...
@@ -329,7 +333,7 @@
<div
class=
"col-4"
>
<div
class=
"col-4"
>
<div
class=
"text-h6 text-weight-regular q-py-md"
>
Lịch
</div>
<div
class=
"text-h6 text-weight-regular q-py-md"
>
Lịch
</div>
<q-date
<q-date
style=
"width: 100%; height:
85%
"
style=
"width: 100%; height:
580px
"
:model-value=
"formatSchedules"
:model-value=
"formatSchedules"
@
update:model-value=
"$emit('update:formatSchedules', $event)"
@
update:model-value=
"$emit('update:formatSchedules', $event)"
multiple
multiple
...
...
src/components/artist-information/hot-product/HotProduct.ts
View file @
68a80dbf
...
@@ -22,6 +22,14 @@ export default defineComponent({
...
@@ -22,6 +22,14 @@ export default defineComponent({
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
name
:
'name'
,
field
:
'name'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.hotProduct.tableColumnsProduct.name'
),
align
:
'center'
,
sortable
:
false
,
},
{
{
name
:
'code'
,
name
:
'code'
,
field
:
'code'
,
field
:
'code'
,
...
...
src/components/customer/add-new-customer-dialog/AddNewCustomerDialog.ts
View file @
68a80dbf
...
@@ -166,6 +166,7 @@ export default defineComponent({
...
@@ -166,6 +166,7 @@ export default defineComponent({
i18n
.
global
.
t
(
'customer.validateMessages.requiredPosition'
),
i18n
.
global
.
t
(
'customer.validateMessages.requiredPosition'
),
];
];
return
{
return
{
isPwd
:
ref
(
true
),
userNameRules
,
userNameRules
,
customerNameRules
,
customerNameRules
,
businessNameRules
,
businessNameRules
,
...
...
src/components/customer/add-new-customer-dialog/index.vue
View file @
68a80dbf
...
@@ -33,11 +33,20 @@
...
@@ -33,11 +33,20 @@
v-model=
"password"
v-model=
"password"
:label=
"$t('customer.dialogLabel.fieldLabels.password')"
:label=
"$t('customer.dialogLabel.fieldLabels.password')"
:rules=
"passwordRules"
:rules=
"passwordRules"
hide-bottom-space
type=
"password"
class=
"q-my-sm"
outlined
outlined
></q-input>
:type=
"isPwd ? 'password' : 'text'"
class=
"q-my-sm"
autocomplete=
"new-password"
hide-bottom-space
>
<template
v-slot:append
>
<q-icon
:name=
"isPwd ? 'visibility_off' : 'visibility'"
class=
"cursor-pointer"
@
click=
"isPwd = !isPwd"
/>
</
template
>
</q-input>
<q-input
<q-input
v-model=
"code"
v-model=
"code"
:label=
"$t('customer.dialogLabel.fieldLabels.code')"
:label=
"$t('customer.dialogLabel.fieldLabels.code')"
...
...
src/components/customer/update-new-customer-dialog/UpdateNewCustomerDialog.ts
View file @
68a80dbf
...
@@ -148,6 +148,7 @@ export default defineComponent({
...
@@ -148,6 +148,7 @@ export default defineComponent({
i18n
.
global
.
t
(
'customer.validateMessages.requiredPosition'
),
i18n
.
global
.
t
(
'customer.validateMessages.requiredPosition'
),
];
];
return
{
return
{
isPwd
:
ref
(
true
),
userNameRules
,
userNameRules
,
customerNameRules
,
customerNameRules
,
businessNameRules
,
businessNameRules
,
...
...
src/components/customer/update-new-customer-dialog/index.vue
View file @
68a80dbf
...
@@ -34,11 +34,18 @@
...
@@ -34,11 +34,18 @@
v-model=
"password"
v-model=
"password"
:label=
"$t('customer.dialogLabel.fieldLabels.password')"
:label=
"$t('customer.dialogLabel.fieldLabels.password')"
:rules=
"passwordRules"
:rules=
"passwordRules"
hide-bottom-space
type=
"password"
class=
"q-my-sm"
outlined
outlined
readonly
:type=
"isPwd ? 'password' : 'text'"
class=
"q-my-sm"
autocomplete=
"new-password"
hide-bottom-space
>
<template
v-slot:append
>
<q-icon
:name=
"isPwd ? 'visibility_off' : 'visibility'"
class=
"cursor-pointer"
@
click=
"isPwd = !isPwd"
/>
</
template
></q-input>
></q-input>
<q-input
<q-input
v-model=
"code"
v-model=
"code"
...
...
src/components/detailBooking/index.vue
0 → 100644
View file @
68a80dbf
<
template
>
<q-dialog
persistent
:model-value=
"showDialog"
@
update:model-value=
"$emit('update:showDialog', $event)"
>
<q-card
style=
"min-width: 56rem"
bordered
>
<q-form
greedy
>
<q-card-section>
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
$t
(
'listBooking.dialogLabel.title'
)
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section>
<div
class=
"col-12 q-px-xl"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.bookingCode'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
bookingCode
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.artistName'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
artistName
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.userName'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
userName
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.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"
>
{{
$t
(
'listBooking.titleColumnsTable.fromTime'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
fromTime
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.toTime'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
toTime
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.fee'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
fee
}}
</div>
<!--
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.like'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
like
}}
</div>
-->
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.status'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
status
}}
</div>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.activeStatus'
)
}}
:
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
activeStatus
}}
</div>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
:label=
"$t('listBooking.crudActions.cancel')"
@
click=
"$emit('click:CloseBtn')"
/>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
watch
}
from
'vue'
;
import
{
ListBooking
}
from
'src/assets/type'
;
export
default
defineComponent
({
props
:
{
showDialog
:
{
type
:
Boolean
,
required
:
true
,
},
detailInfoBooking
:
{
type
:
Object
as
PropType
<
ListBooking
>
,
required
:
true
,
},
},
setup
(
props
)
{
watch
(
()
=>
props
.
showDialog
,
(
value
)
=>
{
if
(
value
)
{
}
}
);
return
{};
},
emits
:
[
'update:showDialog'
,
'click:CloseBtn'
],
});
</
script
>
<
style
scoped
>
.fs-14
{
font-size
:
14px
;
}
.color
{
color
:
#5d319e
;
}
</
style
>
src/components/units-manager/add-update-unit-dialog/index.vue
View file @
68a80dbf
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
icon=
"mdi-delete-outline"
icon=
"mdi-delete-outline"
@
click=
"deleteContract(item.rowIndex)"
@
click=
"deleteContract(item.rowIndex)"
>
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'managingUnitAdd.toolTipMessage.delete'
)
$t
(
'managingUnitAdd.toolTipMessage.delete'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
icon=
"mdi-account-edit-outline"
icon=
"mdi-account-edit-outline"
@
click=
"openUpdateArtistDialog(item.row, item.rowIndex)"
@
click=
"openUpdateArtistDialog(item.row, item.rowIndex)"
>
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'managingUnitAdd.toolTipMessage.updateInfo'
)
$t
(
'managingUnitAdd.toolTipMessage.updateInfo'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -213,9 +213,17 @@
...
@@ -213,9 +213,17 @@
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
<div
v-if=
"check_artistList"
>
Không được để trống
</div>
{{ check_artistList }}
<div
v-if=
"check_artistList"
style=
"color: #c10015; font-size: 12px"
>
Không được để trống
</div>
</div>
</div>
<div></div>
<!-- ngân hàng -->
<!-- ngân hàng -->
<div
class=
"row q-pt-lg"
>
<div
class=
"row q-pt-lg"
>
<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"
>
...
@@ -246,7 +254,7 @@
...
@@ -246,7 +254,7 @@
<
template
v-slot:body-cell-action=
""
>
<
template
v-slot:body-cell-action=
""
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'managingUnitAdd.toolTipMessage.deleteBankAccount'
)
$t
(
'managingUnitAdd.toolTipMessage.deleteBankAccount'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -256,7 +264,7 @@
...
@@ -256,7 +264,7 @@
color=
"primary"
color=
"primary"
icon=
"mdi-account-edit-outline"
icon=
"mdi-account-edit-outline"
>
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'managingUnitAdd.toolTipMessage.updateBankAccount'
)
$t
(
'managingUnitAdd.toolTipMessage.updateBankAccount'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
...
src/i18n/vi/index.ts
View file @
68a80dbf
...
@@ -490,6 +490,7 @@ export default {
...
@@ -490,6 +490,7 @@ export default {
requireEmailAdminister
:
'Vui lòng nhập Email người quản lý'
,
requireEmailAdminister
:
'Vui lòng nhập Email người quản lý'
,
requirePhoneNumberAdminister
:
requirePhoneNumberAdminister
:
'Vui lòng nhập Số điện thoại người quản lý'
,
'Vui lòng nhập Số điện thoại người quản lý'
,
requireProducName
:
'Vui lòng nhập Tên sản phẩm'
,
requireProducCode
:
'Vui lòng nhập Mã sản phẩm'
,
requireProducCode
:
'Vui lòng nhập Mã sản phẩm'
,
requireUrlembed
:
'Vui lòng nhập Url Embed'
,
requireUrlembed
:
'Vui lòng nhập Url Embed'
,
requireArtistCode
:
'Vui lòng nhập Mã nghệ sỹ'
,
requireArtistCode
:
'Vui lòng nhập Mã nghệ sỹ'
,
...
@@ -529,6 +530,7 @@ export default {
...
@@ -529,6 +530,7 @@ export default {
},
},
hotProduct
:
{
hotProduct
:
{
tableColumnsProduct
:
{
tableColumnsProduct
:
{
name
:
'Tên sản phẩm'
,
productCode
:
'Mã sản phẩm'
,
productCode
:
'Mã sản phẩm'
,
urlEmbed
:
'Url embed'
,
urlEmbed
:
'Url embed'
,
productImage
:
'Ảnh sản phẩm'
,
productImage
:
'Ảnh sản phẩm'
,
...
@@ -918,25 +920,31 @@ export default {
...
@@ -918,25 +920,31 @@ export default {
title
:
'Danh sách booking'
,
title
:
'Danh sách booking'
,
titleColumnsTable
:
{
titleColumnsTable
:
{
stt
:
'STT'
,
stt
:
'STT'
,
customerName
:
'Khách hàng'
,
bookingCode
:
'Mã'
,
userName
:
'Khách hàng'
,
artistName
:
'Nghệ sỹ'
,
artistName
:
'Nghệ sỹ'
,
description
:
'Nội dung'
,
content
:
'Nội dung'
,
place
:
'Địa điểm'
,
address
:
'Địa điểm'
,
startTime
:
'Thời gian bắt đầu'
,
fromTime
:
'Thời gian bắt đầu'
,
endTime
:
'Thời gian kết thúc'
,
toTime
:
'Thời gian kết thúc'
,
statusBooking
:
'Trạng thái Booking'
,
fee
:
'Giá'
,
statusActive
:
'Trạng thái hoạt động'
,
like
:
'Số lượt thích'
,
createTime
:
'Thời gian tạo'
,
status
:
'T.T Booking'
,
createBy
:
'Người tạo'
,
activeStatus
:
'T.T Thực hiện'
,
updateBy
:
'Người cập nhật'
,
updateTime
:
'Thời gian cập nhật'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
dialogLabel
:
{
title
:
'Thông tin Booking'
,
},
crudActions
:
{
cancel
:
'Đóng'
,
},
statusLabel
:
{
statusLabel
:
{
activeBooking
:
'Đã xác nhận'
,
waitBooking
:
'Chờ nhận'
,
inactiveBooking
:
'Không xác nhận'
,
activeBooking
:
'Đã nhận'
,
activeEvent
:
'Active'
,
inactiveBooking
:
'Từ chối'
,
inactiveEvent
:
'Xoá'
,
activeEvent
:
'Đã diễn'
,
inactiveEvent
:
'Chưa diễn'
,
},
},
},
},
work
:
{
work
:
{
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
68a80dbf
...
@@ -14,13 +14,6 @@
...
@@ -14,13 +14,6 @@
name=
"information"
name=
"information"
:label=
"$t('artist.artistInformation.tabLabel.personalInformation')"
:label=
"$t('artist.artistInformation.tabLabel.personalInformation')"
>
>
<!--
<template
v-slot:default
>
<q-icon
style=
"position: absolute; top: 5px; right: -16px"
name=
"mdi-alert"
color=
"red"
></q-icon>
</
template
>
-->
</q-tab>
</q-tab>
<q-tab
<q-tab
name=
"vabAccount"
name=
"vabAccount"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
68a80dbf
...
@@ -36,9 +36,6 @@ import {
...
@@ -36,9 +36,6 @@ import {
TypeCardType
,
TypeCardType
,
FileUploadType
,
FileUploadType
,
}
from
'src/assets/type'
;
}
from
'src/assets/type'
;
// import { isEmail } from '../../boot/functions';
// import { isMobilePhone } from '../../boot/functions';
export
type
AvatarType
=
{
export
type
AvatarType
=
{
file
?:
File
;
file
?:
File
;
url
?:
string
|
null
;
url
?:
string
|
null
;
...
@@ -690,14 +687,6 @@ export default defineComponent({
...
@@ -690,14 +687,6 @@ export default defineComponent({
'artist.artistInformation.validateMessages.requirePhoneNumber'
'artist.artistInformation.validateMessages.requirePhoneNumber'
);
);
}
}
// if (!isMobilePhone(phoneNumber.value as string)) {
// hasError = true;
// phoneNumberRules.value = true;
// errorMessPhoneNumber.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.isPhone'
// );
// }
if
(
!
email
.
value
||
!
email
.
value
?.
trim
().
length
)
{
if
(
!
email
.
value
||
!
email
.
value
?.
trim
().
length
)
{
hasError
=
true
;
hasError
=
true
;
emailRules
.
value
=
true
;
emailRules
.
value
=
true
;
...
@@ -705,30 +694,24 @@ export default defineComponent({
...
@@ -705,30 +694,24 @@ export default defineComponent({
'artist.artistInformation.validateMessages.requireEmail'
'artist.artistInformation.validateMessages.requireEmail'
);
);
}
}
// if (!isEmail(email.value as string)) {
// if (
// !phoneNumberAdminister.value ||
// !phoneNumberAdminister.value?.trim().length
// ) {
// hasError = true;
// hasError = true;
// emailRules.value = true;
// phoneNumberAdministerRules.value = true;
// errorMessEmail.value = i18n.global.t(
// errorMessPhoneNumberAdminister.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.isEmail'
// 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
// );
// }
// if (!emailAdminister.value || !emailAdminister.value?.trim().length) {
// hasError = true;
// emailAdministerRules.value = true;
// errorMessEmailAdminister.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.requireEmailAdminister'
// );
// );
// }
// }
if
(
!
phoneNumberAdminister
.
value
||
!
phoneNumberAdminister
.
value
?.
trim
().
length
)
{
hasError
=
true
;
phoneNumberAdministerRules
.
value
=
true
;
errorMessPhoneNumberAdminister
.
value
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
);
}
if
(
!
emailAdminister
.
value
||
!
emailAdminister
.
value
?.
trim
().
length
)
{
hasError
=
true
;
emailAdministerRules
.
value
=
true
;
errorMessEmailAdminister
.
value
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireEmailAdminister'
);
}
if
(
artistLevel
.
value
===
null
)
{
if
(
artistLevel
.
value
===
null
)
{
hasError
=
true
;
hasError
=
true
;
...
@@ -805,7 +788,6 @@ export default defineComponent({
...
@@ -805,7 +788,6 @@ export default defineComponent({
instagram
:
instagram
.
value
,
instagram
:
instagram
.
value
,
whatsapp
:
whatsapp
.
value
,
whatsapp
:
whatsapp
.
value
,
fullName
:
fullName
.
value
,
fullName
:
fullName
.
value
,
// "workStatus": 1,
shortDescription
:
null
,
shortDescription
:
null
,
account
:
null
,
account
:
null
,
socialEmbedded
:
socialEmbedded
.
value
,
socialEmbedded
:
socialEmbedded
.
value
,
...
@@ -856,7 +838,6 @@ export default defineComponent({
...
@@ -856,7 +838,6 @@ export default defineComponent({
void
getNationalityOptions
();
void
getNationalityOptions
();
void
getArtistLevelOptions
();
void
getArtistLevelOptions
();
void
getQualificationOptions
();
void
getQualificationOptions
();
void
getBankOptions
();
void
getBankOptions
();
void
getTypeCardOptions
();
void
getTypeCardOptions
();
});
});
...
...
src/pages/danh-sach-booking/ListBooking.ts
deleted
100644 → 0
View file @
0c261995
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
BookingStatus
}
from
'src/assets/enums'
;
import
{
ActiveStatus
}
from
'src/assets/enums'
;
export
default
defineComponent
({
components
:
{
Pagination
,
},
setup
()
{
const
tableColumns
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.stt'
),
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'artistName'
,
field
:
'artistName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.artistName'
),
align
:
'center'
,
headerStyle
:
'text-align: center !important;'
,
sortable
:
false
,
},
{
name
:
'customerName'
,
field
:
'customerName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.customerName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'description'
,
field
:
'description'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.description'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'place'
,
field
:
'place'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.place'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'startTime'
,
field
:
'startTime'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.startTime'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'endTime'
,
field
:
'endTime'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.endTime'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'statusBooking'
,
field
:
'statusBooking'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.statusBooking'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'statusActive'
,
field
:
'statusActive'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.statusActive'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.action'
),
align
:
'center'
,
sortable
:
false
,
},
];
const
listBooking
=
ref
([
{
stt
:
1
,
artistName
:
'Sơn Tùng MTP'
,
customerName
:
'Nguyễn Văn A'
,
description
:
'Đại nhạc hội'
,
place
:
'Cầu Giấy - Hà Nội'
,
startTime
:
'18:00:00 - 30/4/2021'
,
endTime
:
'21:00:00 - 30/4/2021'
,
statusBooking
:
1
,
statusActive
:
2
,
},
]);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
10
);
const
keywordSearch
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListBooking
();
};
const
getListBooking
=
()
=>
{
// console.log('API List Menu');
};
onMounted
(()
=>
{
void
getListBooking
();
});
return
{
keywordSearch
,
status
,
listBooking
,
tableColumns
,
pageIndex
,
pageSize
,
totalPage
,
changePageSize
,
getListBooking
,
BookingStatus
,
ActiveStatus
,
};
},
});
src/pages/danh-sach-booking/index.vue
View file @
68a80dbf
...
@@ -7,17 +7,28 @@
...
@@ -7,17 +7,28 @@
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-2"
>
<div
class=
"col-2"
>
<q-input
<q-input
v-model=
"
keywordSearch
"
v-model=
"
sreachArtist
"
dense
dense
outlined
outlined
:label=
"$t('listBooking.titleColumnsTable.artistName')"
:label=
"$t('listBooking.titleColumnsTable.artistName')"
clearable
clearable
></q-input>
></q-input>
</div>
</div>
<div
class=
"col-2"
>
<q-input
v-model=
"sreachUserName"
dense
outlined
:label=
"$t('listBooking.titleColumnsTable.userName')"
clearable
></q-input>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<q-btn
<q-btn
class=
"q-mr-sm"
color=
"primary"
color=
"primary"
no-caps
no-caps
@
click=
"getListBooking"
:label=
"$t('crudActions.search')"
:label=
"$t('crudActions.search')"
style=
"width: 100px"
style=
"width: 100px"
>
>
...
@@ -31,30 +42,66 @@
...
@@ -31,30 +42,66 @@
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
row-key=
"name"
row-key=
"name"
separator=
"cell"
separator=
"cell"
:pagination=
"
{ rowsPerPage: pageSize }"
:rows-per-page-label=
"$t('recordPerPage')"
:pagination=
"
{
rowsPerPage: 0,
}"
wrap-cells
hide-pagination
hide-pagination
class="sticky-header-table"
class="sticky-header-table"
>
>
<template
v-slot:body-cell-statusBooking=
"rowData"
>
<template
v-slot:body-cell-action=
"rowData"
>
<q-td>
<q-td
style=
"padding: 0; text-align: center"
>
<div
align=
"center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-information-outline"
@
click=
"detail(rowData.row.id)"
>
<q-tooltip
:offset=
"[10, 10]"
>
{{
$t
(
'listBooking.toolTipMessage'
)
}}
</q-tooltip>
</q-btn>
</q-td>
</
template
>
<
template
v-slot:body-cell-stt=
"item"
>
<q-td
:item=
"item"
style=
"text-align: center"
>
{{
1
+
item
.
rowIndex
+
pageSize
*
(
pageIndex
-
1
)
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-status=
"item"
>
<q-td
align=
"center"
>
<template
v-for=
"(data, idx) in BookingStatus"
>
<q-chip
<q-chip
:color=
"
v-if=
"item.row.status === data.value"
rowData.value === BookingStatus.active ? 'positive' : 'orange'
:key=
"`status-$
{idx}-${item}`"
"
text-color=
"white"
size="sm"
size="sm"
label
:color="data.color"
>
{{
data
.
text
}}
</q-chip
>
>
{{
</
template
>
rowData
.
value
===
BookingStatus
.
active
</q-td>
?
$t
(
'listBooking.statusLabel.activeBooking'
)
</template>
:
$t
(
'listBooking.statusLabel.inactiveBooking'
)
}}
<
template
v-slot:body-cell-activeStatus=
"item"
>
</q-chip>
<q-td
align=
"center"
>
</div>
<template
v-for=
"(data, idx) in Status"
>
<q-chip
v-if=
"item.row.activeStatus === data.value"
:key=
"`activeStatus-$
{idx}-${item}`"
size="sm"
label
:color="data.color"
>
{{
data
.
text
}}
</q-chip
>
</
template
>
</q-td>
</q-td>
</template>
</template>
<
template
v-slot:body-cell-statusActive=
"rowData"
>
<!-- <template v-slot:body-cell-activeStatus="rowData">
<q-td>
<q-td>
<div align="center">
<div align="center">
<q-chip
<q-chip
...
@@ -72,19 +119,258 @@
...
@@ -72,19 +119,258 @@
</q-chip>
</q-chip>
</div>
</div>
</q-td>
</q-td>
</
template
>
</template> -->
<
template
v-slot:body-cell-action
>
<
template
v-slot:body-cell-content=
"item"
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<td>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-information-outline"
>
<div
class=
"ellipsis-3-lines"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
{{
!
item
.
row
.
content
?
''
:
item
.
row
.
content
}}
$t
(
'listBooking.toolTipMessage'
)
<q-tooltip
:offset=
"[10, 10]"
max-width=
"35%"
>
{{
!
item
.
row
.
content
?
''
:
item
.
row
.
content
}}
</q-tooltip>
}}
</q-tooltip>
</
q-btn
>
</
div
>
</
q-
td>
</td>
</
template
>
</
template
>
</q-table>
</q-table>
</div>
</div>
<div
class=
"col-12 q-mt-sm"
>
<Pagination
v-model:currentPage=
"pageIndex"
v-model:pageSize=
"pageSize"
:totalPage=
"totalPage"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListBooking"
/>
<detailBooking
v-model:show-dialog=
"showDialog"
:detail-info-booking=
"detailInfoBooking"
@
click:CloseBtn=
"showDialog = false"
></detailBooking>
</div>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
src=
"./ListBooking.ts"
></
script
>
<
script
lang=
"ts"
>
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
config
,
API_PATHS
}
from
'src/assets/configurations'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
PaginationResponse
,
ListBooking
}
from
'src/assets/type'
;
import
detailBooking
from
'../../components/detailBooking/index.vue'
;
export
default
defineComponent
({
components
:
{
detailBooking
,
Pagination
,
},
setup
()
{
const
tableColumns
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.stt'
),
headerStyle
:
'text-align: center !important; width: 4%'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'bookingCode'
,
field
:
'bookingCode'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.bookingCode'
),
headerStyle
:
'text-align: center !important; width: 4%'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'artistName'
,
field
:
'artistName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.artistName'
),
align
:
'left'
,
headerStyle
:
'text-align: center !important; width: 9%'
,
sortable
:
false
,
},
{
name
:
'userName'
,
field
:
'userName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.userName'
),
headerStyle
:
'text-align: center !important; width: 9%'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'address'
,
field
:
'address'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.address'
),
headerStyle
:
'text-align: center !important; width: 13%'
,
align
:
'left'
,
sortable
:
false
,
},
// {
// name: 'content',
// field: 'content',
// required: true,
// label: i18n.global.t('listBooking.titleColumnsTable.content'),
// headerStyle: 'text-align: center !important; width: 13%',
// align: 'left',
// sortable: false,
// },
{
name
:
'fromTime'
,
field
:
'fromTime'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.fromTime'
),
headerStyle
:
'text-align: center !important; width: 9%'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'toTime'
,
field
:
'toTime'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.toTime'
),
headerStyle
:
'text-align: center !important; width: 9%'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'fee'
,
field
:
'fee'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.fee'
),
headerStyle
:
'text-align: center !important; width: 9%'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'like'
,
field
:
'like'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.like'
),
headerStyle
:
'text-align: center !important; width: 9%'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.status'
),
headerStyle
:
'text-align: center !important; width: 7%'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'activeStatus'
,
field
:
'activeStatus'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.activeStatus'
),
headerStyle
:
'text-align: center !important; width: 7%'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'listBooking.titleColumnsTable.action'
),
headerStyle
:
'text-align: center !important; width: 7%'
,
align
:
'center'
,
sortable
:
false
,
},
];
const
BookingStatus
=
ref
([
{
value
:
0
,
text
:
'Chờ nhận'
,
color
:
'secondary'
},
{
value
:
1
,
text
:
'Đã nhận'
,
color
:
'info'
},
{
value
:
2
,
text
:
'Từ chối'
,
color
:
'warning'
},
]);
const
Status
=
ref
([
{
value
:
0
,
text
:
'Chờ nhận'
,
color
:
'secondary'
},
{
value
:
1
,
text
:
'Đã thực hiện'
,
color
:
'info'
},
{
value
:
2
,
text
:
'Chưa thực hiện'
,
color
:
'warning'
},
{
value
:
3
,
text
:
'Hoãn lịch'
,
color
:
'secondary'
},
{
value
:
4
,
text
:
'Hủy lịch'
,
color
:
'info'
},
{
value
:
5
,
text
:
'Thay đổi lịch'
,
color
:
'warning'
},
]);
const
detailInfoBooking
:
Ref
<
ListBooking
|
null
>
=
ref
(
null
);
const
showDialog
=
ref
(
false
);
const
listBooking
:
Ref
<
unknown
[]
>
=
ref
([]);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
1
);
const
sreachArtist
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
sreachUserName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListBooking
();
};
const
getListBooking
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListBooking
,
method
:
'GET'
,
params
:
{
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
artistName
:
sreachArtist
.
value
,
userName
:
sreachUserName
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ListBooking
>>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
listBooking
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
}
catch
(
error
)
{}
};
const
getDetail
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getBookingDetail
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
ListBooking
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
detailInfoBooking
.
value
=
response
.
data
.
data
;
showDialog
.
value
=
true
;
}
}
catch
(
error
)
{}
};
const
detail
=
(
id
:
number
)
=>
{
void
getDetail
(
id
);
};
onMounted
(()
=>
{
void
getListBooking
();
});
return
{
detailInfoBooking
,
showDialog
,
detail
,
sreachArtist
,
sreachUserName
,
listBooking
,
tableColumns
,
pageIndex
,
pageSize
,
totalPage
,
changePageSize
,
getListBooking
,
BookingStatus
,
Status
,
};
},
});
</
script
>
src/pages/khach-hang/customer.ts
deleted
100644 → 0
View file @
0c261995
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
AddNewCustomerDialogComponent
from
'../../components/customer/add-new-customer-dialog/index.vue'
;
import
UpdateNewCustomerDialogComponent
from
'../../components/customer/update-new-customer-dialog/index.vue'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
CustomerType
,
PaginationResponse
,
CustomerLevelType
,
}
from
'src/assets/type'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
default
defineComponent
({
components
:
{
AddNewCustomerDialogComponent
,
UpdateNewCustomerDialogComponent
,
Pagination
,
},
setup
()
{
const
dataTest
=
ref
([]);
const
userTableColumnsCustomer
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.stt'
),
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'code'
,
field
:
'code'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.customerCode'
),
align
:
'center'
,
headerStyle
:
'text-align: center !important;'
,
sortable
:
false
,
},
{
name
:
'userName'
,
field
:
'userName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.userName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'fullName'
,
field
:
'fullName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.fullName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'companyName'
,
field
:
'companyName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.businessName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'taxCode'
,
field
:
'taxCode'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.taxCode'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'email'
,
field
:
'email'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.email'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'level'
,
field
:
'level'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.ratings'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.status'
),
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.action'
),
align
:
'center'
,
sortable
:
false
,
},
];
const
userTableRowsCustomer
:
Ref
<
CustomerType
[]
>
=
ref
([]);
const
customerInfo
:
Ref
<
CustomerType
|
null
>
=
ref
(
null
);
const
showDialog
=
ref
(
false
);
const
showDialogUpdate
=
ref
(
false
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
0
);
const
companyNameSelected
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
taxCodeSelected
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
levelSelected
:
Ref
<
CustomerLevelType
|
null
>
=
ref
(
null
);
const
id
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
code
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
userName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
fullName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
companyName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
taxCode
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
|
null
>
=
ref
(
2
);
const
phone
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
password
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
type
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
representative
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
position
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
level
:
Ref
<
CustomerLevelType
|
null
>
=
ref
(
null
);
const
levelOptions
:
Ref
<
CustomerLevelType
[]
|
null
>
=
ref
([]);
const
getListCustomers
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
listCustomers
,
method
:
'GET'
,
params
:
{
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
customerLevel
:
levelSelected
.
value
?.
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
CustomerType
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
userTableRowsCustomer
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
}
catch
(
error
)
{}
};
const
getCustomerLevelOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
listCustomerLevel
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
CustomerLevelType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
levelOptions
.
value
=
response
.
data
.
data
;
}
};
const
confirmDeleteCustomer
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserTitle'
),
message
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserContent'
),
cancel
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deleteCustomer
(
id
);
});
};
const
deleteCustomer
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
deleteCustomer
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.deleteUserAccess'
),
});
void
getListCustomers
();
}
}
catch
(
error
)
{}
};
const
addCustomer
=
async
(
item
:
CustomerType
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
addCustomer
,
method
:
'POST'
,
data
:
{
code
:
item
.
code
,
userName
:
item
.
userName
,
fullName
:
item
.
fullName
,
companyName
:
item
.
companyName
,
taxCode
:
item
.
taxCode
,
email
:
item
.
email
,
status
:
item
.
status
,
phone
:
item
.
phone
,
password
:
item
.
password
,
address
:
item
.
address
,
type
:
item
.
type
,
representative
:
item
.
representative
,
position
:
item
.
position
,
level
:
item
.
level
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.addNewUserAccess'
),
});
void
getListCustomers
();
showDialog
.
value
=
false
;
}
}
catch
(
error
)
{}
};
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListCustomers
();
};
const
openAddCustomerDialog
=
()
=>
{
showDialog
.
value
=
true
;
userName
.
value
=
null
;
fullName
.
value
=
null
;
companyName
.
value
=
null
;
taxCode
.
value
=
null
;
email
.
value
=
null
;
level
.
value
=
null
;
address
.
value
=
null
;
type
.
value
=
null
;
representative
.
value
=
null
;
position
.
value
=
null
;
phone
.
value
=
null
;
status
.
value
=
2
;
};
const
getDetailCustomer
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
detailCustomer
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
CustomerType
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
customerInfo
.
value
=
response
.
data
.
data
;
showDialogUpdate
.
value
=
true
;
}
}
catch
(
error
)
{}
};
const
openUpdateCustomerDialog
=
(
id
:
number
)
=>
{
void
getDetailCustomer
(
id
);
};
//Bấm nút lưu ở dialog update thì gọi api cập nhật trong hàm updateCustomer
const
updateCustomer
=
async
(
item
:
CustomerType
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateCustomer
,
method
:
'POST'
,
data
:
{
id
:
item
.
id
,
code
:
item
.
code
,
userName
:
item
.
userName
,
fullName
:
item
.
fullName
,
companyName
:
item
.
companyName
,
taxCode
:
item
.
taxCode
,
email
:
item
.
email
,
status
:
item
.
status
,
phone
:
item
.
phone
,
password
:
item
.
password
,
address
:
item
.
address
,
type
:
item
.
type
,
representative
:
item
.
representative
,
position
:
item
.
position
,
level
:
item
.
level
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.updateUserAccess'
),
});
void
getListCustomers
();
showDialogUpdate
.
value
=
false
;
}
}
catch
(
error
)
{}
};
onMounted
(()
=>
{
void
getListCustomers
();
void
getCustomerLevelOptions
();
});
return
{
openUpdateCustomerDialog
,
updateCustomer
,
openAddCustomerDialog
,
addCustomer
,
showDialogUpdate
,
showDialog
,
id
,
userName
,
fullName
,
companyName
,
taxCode
,
code
,
password
,
type
,
email
,
level
,
levelOptions
,
address
,
representative
,
position
,
levelSelected
,
phone
,
companyNameSelected
,
taxCodeSelected
,
status
,
userTableColumnsCustomer
,
userTableRowsCustomer
,
getListCustomers
,
pageIndex
,
pageSize
,
dataTest
,
totalPage
,
changePageSize
,
getCustomerLevelOptions
,
confirmDeleteCustomer
,
customerInfo
,
};
},
});
src/pages/khach-hang/index.vue
View file @
68a80dbf
...
@@ -149,4 +149,359 @@
...
@@ -149,4 +149,359 @@
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
src=
"./customer.ts"
></
script
>
<
script
lang=
"ts"
>
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
AddNewCustomerDialogComponent
from
'../../components/customer/add-new-customer-dialog/index.vue'
;
import
UpdateNewCustomerDialogComponent
from
'../../components/customer/update-new-customer-dialog/index.vue'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
CustomerType
,
PaginationResponse
,
CustomerLevelType
,
}
from
'src/assets/type'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
default
defineComponent
({
components
:
{
AddNewCustomerDialogComponent
,
UpdateNewCustomerDialogComponent
,
Pagination
,
},
setup
()
{
const
dataTest
=
ref
([]);
const
userTableColumnsCustomer
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.stt'
),
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'code'
,
field
:
'code'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.customerCode'
),
align
:
'center'
,
headerStyle
:
'text-align: center !important;'
,
sortable
:
false
,
},
{
name
:
'userName'
,
field
:
'userName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.userName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'fullName'
,
field
:
'fullName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.fullName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'companyName'
,
field
:
'companyName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.businessName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'taxCode'
,
field
:
'taxCode'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.taxCode'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'email'
,
field
:
'email'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.email'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'level'
,
field
:
'level'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.ratings'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.status'
),
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.action'
),
align
:
'center'
,
sortable
:
false
,
},
];
const
userTableRowsCustomer
:
Ref
<
CustomerType
[]
>
=
ref
([]);
const
customerInfo
:
Ref
<
CustomerType
|
null
>
=
ref
(
null
);
const
showDialog
=
ref
(
false
);
const
showDialogUpdate
=
ref
(
false
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
0
);
const
companyNameSelected
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
taxCodeSelected
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
levelSelected
:
Ref
<
CustomerLevelType
|
null
>
=
ref
(
null
);
const
id
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
code
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
userName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
fullName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
companyName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
taxCode
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
|
null
>
=
ref
(
2
);
const
phone
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
password
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
type
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
representative
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
position
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
level
:
Ref
<
CustomerLevelType
|
null
>
=
ref
(
null
);
const
levelOptions
:
Ref
<
CustomerLevelType
[]
|
null
>
=
ref
([]);
const
getListCustomers
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
listCustomers
,
method
:
'GET'
,
params
:
{
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
customerLevel
:
levelSelected
.
value
?.
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
CustomerType
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
userTableRowsCustomer
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
}
catch
(
error
)
{}
};
const
getCustomerLevelOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
listCustomerLevel
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
CustomerLevelType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
levelOptions
.
value
=
response
.
data
.
data
;
}
};
const
confirmDeleteCustomer
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserTitle'
),
message
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserContent'
),
cancel
:
i18n
.
global
.
t
(
'customer.confirmActionsTitle.confirmDeleteUserCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deleteCustomer
(
id
);
});
};
const
deleteCustomer
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
deleteCustomer
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.deleteUserAccess'
),
});
void
getListCustomers
();
}
}
catch
(
error
)
{}
};
const
addCustomer
=
async
(
item
:
CustomerType
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
addCustomer
,
method
:
'POST'
,
data
:
{
code
:
item
.
code
,
userName
:
item
.
userName
,
fullName
:
item
.
fullName
,
companyName
:
item
.
companyName
,
taxCode
:
item
.
taxCode
,
email
:
item
.
email
,
status
:
item
.
status
,
phone
:
item
.
phone
,
password
:
item
.
password
,
address
:
item
.
address
,
type
:
item
.
type
,
representative
:
item
.
representative
,
position
:
item
.
position
,
level
:
item
.
level
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.addNewUserAccess'
),
});
void
getListCustomers
();
showDialog
.
value
=
false
;
}
}
catch
(
error
)
{}
};
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListCustomers
();
};
const
openAddCustomerDialog
=
()
=>
{
showDialog
.
value
=
true
;
userName
.
value
=
null
;
fullName
.
value
=
null
;
companyName
.
value
=
null
;
taxCode
.
value
=
null
;
email
.
value
=
null
;
level
.
value
=
null
;
address
.
value
=
null
;
type
.
value
=
null
;
representative
.
value
=
null
;
position
.
value
=
null
;
phone
.
value
=
null
;
status
.
value
=
2
;
};
const
getDetailCustomer
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
detailCustomer
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
CustomerType
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
customerInfo
.
value
=
response
.
data
.
data
;
showDialogUpdate
.
value
=
true
;
}
}
catch
(
error
)
{}
};
const
openUpdateCustomerDialog
=
(
id
:
number
)
=>
{
void
getDetailCustomer
(
id
);
};
//Bấm nút lưu ở dialog update thì gọi api cập nhật trong hàm updateCustomer
const
updateCustomer
=
async
(
item
:
CustomerType
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateCustomer
,
method
:
'POST'
,
data
:
{
id
:
item
.
id
,
code
:
item
.
code
,
userName
:
item
.
userName
,
fullName
:
item
.
fullName
,
companyName
:
item
.
companyName
,
taxCode
:
item
.
taxCode
,
email
:
item
.
email
,
status
:
item
.
status
,
phone
:
item
.
phone
,
password
:
item
.
password
,
address
:
item
.
address
,
type
:
item
.
type
,
representative
:
item
.
representative
,
position
:
item
.
position
,
level
:
item
.
level
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customer.actionMessages.updateUserAccess'
),
});
void
getListCustomers
();
showDialogUpdate
.
value
=
false
;
}
}
catch
(
error
)
{}
};
onMounted
(()
=>
{
void
getListCustomers
();
void
getCustomerLevelOptions
();
});
return
{
openUpdateCustomerDialog
,
updateCustomer
,
openAddCustomerDialog
,
addCustomer
,
showDialogUpdate
,
showDialog
,
id
,
userName
,
fullName
,
companyName
,
taxCode
,
code
,
password
,
type
,
email
,
level
,
levelOptions
,
address
,
representative
,
position
,
levelSelected
,
phone
,
companyNameSelected
,
taxCodeSelected
,
status
,
userTableColumnsCustomer
,
userTableRowsCustomer
,
getListCustomers
,
pageIndex
,
pageSize
,
dataTest
,
totalPage
,
changePageSize
,
getCustomerLevelOptions
,
confirmDeleteCustomer
,
customerInfo
,
};
},
});
</
script
>
src/pages/linh-vuc-hoat-dong/index.vue
View file @
68a80dbf
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
icon=
"mdi-account-edit-outline"
icon=
"mdi-account-edit-outline"
@
click=
"openUpdateFieldDialog(item.row.id)"
@
click=
"openUpdateFieldDialog(item.row.id)"
>
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'field.toolTipMessage.updateField'
)
$t
(
'field.toolTipMessage.updateField'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
icon=
"mdi-delete-outline"
icon=
"mdi-delete-outline"
@
click=
"confirmDeleteField(item.row.id)"
@
click=
"confirmDeleteField(item.row.id)"
>
>
<q-tooltip
:offset=
"[
2
0, 10]"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
>
{{
$t
(
'field.toolTipMessage.deleteField'
)
$t
(
'field.toolTipMessage.deleteField'
)
}}
</q-tooltip>
}}
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<td>
<td>
<div
class=
"ellipsis-3-lines"
>
<div
class=
"ellipsis-3-lines"
>
{{
!
item
.
row
.
description
?
''
:
item
.
row
.
description
}}
{{
!
item
.
row
.
description
?
''
:
item
.
row
.
description
}}
<q-tooltip
:offset=
"[
2
0, 10]"
max-width=
"35%"
>
{{
<q-tooltip
:offset=
"[
1
0, 10]"
max-width=
"35%"
>
{{
!
item
.
row
.
description
?
''
:
item
.
row
.
description
!
item
.
row
.
description
?
''
:
item
.
row
.
description
}}
</q-tooltip>
}}
</q-tooltip>
</div>
</div>
...
@@ -141,14 +141,6 @@ export default defineComponent({
...
@@ -141,14 +141,6 @@ export default defineComponent({
},
},
setup
()
{
setup
()
{
const
fieldTableColumns
=
[
const
fieldTableColumns
=
[
// {
// name: 'index',
// field: 'index',
// required: true,
// label: 'STT',
// align: 'center',
// sortable: false,
// },
{
{
name
:
'name'
,
name
:
'name'
,
field
:
'name'
,
field
:
'name'
,
...
...
src/pages/them-nghe-sy/AddArtist.ts
View file @
68a80dbf
...
@@ -648,23 +648,24 @@ export default defineComponent({
...
@@ -648,23 +648,24 @@ export default defineComponent({
// 'artist.artistInformation.validateMessages.isEmail'
// 'artist.artistInformation.validateMessages.isEmail'
// );
// );
// }
// }
if
(
!
phoneNumberAdminister
.
value
||
// if (
!
phoneNumberAdminister
.
value
?.
trim
().
length
// !phoneNumberAdminister.value ||
)
{
// !phoneNumberAdminister.value?.trim().length
hasError
=
true
;
// ) {
phoneNumberAdministerRules
.
value
=
true
;
// hasError = true;
errorMessPhoneNumberAdminister
.
value
=
i18n
.
global
.
t
(
// phoneNumberAdministerRules.value = true;
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
// errorMessPhoneNumberAdminister.value = i18n.global.t(
);
// 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
}
// );
if
(
!
emailAdminister
.
value
||
!
emailAdminister
.
value
?.
trim
().
length
)
{
// }
hasError
=
true
;
// if (!emailAdminister.value || !emailAdminister.value?.trim().length) {
emailAdministerRules
.
value
=
true
;
// hasError = true;
errorMessEmailAdminister
.
value
=
i18n
.
global
.
t
(
// emailAdministerRules.value = true;
'artist.artistInformation.validateMessages.requireEmailAdminister'
// errorMessEmailAdminister.value = i18n.global.t(
);
// 'artist.artistInformation.validateMessages.requireEmailAdminister'
}
// );
// }
if
(
artistLevel
.
value
===
null
)
{
if
(
artistLevel
.
value
===
null
)
{
hasError
=
true
;
hasError
=
true
;
...
...
src/pages/them-nghe-sy/index.vue
View file @
68a80dbf
...
@@ -14,13 +14,6 @@
...
@@ -14,13 +14,6 @@
name=
"information"
name=
"information"
:label=
"$t('artist.artistInformation.tabLabel.personalInformation')"
:label=
"$t('artist.artistInformation.tabLabel.personalInformation')"
>
>
<!--
<template
v-slot:default
>
<q-icon
style=
"position: absolute; top: 5px; right: -16px"
name=
"mdi-alert"
color=
"red"
></q-icon>
</
template
>
-->
</q-tab>
</q-tab>
<q-tab
<q-tab
name=
"vabAccount"
name=
"vabAccount"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment