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
65d1c7b3
Commit
65d1c7b3
authored
Sep 24, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
efeff16e
2d14b4ee
Pipeline
#3571
canceled with stages
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
422 additions
and
207 deletions
+422
-207
index.js
api/project/index.js
+50
-0
cell-employee.vue
pages/workpoint/employees/components/cell-employee.vue
+17
-11
pop-wage-setting.vue
pages/workpoint/employees/components/pop-wage-setting.vue
+20
-9
wage-setting.vue
pages/workpoint/employees/components/wage-setting.vue
+12
-6
employee-create.vue
pages/workpoint/employees/employee-create.vue
+110
-22
index.vue
pages/workpoint/employees/index.vue
+177
-110
project-edit.vue
pages/workpoint/project/project-edit.vue
+36
-49
No files found.
api/project/index.js
View file @
65d1c7b3
...
@@ -80,4 +80,54 @@ export async function settleProject(data) {
...
@@ -80,4 +80,54 @@ export async function settleProject(data) {
data
,
data
,
noLoading
:
true
noLoading
:
true
})
})
}
// 项目成员
export
async
function
getProjectMembers
(
data
)
{
return
request
({
url
:
`/rest/project/member/page`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 项目成员
export
async
function
getProjectMembersKnow
(
data
)
{
return
request
({
url
:
`/rest/project/member/all`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 新增、更新项目成员
export
async
function
updateProjectMember
(
data
)
{
return
request
({
url
:
`/rest/project/member/save`
,
method
:
'POST'
,
data
,
noLoading
:
true
})
}
// 项目成员信息
export
async
function
getProjectMemberInfo
(
data
)
{
return
request
({
url
:
`/rest/project/member/info`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 删除项目成员
export
async
function
deleteProjectMember
(
data
)
{
return
request
({
url
:
`/rest/project/member`
,
method
:
'DELETE'
,
data
,
noLoading
:
true
})
}
}
\ No newline at end of file
pages/workpoint/employees/components/cell-employee.vue
View file @
65d1c7b3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<view
class=
"image-view"
>
{{
imagekName
}}
</view>
<view
class=
"image-view"
>
{{
imagekName
}}
</view>
<view
class=
"name-view"
>
{{
member
.
name
}}
</view>
<view
class=
"name-view"
>
{{
member
.
name
}}
</view>
<view
class=
"info-view
"
>
{{
textInfo
}}
</view>
<view
:class=
"['info-view',
{select: isSelect}]
">
{{
textInfo
}}
</view>
</view>
</view>
<view
class=
"right-view"
>
<view
class=
"right-view"
>
<view
v-if=
"isSelect"
class=
"select-view"
@
click=
"$u.throttle(handleSelect, 500)"
hover-class=
"u-hover-class"
>
<view
v-if=
"isSelect"
class=
"select-view"
@
click=
"$u.throttle(handleSelect, 500)"
hover-class=
"u-hover-class"
>
...
@@ -28,10 +28,10 @@ export default {
...
@@ -28,10 +28,10 @@ export default {
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
memberI
d
:
''
,
i
d
:
''
,
name
:
''
,
name
:
''
,
money
:
''
,
notSettleAmount
:
''
,
phon
e
:
''
,
mobil
e
:
''
,
}
}
},
},
},
},
...
@@ -62,25 +62,26 @@ export default {
...
@@ -62,25 +62,26 @@ export default {
return
this
.
baseUrl
+
'bianjifuwufenlei@3x.png'
return
this
.
baseUrl
+
'bianjifuwufenlei@3x.png'
},
},
textInfo
()
{
textInfo
()
{
return
this
.
isEdit
?
this
.
member
.
phone
:
'¥'
+
formatCount
(
this
.
member
.
money
||
0
)
var
count
=
(
Number
(
this
.
member
.
notSettleAmount
||
0
)
==
0
?
''
:
'¥'
+
formatCount
(
this
.
member
.
notSettleAmount
||
0
))
var
mobile
=
this
.
member
.
mobile
?
(
this
.
member
.
mobile
.
substring
(
0
,
3
)
+
' '
+
this
.
member
.
mobile
.
substring
(
3
,
7
)
+
' '
+
this
.
member
.
mobile
.
substring
(
7
,
11
))
:
''
return
this
.
isEdit
?
count
:
mobile
}
}
},
},
created
()
{
},
created
()
{
},
methods
:
{
methods
:
{
handleClickButton
()
{
handleClickButton
()
{
this
.
$emit
(
'action'
,
this
.
member
.
memberI
d
)
this
.
$emit
(
'action'
,
this
.
member
.
i
d
)
},
},
handleSelect
()
{
handleSelect
()
{
this
.
member
.
selected
=
!
this
.
member
.
selected
this
.
member
.
selected
=
!
this
.
member
.
selected
console
.
log
(
this
.
member
)
this
.
$emit
(
'select'
,
this
.
member
.
id
,
this
.
member
.
selected
)
this
.
$emit
(
'select'
,
this
.
member
.
memberId
,
this
.
member
.
selected
)
},
},
},
},
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.cell-employee
{
.cell-employee
{
padding
:
32rpx
0
32
rpx
24rpx
;
padding
:
28rpx
0
28
rpx
24rpx
;
min-height
:
120rpx
;
min-height
:
120rpx
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
...
@@ -109,12 +110,17 @@ export default {
...
@@ -109,12 +110,17 @@ export default {
font-size
:
26rpx
;
font-size
:
26rpx
;
}
}
.info-view
{}
.info-view
{
color
:
#fc524d
;
&
.select
{
color
:
#333333
;
}
}
.name-view
{
.name-view
{
margin-right
:
32rpx
;
margin-right
:
32rpx
;
margin-left
:
24rpx
;
margin-left
:
24rpx
;
width
:
120rpx
;
max-
width
:
120rpx
;
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
overflow
:
hidden
;
...
...
pages/workpoint/employees/components/pop-wage-setting.vue
View file @
65d1c7b3
<
template
>
<
template
>
<u-popup
v-model=
"show"
safe-area-inset-bottom
mode=
"bottom"
width=
"100%"
border-radius=
"16"
:closeable=
"false"
@
close=
"handleClose"
>
<u-popup
v-model=
"show"
safe-area-inset-bottom
mode=
"bottom"
width=
"100%"
border-radius=
"16"
:closeable=
"false"
@
close=
"handleClose"
>
<view
class=
"ppop-cwage-setting"
>
<view
class=
"ppop-cwage-setting"
>
<WageSetting
type=
"pop"
:form=
"form"
@
close=
"handleClose"
:fill
.
sync=
"canConfirm"
@
change=
"handleChange"
/>
<!-- v-if 可以清空上次填写 -->
<WageSetting
v-if=
"visible"
type=
"pop"
:form=
"salary"
@
close=
"handleClose"
:fill
.
sync=
"canConfirm"
@
change=
"handleChange"
/>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:loading=
"buttonLoading"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:loading=
"buttonLoading"
>
<view
class=
"confirm-view"
>
确定
</view>
<view
class=
"confirm-view"
>
确定
</view>
...
@@ -24,7 +25,7 @@ export default {
...
@@ -24,7 +25,7 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
form
:
{
form
:
{
// 项目值
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
...
@@ -44,7 +45,17 @@ export default {
...
@@ -44,7 +45,17 @@ export default {
return
{
return
{
buttonLoading
:
false
,
buttonLoading
:
false
,
show
:
false
,
show
:
false
,
canConfirm
:
false
canConfirm
:
false
,
salary
:
{
// 用户输入值
id
:
''
,
normalUnitHours
:
''
,
normalUnitMoney
:
''
,
overHoursMoney
:
''
,
overType
:
'UNIT'
,
overUnitHours
:
''
,
overUnitMoney
:
''
,
projectId
:
''
,
},
}
}
},
},
computed
:
{
computed
:
{
...
@@ -60,9 +71,11 @@ export default {
...
@@ -60,9 +71,11 @@ export default {
},
},
watch
:
{
watch
:
{
visible
(
val
)
{
visible
(
val
)
{
if
(
val
&&
this
.
form
.
id
)
{
// 老项目才用项目值刷新用户输入值;新项目保留用户输入值
this
.
salary
=
{...
this
.
form
}
}
this
.
show
=
val
this
.
show
=
val
this
.
buttonLoading
=
false
this
.
buttonLoading
=
false
console
.
log
(
'-----created---0--'
,
this
.
form
)
},
},
},
},
created
()
{
created
()
{
...
@@ -73,13 +86,11 @@ export default {
...
@@ -73,13 +86,11 @@ export default {
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'update:visible'
,
false
)
},
},
handleChange
(
key
,
value
)
{
handleChange
(
key
,
value
)
{
this
.
form
[
key
]
=
value
this
.
salary
[
key
]
=
value
console
.
log
(
'---handleChange----0---'
,
key
,
value
)
this
.
$emit
(
'change'
,
key
,
value
)
},
},
handleClickSure
()
{
handleClickSure
()
{
this
.
buttonLoading
=
true
this
.
buttonLoading
=
true
this
.
$emit
(
'sure'
,
{...
this
.
form
})
this
.
$emit
(
'sure'
,
{...
this
.
salary
})
this
.
handleClose
()
this
.
handleClose
()
}
}
},
},
...
...
pages/workpoint/employees/components/wage-setting.vue
View file @
65d1c7b3
...
@@ -93,7 +93,10 @@ export default {
...
@@ -93,7 +93,10 @@ export default {
fontSize
:
'28rpx'
,
fontSize
:
'28rpx'
,
textAlign
:
'right'
,
textAlign
:
'right'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
padding
:
'0 16rpx'
padding
:
'0 16rpx'
,
'background-color'
:
'#f6f6f6'
,
'border-radius'
:
'8rpx'
}
}
},
},
isPop
()
{
isPop
()
{
...
@@ -122,18 +125,20 @@ export default {
...
@@ -122,18 +125,20 @@ export default {
'overType'
,
'overType'
,
'overUnitHours'
,
'overUnitHours'
,
'overUnitMoney'
]
'overUnitMoney'
]
}
},
},
watch
:
{
form
(
value
)
{
this
.
$emit
(
'update:fill'
,
this
.
checkForm
())
},
},
},
created
()
{
created
()
{
},
},
methods
:
{
methods
:
{
handleChange
(
key
,
value
)
{
handleChange
(
key
,
value
)
{
this
.
form
[
key
]
=
value
this
.
$emit
(
'update:fill'
,
this
.
checkForm
())
this
.
$emit
(
'change'
,
key
,
value
)
this
.
$emit
(
'change'
,
key
,
value
)
},
},
handleSelectType
(
type
)
{
handleSelectType
(
type
)
{
console
.
log
(
'-------'
,
type
)
this
.
handleChange
(
'overType'
,
type
)
this
.
handleChange
(
'overType'
,
type
)
},
},
handleInput
(
value
,
key
)
{
handleInput
(
value
,
key
)
{
...
@@ -218,7 +223,8 @@ export default {
...
@@ -218,7 +223,8 @@ export default {
line-height
:
70rpx
;
line-height
:
70rpx
;
.input-view
{
.input-view
{
width
:
160rpx
;
width
:
146rpx
;
margin
:
0
8rpx
;
}
}
.type-view
{
.type-view
{
...
...
pages/workpoint/employees/employee-create.vue
View file @
65d1c7b3
...
@@ -19,19 +19,20 @@
...
@@ -19,19 +19,20 @@
</view>
</view>
</view>
</view>
</view>
</view>
<WageSetting
:form=
"form"
:fill
.
sync=
"
canConfirm
"
@
change=
"handleChange"
/>
<WageSetting
:form=
"form"
:fill
.
sync=
"
fill
"
@
change=
"handleChange"
/>
</view>
</view>
<view
:class=
"['bottom-view',
{edit: memberId}]">
<view
:class=
"['bottom-view',
{edit: memberId}]">
<u-button
v-if=
"memberId"
:custom-style=
"customDelete"
@
click=
"handleClickDelete"
class=
"delete-button"
>
<u-button
v-if=
"memberId"
:custom-style=
"customDelete"
@
click=
"handleClickDelete"
class=
"delete-button"
>
<view
class=
"delete-view"
>
删除
</view>
<view
class=
"delete-view"
>
删除
</view>
</u-button>
</u-button>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickCon
F
irm"
:loading=
"buttonLoading"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickCon
f
irm"
:loading=
"buttonLoading"
>
<view
class=
"confirm-view"
>
保存
</view>
<view
class=
"confirm-view"
>
保存
</view>
</u-button>
</u-button>
</view>
</view>
<view
class=
"loading-view"
v-if=
"loading"
>
<view
class=
"loading-view"
v-if=
"loading"
>
<u-loading
mode=
"flower"
></u-loading>
<u-loading
mode=
"flower"
></u-loading>
</view>
</view>
<PopNormal
:visible
.
sync=
"visible"
title=
"删除提醒"
content=
"确认删除该成员吗?"
@
confirm=
"handleClickSure"
/>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -39,13 +40,15 @@
...
@@ -39,13 +40,15 @@
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
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
{
repairDetail
}
from
'@/api/maintain
/index.js'
;
import
{
updateProjectMember
,
getProjectMemberInfo
,
deleteProjectMember
,
getProjectSalary
}
from
'@/api/project
/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
WageSetting
WageSetting
,
PopNormal
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -63,7 +66,8 @@ export default {
...
@@ -63,7 +66,8 @@ export default {
},
},
loading
:
false
,
loading
:
false
,
buttonLoading
:
false
,
buttonLoading
:
false
,
canConfirm
:
false
,
fill
:
false
,
visible
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -100,6 +104,9 @@ export default {
...
@@ -100,6 +104,9 @@ export default {
'border-radius'
:
'16rpx'
,
'border-radius'
:
'16rpx'
,
width
:
this
.
memberId
?
'470rpx'
:
'686rpx'
,
width
:
this
.
memberId
?
'470rpx'
:
'686rpx'
,
}
}
},
canConfirm
()
{
return
this
.
fill
&&
this
.
form
.
memberName
&&
this
.
form
.
memberMobile
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -109,24 +116,24 @@ export default {
...
@@ -109,24 +116,24 @@ 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
.
repairDetail
()
this
.
getProjectMemberInfo
()
// 编辑就优先个人工资设置,没有再调项目工资设置
}
else
{
this
.
getProjectSalary
()
// 新建就直接用项目工资设置
}
}
},
},
methods
:
{
methods
:
{
repairDetail
()
{
getProjectMemberInfo
()
{
// 测试数据
this
.
loading
=
false
this
.
setForm
()
return
this
.
loading
=
true
;
this
.
loading
=
true
;
repairDetail
({
getProjectMemberInfo
({
id
:
this
.
memberId
projectId
:
this
.
projectId
,
memberId
:
this
.
memberId
,
})
})
.
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
;
})
})
...
@@ -136,25 +143,106 @@ export default {
...
@@ -136,25 +143,106 @@ export default {
},
},
setForm
(
data
)
{
setForm
(
data
)
{
this
.
form
=
{
this
.
form
=
{
memberId
:
data
.
memberId
,
memberId
:
[
this
.
memberId
]
,
projectId
:
data
.
projectId
,
projectId
:
this
.
projectId
,
memberName
:
data
.
memberN
ame
,
memberName
:
data
.
n
ame
,
memberMobile
:
data
.
m
emberM
obile
,
memberMobile
:
data
.
mobile
,
normalUnitHours
:
data
.
normalUnitHours
,
normalUnitHours
:
data
.
normalUnitHours
,
normalUnitMoney
:
data
.
normalUnitMoney
,
normalUnitMoney
:
data
.
normalUnitMoney
,
overHoursMoney
:
data
.
overHoursMoney
,
overHoursMoney
:
data
.
overHoursMoney
,
overType
:
data
.
overType
,
overType
:
data
.
overType
.
code
,
overUnitHours
:
data
.
overUnitHours
,
overUnitHours
:
data
.
overUnitHours
,
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
},
},
handleClickDelete
()
{
handleClickDelete
()
{
this
.
visible
=
true
}
},
handleClickSure
()
{
this
.
deleteProjectMember
()
},
handleClickConfirm
()
{
this
.
updateProjectMember
()
},
deleteProjectMember
()
{
deleteProjectMember
({
memberId
:
this
.
memberId
,
projectId
:
this
.
projectId
})
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'删除成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
goBack
()
}
});
}
})
.
catch
(
res
=>
{
});
},
updateProjectMember
()
{
this
.
buttonLoading
=
true
if
(
!
this
.
form
.
projectId
)
{
this
.
form
.
projectId
=
this
.
projectId
}
updateProjectMember
(
this
.
form
)
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'保存成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
goBack
()
}
});
}
})
.
catch
(
res
=>
{
this
.
buttonLoading
=
false
});
},
goBack
()
{
uni
.
$emit
(
'employees-changed'
)
uni
.
$emit
(
'project-detail'
)
this
.
$u
.
route
({
type
:
'navigateBack'
,
params
:
{
}
})
},
},
},
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
pages/workpoint/employees/index.vue
View file @
65d1c7b3
This diff is collapsed.
Click to expand it.
pages/workpoint/project/project-edit.vue
View file @
65d1c7b3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<NavbarRight
title=
"项目管理"
/>
<NavbarRight
title=
"项目管理"
/>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"info-view"
>
<view
class=
"info-view"
>
<view
class=
"part-view"
hover-class=
"u-
cell
-class"
@
click=
"$u.throttle(handleClickName, 500)"
>
<view
class=
"part-view"
hover-class=
"u-
hover
-class"
@
click=
"$u.throttle(handleClickName, 500)"
>
<view
class=
"label-view"
>
项目名称
</view>
<view
class=
"label-view"
>
项目名称
</view>
<view
class=
"value-view"
>
<view
class=
"value-view"
>
<view>
{{
form
.
name
}}
</view>
<view>
{{
form
.
name
}}
</view>
...
@@ -11,26 +11,26 @@
...
@@ -11,26 +11,26 @@
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"part-view"
hover-class=
"u-
cell
-class"
@
click=
"$u.throttle(handleClicSalary, 500)"
>
<view
class=
"part-view"
hover-class=
"u-
hover
-class"
@
click=
"$u.throttle(handleClicSalary, 500)"
>
<view
class=
"label-view"
>
点工工资
</view>
<view
class=
"label-view"
>
点工工资
</view>
<view
class=
"value-view"
>
<view
class=
"value-view"
>
<view
v-if=
"salary"
>
已设置
</view>
<view
v-if=
"salary
.id
"
>
已设置
</view>
<view
v-else
class=
"no-info"
>
未设置
</view>
<view
v-else
class=
"no-info"
>
未设置
</view>
<u-icon
class=
"icon-view"
name=
"arrow-right"
color=
"#CCCCCC"
size=
"24"
></u-icon>
<u-icon
class=
"icon-view"
name=
"arrow-right"
color=
"#CCCCCC"
size=
"24"
></u-icon>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"info-view"
>
<view
class=
"info-view"
>
<view
class=
"part-view"
hover-class=
"u-
cell
-class"
@
click=
"$u.throttle(handleClickMember, 500)"
>
<view
class=
"part-view"
hover-class=
"u-
hover
-class"
@
click=
"$u.throttle(handleClickMember, 500)"
>
<view
class=
"label-view"
>
项目成员
</view>
<view
class=
"label-view"
>
项目成员
</view>
<view
class=
"value-view"
>
<view
class=
"value-view"
>
<view
v-if=
"
memberCount"
>
{{
memberCount
}}
</view>
<view
v-if=
"
form.memberCount"
>
{{
form
.
memberCount
}}
</view>
<view
v-else
class=
"no-info"
>
未选择
</view>
<view
v-else
class=
"no-info"
>
未选择
</view>
<u-icon
class=
"icon-view"
name=
"arrow-right"
color=
"#CCCCCC"
size=
"24"
></u-icon>
<u-icon
class=
"icon-view"
name=
"arrow-right"
color=
"#CCCCCC"
size=
"24"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"part-view"
hover-class=
"u-
cell
-class"
@
click=
"$u.throttle(handleClicBill, 500)"
>
<view
class=
"part-view"
hover-class=
"u-
hover
-class"
@
click=
"$u.throttle(handleClicBill, 500)"
>
<view
class=
"label-view"
>
项目账单
</view>
<view
class=
"label-view"
>
项目账单
</view>
<view
class=
"value-view"
>
<view
class=
"value-view"
>
<view
class=
"settle-view"
v-if=
"notSettleAmount"
>
{{
notSettleAmount
}}
</view>
<view
class=
"settle-view"
v-if=
"notSettleAmount"
>
{{
notSettleAmount
}}
</view>
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<view
class=
"loading-view"
v-if=
"loading"
>
<view
class=
"loading-view"
v-if=
"loading"
>
<u-loading
mode=
"flower"
></u-loading>
<u-loading
mode=
"flower"
></u-loading>
</view>
</view>
<PopWageSetting
:form=
"salary"
:visible
.
sync=
"visible"
@
change=
"handleChange"
@
sure=
"handleClickSure"
/>
<PopWageSetting
:form=
"salary"
:visible
.
sync=
"visible"
@
sure=
"handleClickSure"
/>
<PopNormal
:visible
.
sync=
"visiblePop"
:loadingShow=
"true"
:title=
"currentPopInfo.title"
<PopNormal
:visible
.
sync=
"visiblePop"
:loadingShow=
"true"
:title=
"currentPopInfo.title"
:content=
"currentPopInfo.content"
@
confirm=
"handleClickConfirm"
/>
:content=
"currentPopInfo.content"
@
confirm=
"handleClickConfirm"
/>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
...
@@ -60,15 +60,17 @@
...
@@ -60,15 +60,17 @@
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
import
NavbarRight
from
'@/components/navbar-right'
import
PopNormal
from
'@/components/pop-normal'
import
PopWageSetting
from
'@/pages/workpoint/employees/components/pop-wage-setting'
import
PopWageSetting
from
'@/pages/workpoint/employees/components/pop-wage-setting'
import
{
formatCount
}
from
'@/utils/common.js'
;
import
{
formatCount
}
from
'@/utils/common.js'
;
import
{
getProjectDetail
,
getProjectSalary
,
setProjectSalary
,
updateProject
}
from
'@/api/project/index.js'
;
import
{
getProjectDetail
,
getProjectSalary
,
setProjectSalary
,
updateProject
,
deleteProject
}
from
'@/api/project/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
NavbarRight
,
NavbarRight
,
PopWageSetting
PopWageSetting
,
PopNormal
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -79,13 +81,21 @@ export default {
...
@@ -79,13 +81,21 @@ export default {
memberCount
:
''
,
memberCount
:
''
,
notSettleAmount
:
''
,
notSettleAmount
:
''
,
},
},
salary
:
null
,
salary
:
{
id
:
''
,
normalUnitHours
:
''
,
normalUnitMoney
:
''
,
overHoursMoney
:
''
,
overType
:
'UNIT'
,
overUnitHours
:
''
,
overUnitMoney
:
''
,
projectId
:
''
,
},
loading
:
false
,
loading
:
false
,
buttonLoading
:
false
,
buttonLoading
:
false
,
visible
:
false
,
visible
:
false
,
currentPopInfo
:
{},
currentPopInfo
:
{},
visiblePop
:
false
visiblePop
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -115,24 +125,12 @@ export default {
...
@@ -115,24 +125,12 @@ export default {
customConFirm
()
{
customConFirm
()
{
return
{
return
{
color
:
'transparent'
,
color
:
'transparent'
,
'background-color'
:
this
.
canConfirm
?
'#02a074'
:
'#7DCFB8
'
,
'background-color'
:
'#02a074
'
,
height
:
'104rpx'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
,
'border-radius'
:
'16rpx'
,
width
:
'330rpx'
,
width
:
'330rpx'
,
}
}
},
},
canConfirm
()
{
for
(
var
item
in
this
.
form
)
{
if
(
this
.
form
.
type
==
'hour'
&&
item
==
'overHour'
)
{
continue
}
if
(
this
.
form
[
item
]
==
''
||
this
.
form
[
item
]
==
null
)
{
return
false
}
}
return
true
},
canClosed
()
{
canClosed
()
{
return
Number
(
this
.
form
.
notSettleAmount
||
0
)
!=
0
return
Number
(
this
.
form
.
notSettleAmount
||
0
)
!=
0
},
},
...
@@ -229,14 +227,7 @@ export default {
...
@@ -229,14 +227,7 @@ export default {
setProjectSalary
(
params
)
setProjectSalary
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
uni
.
$emit
(
'projects-changed'
)
this
.
setSuccess
()
this
.
$refs
.
uToast
.
show
({
title
:
'设置成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
}
});
}
}
})
})
.
catch
(
res
=>
{
.
catch
(
res
=>
{
...
@@ -299,14 +290,13 @@ export default {
...
@@ -299,14 +290,13 @@ export default {
});
});
uni
.
$once
(
'input-sure-project-create'
,
res
=>
{
uni
.
$once
(
'input-sure-project-create'
,
res
=>
{
this
.
form
.
name
=
res
.
content
this
.
form
.
name
=
res
.
content
this
.
updateProject
({
...
this
.
form
})
this
.
updateProject
({
...
this
.
form
})
});
});
},
},
updateProject
(
params
)
{
updateProject
(
params
)
{
updateProject
(
params
)
updateProject
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
let
data
=
res
.
data
;
let
data
=
res
.
data
;
console
.
log
(
'------updateProject-------'
,
data
)
if
(
data
)
{
if
(
data
)
{
this
.
setSuccess
()
this
.
setSuccess
()
}
}
...
@@ -317,16 +307,16 @@ export default {
...
@@ -317,16 +307,16 @@ export default {
});
});
},
},
setSuccess
()
{
setSuccess
()
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'设置成功'
,
title
:
'设置成功'
,
type
:
'success'
,
type
:
'success'
,
duration
:
1500
,
duration
:
1500
,
callback
:
()
=>
{
callback
:
()
=>
{
this
.
reloadList
()
this
.
reloadList
()
uni
.
$emit
(
'projects-changed'
)
uni
.
$emit
(
'projects-changed'
)
}
}
});
});
},
},
handleClicSalary
()
{
handleClicSalary
()
{
this
.
visible
=
true
this
.
visible
=
true
...
@@ -352,16 +342,13 @@ export default {
...
@@ -352,16 +342,13 @@ export default {
handleClickSure
(
form
)
{
handleClickSure
(
form
)
{
this
.
setProjectSalary
(
form
)
this
.
setProjectSalary
(
form
)
},
},
handleChange
(
key
,
value
)
{
this
.
salary
[
key
]
=
value
},
handleClickDelete
()
{
handleClickDelete
()
{
this
.
currentPopInfo
=
this
.
popInfos
[
0
]
this
.
currentPopInfo
=
this
.
popInfos
[
0
]
this
.
visible
=
true
this
.
visible
Pop
=
true
},
},
handleClickSetting
()
{
handleClickSetting
()
{
this
.
currentPopInfo
=
this
.
popInfos
[
1
]
this
.
currentPopInfo
=
this
.
popInfos
[
1
]
this
.
visible
=
true
this
.
visible
Pop
=
true
},
},
handleClickConfirm
()
{
handleClickConfirm
()
{
switch
(
this
.
currentPopInfo
.
action
)
{
switch
(
this
.
currentPopInfo
.
action
)
{
...
...
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