Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
8425e838
Commit
8425e838
authored
Sep 25, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1:
parent
62a2bff0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
14 deletions
+30
-14
addNormalManagerModal.vue
src/components/UserManage/addNormalManagerModal.vue
+28
-14
index.ts
src/store/UserManagement/index.ts
+1
-0
types.ts
src/store/UserManagement/types.ts
+1
-0
No files found.
src/components/UserManage/addNormalManagerModal.vue
View file @
8425e838
...
...
@@ -76,6 +76,7 @@ import {
import
HeaderSelect
from
"@/components/HeaderSelect2/index.vue"
;
import
{
fooList
}
from
"@/components/HeaderSelect2/const"
;
import
StaffService
from
"@/service/StaffService"
;
import
AddressService
from
"@/service/AddressService"
;
Vue
.
use
(
Switch
);
...
...
@@ -287,16 +288,22 @@ export default Vue.extend({
(
this
.
$refs
.
addForm
as
FormModel
).
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
modalMode
===
eAddManagerModalMode
.
create
)
{
StaffService
.
getInstance
().
addNextLevel
({
attr
:
{
add_same_level
:
false
,
},
level
:
this
.
searchLevel
,
name
:
this
.
form
.
name
,
password
:
this
.
form
.
password
,
phone
:
this
.
form
.
tel
,
second_sub_branch
:
this
.
form
.
fooProp3
as
number
,
});
StaffService
.
getInstance
()
.
addNextLevel
({
attr
:
{
add_same_level
:
false
,
},
level
:
this
.
searchLevel
,
name
:
this
.
form
.
name
,
password
:
this
.
form
.
password
,
phone
:
this
.
form
.
tel
,
second_sub_branch
:
this
.
form
.
fooProp3
as
number
,
})
.
then
(()
=>
{
this
.
save
({
refreshMark
:
new
Date
().
getTime
(),
});
});
}
this
.
setModal
(
false
);
}
else
{
...
...
@@ -318,11 +325,18 @@ export default Vue.extend({
newV
.
forEach
((
item
,
index
)
=>
{
(
this
.
form
as
any
)[
`fooProp
${
index
}
`
]
=
item
.
value
;
});
if
(
newV
[
3
].
options
.
length
!==
0
)
this
.
outletName
=
newV
[
3
].
options
[
0
].
Name
;
if
(
newV
[
3
].
value
!==
undefined
)
{
this
.
outletName
=
newV
[
3
].
options
.
find
((
i
)
=>
i
.
ID
===
newV
[
3
].
value
)?.
Name
||
""
;
}
},
outletName
(
newV
,
oldV
)
{
console
.
log
(
newV
);
async
outletName
(
newV
,
oldV
)
{
const
ret
=
await
AddressService
.
getInstance
().
getOutlet
({
outlet_name
:
newV
,
});
if
(
ret
.
code
===
200
)
{
this
.
form
.
location
=
ret
.
data
.
location
;
}
},
},
});
...
...
src/store/UserManagement/index.ts
View file @
8425e838
...
...
@@ -9,6 +9,7 @@ import {
export
default
<
Module
<
iUserManagementState
,
{}
>>
{
namespaced
:
true
,
state
:
{
refreshMark
:
NaN
,
modalShow
:
true
,
modalMode
:
eAddManagerModalMode
.
create
,
typeOfOperatedObject
:
eTypeOfOperatedObject
.
manager
,
...
...
src/store/UserManagement/types.ts
View file @
8425e838
...
...
@@ -40,4 +40,5 @@ export interface iUserManagementState {
branchDetailMsg
:
Partial
<
iBranchDetailMsg
>
personalMsg
:
iPersonalMsg
address
:
string
refreshMark
:
number
}
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