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
fc9bde04
Commit
fc9bde04
authored
May 10, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0f4169dd
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
611 additions
and
1 deletion
+611
-1
enums.ts
src/assets/enums.ts
+5
-0
index.vue
src/components/add-update-customer-rank/index.vue
+190
-0
index.vue
...components/units-manager/unit-add-update-artist/index.vue
+0
-1
index.ts
src/i18n/vi/index.ts
+59
-0
index.vue
src/pages/xep-hang-khach-hang/index.vue
+351
-0
routes.ts
src/router/routes.ts
+6
-0
No files found.
src/assets/enums.ts
View file @
fc9bde04
...
...
@@ -13,3 +13,8 @@ export enum HotProductStatus {
active
=
1
,
inactive
=
2
,
}
export
enum
CustomerRankStatus
{
active
=
1
,
inactive
=
2
,
}
src/components/add-update-customer-rank/index.vue
0 → 100644
View file @
fc9bde04
<
template
>
<q-dialog
persistent
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
<q-card
class=
"full-width"
style=
"max-width: 50rem"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('saveCustomerRankInfo',
{});
$emit('update:isOpened', false);
"
>
<q-card-section
class=
"q-pa-none"
>
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
isUpdate
?
$t
(
'customerRank.dialogLabel.title.addCustomerRank'
)
:
$t
(
'customerRank.dialogLabel.title.updateCustomerRank'
)
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"overflow-auto"
style=
"max-height: calc(100vh - 10rem)"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<q-input
:model-value=
"rankCode"
@
update:model-value=
"$emit('update:rankCode', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.rankCode')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"rankCodeRules"
clearable
></q-input>
<q-input
:model-value=
"rankName"
@
update:model-value=
"$emit('update:rankName', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.rankName')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"rankNameRules"
clearable
></q-input>
<q-select
:model-value=
"rankType"
@
update:model-value=
"$emit('update:rankType', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.rankType')"
:options=
"rankTypeOptions"
:rules=
"rankTypeRules"
map-options
option-value=
"id"
option-label=
"name"
class=
"q-my-sm"
outlined
></q-select>
</div>
<div
class=
"col-6"
>
<q-input
:model-value=
"discount"
@
update:model-value=
"$emit('update:discount', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.discount')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"discountRules"
clearable
></q-input>
<q-input
:model-value=
"discountCode"
@
update:model-value=
"$emit('update:discountCode', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.discountCode')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"discountCodeRules"
clearable
></q-input>
<div
class=
"q-pt-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'customerRank.dialogLabel.fieldLabels.rankStatus'
)
}}
</span
><q-toggle
:model-value=
"rankStatus"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:rankStatus', $event)"
/>
</div>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<div>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
class=
"q-mr-sm"
:label=
"$t('customerRank.crudActions.cancel')"
@
click=
"$emit('update:isOpened', false)"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('customerRank.crudActions.save')"
/>
</div>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
props
:
{
isOpened
:
{
type
:
Boolean
,
required
:
true
,
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
rankCode
:
{
type
:
String
,
required
:
true
},
rankName
:
{
type
:
String
,
required
:
true
},
discount
:
{
type
:
String
,
required
:
true
},
discountCode
:
{
type
:
String
,
required
:
true
},
rankType
:
{
type
:
Number
,
required
:
true
},
rankTypeOptions
:
{
type
:
Array
,
required
:
true
},
rankStatus
:
{
type
:
Number
,
required
:
true
},
},
setup
()
{
const
rankTypeRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'customerRank.validateMessages.requireRankType'
),
];
const
rankCodeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.requireRankCode'
),
];
const
rankNameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.requireRankName'
),
];
const
discountRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.requireDiscount'
),
];
const
discountCodeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.requireDiscountCode'
),
];
return
{
rankTypeRules
,
rankCodeRules
,
rankNameRules
,
discountRules
,
discountCodeRules
,
};
},
emits
:
[
'update:isOpened'
,
'update:rankCode'
,
'update:rankName'
,
'update:rankType'
,
'update:discount'
,
'update:discountCode'
,
'update:rankStatus'
,
'saveCustomerRankInfo'
,
],
});
</
script
>
src/components/units-manager/unit-add-update-artist/index.vue
View file @
fc9bde04
...
...
@@ -185,7 +185,6 @@ export default defineComponent({
artistStatus
:
{
type
:
Number
,
required
:
true
},
contractTimeFrom
:
{
type
:
String
,
required
:
true
},
contractTimeTo
:
{
type
:
String
,
required
:
true
},
//gọi api lĩnh vực
},
setup
()
{
const
artistNameRules
=
[
...
...
src/i18n/vi/index.ts
View file @
fc9bde04
...
...
@@ -514,4 +514,63 @@ export default {
uploadStory
:
'Tải lên Story'
,
titleEmbedDialog
:
'Thay đổi Embed'
,
},
//xếp hạng khách hàng
customerRank
:
{
title
:
'Xếp hạng'
,
tableColumnsCustomerRank
:
{
stt
:
'STT'
,
rankCode
:
'Mã xếp hạng'
,
rankName
:
'Tên xếp hạng'
,
rankType
:
'Loại xếp hạng'
,
discount
:
'Chiết khấu (%)'
,
discountCode
:
'Mã chiết khấu'
,
rankStatus
:
'Trạng thái'
,
action
:
'Chức năng'
,
},
statusLabel
:
{
active
:
'Đang hoạt động'
,
inactive
:
'Ngừng hoạt động'
,
},
dialogLabel
:
{
title
:
{
addCustomerRank
:
'Thêm xếp hạng'
,
updateCustomerRank
:
'Cập nhật xếp hạng'
,
},
fieldLabels
:
{
rankCode
:
'Mã xếp hạng *'
,
rankName
:
'Tên xếp hạng *'
,
rankType
:
'Loại xếp hạng *'
,
discount
:
'Chiết khấu (%) *'
,
discountCode
:
'Mã chiết khấu *'
,
rankStatus
:
'Trạng thái'
,
},
},
toolTipMessage
:
{
updateCustomerRankInfo
:
'Cập nhật'
,
deleteCustomerRank
:
'Xoá'
,
},
crudActions
:
{
save
:
'Lưu'
,
cancel
:
'Đóng'
,
},
validateMessages
:
{
requireRankCode
:
'Vui lòng nhập Mã xếp hạng'
,
requireRankName
:
'Vui lòng nhập Tên xếp hạng'
,
requireRankType
:
'Vui lòng chọn Loại xếp hạng'
,
requireDiscount
:
'Vui lòng nhập % chiết khấu'
,
requireDiscountCode
:
'Vui lòng nhập Mã chiết khấu'
,
},
confirmActionsTitle
:
{
confirmDeleteCustomerRankTitle
:
'Xác nhận'
,
confirmDeleteCustomerRankCancelBtnLabel
:
'Huỷ'
,
confirmDeleteCustomerRankContent
:
'Bạn có chắc muốn xoá xếp hạng này không?'
,
},
actionMessages
:
{
addNewCustomerRankAccess
:
'Thêm xếp hạng thành công'
,
deleteCustomerRankAccess
:
'Xoá xếp hạng thành công'
,
updateCustomerRankAccess
:
'Cập nhật xếp hạng thành công'
,
},
},
};
src/pages/xep-hang-khach-hang/index.vue
0 → 100644
View file @
fc9bde04
This diff is collapsed.
Click to expand it.
src/router/routes.ts
View file @
fc9bde04
...
...
@@ -10,6 +10,7 @@ export enum Pages {
informationArtist
=
'cap-nhat-thong-tin-nghe-sy'
,
customer
=
'khach-hang'
,
addArtist
=
'them-nghe-sy'
,
customerRank
=
'danh-muc-xep-hang'
,
}
const
routes
:
RouteRecordRaw
[]
=
[
...
...
@@ -62,6 +63,11 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/khach-hang/index.vue'
),
name
:
Pages
.
customer
,
},
{
path
:
'danh-muc-xep-hang'
,
component
:
()
=>
import
(
'pages/xep-hang-khach-hang/index.vue'
),
name
:
Pages
.
customerRank
,
},
],
},
...
...
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