Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
2a3e611c
Commit
2a3e611c
authored
Sep 24, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 成员添加
parent
cc67eb5f
Pipeline
#3567
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
23 deletions
+62
-23
employee-create.vue
pages/workpoint/employees/employee-create.vue
+31
-3
index.vue
pages/workpoint/employees/index.vue
+31
-20
No files found.
pages/workpoint/employees/employee-create.vue
View file @
2a3e611c
...
@@ -42,7 +42,7 @@ import NavbarRight from '@/components/navbar-right'
...
@@ -42,7 +42,7 @@ import NavbarRight from '@/components/navbar-right'
import
WageSetting
from
'./components/wage-setting'
import
WageSetting
from
'./components/wage-setting'
import
PopNormal
from
'@/components/pop-normal'
;
import
PopNormal
from
'@/components/pop-normal'
;
import
{
updateProjectMember
,
getProjectMemberInfo
,
deleteProjectMember
}
from
'@/api/project/index.js'
;
import
{
updateProjectMember
,
getProjectMemberInfo
,
deleteProjectMember
,
getProjectSalary
}
from
'@/api/project/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -116,7 +116,9 @@ export default {
...
@@ -116,7 +116,9 @@ export default {
if
(
options
&&
options
.
memberId
)
{
if
(
options
&&
options
.
memberId
)
{
this
.
memberId
=
options
.
memberId
this
.
memberId
=
options
.
memberId
this
.
loading
=
true
this
.
loading
=
true
this
.
getProjectMemberInfo
()
this
.
getProjectMemberInfo
()
// 编辑就优先个人工资设置,没有再调项目工资设置
}
else
{
this
.
getProjectSalary
()
// 新建就直接用项目工资设置
}
}
},
},
methods
:
{
methods
:
{
...
@@ -129,6 +131,9 @@ export default {
...
@@ -129,6 +131,9 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
setForm
(
res
.
data
);
this
.
setForm
(
res
.
data
);
if
(
Number
(
res
.
data
.
normalUnitHours
||
0
)
==
0
)
{
this
.
getProjectSalary
()
}
}
}
this
.
loading
=
false
;
this
.
loading
=
false
;
})
})
...
@@ -138,7 +143,7 @@ export default {
...
@@ -138,7 +143,7 @@ export default {
},
},
setForm
(
data
)
{
setForm
(
data
)
{
this
.
form
=
{
this
.
form
=
{
memberId
:
this
.
memberId
,
memberId
:
[
this
.
memberId
]
,
projectId
:
this
.
projectId
,
projectId
:
this
.
projectId
,
memberName
:
data
.
name
,
memberName
:
data
.
name
,
memberMobile
:
data
.
mobile
,
memberMobile
:
data
.
mobile
,
...
@@ -150,6 +155,29 @@ export default {
...
@@ -150,6 +155,29 @@ export default {
overUnitMoney
:
data
.
overUnitMoney
,
overUnitMoney
:
data
.
overUnitMoney
,
};
};
},
},
getProjectSalary
()
{
this
.
loading
=
true
;
getProjectSalary
({
id
:
this
.
projectId
})
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
setSalary
(
res
.
data
)
}
this
.
loading
=
false
;
})
.
catch
(
res
=>
{
this
.
loading
=
false
;
});
},
setSalary
(
data
)
{
this
.
form
.
normalUnitHours
=
data
.
normalUnitHours
this
.
form
.
normalUnitMoney
=
data
.
normalUnitMoney
this
.
form
.
overHoursMoney
=
data
.
overHoursMoney
this
.
form
.
overType
=
data
.
overType
.
code
this
.
form
.
overUnitHours
=
data
.
overUnitHours
this
.
form
.
overUnitMoney
=
data
.
overUnitMoney
},
handleChange
(
key
,
value
)
{
handleChange
(
key
,
value
)
{
this
.
form
[
key
]
=
value
this
.
form
[
key
]
=
value
},
},
...
...
pages/workpoint/employees/index.vue
View file @
2a3e611c
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</u-button>
</u-button>
</view>
</view>
<view
class=
"bottom-select"
v-if=
"isSelect"
>
<view
class=
"bottom-select"
v-if=
"isSelect"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickConfirm"
>
<u-button
:
loading=
"buttonLoading"
:
custom-style=
"customConFirm"
@
click=
"handleClickConfirm"
>
<view
class=
"confirm-view"
>
下一步
</view>
<view
class=
"confirm-view"
>
下一步
</view>
</u-button>
</u-button>
</view>
</view>
...
@@ -51,7 +51,7 @@ import CellEmployee from './components/cell-employee';
...
@@ -51,7 +51,7 @@ import CellEmployee from './components/cell-employee';
import
NoData
from
'@/components/no-data'
;
import
NoData
from
'@/components/no-data'
;
import
PopWageSetting
from
'./components/pop-wage-setting'
import
PopWageSetting
from
'./components/pop-wage-setting'
import
{
getProjectMembers
,
getProjectMembersKnow
,
getProjectSalary
}
from
'@/api/project/index.js'
;
import
{
getProjectMembers
,
getProjectMembersKnow
,
getProjectSalary
,
updateProjectMember
}
from
'@/api/project/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -66,6 +66,7 @@ export default {
...
@@ -66,6 +66,7 @@ export default {
keyword
:
''
,
keyword
:
''
,
employees
:
[],
employees
:
[],
loading
:
true
,
loading
:
true
,
buttonLoading
:
false
,
loadStatus
:
'loading'
,
loadStatus
:
'loading'
,
triggered
:
true
,
triggered
:
true
,
freshing
:
false
,
freshing
:
false
,
...
@@ -379,10 +380,11 @@ export default {
...
@@ -379,10 +380,11 @@ export default {
}
}
this
.
visible
=
true
this
.
visible
=
true
},
},
handleClickSure
(
salary
)
{
updateProjectMember
(
params
)
{
console
.
log
(
'----handleClickSure-------'
,
salary
)
this
.
buttonLoading
=
true
return
updateProjectMember
(
params
)
// 调接口
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'添加成功'
,
title
:
'添加成功'
,
type
:
'success'
,
type
:
'success'
,
...
@@ -399,6 +401,15 @@ export default {
...
@@ -399,6 +401,15 @@ export default {
}
}
});
});
}
}
})
.
catch
(
res
=>
{
this
.
buttonLoading
=
false
});
},
handleClickSure
(
salary
)
{
var
params
=
{...
salary
,
memberId
:
this
.
selectedMembers
,
projectId
:
this
.
projectId
}
this
.
updateProjectMember
(
params
)
}
}
}
};
};
</
script
>
</
script
>
...
...
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