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
eec5c80a
Commit
eec5c80a
authored
May 10, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7e6a2497
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
315 additions
and
276 deletions
+315
-276
configurations.example.ts
src/assets/configurations.example.ts
+5
-0
enums.ts
src/assets/enums.ts
+1
-1
type.ts
src/assets/type.ts
+34
-0
index.vue
src/components/add-update-customer-rank/index.vue
+35
-77
index.ts
src/i18n/vi/index.ts
+19
-24
index.vue
src/pages/don-vi-chu-quan/index.vue
+2
-2
index.vue
src/pages/xep-hang-khach-hang/index.vue
+217
-170
routes.ts
src/router/routes.ts
+2
-2
No files found.
src/assets/configurations.example.ts
View file @
eec5c80a
...
...
@@ -55,4 +55,9 @@ export enum API_PATHS {
listCustomerLevel
=
'customerLevel'
,
addCustomer
=
'customer/add'
,
deleteCustomer
=
'customer/delete'
,
getListCustomersRank
=
'customerLevel'
,
deleteCustomerRank
=
'customerLevel/delete'
,
addCustomerRank
=
'customerLevel/add'
,
updateCustomerRank
=
'customerLevel/update'
,
getDetailCustomerRank
=
'customerLevel/detail'
,
}
src/assets/enums.ts
View file @
eec5c80a
...
...
@@ -16,5 +16,5 @@ export enum HotProductStatus {
export
enum
CustomerRankStatus
{
active
=
1
,
inactive
=
2
,
inactive
=
0
,
}
src/assets/type.ts
View file @
eec5c80a
...
...
@@ -251,3 +251,37 @@ export type CustomerLevelType = {
level
:
number
;
status
:
number
;
};
export
type
CustomerRank
=
{
id
:
number
;
code
:
string
;
name
:
string
;
description
:
string
;
level
:
number
;
status
:
number
;
};
export
type
AddCustomerRank
=
{
name
:
string
;
description
:
string
;
level
:
number
;
status
:
number
;
};
export
type
UpdateCustomerRank
=
{
id
:
number
;
code
:
string
;
name
:
string
;
description
:
string
;
level
:
number
;
status
:
number
;
};
export
type
DetailCustomerRank
=
{
id
:
number
;
code
:
string
;
name
:
string
;
description
:
string
;
level
:
number
;
status
:
number
;
};
src/components/add-update-customer-rank/index.vue
View file @
eec5c80a
...
...
@@ -4,7 +4,7 @@
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
<q-card
class=
"full-width"
style=
"max-width:
5
0rem"
bordered
>
<q-card
class=
"full-width"
style=
"max-width:
3
0rem"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"
...
...
@@ -30,70 +30,45 @@
style=
"max-height: calc(100vh - 10rem)"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-
6
"
>
<div
class=
"col-
12
"
>
<q-input
:model-value=
"
rankC
ode"
@
update:model-value=
"$emit('update:
rankC
ode', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.
rankC
ode')"
:model-value=
"
c
ode"
@
update:model-value=
"$emit('update:
c
ode', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.
c
ode')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"
rankC
odeRules"
:rules=
"
c
odeRules"
clearable
></q-input>
<q-input
:model-value=
"
rankN
ame"
@
update:model-value=
"$emit('update:
rankN
ame', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.
rankN
ame')"
:model-value=
"
n
ame"
@
update:model-value=
"$emit('update:
n
ame', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.
n
ame')"
type=
"text"
class=
"q-my-sm"
outlined
:rules=
"
rankN
ameRules"
:rules=
"
n
ameRules"
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"
:model-value=
"level"
@
update:model-value=
"$emit('update:level', $event)"
:label=
"$t('customerRank.dialogLabel.fieldLabels.level')"
:rules=
"levelRules"
type=
"number"
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.
rankS
tatus'
)
$t
(
'customerRank.dialogLabel.fieldLabels.
s
tatus'
)
}}
</span
><q-toggle
:model-value=
"
rankS
tatus"
:model-value=
"
s
tatus"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:
rankS
tatus', $event)"
@
update:model-value=
"$emit('update:
s
tatus', $event)"
/>
</div>
</div>
...
...
@@ -134,56 +109,39 @@ export default defineComponent({
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
},
code
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
level
:
{
type
:
Number
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
},
setup
()
{
const
rankType
Rules
=
[
const
level
Rules
=
[
(
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'
),
i18n
.
global
.
t
(
'customerRank.validateMessages.requireLevel'
),
];
const
discount
Rules
=
[
const
code
Rules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.require
Discount
'
),
i18n
.
global
.
t
(
'customerRank.validateMessages.require
Code
'
),
];
const
discountCod
eRules
=
[
const
nam
eRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customerRank.validateMessages.require
DiscountCod
e'
),
i18n
.
global
.
t
(
'customerRank.validateMessages.require
Nam
e'
),
];
return
{
rankTypeRules
,
rankCodeRules
,
rankNameRules
,
discountRules
,
discountCodeRules
,
levelRules
,
codeRules
,
nameRules
,
};
},
emits
:
[
'update:isOpened'
,
'update:rankCode'
,
'update:rankName'
,
'update:rankType'
,
'update:discount'
,
'update:discountCode'
,
'update:rankStatus'
,
'update:code'
,
'update:name'
,
'update:level'
,
'update:status'
,
'saveCustomerRankInfo'
,
],
});
...
...
src/i18n/vi/index.ts
View file @
eec5c80a
...
...
@@ -517,15 +517,13 @@ export default {
//xếp hạng khách hàng
customerRank
:
{
title
:
'
Xếp hạ
ng'
,
title
:
'
Danh mục xếp hạng khách 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'
,
code
:
'Mã xếp hạng'
,
name
:
'Tên xếp hạng'
,
level
:
'Loại xếp hạng'
,
status
:
'Trạng thái'
,
action
:
'Chức năng'
,
},
statusLabel
:
{
...
...
@@ -534,16 +532,14 @@ export default {
},
dialogLabel
:
{
title
:
{
addCustomerRank
:
'Thêm
xếp hạ
ng'
,
updateCustomerRank
:
'Cập nhật
xếp hạ
ng'
,
addCustomerRank
:
'Thêm
danh mục xếp hạng khách hà
ng'
,
updateCustomerRank
:
'Cập nhật
danh mục xếp hạng khách 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'
,
code
:
'Mã xếp hạng *'
,
name
:
'Tên xếp hạng *'
,
level
:
'Loại xếp hạng *'
,
status
:
'Trạng thái'
,
},
},
toolTipMessage
:
{
...
...
@@ -555,22 +551,21 @@ export default {
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'
,
requireCode
:
'Vui lòng nhập Mã xếp hạng'
,
requireName
:
'Vui lòng nhập Tên xếp hạng'
,
requireLevel
:
'Vui lòng nhập Loại xếp hạng'
,
},
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?'
,
'Bạn có chắc
chắn muốn xoá danh mục xếp hạng khách 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'
,
addNewCustomerRankAccess
:
'Thêm danh mục xếp hạng khách hàng thành công'
,
deleteCustomerRankAccess
:
'Xoá danh mục xếp hạng khách hàng thành công'
,
updateCustomerRankAccess
:
'Cập nhật danh mục xếp hạng khách hàng thành công'
,
},
},
};
src/pages/don-vi-chu-quan/index.vue
View file @
eec5c80a
...
...
@@ -9,7 +9,7 @@
<q-input
dense
outlined
:label=
"$t('managingUnit.tableColumns.name')
"
label=
"Tên đơn vị
"
v-model=
"unitNameKeyword"
clearable
></q-input>
...
...
@@ -73,7 +73,7 @@
flat
round
color=
"primary"
icon=
"mdi-delete"
icon=
"mdi-delete
-outline
"
@
click=
"confirmDeleteManagingUnits(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
...
...
src/pages/xep-hang-khach-hang/index.vue
View file @
eec5c80a
This diff is collapsed.
Click to expand it.
src/router/routes.ts
View file @
eec5c80a
...
...
@@ -10,7 +10,7 @@ export enum Pages {
informationArtist
=
'cap-nhat-thong-tin-nghe-sy'
,
customer
=
'khach-hang'
,
addArtist
=
'them-nghe-sy'
,
customerRank
=
'
danh-muc-xep
-hang'
,
customerRank
=
'
xep-hang-khach
-hang'
,
}
const
routes
:
RouteRecordRaw
[]
=
[
...
...
@@ -64,7 +64,7 @@ const routes: RouteRecordRaw[] = [
name
:
Pages
.
customer
,
},
{
path
:
'
danh-muc-xep
-hang'
,
path
:
'
xep-hang-khach
-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