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
cc2da438
Commit
cc2da438
authored
May 20, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug acount-bank in artist page
parent
ed8733bc
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
93 additions
and
59 deletions
+93
-59
BankAccount.ts
...components/artist-information/bank-account/BankAccount.ts
+26
-39
AddAccountBankDialog.ts
...count/add-new-bank-account-dialog/AddAccountBankDialog.ts
+12
-0
index.vue
...mation/bank-account/add-new-bank-account-dialog/index.vue
+8
-0
EditBankAcc.ts
...information/bank-account/edit-bank-account/EditBankAcc.ts
+26
-12
index.vue
...tist-information/bank-account/edit-bank-account/index.vue
+9
-1
index.vue
src/components/artist-information/bank-account/index.vue
+3
-2
HotProduct.ts
src/components/artist-information/hot-product/HotProduct.ts
+1
-1
index.vue
src/components/customer/add-new-customer-dialog/index.vue
+3
-2
AddNewUserDialog.ts
...s/user-management/add-new-user-dialog/AddNewUserDialog.ts
+1
-1
index.ts
src/i18n/vi/index.ts
+3
-0
User.ts
src/pages/nguoi-dung/User.ts
+1
-1
No files found.
src/components/artist-information/bank-account/BankAccount.ts
View file @
cc2da438
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
PropType
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
AddNewBankAccountDialog
from
'components/artist-information/bank-account/add-new-bank-account-dialog/index.vue'
;
import
AddNewBankAccountDialog
from
'components/artist-information/bank-account/add-new-bank-account-dialog/index.vue'
;
import
{
BankAccountType
}
from
'src/assets/type'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
Pagination
,
AddNewBankAccountDialog
,
AddNewBankAccountDialog
,
},
},
props
:
{
props
:
{
bankAccounts
:
{
type
:
Array
,
required
:
true
},
bankAccounts
:
{
type
:
Array
as
PropType
<
BankAccountType
[]
>
,
required
:
true
,
},
},
},
setup
()
{
setup
(
props
)
{
const
userTableColumnsBankAccount
=
[
const
userTableColumnsBankAccount
=
[
{
{
name
:
'STT'
,
name
:
'STT'
,
...
@@ -19,6 +21,16 @@ export default defineComponent({
...
@@ -19,6 +21,16 @@ export default defineComponent({
align
:
'center'
,
align
:
'center'
,
sortable
:
false
,
sortable
:
false
,
},
},
{
name
:
'accountOwner'
,
field
:
'accountOwner'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.bankAccount.tableColumnsBank.accountOwner'
),
align
:
'center'
,
sortable
:
false
,
},
{
{
name
:
'accountNumber'
,
name
:
'accountNumber'
,
field
:
'accountNumber'
,
field
:
'accountNumber'
,
...
@@ -68,48 +80,23 @@ export default defineComponent({
...
@@ -68,48 +80,23 @@ export default defineComponent({
sortable
:
false
,
sortable
:
false
,
},
},
];
];
const
userTableRowsBankAccount
:
Ref
<
unknown
[]
>
=
ref
([]);
const
userTableRowsBankAccount
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
10
);
const
isOpenDialog
=
ref
(
false
);
const
isOpenDialog
=
ref
(
false
);
const
getListBankAccount
=
()
=>
{
const
dataBankAccount
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
// const response = (await api({
const
showData
=
(
info
:
BankAccountType
,
idxAcc
:
number
)
=>
{
// url: API_PATHS.getListArtist,
console
.
log
(
info
,
'showData'
);
// method: 'GET',
console
.
log
(
idxAcc
,
'showData'
);
// params: {
// pageIndex: pageIndex.value,
// pageSize: pageSize.value,
// },
// })) as AxiosResponse<BaseResponseBody<unknown>>;
const
fakeData
:
unknown
[]
=
[
{
idCard
:
91239381
,
numberCard
:
'123213123'
,
bankName
:
'TP Bank'
,
cardType
:
'Visa'
,
default
:
true
,
},
];
userTableRowsBankAccount
.
value
=
fakeData
;
};
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListBankAccount
();
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
void
getListBankAccount
();
console
.
log
(
props
.
bankAccounts
,
'bankAccount'
);
dataBankAccount
.
value
=
props
.
bankAccounts
;
});
});
return
{
return
{
isOpenDialog
,
isOpenDialog
,
userTableColumnsBankAccount
,
userTableColumnsBankAccount
,
userTableRowsBankAccount
,
userTableRowsBankAccount
,
pageIndex
,
dataBankAccount
,
pageSize
,
showData
,
totalPage
,
getListBankAccount
,
changePageSize
,
};
};
},
},
emits
:
[
'click:addBankBtn'
,
'confirmDeleteAccBank'
,
'clickEditAccBankBtn'
],
emits
:
[
'click:addBankBtn'
,
'confirmDeleteAccBank'
,
'clickEditAccBankBtn'
],
...
...
src/components/artist-information/bank-account/add-new-bank-account-dialog/AddAccountBankDialog.ts
View file @
cc2da438
...
@@ -28,6 +28,7 @@ export default defineComponent({
...
@@ -28,6 +28,7 @@ export default defineComponent({
()
=>
props
.
isOpenAddAccountBankDialog
,
()
=>
props
.
isOpenAddAccountBankDialog
,
(
value
)
=>
{
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
accountOwner
.
value
=
null
;
accountNumber
.
value
=
''
;
accountNumber
.
value
=
''
;
cardNumber
.
value
=
''
;
cardNumber
.
value
=
''
;
bank
.
value
=
null
;
bank
.
value
=
null
;
...
@@ -36,6 +37,13 @@ export default defineComponent({
...
@@ -36,6 +37,13 @@ export default defineComponent({
}
}
}
}
);
);
const
accountOwnerRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.dialogLabel.validateMessages.requireAccountOwner'
),
];
const
accountNumberRules
=
[
const
accountNumberRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -87,6 +95,7 @@ export default defineComponent({
...
@@ -87,6 +95,7 @@ export default defineComponent({
}
}
if
(
!
hasError
)
{
if
(
!
hasError
)
{
context
.
emit
(
'addNewBankAccount'
,
{
context
.
emit
(
'addNewBankAccount'
,
{
accountOwner
:
accountOwner
.
value
,
accountNumber
:
accountNumber
.
value
,
accountNumber
:
accountNumber
.
value
,
cardNumber
:
cardNumber
.
value
,
cardNumber
:
cardNumber
.
value
,
bank
:
bankFilter
,
bank
:
bankFilter
,
...
@@ -102,6 +111,7 @@ export default defineComponent({
...
@@ -102,6 +111,7 @@ export default defineComponent({
}
}
};
};
const
accountOwner
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
accountNumber
:
Ref
<
string
>
=
ref
(
''
);
const
accountNumber
:
Ref
<
string
>
=
ref
(
''
);
const
cardNumber
:
Ref
<
string
>
=
ref
(
''
);
const
cardNumber
:
Ref
<
string
>
=
ref
(
''
);
const
bank
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
bank
:
Ref
<
number
|
null
>
=
ref
(
null
);
...
@@ -110,8 +120,10 @@ export default defineComponent({
...
@@ -110,8 +120,10 @@ export default defineComponent({
return
{
return
{
defaultStatus
,
defaultStatus
,
accountOwnerRules
,
accountNumberRules
,
accountNumberRules
,
cardNumberRules
,
cardNumberRules
,
accountOwner
,
accountNumber
,
accountNumber
,
cardNumber
,
cardNumber
,
bank
,
bank
,
...
...
src/components/artist-information/bank-account/add-new-bank-account-dialog/index.vue
View file @
cc2da438
...
@@ -22,6 +22,14 @@
...
@@ -22,6 +22,14 @@
<q-card-section>
<q-card-section>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<q-input
v-model=
"accountOwner"
:label=
"$t('artist.dialogLabel.fieldLabels.accountOwner')"
:rules=
"accountOwnerRules"
hide-bottom-space
class=
"q-my-sm"
outlined
></q-input>
<q-input
<q-input
v-model=
"accountNumber"
v-model=
"accountNumber"
:label=
"$t('artist.dialogLabel.fieldLabels.accountNumber')"
:label=
"$t('artist.dialogLabel.fieldLabels.accountNumber')"
...
...
src/components/artist-information/bank-account/edit-bank-account/EditBankAcc.ts
View file @
cc2da438
...
@@ -37,6 +37,7 @@ export default defineComponent({
...
@@ -37,6 +37,7 @@ export default defineComponent({
()
=>
props
.
isOpenEditAccountBankDialog
,
()
=>
props
.
isOpenEditAccountBankDialog
,
(
value
)
=>
{
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
accountOwner
.
value
=
props
.
rowDataAccBank
.
accountOwner
;
accountNumber
.
value
=
props
.
rowDataAccBank
.
accountNumber
;
accountNumber
.
value
=
props
.
rowDataAccBank
.
accountNumber
;
cardNumber
.
value
=
props
.
rowDataAccBank
.
cardNumber
;
cardNumber
.
value
=
props
.
rowDataAccBank
.
cardNumber
;
bank
.
value
=
props
.
rowDataAccBank
.
bank
.
id
;
bank
.
value
=
props
.
rowDataAccBank
.
bank
.
id
;
...
@@ -46,6 +47,13 @@ export default defineComponent({
...
@@ -46,6 +47,13 @@ export default defineComponent({
}
}
}
}
);
);
const
accountOwnerRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.dialogLabel.validateMessages.requireAccountOwner'
),
];
const
accountNumberRules
=
[
const
accountNumberRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -83,21 +91,24 @@ export default defineComponent({
...
@@ -83,21 +91,24 @@ export default defineComponent({
}
}
});
});
let
hasError
=
false
;
let
hasError
=
false
;
if
(
for
(
let
index
=
0
;
index
<
props
.
bankAccounts
.
length
;
index
++
)
{
props
.
bankAccounts
.
filter
(
const
element
=
props
.
bankAccounts
[
index
];
(
item
)
=>
item
.
accountNumber
===
accountNumber
.
value
if
(
).
length
element
.
accountNumber
==
accountNumber
.
value
&&
)
{
index
!==
props
.
rowBankAccIdx
hasError
=
true
;
)
{
Notify
.
create
({
hasError
=
true
;
type
:
'negative'
,
Notify
.
create
({
message
:
i18n
.
global
.
t
(
type
:
'negative'
,
'artist.dialogLabel.validateMessages.accountNumberExits'
message
:
i18n
.
global
.
t
(
),
'artist.dialogLabel.validateMessages.accountNumberExits'
});
),
});
}
}
}
if
(
!
hasError
)
{
if
(
!
hasError
)
{
context
.
emit
(
'editBankAccount'
,
{
context
.
emit
(
'editBankAccount'
,
{
accountOwner
:
accountOwner
.
value
,
accountNumber
:
accountNumber
.
value
,
accountNumber
:
accountNumber
.
value
,
cardNumber
:
cardNumber
.
value
,
cardNumber
:
cardNumber
.
value
,
bank
:
bankFilter
,
bank
:
bankFilter
,
...
@@ -112,6 +123,7 @@ export default defineComponent({
...
@@ -112,6 +123,7 @@ export default defineComponent({
});
});
}
}
};
};
const
accountOwner
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
accountNumber
:
Ref
<
string
>
=
ref
(
''
);
const
accountNumber
:
Ref
<
string
>
=
ref
(
''
);
const
cardNumber
:
Ref
<
string
>
=
ref
(
''
);
const
cardNumber
:
Ref
<
string
>
=
ref
(
''
);
const
bank
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
bank
:
Ref
<
number
|
null
>
=
ref
(
null
);
...
@@ -120,10 +132,12 @@ export default defineComponent({
...
@@ -120,10 +132,12 @@ export default defineComponent({
return
{
return
{
defaultStatus
,
defaultStatus
,
accountOwnerRules
,
bankNameRules
,
bankNameRules
,
cardTypeRules
,
cardTypeRules
,
accountNumberRules
,
accountNumberRules
,
cardNumberRules
,
cardNumberRules
,
accountOwner
,
accountNumber
,
accountNumber
,
cardNumber
,
cardNumber
,
bank
,
bank
,
...
...
src/components/artist-information/bank-account/edit-bank-account/index.vue
View file @
cc2da438
...
@@ -22,12 +22,20 @@
...
@@ -22,12 +22,20 @@
<q-card-section>
<q-card-section>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<q-input
v-model=
"accountOwner"
:label=
"$t('artist.dialogLabel.fieldLabels.accountOwner')"
:rules=
"accountOwnerRules"
hide-bottom-space
class=
"q-my-sm"
outlined
></q-input>
<q-input
<q-input
v-model=
"accountNumber"
v-model=
"accountNumber"
:label=
"$t('artist.dialogLabel.fieldLabels.accountNumber')"
:label=
"$t('artist.dialogLabel.fieldLabels.accountNumber')"
:rules=
"accountNumberRules"
:rules=
"accountNumberRules"
hide-bottom-space
hide-bottom-space
type=
"
text
"
type=
"
number
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
></q-input>
></q-input>
...
...
src/components/artist-information/bank-account/index.vue
View file @
cc2da438
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</div>
</div>
<div
class=
"col-12 q-mt-sm"
>
<div
class=
"col-12 q-mt-sm"
>
<q-table
<q-table
:rows=
"
bankAccounts
"
:rows=
"
dataBankAccount
"
:columns=
"userTableColumnsBankAccount"
:columns=
"userTableColumnsBankAccount"
:no-data-label=
"$t('emptyData')"
:no-data-label=
"$t('emptyData')"
row-key=
"name"
row-key=
"name"
...
@@ -40,10 +40,11 @@
...
@@ -40,10 +40,11 @@
<
template
v-slot:body-cell-isDefault=
"rowData"
>
<
template
v-slot:body-cell-isDefault=
"rowData"
>
<q-td>
<q-td>
<div
align=
"center"
>
<div
align=
"center"
>
<!-- @click="showData(rowData.row, rowData.rowIndex)" -->
<q-checkbox
<q-checkbox
v-model=
"rowData.value"
:true-value=
"1"
:true-value=
"1"
:false-value=
"2"
:false-value=
"2"
v-model=
"rowData.value"
/>
/>
</div>
</div>
</q-td>
</q-td>
...
...
src/components/artist-information/hot-product/HotProduct.ts
View file @
cc2da438
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
Ref
,
ref
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
ProductType
}
from
'src/assets/type'
;
import
{
ProductType
}
from
'src/assets/type'
;
import
{
HotProductStatus
}
from
'src/assets/enums'
;
import
{
HotProductStatus
}
from
'src/assets/enums'
;
...
...
src/components/customer/add-new-customer-dialog/index.vue
View file @
cc2da438
...
@@ -142,12 +142,13 @@
...
@@ -142,12 +142,13 @@
<q-input
<q-input
v-model=
"phone"
v-model=
"phone"
:label=
"$t('customer.dialogLabel.fieldLabels.phone')"
:label=
"$t('customer.dialogLabel.fieldLabels.phone')"
class=
"q-my-sm"
type=
"number"
:rules=
"phoneRules"
:rules=
"phoneRules"
type=
"number"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
></q-input>
></q-input>
<div
style=
"padding-top: 13px; padding-left: 12px"
>
<div
style=
"padding-top: 13px; padding-left: 12px"
>
<span
class=
"text-body1"
>
{{
<span
class=
"text-body1"
>
{{
$t
(
'customer.dialogLabel.fieldLabels.status'
)
$t
(
'customer.dialogLabel.fieldLabels.status'
)
...
...
src/components/user-management/add-new-user-dialog/AddNewUserDialog.ts
View file @
cc2da438
import
{
defineComponent
,
PropType
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
PropType
,
ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
...
...
src/i18n/vi/index.ts
View file @
cc2da438
...
@@ -412,6 +412,7 @@ export default {
...
@@ -412,6 +412,7 @@ export default {
addHotProduct
:
'Thêm sản phẩm nổi bật'
,
addHotProduct
:
'Thêm sản phẩm nổi bật'
,
},
},
fieldLabels
:
{
fieldLabels
:
{
accountOwner
:
'Chủ tài khoản'
,
accountNumber
:
'Số tài khoản'
,
accountNumber
:
'Số tài khoản'
,
cardNumber
:
'Số ghi trên thẻ'
,
cardNumber
:
'Số ghi trên thẻ'
,
bankName
:
'Ngân hàng'
,
bankName
:
'Ngân hàng'
,
...
@@ -419,6 +420,7 @@ export default {
...
@@ -419,6 +420,7 @@ export default {
isDefault
:
'Mặc định'
,
isDefault
:
'Mặc định'
,
},
},
validateMessages
:
{
validateMessages
:
{
requireAccountOwner
:
'Vui lòng nhập Chủ tài khoản'
,
requireAccountNumber
:
'Vui lòng nhập Số tài khoản'
,
requireAccountNumber
:
'Vui lòng nhập Số tài khoản'
,
accountNumberExits
:
'Số tài khoản đã tồn tại'
,
accountNumberExits
:
'Số tài khoản đã tồn tại'
,
requireCardNumber
:
'Vui lòng nhập Số ghi trên thẻ'
,
requireCardNumber
:
'Vui lòng nhập Số ghi trên thẻ'
,
...
@@ -495,6 +497,7 @@ export default {
...
@@ -495,6 +497,7 @@ export default {
},
},
bankAccount
:
{
bankAccount
:
{
tableColumnsBank
:
{
tableColumnsBank
:
{
accountOwner
:
'Chủ tài khoản'
,
idCard
:
'Số tài khoản'
,
idCard
:
'Số tài khoản'
,
numberCard
:
'Số ghi trên thẻ'
,
numberCard
:
'Số ghi trên thẻ'
,
bankName
:
'Ngân hàng'
,
bankName
:
'Ngân hàng'
,
...
...
src/pages/nguoi-dung/User.ts
View file @
cc2da438
...
@@ -6,7 +6,7 @@ import { PaginationResponse, UserObject } from 'src/assets/type';
...
@@ -6,7 +6,7 @@ import { PaginationResponse, UserObject } from 'src/assets/type';
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
useStore
}
from
'../../store/index'
;
import
{
useStore
}
from
'../../store/index'
;
import
{
computed
,
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
AddNewUserDialogComponent
from
'../../components/user-management/add-new-user-dialog/index.vue'
;
import
AddNewUserDialogComponent
from
'../../components/user-management/add-new-user-dialog/index.vue'
;
import
UpdateUserDialogComponent
from
'../../components/user-management/update-user-dialog/index.vue'
;
import
UpdateUserDialogComponent
from
'../../components/user-management/update-user-dialog/index.vue'
;
import
{
GroupInfoType
}
from
'../nhom-nguoi-dung/UserGroup'
;
import
{
GroupInfoType
}
from
'../nhom-nguoi-dung/UserGroup'
;
...
...
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