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
0ddb3867
Commit
0ddb3867
authored
May 06, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
32dc7933
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
330 additions
and
167 deletions
+330
-167
configurations.example.ts
src/assets/configurations.example.ts
+2
-0
type.ts
src/assets/type.ts
+37
-0
NewManagingUnits.ts
...ingunits/add-new-managingunits-dialog/NewManagingUnits.ts
+139
-73
NewAddArtist.ts
...anagingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
+20
-6
index.vue
...-new-managingunits-dialog/add-new-artist-dialog/index.vue
+23
-20
index.vue
...ents/managingunits/add-new-managingunits-dialog/index.vue
+2
-4
NewUpdateArtist.ts
...gunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
+1
-1
index.vue
...w-managingunits-dialog/update-new-artist-dialog/index.vue
+3
-3
UpdateNewManagingUnits.ts
...update-new-managingunits-dialog/UpdateNewManagingUnits.ts
+28
-12
index.vue
...-new-managingunits-dialog/add-new-artist-dialog/index.vue
+2
-2
index.vue
...s/managingunits/update-new-managingunits-dialog/index.vue
+2
-2
NewUpdateArtist.ts
...gunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
+1
-1
index.vue
...w-managingunits-dialog/update-new-artist-dialog/index.vue
+3
-3
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+66
-38
index.vue
src/pages/don-vi-chu-quan/index.vue
+1
-2
No files found.
src/assets/configurations.example.ts
View file @
0ddb3867
...
@@ -42,4 +42,6 @@ export enum API_PATHS {
...
@@ -42,4 +42,6 @@ export enum API_PATHS {
getDetailArtist
=
'/artist/detail'
,
getDetailArtist
=
'/artist/detail'
,
deleteManagingUnits
=
'/artistOwner/delete'
,
deleteManagingUnits
=
'/artistOwner/delete'
,
deleteArtist
=
'/artist/delete'
,
deleteArtist
=
'/artist/delete'
,
getArtistDicitionaryOptions
=
'artist/dictionary'
,
artistOwnerAdd
=
'artistOwner/add'
,
}
}
src/assets/type.ts
View file @
0ddb3867
...
@@ -159,3 +159,40 @@ export type ContractType = {
...
@@ -159,3 +159,40 @@ export type ContractType = {
artistFullName
:
string
;
artistFullName
:
string
;
field
:
string
;
field
:
string
;
};
};
export
type
ArtistDicitionary
=
{
id
:
number
;
name
:
string
;
qualification
:
string
;
artistLevel
:
string
;
field
:
number
;
};
export
type
ArtistOwnerAdd
=
{
code
:
string
|
undefined
,
name
:
string
|
undefined
,
representative
:
string
|
undefined
,
address
:
string
|
undefined
,
email
:
string
|
undefined
,
phoneNumber
:
string
|
undefined
,
status
:
number
,
fields
:
Array
<
[
{
id
:
number
,
name
:
string
,
status
:
number
,
numIndex
:
number
}
]
>
contracts
:
Array
<
[
{
contractFrom
:
string
,
contractTo
:
string
,
status
:
number
,
artistId
:
number
,
artistName
:
string
,
artistFullName
:
string
,
field
:
string
},
]
>
};
src/components/managingunits/add-new-managingunits-dialog/NewManagingUnits.ts
View file @
0ddb3867
import
{
defineComponent
,
Ref
,
ref
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
onMounted
,
watch
}
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'
;
import
AddNewArtistDialog
from
'components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue'
import
AddNewArtistDialog
from
'components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue'
;
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
;
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FieldType
,
ArtistDicitionary
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
AddNewArtistDialog
,
AddNewArtistDialog
,
UpdateNewArtistDialog
UpdateNewArtistDialog
,
},
},
props
:
{
props
:
{
showDialog
:
{
showDialog
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
managingUnitAddTableRows
:
{
type
:
Array
,
required
:
true
},
managingUnitAddTableColumns
:
{
type
:
Array
,
required
:
true
},
managingUnitAddTableColumns
:
{
type
:
Array
,
required
:
true
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
code
:
{
type
:
String
,
required
:
true
},
code
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
representative
:
{
type
:
String
,
required
:
true
},
representative
:
{
type
:
String
,
required
:
true
},
...
@@ -28,13 +32,25 @@ export default defineComponent({
...
@@ -28,13 +32,25 @@ export default defineComponent({
status
:
{
type
:
Boolean
,
required
:
true
},
status
:
{
type
:
Boolean
,
required
:
true
},
},
},
setup
()
{
setup
()
{
const
openAddArtistDialog
=
ref
(
false
)
const
managingUnitAddTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
addNewManagingUnitsArtist
=
()
=>
{
const
openAddArtistDialog
=
ref
(
false
);
//gọi api thêm mới
const
addNewManagingUnitsArtist
=
(
try
{
timeAddTo
:
string
,
}
catch
(
error
)
{}
timeAddForm
:
string
)
=>
{
console
.
log
(
nameAdd
.
value
);
managingUnitAddTableRows
.
value
.
push
({
contractFrom
:
timeAddForm
,
contractTo
:
timeAddTo
,
timeAdd
:
timeAddForm
+
' - '
+
timeAddTo
,
status
:
statusAdd
,
artistId
:
nameAdd
.
value
.
id
,
artistName
:
nameAdd
.
value
.
artistName
,
fullName
:
nameAdd
.
value
.
fullName
,
field
:
nameAdd
.
value
.
field
,
});
};
};
const
openUpdateArtistDialog
=
ref
(
false
)
const
openUpdateArtistDialog
=
ref
(
false
)
;
const
updateNewManagingUnitsArtist
=
()
=>
{
const
updateNewManagingUnitsArtist
=
()
=>
{
//gọi api cập nhật
//gọi api cập nhật
try
{
try
{
...
@@ -55,19 +71,19 @@ export default defineComponent({
...
@@ -55,19 +71,19 @@ export default defineComponent({
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireRepresentative'
),
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireRepresentative'
),
];
];
const
fieldsRules
=
[
const
fieldsRules
=
[
(
val
?:
number
)
=>
(
val
?:
number
)
=>
val
!==
undefined
||
val
!==
undefined
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireFields'
),
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireFields'
),
];
];
const
phoneNumberRules
=
[
const
phoneNumberRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.requirePhoneNumber'
),
i18n
.
global
.
t
(
'managingUnit.validateMessages.requirePhoneNumber'
),
(
val
:
string
)
=>
(
val
:
string
)
=>
isMobilePhone
(
val
)
||
isMobilePhone
(
val
)
||
i18n
.
global
.
t
(
'managingUnit.validateMessages.isPhone'
),
i18n
.
global
.
t
(
'managingUnit.validateMessages.isPhone'
),
];
];
const
emailRules
=
[
const
emailRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
...
@@ -81,62 +97,112 @@ export default defineComponent({
...
@@ -81,62 +97,112 @@ export default defineComponent({
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireAddress'
),
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireAddress'
),
];
];
const
nameAdd
:
Ref
<
number
|
undefined
>
=
ref
()
const
nameAdd
:
Ref
<
{
const
timeAddTo
:
Ref
<
string
|
undefined
>
=
ref
()
id
:
number
;
const
fieldsAdd
:
Ref
<
number
|
undefined
>
=
ref
();
name
:
string
;
const
statusAdd
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
fullName
:
string
;
const
timeAdd
:
Ref
<
string
|
undefined
>
=
ref
();
artistName
:
string
;
const
fieldsAddOptions
=
ref
([
field
:
string
;
{
id
:
1
,
text
:
'Giải trí'
},
}
>
=
ref
({
{
id
:
2
,
text
:
'Âm nhạc'
},
id
:
1
,
{
id
:
3
,
text
:
'Thể thao'
},
name
:
''
,
]);
fullName
:
''
,
const
nameAddOptions
=
ref
([
artistName
:
''
,
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
field
:
''
,
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
});
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
const
fieldsAdd
:
Ref
<
{
id
:
number
;
name
:
string
}
|
undefined
>
=
ref
();
]);
const
statusAdd
:
Ref
<
number
>
=
ref
(
1
);
const
nameUpdate
:
Ref
<
number
|
undefined
>
=
ref
()
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
timeUpdateTo
:
Ref
<
string
|
undefined
>
=
ref
()
const
nameAddOptions
:
Ref
<
ArtistDicitionary
[]
>
=
ref
([]);
const
nameUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
timeUpdateTo
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
3
,
text
:
'Thể thao'
},
]);
const
nameUpdateOptions
=
ref
([
const
nameUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
]);
]);
watch
(
()
=>
fieldsAdd
.
value
,
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
void
getArtistDicitionaryOptions
(
value
);
}
}
}
);
//gọi api lĩnh vực
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
FieldType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
fieldsAddOptions
.
value
=
response
.
data
.
data
;
}
};
//gọi api nghệ sỹ
const
getArtistDicitionaryOptions
=
async
(
data
:
{
id
:
number
;
name
:
string
;
})
=>
{
nameAddOptions
.
value
=
[];
nameAdd
.
value
=
{
id
:
1
,
name
:
''
,
fullName
:
''
,
artistName
:
''
,
field
:
''
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
getArtistDicitionaryOptions
,
method
:
'GET'
,
params
:
{
field
:
data
.
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistDicitionary
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
nameAddOptions
.
value
=
response
.
data
.
data
;
}
};
onMounted
(()
=>
{
void
getFieldOptions
();
});
return
{
return
{
nameUpdate
,
managingUnitAddTableRows
,
timeUpdateTo
,
getFieldOptions
,
statusUpdate
,
getArtistDicitionaryOptions
,
fields
Update
,
name
Update
,
timeUpdate
,
timeUpdateTo
,
nameUpdateOptions
,
statusUpdate
,
fieldsUpdateOptions
,
fieldsUpdate
,
openAddArtistDialog
,
timeUpdate
,
addNewManagingUnitsArtist
,
nameUpdateOptions
,
openUpdate
ArtistDialog
,
openAdd
ArtistDialog
,
update
NewManagingUnitsArtist
,
add
NewManagingUnitsArtist
,
codeRules
,
openUpdateArtistDialog
,
nameRules
,
updateNewManagingUnitsArtist
,
representativ
eRules
,
cod
eRules
,
address
Rules
,
name
Rules
,
phoneNumber
Rules
,
representative
Rules
,
email
Rules
,
address
Rules
,
fields
Rules
,
phoneNumber
Rules
,
nameAdd
,
emailRules
,
timeAddTo
,
fieldsRules
,
fields
Add
,
name
Add
,
time
Add
,
fields
Add
,
statusAdd
,
statusAdd
,
fieldsAddOptions
,
fieldsAddOptions
,
nameAddOptions
,
nameAddOptions
,
};
};
},
},
emits
:
[
emits
:
[
...
...
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
View file @
0ddb3867
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -11,11 +11,23 @@ export default defineComponent({
...
@@ -11,11 +11,23 @@ export default defineComponent({
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsAdd
:
{
type
:
Number
,
required
:
true
},
fieldsAdd
:
{
type
:
Number
,
required
:
true
},
nameAdd
:
{
type
:
Number
,
required
:
true
},
nameAdd
:
{
type
:
Number
,
required
:
true
},
timeAdd
:
{
type
:
String
,
required
:
true
},
statusAdd
:
{
type
:
Number
,
required
:
true
},
timeAddTo
:
{
type
:
String
,
required
:
true
},
statusAdd
:
{
type
:
Boolean
,
required
:
true
},
},
},
setup
()
{
setup
(
props
,
context
)
{
watch
(
()
=>
props
.
openAddArtistDialog
,
(
value
)
=>
{
if
(
!
value
)
{
context
.
emit
(
'update:nameAdd'
,
undefined
)
timeAddForm
.
value
=
''
timeAddTo
.
value
=
''
context
.
emit
(
'update:fieldsAdd'
,
undefined
)
context
.
emit
(
'update:statusAdd'
,
1
)
}
}
);
const
timeAddForm
:
Ref
<
string
|
undefined
>
=
ref
()
const
timeAddTo
:
Ref
<
string
|
undefined
>
=
ref
()
const
nameAddRules
=
[
const
nameAddRules
=
[
(
val
?:
number
)
=>
(
val
?:
number
)
=>
val
!==
undefined
||
val
!==
undefined
||
...
@@ -41,6 +53,8 @@ export default defineComponent({
...
@@ -41,6 +53,8 @@ export default defineComponent({
timeAddToRules
,
timeAddToRules
,
fieldsAddRules
,
fieldsAddRules
,
timeAddRules
,
timeAddRules
,
timeAddForm
,
timeAddTo
,
};
};
},
},
emits
:
[
emits
:
[
...
@@ -48,8 +62,8 @@ export default defineComponent({
...
@@ -48,8 +62,8 @@ export default defineComponent({
'click:CloseBtn'
,
'click:CloseBtn'
,
'update:nameAdd'
,
'update:nameAdd'
,
'update:timeAddTo'
,
'update:timeAddTo'
,
'update:fieldsAdd'
,
'update:timeAdd'
,
'update:timeAdd'
,
'update:fieldsAdd'
,
'update:statusAdd'
,
'update:statusAdd'
,
'addNewManagingUnitsArtist'
,
'addNewManagingUnitsArtist'
,
],
],
...
...
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue
View file @
0ddb3867
...
@@ -5,7 +5,13 @@
...
@@ -5,7 +5,13 @@
@
update:model-value=
"$emit('update:openAddArtistDialog', $event)"
@
update:model-value=
"$emit('update:openAddArtistDialog', $event)"
>
>
<q-card
style=
"min-width: 700px"
bordered
>
<q-card
style=
"min-width: 700px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNewManagingUnitsArtist')"
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('addNewManagingUnitsArtist', timeAddForm, timeAddTo);
$emit('click:CloseBtn');
"
>
<q-card-section>
<q-card-section>
<q-item>
<q-item>
<q-item-section>
<q-item-section>
...
@@ -26,20 +32,17 @@
...
@@ -26,20 +32,17 @@
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsAdd')"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsAdd')"
:options=
"fieldsAddOptions"
:options=
"fieldsAddOptions"
:rules=
"fieldsAddRules"
:rules=
"fieldsAddRules"
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
clearable
></q-select>
></q-select>
<q-input
<q-input
:model-value=
"timeAdd"
:model-value=
"timeAdd
Form
"
@
update:model-value=
"$emit('update:timeAdd', $event)"
@
update:model-value=
"$emit('update:timeAdd', $event)"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAdd')"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAdd')"
mask=
"date"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"timeAddRules"
:rules=
"timeAddRules"
...
@@ -51,7 +54,7 @@
...
@@ -51,7 +54,7 @@
transition-show=
"scale"
transition-show=
"scale"
transition-hide=
"scale"
transition-hide=
"scale"
>
>
<q-date
v-model=
"timeAdd"
>
<q-date
v-model=
"timeAdd
Form"
mask=
"DD/MM/YYYY
"
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
<q-btn
<q-btn
v-close-popup
v-close-popup
...
@@ -64,6 +67,17 @@
...
@@ -64,6 +67,17 @@
</q-popup-proxy>
</q-popup-proxy>
</q-icon>
</
template
</q-icon>
</
template
></q-input>
></q-input>
<div>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusAdd"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:statusAdd', $event)"
/>
</div>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<div>
<div>
...
@@ -75,10 +89,9 @@
...
@@ -75,10 +89,9 @@
:options=
"nameAddOptions"
:options=
"nameAddOptions"
:rules=
"nameAddRules"
:rules=
"nameAddRules"
hide-bottom-space
hide-bottom-space
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
fullName
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
clearable
clearable
...
@@ -92,7 +105,6 @@
...
@@ -92,7 +105,6 @@
@
update:model-value=
"$emit('update:timeAddTo', $event)"
@
update:model-value=
"$emit('update:timeAddTo', $event)"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAddTo')"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAddTo')"
class=
"q-my-sm"
class=
"q-my-sm"
mask=
"date"
outlined
outlined
:rules=
"timeAddToRules"
:rules=
"timeAddToRules"
readonly
readonly
...
@@ -103,7 +115,7 @@
...
@@ -103,7 +115,7 @@
transition-show=
"scale"
transition-show=
"scale"
transition-hide=
"scale"
transition-hide=
"scale"
>
>
<q-date
v-model=
"timeAddTo"
>
<q-date
v-model=
"timeAddTo"
mask=
"DD/MM/YYYY"
>
<div
class=
"row items-center justify-end"
>
<div
class=
"row items-center justify-end"
>
<q-btn
<q-btn
v-close-popup
v-close-popup
...
@@ -117,15 +129,6 @@
...
@@ -117,15 +129,6 @@
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
<div
class=
"q-pt-sm q-pl-sm"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusAdd"
@
update:model-value=
"$emit('update:statusAdd', $event)"
/>
</div>
</div>
</div>
</div>
</div>
</q-card-section>
</q-card-section>
...
...
src/components/managingunits/add-new-managingunits-dialog/index.vue
View file @
0ddb3867
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
@@ -139,9 +139,7 @@
...
@@ -139,9 +139,7 @@
<AddNewArtistDialog
<AddNewArtistDialog
v-model:open-add-artist-dialog=
"openAddArtistDialog"
v-model:open-add-artist-dialog=
"openAddArtistDialog"
v-model:name-add=
"nameAdd"
v-model:name-add=
"nameAdd"
v-model:time-add-to=
"timeAddTo"
v-model:fields-add=
"fieldsAdd"
v-model:fields-add=
"fieldsAdd"
v-model:time-add=
"timeAdd"
v-model:status-add=
"statusAdd"
v-model:status-add=
"statusAdd"
:fields-add-options=
"fieldsAddOptions"
:fields-add-options=
"fieldsAddOptions"
:name-add-options=
"nameAddOptions"
:name-add-options=
"nameAddOptions"
...
@@ -156,7 +154,7 @@
...
@@ -156,7 +154,7 @@
v-model:fields-update=
"fieldsUpdate"
v-model:fields-update=
"fieldsUpdate"
v-model:time-update=
"timeUpdate"
v-model:time-update=
"timeUpdate"
v-model:status-update=
"statusUpdate"
v-model:status-update=
"statusUpdate"
:fields-
update-options=
"fieldsUpdate
Options"
:fields-
add-options=
"fieldsAdd
Options"
:name-update-options=
"nameUpdateOptions"
:name-update-options=
"nameUpdateOptions"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
View file @
0ddb3867
...
@@ -9,7 +9,7 @@ export default defineComponent({
...
@@ -9,7 +9,7 @@ export default defineComponent({
},
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
fields
Update
Options
:
{
type
:
Array
,
required
:
true
},
fields
Add
Options
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
timeUpdateTo
:
{
type
:
String
,
required
:
true
},
timeUpdateTo
:
{
type
:
String
,
required
:
true
},
timeUpdate
:
{
type
:
String
,
required
:
true
},
timeUpdate
:
{
type
:
String
,
required
:
true
},
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/index.vue
View file @
0ddb3867
...
@@ -26,12 +26,12 @@
...
@@ -26,12 +26,12 @@
:label=
"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
"
"
:options=
"fields
Update
Options"
:options=
"fields
Add
Options"
:rules=
"fieldsUpdateRules"
:rules=
"fieldsUpdateRules"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
<div
class=
"q-p
t-sm q-p
r-sm"
>
<div
class=
"q-pr-sm"
>
<span
class=
"text-body1"
>
{{
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
}}
</span
...
...
src/components/managingunits/update-new-managingunits-dialog/UpdateNewManagingUnits.ts
View file @
0ddb3867
import
{
defineComponent
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
ref
,
Ref
,
onMounted
}
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'
;
import
NewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/add-new-artist-dialog/index.vue'
import
NewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/add-new-artist-dialog/index.vue'
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FieldType
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
...
@@ -85,11 +93,7 @@ export default defineComponent({
...
@@ -85,11 +93,7 @@ export default defineComponent({
const
fieldsAdd
:
Ref
<
number
|
undefined
>
=
ref
();
const
fieldsAdd
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusAdd
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
statusAdd
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeAdd
:
Ref
<
string
|
undefined
>
=
ref
();
const
timeAdd
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsAddOptions
=
ref
([
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
nameAddOptions
=
ref
([
const
nameAddOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
...
@@ -101,23 +105,35 @@ export default defineComponent({
...
@@ -101,23 +105,35 @@ export default defineComponent({
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
nameUpdateOptions
=
ref
([
const
nameUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
]);
]);
//gọi api lĩnh vực
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
FieldType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
fieldsAddOptions
.
value
=
response
.
data
.
data
;
}
};
onMounted
(()
=>
{
void
getFieldOptions
();
});
return
{
return
{
getFieldOptions
,
nameUpdate
,
nameUpdate
,
timeUpdateTo
,
timeUpdateTo
,
fieldsUpdate
,
fieldsUpdate
,
statusUpdate
,
statusUpdate
,
timeUpdate
,
timeUpdate
,
fieldsUpdateOptions
,
nameUpdateOptions
,
nameUpdateOptions
,
openUpdateArtistDialog
,
openUpdateArtistDialog
,
updateUpdateNewManagingUnitsArtist
,
updateUpdateNewManagingUnitsArtist
,
...
...
src/components/managingunits/update-new-managingunits-dialog/add-new-artist-dialog/index.vue
View file @
0ddb3867
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
</q-icon>
</q-icon>
</
template
>
</
template
>
</q-input>
</q-input>
<div
style=
"padding-left: 8px
"
>
<div
class=
"q-pr-sm
"
>
<span
class=
"text-body1"
>
{{
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
}}
</span
...
...
src/components/managingunits/update-new-managingunits-dialog/index.vue
View file @
0ddb3867
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
v-model:fields-update=
"fieldsUpdate"
v-model:fields-update=
"fieldsUpdate"
v-model:time-update=
"timeUpdate"
v-model:time-update=
"timeUpdate"
v-model:status-update=
"statusUpdate"
v-model:status-update=
"statusUpdate"
:fields-
update-options=
"fieldsUpdate
Options"
:fields-
add-options=
"fieldsAdd
Options"
:name-update-options=
"nameUpdateOptions"
:name-update-options=
"nameUpdateOptions"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
...
...
src/components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
View file @
0ddb3867
...
@@ -7,7 +7,7 @@ export default defineComponent({
...
@@ -7,7 +7,7 @@ export default defineComponent({
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
fields
Update
Options
:
{
type
:
Array
,
required
:
true
},
fields
Add
Options
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
...
...
src/components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue
View file @
0ddb3867
...
@@ -29,12 +29,12 @@
...
@@ -29,12 +29,12 @@
:label=
"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
"
"
:options=
"fields
Update
Options"
:options=
"fields
Add
Options"
:rules=
"fieldsUpdateRules"
:rules=
"fieldsUpdateRules"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
</q-popup-proxy>
</q-popup-proxy>
</q-icon>
</
template
</q-icon>
</
template
></q-input>
></q-input>
<div
style=
"padding-left: 8px
"
>
<div
class=
"q-pr-sm
"
>
<span
class=
"text-body1"
>
{{
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
}}
</span
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
0ddb3867
...
@@ -8,6 +8,8 @@ import { api, BaseResponseBody } from 'src/boot/axios';
...
@@ -8,6 +8,8 @@ import { api, BaseResponseBody } from 'src/boot/axios';
import
{
import
{
PaginationResponse
,
PaginationResponse
,
ArtistOwner
,
ArtistOwner
,
FieldType
,
ArtistOwnerAdd
,
}
from
'src/assets/type'
;
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
import
{
config
}
from
'src/assets/configurations'
;
import
AddNewManagingUnitsDialogComponent
from
'../../components/managingunits/add-new-managingunits-dialog/index.vue'
;
import
AddNewManagingUnitsDialogComponent
from
'../../components/managingunits/add-new-managingunits-dialog/index.vue'
;
...
@@ -17,10 +19,9 @@ export default defineComponent({
...
@@ -17,10 +19,9 @@ export default defineComponent({
components
:
{
components
:
{
Pagination
,
Pagination
,
AddNewManagingUnitsDialogComponent
,
AddNewManagingUnitsDialogComponent
,
UpdateNewManagingUnitsDialogComponent
UpdateNewManagingUnitsDialogComponent
,
},
},
setup
()
{
setup
()
{
//DS đơn vị chủ quản
//DS đơn vị chủ quản
const
managingUnitTableColumns
=
[
const
managingUnitTableColumns
=
[
// {
// {
...
@@ -107,17 +108,17 @@ export default defineComponent({
...
@@ -107,17 +108,17 @@ export default defineComponent({
//Add nghệ sỹ
//Add nghệ sỹ
const
managingUnitAddTableColumns
=
[
const
managingUnitAddTableColumns
=
[
{
//
{
name
:
'sttAdd'
,
//
name: 'sttAdd',
field
:
'sttAdd'
,
//
field: 'sttAdd',
required
:
true
,
//
required: true,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.sttAdd'
),
//
label: i18n.global.t('managingUnitAdd.tableColumns.sttAdd'),
align
:
'center'
,
//
align: 'center',
sortable
:
false
,
//
sortable: false,
},
//
},
{
{
name
:
'nameAdd'
,
name
:
'nameAdd'
,
field
:
'
nameAdd
'
,
field
:
'
fullName
'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.nameAdd'
),
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.nameAdd'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
...
@@ -126,7 +127,7 @@ export default defineComponent({
...
@@ -126,7 +127,7 @@ export default defineComponent({
},
},
{
{
name
:
'myedityAdd'
,
name
:
'myedityAdd'
,
field
:
'
myedityAdd
'
,
field
:
'
artistName
'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.myedityAdd'
),
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.myedityAdd'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
...
@@ -135,7 +136,7 @@ export default defineComponent({
...
@@ -135,7 +136,7 @@ export default defineComponent({
},
},
{
{
name
:
'fieldsAdd'
,
name
:
'fieldsAdd'
,
field
:
'field
sAdd
'
,
field
:
'field'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.fieldsAdd'
),
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.fieldsAdd'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
...
@@ -173,14 +174,14 @@ export default defineComponent({
...
@@ -173,14 +174,14 @@ export default defineComponent({
//Update nghệ sỹ
//Update nghệ sỹ
const
managingUnitUpdateTableColumns
=
[
const
managingUnitUpdateTableColumns
=
[
{
//
{
name
:
'sttAdd'
,
//
name: 'sttAdd',
field
:
'sttAdd'
,
//
field: 'sttAdd',
required
:
true
,
//
required: true,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.sttAdd'
),
//
label: i18n.global.t('managingUnitAdd.tableColumns.sttAdd'),
align
:
'center'
,
//
align: 'center',
sortable
:
false
,
//
sortable: false,
},
//
},
{
{
name
:
'nameAdd'
,
name
:
'nameAdd'
,
field
:
'nameAdd'
,
field
:
'nameAdd'
,
...
@@ -238,7 +239,6 @@ export default defineComponent({
...
@@ -238,7 +239,6 @@ export default defineComponent({
];
];
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitAddTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitUpdateTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitUpdateTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
getListAddUnit
=
()
=>
{
const
getListAddUnit
=
()
=>
{
// const response = (await api({
// const response = (await api({
...
@@ -299,14 +299,10 @@ export default defineComponent({
...
@@ -299,14 +299,10 @@ export default defineComponent({
const
pageIndex
=
ref
(
1
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
pageSize
=
ref
(
20
);
const
unitNameKeyword
=
ref
(
''
);
const
unitNameKeyword
=
ref
(
''
);
const
fieldsOptions
=
ref
([
const
fieldsOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
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
=
async
()
=>
{
const
getListUnits
=
async
()
=>
{
try
{
try
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListUnits
,
url
:
API_PATHS
.
getListUnits
,
...
@@ -315,9 +311,7 @@ export default defineComponent({
...
@@ -315,9 +311,7 @@ export default defineComponent({
pageIndex
:
pageIndex
.
value
,
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
pageSize
:
pageSize
.
value
,
},
},
}))
as
AxiosResponse
<
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ArtistOwner
>>>
;
BaseResponseBody
<
PaginationResponse
<
ArtistOwner
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
managingUnitTableRows
.
value
=
response
.
data
.
data
.
data
;
managingUnitTableRows
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
...
@@ -370,7 +364,9 @@ export default defineComponent({
...
@@ -370,7 +364,9 @@ export default defineComponent({
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
Notify
.
create
({
type
:
'positive'
,
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'managingUnit.actionMessages.deleteManagingUnitsAccess'
),
message
:
i18n
.
global
.
t
(
'managingUnit.actionMessages.deleteManagingUnitsAccess'
),
});
});
void
getListUnits
();
void
getListUnits
();
}
}
...
@@ -389,12 +385,31 @@ export default defineComponent({
...
@@ -389,12 +385,31 @@ export default defineComponent({
phoneNumber
.
value
=
''
;
phoneNumber
.
value
=
''
;
};
};
const
addNewManagingUnits
=
()
=>
{
const
addNewManagingUnits
=
async
()
=>
{
//gọi api thêm mới
try
{
try
{
const
data
:
ArtistOwnerAdd
=
{
code
:
code
.
value
,
name
:
name
.
value
,
representative
:
representative
.
value
,
address
:
address
.
value
,
email
:
''
,
phoneNumber
:
''
,
status
:
1
,
fields
:
[],
contracts
:
[],
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
artistOwnerAdd
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistOwnerAdd
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
}
try
{
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
confirmUpdateManagingUnits
=
(
id
:
number
)
=>
{
const
confirmUpdateManagingUnits
=
(
id
:
number
)
=>
{
showDialogUpdate
.
value
=
true
;
showDialogUpdate
.
value
=
true
;
console
.
log
(
id
,
'iddd'
);
console
.
log
(
id
,
'iddd'
);
...
@@ -403,7 +418,7 @@ export default defineComponent({
...
@@ -403,7 +418,7 @@ export default defineComponent({
//Bấm nút lưu ở dialog update thì gọi api cập nhật trong hàm updateCustomer
//Bấm nút lưu ở dialog update thì gọi api cập nhật trong hàm updateCustomer
// const updateCustomer = () => {
// const updateCustomer = () => {
//gọi api update
//gọi api update
// try {
// try {
// } catch (error) {}
// } catch (error) {}
// };
// };
...
@@ -419,12 +434,24 @@ export default defineComponent({
...
@@ -419,12 +434,24 @@ export default defineComponent({
// }))
// }))
// gọi api lấy chi tiết sau đấy gán giá trị api trả về gán cho các biến userName customerName businessName taxCode...
// gọi api lấy chi tiết sau đấy gán giá trị api trả về gán cho các biến userName customerName businessName taxCode...
// const fakeDataDetail = {
// const fakeDataDetail = {
// userName: 'Sơn Tùng',
// userName: 'Sơn Tùng',
// };
// };
// userName.value = fakeDataDetail.userName;
// userName.value = fakeDataDetail.userName;
// Tương tự các biến còn lại
// Tương tự các biến còn lại
};
};
//gọi api lĩnh vực
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
FieldType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
fieldsOptions
.
value
=
response
.
data
.
data
;
}
};
const
updateNewManagingUnits
=
()
=>
{
const
updateNewManagingUnits
=
()
=>
{
//gọi api update
//gọi api update
try
{
try
{
...
@@ -435,8 +462,10 @@ export default defineComponent({
...
@@ -435,8 +462,10 @@ export default defineComponent({
void
getListUnits
();
void
getListUnits
();
void
getListAddUnit
();
void
getListAddUnit
();
void
getListUpdateUnit
();
void
getListUpdateUnit
();
void
getFieldOptions
();
});
});
return
{
return
{
getFieldOptions
,
getListUpdateUnit
,
getListUpdateUnit
,
showDialogUpdate
,
showDialogUpdate
,
managingUnitUpdateTableRows
,
managingUnitUpdateTableRows
,
...
@@ -461,7 +490,6 @@ export default defineComponent({
...
@@ -461,7 +490,6 @@ export default defineComponent({
managingUnitTableColumns
,
managingUnitTableColumns
,
managingUnitTableRows
,
managingUnitTableRows
,
managingUnitAddTableColumns
,
managingUnitAddTableColumns
,
managingUnitAddTableRows
,
getListUnits
,
getListUnits
,
pageIndex
,
pageIndex
,
pageSize
,
pageSize
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
0ddb3867
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
v-model=
"fieldSelected"
v-model=
"fieldSelected"
:options=
"fieldsOptions"
:options=
"fieldsOptions"
label=
"Lĩnh vực"
label=
"Lĩnh vực"
option-label=
"
text
"
option-label=
"
name
"
option-value=
"id"
option-value=
"id"
dense
dense
outlined
outlined
...
@@ -123,7 +123,6 @@
...
@@ -123,7 +123,6 @@
v-model:phone-number=
"phoneNumber"
v-model:phone-number=
"phoneNumber"
v-model:status=
"status"
v-model:status=
"status"
v-model:fields=
"fields"
v-model:fields=
"fields"
v-model:managing-unit-add-table-rows=
"managingUnitAddTableRows"
v-model:managing-unit-add-table-columns=
"managingUnitAddTableColumns"
v-model:managing-unit-add-table-columns=
"managingUnitAddTableColumns"
:fields-options=
"fieldsOptions"
:fields-options=
"fieldsOptions"
@
click:CloseBtn=
"showDialog = false"
@
click:CloseBtn=
"showDialog = false"
...
...
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