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
3d032b75
Commit
3d032b75
authored
May 04, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d32877b5
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
502 additions
and
73 deletions
+502
-73
package.json
package.json
+1
-1
favicon.ico
public/favicon.ico
+0
-0
VAN_Favicon.png
public/icons/VAN_Favicon.png
+0
-0
quasar.conf.js
quasar.conf.js
+7
-7
configurations.example.ts
src/assets/configurations.example.ts
+1
-1
type.ts
src/assets/type.ts
+11
-0
index.vue
src/components/customer/add-new-customer-dialog/index.vue
+0
-1
NewManagingUnits.ts
...ingunits/add-new-managingunits-dialog/NewManagingUnits.ts
+86
-0
index.vue
...ents/managingunits/add-new-managingunits-dialog/index.vue
+143
-0
index.vue
...s/managingunits/update-new-managingunits-dialog/index.vue
+10
-0
index.ts
src/i18n/vi/index.ts
+57
-11
index.template.html
src/index.template.html
+33
-10
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+91
-38
index.vue
src/pages/don-vi-chu-quan/index.vue
+61
-3
customer.ts
src/pages/khach-hang/customer.ts
+1
-1
No files found.
package.json
View file @
3d032b75
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"name"
:
"quasar-web-base"
,
"name"
:
"quasar-web-base"
,
"version"
:
"0.0.1"
,
"version"
:
"0.0.1"
,
"description"
:
"A Quasar Framework app"
,
"description"
:
"A Quasar Framework app"
,
"productName"
:
"
Quasar App
"
,
"productName"
:
"
CMS Vietnam Artist Booking
"
,
"author"
:
"thanhdat <thanhdatwg@gmail.com>"
,
"author"
:
"thanhdat <thanhdatwg@gmail.com>"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
...
...
public/favicon.ico
View replaced file @
d32877b5
View file @
3d032b75
16.3 KB
|
W:
|
H:
5.28 KB
|
W:
|
H:
2-up
Swipe
Onion skin
public/icons/VAN_Favicon.png
0 → 100644
View file @
3d032b75
5.28 KB
quasar.conf.js
View file @
3d032b75
...
@@ -138,8 +138,8 @@ module.exports = configure(function (ctx) {
...
@@ -138,8 +138,8 @@ module.exports = configure(function (ctx) {
},
},
manifest
:
{
manifest
:
{
name
:
'
Quasar App
'
,
name
:
'
CMS Vietnam Artist Booking
'
,
short_name
:
'
Quasar App
'
,
short_name
:
'
CMS Vietnam Artist Booking
'
,
description
:
'A Quasar Framework app'
,
description
:
'A Quasar Framework app'
,
display
:
'standalone'
,
display
:
'standalone'
,
orientation
:
'portrait'
,
orientation
:
'portrait'
,
...
@@ -147,27 +147,27 @@ module.exports = configure(function (ctx) {
...
@@ -147,27 +147,27 @@ module.exports = configure(function (ctx) {
theme_color
:
'#027be3'
,
theme_color
:
'#027be3'
,
icons
:
[
icons
:
[
{
{
src
:
'icons/
icon-128x128
.png'
,
src
:
'icons/
VAN_Favicon
.png'
,
sizes
:
'128x128'
,
sizes
:
'128x128'
,
type
:
'image/png'
,
type
:
'image/png'
,
},
},
{
{
src
:
'icons/
icon-192x192
.png'
,
src
:
'icons/
VAN_Favicon
.png'
,
sizes
:
'192x192'
,
sizes
:
'192x192'
,
type
:
'image/png'
,
type
:
'image/png'
,
},
},
{
{
src
:
'icons/
icon-256x256
.png'
,
src
:
'icons/
VAN_Favicon
.png'
,
sizes
:
'256x256'
,
sizes
:
'256x256'
,
type
:
'image/png'
,
type
:
'image/png'
,
},
},
{
{
src
:
'icons/
icon-384x384
.png'
,
src
:
'icons/
VAN_Favicon
.png'
,
sizes
:
'384x384'
,
sizes
:
'384x384'
,
type
:
'image/png'
,
type
:
'image/png'
,
},
},
{
{
src
:
'icons/
icon-512x512
.png'
,
src
:
'icons/
VAN_Favicon
.png'
,
sizes
:
'512x512'
,
sizes
:
'512x512'
,
type
:
'image/png'
,
type
:
'image/png'
,
},
},
...
...
src/assets/configurations.example.ts
View file @
3d032b75
...
@@ -32,7 +32,7 @@ export enum API_PATHS {
...
@@ -32,7 +32,7 @@ export enum API_PATHS {
resetPassword
=
'/user/resetPass'
,
resetPassword
=
'/user/resetPass'
,
getUserDetail
=
'/user/detail'
,
getUserDetail
=
'/user/detail'
,
updateUser
=
'/user/update'
,
updateUser
=
'/user/update'
,
getListUnits
=
'/
unit/list
'
,
getListUnits
=
'/
artistOwner
'
,
getListArtists
=
'/artist'
,
getListArtists
=
'/artist'
,
getFieldOptions
=
'/field'
,
getFieldOptions
=
'/field'
,
getNationalityOptions
=
'/nationality'
,
getNationalityOptions
=
'/nationality'
,
...
...
src/assets/type.ts
View file @
3d032b75
...
@@ -82,3 +82,14 @@ export type WorkType = {
...
@@ -82,3 +82,14 @@ export type WorkType = {
status
:
number
;
status
:
number
;
numIndex
:
number
;
numIndex
:
number
;
};
};
export
type
ARTISTOWNER
=
{
id
:
number
;
code
:
string
;
name
:
string
;
representative
:
string
;
fields
:
string
;
email
:
string
;
phoneNumber
:
number
;
status
:
number
;
};
src/components/customer/add-new-customer-dialog/index.vue
View file @
3d032b75
...
@@ -114,7 +114,6 @@
...
@@ -114,7 +114,6 @@
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"text"
option-label=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
...
src/components/managingunits/add-new-managingunits-dialog/NewManagingUnits.ts
0 → 100644
View file @
3d032b75
import
{
defineComponent
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
export
default
defineComponent
({
props
:
{
showDialog
:
{
type
:
Boolean
,
required
:
true
,
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
code
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
representative
:
{
type
:
String
,
required
:
true
},
email
:
{
type
:
String
,
required
:
true
},
address
:
{
type
:
String
,
required
:
true
},
phoneNumber
:
{
type
:
String
,
required
:
true
},
status
:
{
type
:
Boolean
,
required
:
true
},
},
setup
()
{
const
codeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireCode'
),
];
const
nameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireName'
),
];
const
representativeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireRepresentative'
),
];
const
fieldsRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireFields'
),
];
const
phoneNumberRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requirePhoneNumber'
),
(
val
:
string
)
=>
isMobilePhone
(
val
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.isPhone'
),
];
const
emailRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireEmail'
),
(
val
:
string
)
=>
isEmail
(
val
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.isEmail'
),
];
const
addressRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireAddress'
),
];
return
{
codeRules
,
nameRules
,
representativeRules
,
addressRules
,
phoneNumberRules
,
emailRules
,
fieldsRules
};
},
emits
:
[
'update:showDialog'
,
'click:CloseBtn'
,
'update:code'
,
'update:name'
,
'update:representative'
,
'update:fields'
,
'update:email'
,
'update:phoneNumber'
,
'update:address'
,
'update:status'
,
'addNewManagingUnits'
,
],
});
src/components/managingunits/add-new-managingunits-dialog/index.vue
0 → 100644
View file @
3d032b75
<
template
>
<q-dialog
persistent
:model-value=
"showDialog"
@
update:model-value=
"$emit('update:showDialog', $event)"
>
<q-card
style=
"min-width: 1500px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNewManagingUnits')"
>
<q-card-section>
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
$t
(
'managingUnit.dialogLabel.title.add'
)
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<q-input
:model-value=
"code"
@
update:model-value=
"$emit('update:code', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.code')"
:rules=
"codeRules"
hide-bottom-space
type=
"text"
class=
"q-my-sm"
outlined
clearable
></q-input>
<q-input
:model-value=
"name"
@
update:model-value=
"$emit('update:name', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.name')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"nameRules"
hide-bottom-space
clearable
></q-input>
<q-input
:model-value=
"representative"
@
update:model-value=
"$emit('update:representative', $event)"
:label=
"
$t('managingUnit.dialogLabel.fieldLabels.representative')
"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"representativeRules"
hide-bottom-space
clearable
></q-input>
<q-input
:model-value=
"address"
@
update:model-value=
"$emit('update:address', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.address')"
class=
"q-my-sm"
type=
"textarea"
outlined
:rules=
"addressRules"
hide-bottom-space
clearable
></q-input>
</div>
<div
class=
"col-6"
>
<q-input
:model-value=
"email"
@
update:model-value=
"$emit('update:email', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.email')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"emailRules"
hide-bottom-space
clearable
></q-input>
<q-input
:model-value=
"phoneNumber"
emit-value
@
update:model-value=
"$emit('update:phoneNumber', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.phoneNumber')"
class=
"q-my-sm"
type=
"number"
:rules=
"phoneNumberRules"
outlined
hide-bottom-space
clearable
></q-input>
<q-select
:model-value=
"fields"
@
update:model-value=
"$emit('update:fields', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.fields')"
:options=
"fieldsOptions"
:rules=
"fieldsRules"
emit-value
map-options
option-value=
"id"
option-label=
"text"
class=
"q-my-sm"
outlined
hide-bottom-space
clearable
></q-select>
<div
style=
"padding-top: 13px; padding-left: 8px"
>
<span
class=
"text-body1"
>
{{
$t
(
'managingUnit.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
:label=
"$t('customer.crudActions.cancel')"
@
click=
"$emit('click:CloseBtn')"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('customer.crudActions.save')"
/>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
src=
"./NewManagingUnits.ts"
></
script
>
src/components/managingunits/update-new-managingunits-dialog/index.vue
0 → 100644
View file @
3d032b75
<
template
>
<div>
My component
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'vue'
export
default
defineComponent
({
// name: 'ComponentName'
})
</
script
>
src/i18n/vi/index.ts
View file @
3d032b75
...
@@ -133,17 +133,63 @@ export default {
...
@@ -133,17 +133,63 @@ export default {
informationUser
:
'Thông tin'
,
informationUser
:
'Thông tin'
,
},
},
},
},
managingUnit
:
{
// Đơn vị chủ quản
managingUnit
:
{
title
:
'Đơn vị chủ quản'
,
tableColumns
:
{
tableColumns
:
{
unit
:
'Mã đơn vị'
,
code
:
'Mã đơn vị'
,
unitN
ame
:
'Tên đơn vị'
,
n
ame
:
'Tên đơn vị'
,
deputy
:
'Người đại diện'
,
representative
:
'Người đại diện'
,
field
:
'Lĩnh vực'
,
field
s
:
'Lĩnh vực'
,
email
:
'Email'
,
email
:
'Email'
,
phoneNumber
:
'SĐT'
,
phoneNumber
:
'SĐT'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
action
:
'Chức năng'
,
},
},
statusLabel
:
{
active
:
'Đang hoạt động'
,
inactive
:
'Ngừng hoạt động'
,
},
dialogLabel
:
{
title
:
{
add
:
'Thêm đơn vị chủ quản'
,
update
:
'Cập nhật đơn vị chủ quản'
,
},
fieldLabels
:
{
code
:
'Mã đơn vị *'
,
name
:
'Tên đơn vị *'
,
representative
:
'Người đại diện *'
,
address
:
'Địa chỉ *'
,
email
:
'Email *'
,
phoneNumber
:
'Số điện thoại *'
,
fields
:
'Lĩnh vực *'
,
status
:
'Trạng thái'
,
},
},
toolTipMessage
:
{
updateInfo
:
'Cập nhật'
,
information
:
'Thông tin'
,
},
crudActions
:
{
save
:
'Lưu'
,
cancel
:
'Đóng'
,
},
validateMessages
:
{
requireCode
:
'Vui lòng nhập Mã đơn vị'
,
requireName
:
'Vui lòng nhập Tên đơn vị'
,
requireRepresentative
:
'Vui lòng nhập Người đại diện'
,
requireFields
:
'Vui lòng chọn Lĩnh vực'
,
requireEmail
:
'Vui lòng nhập Email'
,
isEmail
:
'Email không hợp lệ'
,
requirePhoneNumber
:
'Vui lòng nhập Số điện thoại'
,
isPhone
:
'Số điện thoại không hợp lệ'
,
requireAddress
:
'Vui lòng nhập Địa chỉ'
,
},
// confirmActionsTitle: {
// },
// actionMessages: {
// },
},
},
// khách hàng
// khách hàng
...
@@ -179,7 +225,7 @@ export default {
...
@@ -179,7 +225,7 @@ export default {
ratings
:
'Xếp hạng *'
,
ratings
:
'Xếp hạng *'
,
address
:
'Địa chỉ *'
,
address
:
'Địa chỉ *'
,
businessType
:
'Loại doanh nghiệp *'
,
businessType
:
'Loại doanh nghiệp *'
,
representative
:
'
Đ
ại diện *'
,
representative
:
'
Người đ
ại diện *'
,
position
:
'Chức vụ *'
,
position
:
'Chức vụ *'
,
phone
:
'Số điện thoại *'
,
phone
:
'Số điện thoại *'
,
status
:
'Trạng thái'
,
status
:
'Trạng thái'
,
...
@@ -200,13 +246,13 @@ export default {
...
@@ -200,13 +246,13 @@ export default {
requireTaxCode
:
'Vui lòng nhập Mã số thuế'
,
requireTaxCode
:
'Vui lòng nhập Mã số thuế'
,
requireEmail
:
'Vui lòng nhập Email'
,
requireEmail
:
'Vui lòng nhập Email'
,
isEmail
:
'Email không hợp lệ'
,
isEmail
:
'Email không hợp lệ'
,
requirePhone
:
'Vui lòng nhập
s
ố điện thoại'
,
requirePhone
:
'Vui lòng nhập
S
ố điện thoại'
,
isPhone
:
'Số điện thoại không hợp lệ'
,
isPhone
:
'Số điện thoại không hợp lệ'
,
requireAddress
:
'Vui lòng nhập
đ
ịa chỉ'
,
requireAddress
:
'Vui lòng nhập
Đ
ịa chỉ'
,
requireBusinessType
:
'Vui lòng nhập Loại doanh nghiệp'
,
requireBusinessType
:
'Vui lòng nhập Loại doanh nghiệp'
,
requireRatings
:
'Vui lòng nhập
x
ếp hạng'
,
requireRatings
:
'Vui lòng nhập
X
ếp hạng'
,
requireRepresentative
:
'Vui lòng nhập
giới tính
'
,
requireRepresentative
:
'Vui lòng nhập
Người đại diện
'
,
requiredPosition
:
'Vui lòng nhập
c
hức vụ'
,
requiredPosition
:
'Vui lòng nhập
C
hức vụ'
,
},
},
confirmActionsTitle
:
{
confirmActionsTitle
:
{
confirmDeleteUserTitle
:
'Xác nhận'
,
confirmDeleteUserTitle
:
'Xác nhận'
,
...
...
src/index.template.html
View file @
3d032b75
...
@@ -3,17 +3,40 @@
...
@@ -3,17 +3,40 @@
<head>
<head>
<title><
%=
productName
%
></title>
<title><
%=
productName
%
></title>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
/>
<meta
name=
"description"
content=
"<%= productDescription %>"
>
<meta
name=
"description"
content=
"<%= productDescription %>"
/>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
/>
<meta
name=
"viewport"
content=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
>
<meta
name=
"viewport"
content=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
/>
<link
rel=
"icon"
type=
"image/png"
sizes=
"128x128"
href=
"icons/favicon-128x128.png"
>
<link
<link
rel=
"icon"
type=
"image/png"
sizes=
"96x96"
href=
"icons/favicon-96x96.png"
>
rel=
"icon"
<link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"icons/favicon-32x32.png"
>
type=
"image/png"
<link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"icons/favicon-16x16.png"
>
sizes=
"128x128"
<link
rel=
"icon"
type=
"image/ico"
href=
"favicon.ico"
>
href=
"icons/VAN_Favicon.png"
/>
<link
rel=
"icon"
type=
"image/png"
sizes=
"96x96"
href=
"icons/VAN_Favicon.png"
/>
<link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"icons/VAN_Favicon.png"
/>
<link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"icons/VAN_Favicon.png"
/>
<link
rel=
"icon"
type=
"image/ico"
href=
"favicon.ico"
/>
</head>
</head>
<body>
<body>
<!-- DO NOT touch the following DIV -->
<!-- DO NOT touch the following DIV -->
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
3d032b75
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
// import { API_PATHS } from 'src/assets/configurations.example';
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
// import { AxiosResponse } from 'axios';
import
{
AxiosResponse
}
from
'axios'
;
// import { api, BaseResponseBody } from 'src/boot/axios';
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
PaginationResponse
,
ARTISTOWNER
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
import
AddNewManagingUnitsDialogComponent
from
'../../components/managingunits/add-new-managingunits-dialog/index.vue'
;
export
type
CustomerInfoType
=
{
id
:
number
;
code
:
string
|
null
;
name
:
string
|
null
;
address
:
string
|
null
;
email
:
string
|
null
;
representative
:
string
|
null
;
phoneNumber
:
string
|
null
;
status
:
number
;
};
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
Pagination
,
Pagination
,
AddNewManagingUnitsDialogComponent
,
},
},
setup
()
{
setup
()
{
const
managingUnitTableColumns
=
[
const
managingUnitTableColumns
=
[
...
@@ -20,37 +38,37 @@ export default defineComponent({
...
@@ -20,37 +38,37 @@ export default defineComponent({
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'
unitC
ode'
,
name
:
'
c
ode'
,
field
:
'
unitC
ode'
,
field
:
'
c
ode'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
unit
'
),
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
code
'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
align
:
'left'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'
unitN
ame'
,
name
:
'
n
ame'
,
field
:
'
unitN
ame'
,
field
:
'
n
ame'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
unitN
ame'
),
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
n
ame'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
align
:
'left'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'
deputy
'
,
name
:
'
representative
'
,
field
:
'
deputy
'
,
field
:
'
representative
'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
deputy
'
),
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.
representative
'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
align
:
'left'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'field'
,
name
:
'field
s
'
,
field
:
'field'
,
field
:
'field
s
'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.field'
),
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.field
s
'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
align
:
'left'
,
sortable
:
false
,
sortable
:
false
,
...
@@ -93,38 +111,44 @@ export default defineComponent({
...
@@ -93,38 +111,44 @@ export default defineComponent({
},
},
];
];
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
showDialog
=
ref
(
false
);
const
code
:
Ref
<
string
|
undefined
>
=
ref
();
const
name
:
Ref
<
string
|
undefined
>
=
ref
();
const
email
:
Ref
<
string
|
undefined
>
=
ref
();
const
phoneNumber
:
Ref
<
string
|
undefined
>
=
ref
();
const
representative
:
Ref
<
string
|
undefined
>
=
ref
();
const
address
:
Ref
<
string
|
undefined
>
=
ref
();
const
fields
:
Ref
<
number
|
undefined
>
=
ref
();
const
status
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
pageIndex
=
ref
(
1
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
pageSize
=
ref
(
20
);
const
unitNameKeyword
=
ref
(
''
);
const
unitNameKeyword
=
ref
(
''
);
const
fieldOptions
=
ref
([
const
field
s
Options
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
]);
const
totalPage
=
ref
(
10
);
const
totalPage
=
ref
(
10
);
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
getListUnits
=
()
=>
{
const
getListUnits
=
async
()
=>
{
// const response = (await api({
try
{
// url: API_PATHS.getListUnits,
const
response
=
(
await
api
({
// method: 'GET',
url
:
API_PATHS
.
getListUnits
,
// params: {
method
:
'GET'
,
// pageIndex: pageIndex.value,
params
:
{
// pageSize: pageSize.value,
pageIndex
:
pageIndex
.
value
,
// },
pageSize
:
pageSize
.
value
,
// })) as AxiosResponse<BaseResponseBody<unknown>>;
},
const
fakeData
:
unknown
[]
=
[
}))
as
AxiosResponse
<
{
BaseResponseBody
<
PaginationResponse
<
ARTISTOWNER
>>
unitCode
:
'0001'
,
>
;
unitName
:
'MTP Entertainment'
,
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
deputy
:
'Sơn Tùng MTP'
,
managingUnitTableRows
.
value
=
response
.
data
.
data
.
data
;
field
:
'Giải trí'
,
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
email
:
'sontung@gmail.com'
,
}
phoneNumber
:
'0899999999'
,
}
catch
(
error
)
{}
status
:
1
,
// managingUnitTableRows.value = fakeData;
},
];
managingUnitTableRows
.
value
=
fakeData
;
};
};
const
filterListUnit
=
()
=>
{
const
filterListUnit
=
()
=>
{
// const response = (await api({
// const response = (await api({
...
@@ -140,17 +164,46 @@ export default defineComponent({
...
@@ -140,17 +164,46 @@ export default defineComponent({
pageIndex
.
value
=
1
;
pageIndex
.
value
=
1
;
void
getListUnits
();
void
getListUnits
();
};
};
const
openAddManagingUnitsDialog
=
()
=>
{
showDialog
.
value
=
true
;
code
.
value
=
''
;
name
.
value
=
''
;
fields
.
value
=
undefined
;
email
.
value
=
''
;
address
.
value
=
''
;
representative
.
value
=
''
;
phoneNumber
.
value
=
''
;
};
const
addNewManagingUnits
=
()
=>
{
//gọi api thêm mới
try
{
}
catch
(
error
)
{}
};
onMounted
(()
=>
{
onMounted
(()
=>
{
void
getListUnits
();
void
getListUnits
();
});
});
return
{
return
{
openAddManagingUnitsDialog
,
addNewManagingUnits
,
showDialog
,
fieldsOptions
,
status
,
code
,
name
,
fields
,
email
,
address
,
phoneNumber
,
representative
,
managingUnitTableColumns
,
managingUnitTableColumns
,
managingUnitTableRows
,
managingUnitTableRows
,
getListUnits
,
getListUnits
,
pageIndex
,
pageIndex
,
pageSize
,
pageSize
,
unitNameKeyword
,
unitNameKeyword
,
fieldOptions
,
fieldSelected
,
fieldSelected
,
filterListUnit
,
filterListUnit
,
totalPage
,
totalPage
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
3d032b75
<
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"
>
<div
class=
"col-auto text-h6 text-weight-regular flex flex-center q-mr-md"
>
{{
$t
(
'managingUnit.title'
)
}}
<q-separator
vertical
spaced
/>
</div>
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-2"
>
<div
class=
"col-2"
>
<q-input
<q-input
dense
dense
outlined
outlined
:label=
"$t('managingUnit.tableColumns.
unitN
ame')"
:label=
"$t('managingUnit.tableColumns.
n
ame')"
v-model=
"unitNameKeyword"
v-model=
"unitNameKeyword"
clearable
></q-input>
></q-input>
</div>
</div>
<div
class=
"col-2"
>
<div
class=
"col-2"
>
<q-select
<q-select
v-model=
"fieldSelected"
v-model=
"fieldSelected"
:options=
"fieldOptions"
:options=
"fieldsOptions"
label=
"Lĩnh vực"
option-label=
"text"
option-label=
"text"
option-value=
"id"
option-value=
"id"
dense
dense
outlined
outlined
clearable
></q-select>
></q-select>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
...
@@ -28,7 +35,13 @@
...
@@ -28,7 +35,13 @@
></q-btn>
></q-btn>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
>
</q-btn>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
@
click=
"openAddManagingUnitsDialog"
>
</q-btn>
</div>
</div>
<div
class=
"col-12 q-mt-sm"
>
<div
class=
"col-12 q-mt-sm"
>
...
@@ -40,6 +53,37 @@
...
@@ -40,6 +53,37 @@
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
hide-pagination
hide-pagination
>
>
<template
v-slot:body-cell-action=
""
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-information-outline"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'managingUnit.toolTipMessage.information'
)
}}
</q-tooltip>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-account-edit-outline"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'managingUnit.toolTipMessage.updateInfo'
)
}}
</q-tooltip>
</q-btn>
</q-td>
</
template
>
<
template
v-slot:body-cell-status=
"rowData"
>
<q-td>
<div
align=
"center"
>
<q-chip
:color=
"rowData.value ? 'positive' : 'orange'"
text-color=
"white"
size=
"sm"
>
{{
rowData
.
value
?
$t
(
'managingUnit.statusLabel.active'
)
:
$t
(
'managingUnit.statusLabel.inactive'
)
}}
</q-chip>
</div>
</q-td>
</
template
>
</q-table>
</q-table>
</div>
</div>
<div
class=
"col-12 q-mt-sm"
>
<div
class=
"col-12 q-mt-sm"
>
...
@@ -50,6 +94,20 @@
...
@@ -50,6 +94,20 @@
@
update:pageSize=
"changePageSize"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListUnits"
@
update:currentPage=
"getListUnits"
/>
/>
<AddNewManagingUnitsDialogComponent
v-model:show-dialog=
"showDialog"
v-model:code=
"code"
v-model:name=
"name"
v-model:email=
"email"
v-model:address=
"address"
v-model:phone-number=
"phoneNumber"
v-model:status=
"status"
v-model:fields=
"fields"
:fields-options=
"fieldsOptions"
@
click:CloseBtn=
"showDialog = false"
@
addNewManagingUnits=
"addNewManagingUnits"
></AddNewManagingUnitsDialogComponent>
</div>
</div>
</div>
</div>
</template>
</template>
...
...
src/pages/khach-hang/customer.ts
View file @
3d032b75
...
@@ -4,7 +4,7 @@ import Pagination from 'components/pagination/index.vue';
...
@@ -4,7 +4,7 @@ import Pagination from 'components/pagination/index.vue';
import
AddNewCustomerDialogComponent
from
'../../components/customer/add-new-customer-dialog/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
UpdateNewCustomerDialogComponent
from
'../../components/customer/update-new-customer-dialog/index.vue'
;
// import { API_PATHS } from 'src/assets/configurations.example';
// import { API_PATHS } from 'src/assets/configurations.example';
export
type
Artist
InfoType
=
{
export
type
Customer
InfoType
=
{
id
:
number
;
id
:
number
;
userName
:
string
|
null
;
userName
:
string
|
null
;
customerName
:
string
|
null
;
customerName
:
string
|
null
;
...
...
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