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
ab4fe69b
Commit
ab4fe69b
authored
Sep 23, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
记工时接口调试
parent
4187c176
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
155 additions
and
103 deletions
+155
-103
mid-popup.vue
components/mid-popup/mid-popup.vue
+5
-5
input.vue
pages/mine/input/input.vue
+15
-5
bill-tabs.vue
pages/workpoint/components/bill-tabs.vue
+3
-3
loan-statement.vue
pages/workpoint/loan-statement/loan-statement.vue
+3
-2
bill-detail.vue
pages/workpoint/project-bill/components/bill-detail.vue
+32
-42
project-edit.vue
pages/workpoint/project/project-edit.vue
+15
-0
workpoint-create.vue
pages/workpoint/workpoint-create/workpoint-create.vue
+65
-40
index.js
utils/options/index/index.js
+8
-1
index.js
utils/options/workpoint/index.js
+9
-5
No files found.
components/mid-popup/mid-popup.vue
View file @
ab4fe69b
...
...
@@ -3,7 +3,7 @@
<u-popup
v-model=
"show"
border-radius=
"24"
safe-area-inset-bottom
mode=
"bottom"
:duration=
"100"
>
<view
class=
"mid-popup"
>
<u-row
gutter=
"16"
>
<u-col
span=
"
4
"
v-for=
"(item, index) in list"
:key=
"index"
>
<u-col
span=
"
3
"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"button-view"
@
click=
"clickItem(item)"
>
<view
class=
"button-view-icon"
><image
:src=
"indexBaseUrl+item.icon"
mode=
""
v-if=
"item.icon"
></image></view>
<view
class=
"button-view-content"
>
{{
item
.
label
}}
</view>
...
...
@@ -91,18 +91,18 @@ export default {
justify-content
:
center
;
align-items
:
center
;
position
:
relative
;
margin-right
:
96
upx
;
margin-right
:
64
upx
;
&
:last-child
{
margin-right
:
0
;
}
&
-icon
{
width
:
1
44
upx
;
height
:
1
44
upx
;
width
:
1
20
upx
;
height
:
1
20
upx
;
// display: flex;
}
&
-content
{
margin-top
:
32upx
;
font-size
:
32
upx
;
font-size
:
28
upx
;
line-height
:
32upx
;
}
}
...
...
pages/mine/input/input.vue
View file @
ab4fe69b
...
...
@@ -16,7 +16,7 @@
@
input=
"handleInput"
/>
<view
v-if=
"!disabled"
class=
"tip-view"
>
{{
tipText
}}
</view>
<bottom-buttons
cancelText=
'删除'
:showCancel=
"id?true:false"
@
cancel=
"handleDelete"
@
confirm=
"handleClick"
></bottom-buttons>
<bottom-buttons
cancelText=
"删除"
:showCancel=
"id ? true : false"
@
cancel=
"handleDelete"
@
confirm=
"handleClick"
></bottom-buttons>
<!--
<view
class=
"bottom-view"
>
<u-button
:customStyle=
"buttonStyle"
@
click=
"handleClick"
><view
class=
"button-text"
>
确定
</view></u-button>
<u-button
:customStyle=
"deleteStyle"
@
click=
"handleDelete"
v-if=
"id"
><view
class=
"button-text delete-button"
>
删除
</view></u-button>
...
...
@@ -157,7 +157,17 @@ export default {
placeholder
:
'添加备注信息(200个字以内)'
,
maxlength
:
200
,
height
:
240
,
empty
:
true
empty
:
true
};
case
'workpoint-create-remark'
:
return
{
title
:
'备注信息'
,
type
:
'textarea'
,
placeholder
:
'添加备注信息(200个字以内)'
,
maxlength
:
200
,
height
:
240
,
empty
:
true
};
}
}
...
...
@@ -198,15 +208,15 @@ export default {
},
handleClick
()
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
info
.
empty
)
{
if
(
!
this
.
info
.
empty
)
{
if
(
!
this
.
value
.
trim
())
{
this
.
$u
.
toast
(
'内容不能为空'
);
return
false
;
}
}
let
notification
=
`input-sure-
${
this
.
type
}
`
;
let
str
=
this
.
value
if
(
this
.
info
.
type
!==
'textarea'
)
{
let
str
=
this
.
value
;
if
(
this
.
info
.
type
!==
'textarea'
)
{
str
=
str
.
replace
(
/
[\r\n]
/g
,
''
);
}
uni
.
$emit
(
notification
,
{
...
...
pages/workpoint/components/bill-tabs.vue
View file @
ab4fe69b
<
template
>
<view
class=
"bill-tabs left"
:class=
"
{ right: current === 2 }">
<view
class=
"bill-tabs-item"
:class=
"
{ 'bill-tabs-active': item.value === current }" v-for="(item, index) in list" :key="index" @click="change(item
.value
)">
<view
class=
"bill-tabs-item"
:class=
"
{ 'bill-tabs-active': item.value === current }" v-for="(item, index) in list" :key="index" @click="change(item)">
<view
class=
"bill-tabs-item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"bill-tabs-item-line"
v-if=
"item.value === current"
></view>
</view>
...
...
@@ -24,8 +24,8 @@ export default {
};
},
methods
:
{
change
(
i
ndex
)
{
this
.
$emit
(
'change'
,
i
ndex
);
change
(
i
tem
)
{
this
.
$emit
(
'change'
,
i
tem
);
}
}
};
...
...
pages/workpoint/loan-statement/loan-statement.vue
View file @
ab4fe69b
...
...
@@ -276,7 +276,8 @@ export default {
},
tabChange
(
index
)
{
this
.
tabCurrent
=
index
;
this
.
tabCurrent
=
item
.
value
;
this
.
form
.
type
=
item
.
type
},
checkAllUser
()
{
let
flag
=
this
.
checkedAll
?
false
:
true
;
...
...
@@ -287,7 +288,7 @@ export default {
},
toSetting
()
{
uni
.
navigateTo
({
url
:
'/pages/mine/
payments-setting/payments-setting
'
url
:
'/pages/mine/
employees/index
'
});
uni
.
$on
(
this
.
notification
,
res
=>
{
this
.
getBillTypeOptions
();
...
...
pages/workpoint/project-bill/components/bill-detail.vue
View file @
ab4fe69b
<
template
>
<view
class=
"debit-detail"
@
click=
"toBill"
>
<view
class=
"content"
>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
客户名称:
</text>
<text
class=
"content-item-value"
>
{{
detail
.
customerName
}}
</text>
<view
class=
"content-icon"
>
<text>
{{
resetName
(
detail
.
name
)
}}
</text>
</view>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
联系电话:
</text>
<text
class=
"content-item-value"
>
{{
detail
.
customerPhone
}}
</text>
</view>
<view
class=
"line"
>
<view
class=
"content-item-label"
>
{{
detail
.
name
}}
</view>
<view
class=
"content-item-value"
>
{{
detail
.
createTime
}}
</view>
</view>
</view>
<view
class=
"debit-detail-right"
>
<view
class=
"debt"
v-if=
"current===0||showDebtAmount"
>
<view
class=
"content-item debt-status"
>
{{
showDebtAmount
?
'欠款'
:
'未结清'
}}
</view>
<view
class=
"content-item debt-money"
>
<text>
¥
</text>
<text>
{{
detail
.
debtAmount
}}
</text>
</view>
</view>
<view
class=
"finish"
v-else
>
账单已结清
</view>
<view
class=
"debit-detail-right-label"
>
{{
detail
.
name
}}
</view>
<view
class=
"debit-detail-right-value"
:class=
"
{red:detail.createTime}">
{{
detail
.
createTime
}}
</view>
</view>
</view>
</
template
>
...
...
@@ -51,22 +41,19 @@ export default {
return
{};
},
methods
:{
resetName
(
name
)
{
return
name
.
slice
(
-
2
);
},
toBill
(){
this
.
$u
.
route
({
url
:
'/pages/maintain-bill/index'
,
type
:
'navigateTo'
,
params
:
{
customerId
:
this
.
detail
.
customerId
,
onlyDebt
:
1
,
}
});
// this.$Router.push({
// path:"/pages/maintain-bill/index",
// query:{
// this.$u.route({
// url: '/pages/maintain-bill/index',
// type: 'navigateTo',
// params: {
// customerId:this.detail.customerId,
// onlyDebt:1,
// }
// })
// });
}
}
};
...
...
@@ -80,11 +67,24 @@ export default {
padding
:
24upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
24upx
;
.content
{
width
:
420upx
;
position
:
relative
;
overflow
:
hidden
;
display
:
flex
;
align-items
:
center
;
&
-icon
{
width
:
72rpx
;
height
:
72rpx
;
background-color
:
#02a074
;
border-radius
:
16rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#ffffff
;
font-size
:
26rpx
;
margin-right
:
24rpx
;
}
&
-item
{
font-size
:
28upx
;
line-height
:
28upx
;
...
...
@@ -92,24 +92,14 @@ export default {
margin-bottom
:
32upx
;
}
&
-label
{
color
:
#8D8D8D
;
font-weight
:
bold
;
}
&
-value
{
font-weight
:
bold
;
color
:
#8D8D8D
;
}
}
.line
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
2upx
;
height
:
80upx
;
background
:
#F6F7FA
;
}
}
&
-right
{
flex
:
1
;
.finish
{
display
:
flex
;
align-items
:
center
;
...
...
pages/workpoint/project/project-edit.vue
View file @
ab4fe69b
<
template
>
<div>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
pages/workpoint/workpoint-create/workpoint-create.vue
View file @
ab4fe69b
...
...
@@ -6,16 +6,16 @@
<u-form-item
label=
"项目名称"
prop=
"templateName"
required
>
<view
class=
"right-view"
>
<view
class=
"placeholder"
@
click=
"openSelect"
>
<text
class=
"value-text"
v-if=
"form.
templateName"
>
{{
form
.
template
Name
}}
</text>
<text
class=
"value-text"
v-if=
"form.
projectName"
>
{{
form
.
project
Name
}}
</text>
<text
v-else
>
选择项目
</text>
<u-icon
name=
"arrow-right"
class=
"arrow"
></u-icon>
</view>
</view>
</u-form-item>
<u-form-item
label=
"日期"
prop=
"
day
Time"
required
>
<u-form-item
label=
"日期"
prop=
"
happen
Time"
required
>
<view
class=
"right-view"
>
<view
class=
"date-view"
hover-class=
"u-hover-class"
@
click=
"handleClickShowDateRange"
>
<view
class=
"date-text"
v-if=
"form.
dayTime"
>
{{
resetHappenTime
(
form
.
day
Time
)
}}
</view>
<view
class=
"date-text"
v-if=
"form.
happenTime"
>
{{
resetHappenTime
(
form
.
happen
Time
)
}}
</view>
<view
class=
"placeholder"
v-else
>
选择服务日期
</view>
<view
class=
"image-view"
><image
:src=
"dateImage"
></image></view>
</view>
...
...
@@ -38,13 +38,13 @@
<u-form-item
label=
"上班"
prop=
"work"
label-position=
"top"
required
>
<view
class=
""
>
<checkbox-groups
:checked=
"form.
work
"
:checked=
"form.
normal
"
:customStyle=
"checkboxCustomStyle"
:options=
"workTypeOptions"
@
handleClick=
"workTypeChange"
></checkbox-groups>
<view
class=
"custom"
v-if=
"form.
work
==='custom'"
>
<view
class=
"custom-label"
>
<view
class=
"custom"
v-if=
"form.
normal
==='custom'"
>
<view
class=
"custom-label"
@
click=
"changeUnit('normalType')"
>
<text>
按工量
</text>
<view
class=
"custom-label-icon"
>
<image
:src=
"customSwitchIcon"
mode=
""
></image>
...
...
@@ -53,7 +53,7 @@
<view
class=
"custom-value"
>
<u-input
type=
"digit"
v-model=
"form.
work
Number"
v-model=
"form.
normal
Number"
placeholder=
"填写数量"
:clearable=
"false"
input-align=
"right"
...
...
@@ -61,7 +61,7 @@
cursor-spacing=
"50"
:custom-style=
"customStyle"
/>
<text
class=
"custom-value-unit"
>
个工
</text>
<text
class=
"custom-value-unit"
>
{{
form
.
normalType
===
'HOURS'
?
'小时'
:
'个工'
}}
</text>
</view>
</view>
</view>
...
...
@@ -69,13 +69,13 @@
<u-form-item
label=
"加班"
prop=
"overtime"
label-position=
"top"
required
>
<view
class=
""
>
<checkbox-groups
:checked=
"form.over
time
"
:checked=
"form.over"
:customStyle=
"checkboxCustomStyle"
:options=
"overtimeTypeOptions"
@
handleClick=
"overtimeTypeChange"
></checkbox-groups>
<view
class=
"custom"
v-if=
"form.over
time
==='custom'"
>
<view
class=
"custom-label"
>
<view
class=
"custom"
v-if=
"form.over==='custom'"
>
<view
class=
"custom-label"
@
click=
"changeUnit('overType')"
>
<text>
按小时
</text>
<view
class=
"custom-label-icon"
>
<image
:src=
"customSwitchIcon"
mode=
""
></image>
...
...
@@ -84,7 +84,7 @@
<view
class=
"custom-value"
>
<u-input
type=
"digit"
v-model=
"form.over
time
Number"
v-model=
"form.overNumber"
placeholder=
"填写数量"
:clearable=
"false"
input-align=
"right"
...
...
@@ -92,7 +92,7 @@
cursor-spacing=
"50"
:custom-style=
"customStyle"
/>
<text
class=
"custom-value-unit"
>
小时
</text>
<text
class=
"custom-value-unit"
>
{{
form
.
overType
===
'HOURS'
?
'小时'
:
'个工'
}}
</text>
</view>
</view>
</view>
...
...
@@ -256,21 +256,26 @@ export default {
uploading
:
false
,
classificationList
:
[],
form
:
{
work
:
'100'
,
overtime
:
'null'
,
unit
:
''
,
templateName
:
''
,
customerPhone
:
''
,
receivableAmount
:
''
,
actualAmount
:
'0'
,
userIds
:
[
'self'
],
address
:
''
,
latitude
:
''
,
longitude
:
''
,
remark
:
''
,
attach
:
[],
type
:
''
,
// 收据样式
expenseDetails
:
[]
// 服务明细
projectId
:
''
,
projectName
:
''
,
happenTime
:
''
,
memberIds
:[],
remark
:
''
,
type
:
'TIME'
,
// 类型 TIME:记工-点工;CONTRACTOR:记工-包工;BORROWING:借支;SETTLE:结算
// 点工
normal
:
''
,
normalNumber
:
''
,
normalType
:
'UNIT'
,
over
:
''
,
overNumber
:
''
,
overType
:
'UNIT'
,
// 包工
number
:
''
,
unit
:
''
,
unitPrice
:
''
,
// 借支/结算
amount
:
''
},
showDatePicker
:
false
,
buttonLoading
:
false
,
...
...
@@ -346,7 +351,9 @@ export default {
checked
:
false
}
],
tabCurrent
:
1
tabCurrent
:
1
,
notification
:
'workpoint-create-remark'
,
};
},
computed
:
{
...
...
@@ -363,7 +370,7 @@ export default {
};
},
checkedAll
()
{
return
this
.
form
.
us
erIds
.
length
===
this
.
billingCategoryLength
;
return
this
.
form
.
memb
erIds
.
length
===
this
.
billingCategoryLength
;
}
},
onLoad
(
options
)
{
...
...
@@ -385,7 +392,7 @@ export default {
},
onUnload
()
{
uni
.
$off
(
'maintain-bill-detail'
);
uni
.
$off
(
'maintain-bill-choose-remark'
);
uni
.
$off
(
this
.
notification
);
},
onShow
()
{
this
.
getBillTypeOptions
();
...
...
@@ -409,25 +416,29 @@ export default {
chooseUnit
()
{
this
.
$refs
[
'unit-popup'
].
open
();
},
changeUnit
(
type
){
this
.
form
[
type
]
=
this
.
form
[
type
]
&&
this
.
form
[
type
]
===
'UNIT'
?
'HOURS'
:
'UNIT'
},
workTypeChange
(
item
)
{
this
.
form
.
work
=
item
.
value
;
this
.
form
.
normal
=
item
.
value
;
},
overtimeTypeChange
(
item
)
{
this
.
form
.
over
time
=
item
.
value
;
this
.
form
.
over
=
item
.
value
;
},
tabChange
(
index
)
{
this
.
tabCurrent
=
index
;
tabChange
(
item
)
{
this
.
tabCurrent
=
item
.
value
;
this
.
form
.
type
=
item
.
type
},
checkAllUser
()
{
let
flag
=
this
.
checkedAll
?
false
:
true
;
this
.
$refs
[
'billing-category'
].
checkAll
(
flag
);
},
billingCategoryChange
(
ids
)
{
this
.
form
.
us
erIds
=
ids
;
this
.
form
.
memb
erIds
=
ids
;
},
toSetting
()
{
uni
.
navigateTo
({
url
:
'/pages/workpoint/
member/member
'
url
:
'/pages/workpoint/
employees/index
'
});
uni
.
$on
(
this
.
notification
,
res
=>
{
this
.
getBillTypeOptions
();
...
...
@@ -454,10 +465,10 @@ export default {
}
},
setCheckedList
()
{
if
(
this
.
form
.
userIds
&&
this
.
form
.
us
erIds
.
length
)
{
if
(
this
.
form
.
memberIds
&&
this
.
form
.
memb
erIds
.
length
)
{
this
.
billingCategoryList
.
map
(
item
=>
{
item
.
map
(
li
=>
{
this
.
form
.
us
erIds
.
map
(
el
=>
{
this
.
form
.
memb
erIds
.
map
(
el
=>
{
if
(
li
.
id
===
el
)
{
li
.
checked
=
true
;
}
...
...
@@ -473,6 +484,19 @@ export default {
}
return
newArray
;
},
editRemark
(){
uni
.
$on
(
`input-sure-
${
this
.
notification
}
`
,
res
=>
{
console
.
log
(
res
)
this
.
form
.
remark
=
res
.
content
;
});
this
.
$u
.
route
({
url
:
'/pages/mine/input/input'
,
params
:
{
type
:
this
.
notification
,
value
:
encodeURIComponent
(
this
.
form
.
remark
)
}
});
},
repairDetail
()
{
this
.
loading
=
true
;
repairDetail
({
...
...
@@ -603,7 +627,7 @@ export default {
// 日历
calendarChange
(
e
)
{
console
.
log
(
'calendarChange'
,
e
);
this
.
form
.
day
Time
=
e
;
this
.
form
.
happen
Time
=
e
;
},
resetHappenTime
(
time
)
{
return
this
.
parseTime
(
time
,
'{y}-{m}-{d}'
);
...
...
@@ -635,6 +659,7 @@ export default {
padding
:
0
24rpx
;
padding-bottom
:
144rpx
;
.placeholder
{
font-weight
:
bold
;
color
:
#cccccc
;
}
.value-text
{
...
...
utils/options/index/index.js
View file @
ab4fe69b
import
{
indexBaseUrl
}
from
"@/utils/config.js"
export
const
minPopupOptions
=
[{
export
const
minPopupOptions
=
[
{
label
:
'记工时'
,
path
:
'/pages/workpoint/project/index'
,
icon
:
'jigongshitanchu@3x.png'
,
type
:
'0'
,
},
{
label
:
'记行程'
,
path
:
'/pages/schedule/create-schedule/create-schedule'
,
icon
:
'jixingcheng@3x.png'
,
...
...
utils/options/workpoint/index.js
View file @
ab4fe69b
export
const
tabOptions
=
[{
value
:
1
,
type
:
'TIME'
,
label
:
"点工"
},
{
value
:
2
,
type
:
'CONTRACTOR'
,
label
:
"包工/计量"
},
]
export
const
loanTabOptions
=
[{
value
:
1
,
type
:
'BORROWING'
,
label
:
"借支"
},
{
value
:
2
,
type
:
'SETTLE'
,
label
:
"结算"
},
]
export
const
workTypeOptions
=
[{
value
:
"100"
,
value
:
1
,
label
:
"一个工"
},
{
value
:
"50"
,
value
:
0.5
,
label
:
"半个工"
},
{
...
...
@@ -49,7 +53,7 @@ export const projectBillPages = [{
loadStatus
:
'loadmore'
,
freshing
:
false
,
triggered
:
false
,
},{
},
{
pageNumber
:
0
,
size
:
10
,
loaded
:
false
,
...
...
@@ -78,7 +82,7 @@ export const projectBillPages = [{
export
const
projectBillTabs
=
[{
title
:
'全部'
,
name
:
''
},{
},
{
title
:
'记工'
,
name
:
true
},
...
...
@@ -90,4 +94,4 @@ export const projectBillTabs = [{
title
:
'结算'
,
name
:
false
},
]
\ No newline at end of file
]
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