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
d2df992c
Commit
d2df992c
authored
Nov 09, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into lwh-dev
parents
9335e21d
7aac5f0a
Pipeline
#3969
canceled with stages
Changes
18
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1636 additions
and
306 deletions
+1636
-306
index.js
api/bill/index.js
+15
-0
shop.js
api/mine/shop.js
+2
-2
project-bill.js
api/workpoint/project-bill.js
+20
-0
index.vue
components/cell-maintain-bill/index.vue
+17
-5
index.vue
components/navbar-right/index.vue
+93
-81
index.vue
components/pop-normal/index.vue
+8
-5
bill-style.vue
pages/maintain-bill/bill-style.vue
+61
-7
bill-count.vue
pages/maintain-bill/components/bill-count.vue
+1
-1
particulars-record.vue
pages/maintain-bill/components/particulars-record.vue
+7
-0
pop-shop.vue
pages/maintain-bill/components/pop-shop.vue
+244
-0
create.vue
pages/maintain-bill/create.vue
+23
-14
detail.vue
pages/maintain-bill/detail.vue
+179
-46
input.vue
pages/mine/input/input.vue
+36
-0
bill-detail.vue
pages/workpoint/project-bill/components/bill-detail.vue
+13
-11
cell-project-bill.vue
...s/workpoint/project-bill/components/cell-project-bill.vue
+189
-0
summary-content.vue
pages/workpoint/project-bill/components/summary-content.vue
+347
-0
summary-count.vue
pages/workpoint/project-bill/components/summary-count.vue
+132
-0
project-bill.vue
pages/workpoint/project-bill/project-bill.vue
+249
-134
No files found.
api/bill/index.js
View file @
d2df992c
import
request
from
"@/utils/request.js"
import
store
from
"@/store"
export
function
getList
(
data
)
{
return
request
({
url
:
`/rest/bookRecord/page`
,
...
...
@@ -76,4 +78,17 @@ export async function getBookRecordPage(data) {
data
,
noLoading
:
true
})
}
export
function
reportEvent
(
event
)
{
let
userInfo
=
store
.
getters
.
userInfo
// 微信上报事件
var
param
=
{
user_name
:
userInfo
.
nickname
,
user_id
:
userInfo
.
id
,
user_phone
:
userInfo
.
mobile
,
remain_day
:
userInfo
.
remainDay
,
vip
:
userInfo
.
vip
&&
userInfo
.
vip
.
desc
};
wx
.
reportEvent
(
event
,
param
);
}
\ No newline at end of file
api/mine/shop.js
View file @
d2df992c
import
request
from
"@/utils/request.js"
export
function
getShopInfo
()
{
export
async
function
getShopInfo
()
{
return
request
({
url
:
`/rest/user/shop`
,
method
:
'GET'
,
})
}
export
function
updateShopInfo
(
data
)
{
export
async
function
updateShopInfo
(
data
)
{
return
request
({
url
:
`/rest/user/shop`
,
method
:
'POST'
,
...
...
api/workpoint/project-bill.js
View file @
d2df992c
...
...
@@ -35,4 +35,24 @@ export function deleteBill(data) {
data
,
noLoading
:
true
})
}
// 项目账单统计汇总
export
async
function
getStatistics
(
data
)
{
return
request
({
url
:
`/rest/project/record/statistics`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
// 获取自己的名片
export
async
function
getStatisticsItem
(
data
)
{
return
request
({
url
:
`/rest/project/record/statistics/item`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
\ No newline at end of file
components/cell-maintain-bill/index.vue
View file @
d2df992c
...
...
@@ -35,14 +35,14 @@
</view>
-->
<view
class=
"info-view"
>
<view
class=
"name-view"
>
<view>
{{
info
.
customerName
}}
</view>
<view
class=
"phone-view"
>
{{
info
.
customerPhone
}}
</view>
<view>
{{
info
.
customerName
||
info
.
customer
.
name
}}
</view>
<view
class=
"phone-view"
>
{{
info
.
customerPhone
||
info
.
customer
.
phone
}}
</view>
</view>
<view
class=
"location-view"
v-if=
"info.address"
>
<view
class=
"location-view"
v-if=
"info.address
|| (isDetail && !isCollection)
"
>
<view
class=
"image-view"
>
<image
:src=
"locationImage"
></image>
</view>
<view
>
{{
info
.
address
}}
</view>
<view
class=
"address-view"
>
{{
info
.
address
||
'计划'
}}
</view>
</view>
<view
class=
"time-view"
>
<view
class=
"image-view"
>
...
...
@@ -53,7 +53,7 @@
</view>
<!--
<view
class=
"line-view"
></view>
-->
<view
class=
"bottom-view"
:style=
"statusSetting[info.settleState.code].style"
>
<view
class=
"bottom-view"
:style=
"statusSetting[info.settleState.code].style"
v-if=
"isNormal || isSelect"
>
<view
v-for=
"(item, index) in bottoms"
:key=
"index"
class=
"item-view"
>
<view
v-if=
"index % 2"
class=
"line-view"
>
</view>
<template
v-else
>
...
...
@@ -95,9 +95,15 @@ export default {
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
isDetail
()
{
return
this
.
type
==
'detail'
},
isSelect
()
{
return
this
.
type
==
'select'
},
isNormal
()
{
return
!
this
.
type
||
this
.
type
==
'normal'
},
middleImage
()
{
return
this
.
baseUrl
+
'fengexuxian-s@3x.png'
},
...
...
@@ -170,6 +176,9 @@ export default {
isRefund
()
{
return
this
.
info
.
type
==
'refund'
},
isCollection
()
{
return
this
.
info
.
type
==
'collection'
},
maintainTypes
()
{
return
{
'receipt'
:
{
...
...
@@ -338,6 +347,9 @@ export default {
flex-shrink
:
0
;
margin-top
:
4rpx
;
}
.address-view
{
min-height
:
40rpx
;
}
}
.time-view
{
...
...
components/navbar-right/index.vue
View file @
d2df992c
<
template
>
<u-navbar
:title=
"title"
:title-color=
"titleColor"
:back-icon-color=
"backIconColor"
:title-bold=
"true"
:back-text=
"backText"
:back-text-style=
"backStyle"
:background=
"background"
:border-bottom=
"false"
:custom-back=
"goBack"
>
<view
v-if=
"text || image"
class=
"slot-wrap"
slot=
"right"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleClickRight, 500)"
>
<view
v-if=
"image"
class=
"image-view"
:style=
"'width:' + imageWidth + 'rpx'"
><image
mode=
"widthFix"
:src=
"image"
></image
></view>
<view>
{{
text
}}
</view>
<u-navbar
:title=
"title"
:title-color=
"titleColor"
:back-icon-color=
"backIconColor"
:title-bold=
"true"
:back-text=
"backText"
:back-text-style=
"backStyle"
:background=
"background"
:border-bottom=
"false"
:custom-back=
"goBack"
>
<view
class=
"slot-wrap"
slot=
"right"
>
<view
class=
"content-view"
v-if=
"text || image"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleClickRight, 500)"
>
<view
v-if=
"image"
class=
"image-view"
:style=
"'width:' + imageWidth + 'rpx'"
>
<image
mode=
"widthFix"
:src=
"image"
></image>
</view>
<view>
{{
text
}}
</view>
</view>
<view
class=
"content-view"
v-if=
"secondText || secondImage"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleClickRightSecond, 500)"
>
<view
v-if=
"image"
class=
"image-view"
:style=
"'width:' + imageWidth + 'rpx'"
>
<image
mode=
"widthFix"
:src=
"secondImage"
></image>
</view>
<view>
{{
secondText
}}
</view>
</view>
</view>
</u-navbar>
</
template
>
...
...
@@ -47,13 +41,21 @@ export default {
type
:
String
,
default
:
''
,
},
secondText
:
{
type
:
String
,
default
:
''
,
},
secondImage
:
{
type
:
String
,
default
:
''
,
},
imageWidth
:
{
type
:
[
String
,
Number
],
default
:
'24'
,
},
background
:
{
type
:
Object
,
default
()
{
default
()
{
return
{
'background-color'
:
'transparent'
}
},
},
...
...
@@ -71,7 +73,7 @@ export default {
},
backTextStyle
:
{
type
:
Object
,
default
()
{
default
()
{
return
{
color
:
'#191C27'
,
'font-size'
:
'weight'
,
...
...
@@ -80,43 +82,43 @@ export default {
}
},
},
// 自定义返回逻辑
customBack
:
{
type
:
Function
,
// 自定义返回逻辑
customBack
:
{
type
:
Function
,
// #ifdef APP-PLUS
default
:
()
=>
{
if
(
getCurrentPages
().
length
==
1
)
{
uni
.
switchTab
({
url
:
'/pages/index/index'
});
}
else
{
uni
.
navigateBack
();
}
}
default
:
()
=>
{
if
(
getCurrentPages
().
length
==
1
)
{
uni
.
switchTab
({
url
:
'/pages/index/index'
});
}
else
{
uni
.
navigateBack
();
}
}
// #endif
// #ifdef MP
default
()
{
default
()
{
return
()
=>
{
if
(
getCurrentPages
().
length
==
1
)
{
uni
.
switchTab
({
url
:
'/pages/index/index'
});
}
else
{
uni
.
navigateBack
();
}
}
if
(
getCurrentPages
().
length
==
1
)
{
uni
.
switchTab
({
url
:
'/pages/index/index'
});
}
else
{
uni
.
navigateBack
();
}
}
}
// #endif
// #endif
},
},
},
data
()
{
data
()
{
return
{}
},
computed
:
{
backStyle
()
{
backStyle
()
{
if
(
this
.
backTextBold
)
{
return
{
...
this
.
backTextStyle
,
'font-weight'
:
'bold'
}
return
{
...
this
.
backTextStyle
,
'font-weight'
:
'bold'
}
}
else
{
return
this
.
backTextStyle
}
...
...
@@ -124,19 +126,22 @@ export default {
},
methods
:
{
handleClickRight
()
{
this
.
$emit
(
'click'
)
handleClickRight
()
{
this
.
$emit
(
'click'
,
0
)
},
handleClickRightSecond
()
{
this
.
$emit
(
'click'
,
1
)
},
goBack
()
{
// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
if
(
typeof
this
.
customBack
===
'function'
)
{
// 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this
// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
this
.
customBack
.
bind
(
this
.
$u
.
$parent
.
call
(
this
))();
}
else
{
uni
.
navigateBack
();
}
}
goBack
()
{
// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
if
(
typeof
this
.
customBack
===
'function'
)
{
// 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this
// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
this
.
customBack
.
bind
(
this
.
$u
.
$parent
.
call
(
this
))();
}
else
{
uni
.
navigateBack
();
}
}
},
}
</
script
>
...
...
@@ -144,25 +149,32 @@ export default {
.slot-wrap
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
// width: 160rpx;
padding
:
0
18rpx
;
height
:
48rpx
;
border-radius
:
24rpx
;
background-color
:
#ffffff
;
color
:
#333333
;
font-size
:
24rpx
;
// #ifdef APP-PLUS
margin-right
:
24rpx
;
justify-content
:
flex-end
;
// #ifdef APP-PLUS
margin-right
:
24rpx
;
// #endif
// #ifdef MP
// #ifdef MP
margin-right
:
8rpx
;
// #endif
// #endif
.content-view
{
margin-left
:
24rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
// width: 160rpx;
padding
:
0
18rpx
;
height
:
48rpx
;
border-radius
:
24rpx
;
background-color
:
#ffffff
;
color
:
#333333
;
font-size
:
24rpx
;
.image-view
{
width
:
20rpx
;
height
:
24rpx
;
margin-right
:
8rpx
;
.image-view
{
width
:
20rpx
;
height
:
24rpx
;
margin-right
:
8rpx
;
}
}
}
</
style
>
components/pop-normal/index.vue
View file @
d2df992c
...
...
@@ -33,7 +33,7 @@
<slot
v-else
/>
</view>
<view
class=
"buttons-view"
>
<view
class=
"left-view"
>
<view
v-if=
"showCancel"
class=
"left-view"
>
<u-button
open-type=
"share"
v-if=
"isShare"
...
...
@@ -123,7 +123,11 @@ export default {
tipSelected
:
{
type
:
Boolean
,
default
:
false
}
},
showCancel
:
{
type
:
Boolean
,
default
:
true
},
},
data
()
{
return
{
...
...
@@ -237,10 +241,11 @@ export default {
}
.buttons-view
{
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
center
;
align-items
:
center
;
margin-bottom
:
32rpx
;
.left-view
{
margin-right
:
30rpx
;
.cancel-view
{
color
:
#02a074
;
height
:
96rpx
;
...
...
@@ -261,8 +266,6 @@ export default {
}
}
.right-view
{
margin-left
:
30rpx
;
.confirm-view
{
color
:
#ffffff
;
height
:
96rpx
;
...
...
pages/maintain-bill/bill-style.vue
View file @
d2df992c
...
...
@@ -29,27 +29,32 @@
</scroll-view>
<!-- #endif -->
</view>
<!--
<submit-button
@
handleClick=
"submit"
text=
"下一步"
></submit-button>
-->
<view
class=
"bottom-view"
>
<u-button
type=
"success"
:
custom-style=
"customCreate"
@
click=
"s
ubmit"
>
<u-button
type=
"success"
:
loading=
"loading"
:custom-style=
"customCreate"
@
click=
"handleClickS
ubmit"
>
<view
class=
"create-view"
>
下一步
</view>
</u-button>
</view>
<PopShop
:visible
.
sync=
"showPop"
:info=
"info"
@
cancel=
"handleClickCancel"
@
confirm=
"handleClickConfirm"
/>
</view>
</
template
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
;
// import SubmitButton from '@/components/submit-button/index
.vue';
import
PopShop
from
'./components/pop-shop
.vue'
;
import
{
billBaseUrl
,
mineBaseUrl
}
from
'@/utils/config.js'
;
import
{
setMaintainBillType
,
getMaintainBillType
}
from
'@/utils/common.js'
;
import
{
reportEvent
}
from
'@/api/bill/index.js'
import
{
getShopInfo
,
updateShopInfo
}
from
"@/api/mine/shop.js"
export
default
{
components
:
{
NavbarRight
,
// SubmitButton
PopShop
},
data
()
{
return
{
showPop
:
false
,
loading
:
false
,
list
:
""
,
backText
:
'收据记账'
,
rightImage
:
mineBaseUrl
+
'dianpushezhi@3x.png'
,
...
...
@@ -93,7 +98,9 @@ export default {
'border-radius'
:
'16rpx'
,
width
:
'686rpx'
},
};
info
:
{},
infoKeys
:
[
'name'
,
'address'
,
'phone'
,
'lister'
]
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
list
)
{
...
...
@@ -103,6 +110,7 @@ export default {
},
onReady
()
{
this
.
type
=
getMaintainBillType
()
||
'receipt'
;
this
.
getShopInfo
()
},
methods
:
{
handleClick
(
item
)
{
...
...
@@ -121,6 +129,14 @@ export default {
}
});
},
handleClickSubmit
()
{
this
.
loading
=
true
if
(
!
this
.
checkValue
())
{
this
.
showPop
=
true
}
else
{
this
.
submit
()
}
},
submit
()
{
setMaintainBillType
(
this
.
type
)
if
(
this
.
type
==
'collection'
)
{
...
...
@@ -138,14 +154,52 @@ export default {
url
:
path
});
}
this
.
loading
=
false
// #ifdef MP-WEIXIN
// 上报选择类型
reportEvent
(
`selected_bill_
${
this
.
type
}
_type`
);
// #endif
},
handlClickRight
()
{
this
.
$u
.
route
({
url
:
'/pages/mine/shop-setting/shop-setting'
,
params
:
{}
});
}
},
getShopInfo
()
{
getShopInfo
({})
.
then
(
res
=>
{
this
.
info
=
res
.
data
||
{}
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
updateShopInfo
(
info
)
{
updateShopInfo
(
info
)
.
then
(
res
=>
{
this
.
info
=
res
.
data
||
{}
this
.
submit
()
})
.
catch
(
err
=>
{
this
.
loading
=
false
console
.
log
(
err
);
});
},
handleClickConfirm
(
info
)
{
this
.
info
=
info
this
.
updateShopInfo
(
info
)
},
handleClickCancel
()
{
this
.
submit
()
},
checkValue
()
{
for
(
var
item
of
this
.
infoKeys
)
{
if
(
!
this
.
info
[
item
])
return
false
}
return
true
},
}
};
</
script
>
...
...
pages/maintain-bill/components/bill-count.vue
View file @
d2df992c
...
...
@@ -96,7 +96,7 @@ export default {
}
&
-label
{
font-size
:
24upx
;
color
:
#8
d8d8d
;
color
:
#8
D8D8D
;
}
&
-line
{
position
:
absolute
;
...
...
pages/maintain-bill/components/particulars-record.vue
View file @
d2df992c
...
...
@@ -94,7 +94,14 @@ export default {
}
};
},
created
()
{
console
.
log
(
'-------created-----'
,
this
.
showRecord
)
},
watch
:
{
showRecord
(
val
)
{
console
.
log
(
'-------showRecord-----'
,
val
)
this
.
show
=
val
},
faultRecord
:
{
handler
(
val
)
{
this
.
setForm
(
val
)
...
...
pages/maintain-bill/components/pop-shop.vue
0 → 100644
View file @
d2df992c
<
template
>
<u-popup
v-model=
"show"
safe-area-inset-bottom
border-radius=
"24"
mode=
"center"
width=
"86%"
:closeable=
"false"
@
close=
"handleClose"
:mask-close-able=
"false"
>
<view
class=
"pop-shop"
>
<view
class=
"title-view"
>
完善店铺信息
</view>
<view
class=
"tip-view"
>
为了更好的体验,请先完善以下信息:
</view>
<view
class=
"content-view"
>
<view
class=
"part-view"
v-for=
"(item, key) in infoKeys"
:key=
"key"
hover-class=
"u-hover-class"
@
click=
"handleClick(key)"
>
<view
class=
"label-view"
>
{{
item
.
name
}}
</view>
<view
class=
"value-view"
>
<view
v-if=
"shopInfo[key]"
>
{{
key
==
'phone'
?
showText
(
shopInfo
[
key
])
:
shopInfo
[
key
]
}}
</view>
<view
class=
"no-value"
v-else
>
{{
shopInfo
[
key
]
||
item
.
placeholder
}}
</view>
<u-icon
class=
"icon-view"
name=
"arrow-right"
color=
"#CCCCCC"
size=
"24"
></u-icon>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"left-view"
>
<u-button
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
>
<view
class=
"cancel-view"
>
下次完善
</view>
</u-button>
</view>
<view
class=
"right-view"
>
<u-button
:loading=
"loading"
:type=
"customConFirm.type"
:custom-style=
"customConFirm"
@
click=
"handleClickConfirm"
>
<view
class=
"confirm-view"
>
保存
</view>
</u-button>
</view>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
info
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
return
{
show
:
false
,
shopInfo
:
{}
}
},
computed
:
{
infoKeys
()
{
return
{
name
:
{
name
:
"店铺名称"
,
placeholder
:
'填写店铺名称20字以内'
,
},
address
:
{
name
:
'店铺地址'
,
placeholder
:
'填写店铺地址信息'
,
},
phone
:
{
name
:
'联系电话'
,
placeholder
:
'填写联系电话'
,
},
lister
:
{
name
:
'收款人'
,
placeholder
:
'填写收款人'
,
},
}
},
customCancel
()
{
return
{
color
:
'transparent'
,
height
:
'96rpx'
,
width
:
'264rpx'
,
border
:
'2rpx solid #8D8D8D'
,
'border-radius'
:
'16rpx'
,
}
},
customConFirm
()
{
return
{
type
:
'success'
,
color
:
'transparent'
,
'background-color'
:
'#02A074'
,
height
:
'96rpx'
,
width
:
'264rpx'
,
}
},
},
watch
:
{
visible
(
val
)
{
this
.
show
=
val
this
.
loading
=
false
if
(
val
)
{
this
.
shopInfo
=
{...
this
.
info
}
}
},
},
methods
:
{
handleClick
(
key
)
{
let
type
=
`pop-shop-
${
key
}
`
this
.
$u
.
route
({
url
:
'/pages/mine/input/input'
,
params
:
{
type
:
type
,
value
:
this
.
shopInfo
[
key
],
}
});
uni
.
$once
(
`input-sure-
${
type
}
`
,
res
=>
{
this
.
shopInfo
[
key
]
=
res
.
content
});
},
handleClickConfirm
()
{
if
(
!
this
.
checkValue
())
{
return
}
this
.
loading
=
true
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'confirm'
,
{
...
this
.
shopInfo
})
},
checkValue
()
{
for
(
var
item
in
this
.
infoKeys
)
{
this
.
$refs
.
uToast
.
show
({
title
:
`请输入
${
this
.
infoKeys
[
item
].
name
}
`
,
type
:
'warning'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
focus
=
true
;
}
});
if
(
!
this
.
shopInfo
[
item
])
return
false
}
return
true
},
handleClickCancel
()
{
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'cancel'
)
},
changeVisibleValue
(
val
)
{
this
.
show
=
val
this
.
$emit
(
'update:visible'
,
val
)
},
handleClose
()
{
this
.
changeVisibleValue
(
false
)
},
showText
(
string
)
{
var
mobile
=
string
?
(
string
.
substring
(
0
,
3
)
+
' '
+
string
.
substring
(
3
,
7
)
+
' '
+
string
.
substring
(
7
,
11
))
:
''
return
mobile
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pop-shop
{
text-align
:
center
;
padding
:
24rpx
32rpx
;
background-image
:
linear-gradient
(
to
bottom
,
#f4fffc
0%
,
#ffffff
50%
);
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40rpx
;
margin
:
32rpx
0
24rpx
0
;
}
.tip-view
{
color
:
#8D8D8D
;
font-size
:
28rpx
;
text-align
:
left
;
margin-bottom
:
24rpx
;
}
.content-view
{
margin-bottom
:
32rpx
;
.part-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
28rpx
;
color
:
#333333
;
padding
:
20rpx
0
;
.label-view
{
height
:
70rpx
;
line-height
:
70rpx
;
}
.value-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
height
:
70rpx
;
line-height
:
70rpx
;
font-weight
:
bold
;
.no-value
{
color
:
#CCCCCC
,
}
.icon-view
{
margin-left
:
16rpx
;
}
}
}
}
.bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
16rpx
;
.left-view
{
.cancel-view
{
color
:
#8D8D8D
;
height
:
96rpx
;
line-height
:
96rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
.right-view
{
margin-left
:
30rpx
;
.confirm-view
{
color
:
#ffffff
;
height
:
96rpx
;
line-height
:
96rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
}
}
</
style
>
pages/maintain-bill/create.vue
View file @
d2df992c
...
...
@@ -233,6 +233,7 @@
showTimePicker
:
false
,
buttonLoading
:
false
,
billId
:
''
,
copyId
:
''
,
firstDelete
:
true
,
deleteForm
:
{},
faultRecord
:
{
...
...
@@ -281,6 +282,9 @@
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
;
},
isCopy
()
{
return
this
.
operateType
==
'copy'
},
dateImage
()
{
return
this
.
baseUrl
+
'riqi@3x.png'
;
},
...
...
@@ -400,16 +404,19 @@
if
(
options
&&
options
.
billId
)
{
this
.
billId
=
options
.
billId
;
}
if
(
options
&&
options
.
copyId
)
{
this
.
copyId
=
options
.
copyId
;
}
if
(
options
&&
options
.
type
)
{
this
.
form
.
type
=
options
.
type
;
}
this
.
freshing
=
false
;
if
(
this
.
billId
)
{
this
.
repairDetail
();
if
(
this
.
billId
||
this
.
copyId
)
{
this
.
repairDetail
(
this
.
billId
||
this
.
copyId
);
}
uni
.
$on
(
'maintain-bill-detail'
,
res
=>
{
this
.
repairDetail
();
this
.
repairDetail
(
this
.
billId
);
});
if
(
options
&&
options
.
list
)
{
let
list
=
JSON
.
parse
(
decodeURIComponent
(
decodeURIComponent
(
decodeURIComponent
(
options
.
list
))));
...
...
@@ -567,10 +574,11 @@
}
});
},
repairDetail
()
{
repairDetail
(
id
)
{
if
(
!
id
)
return
this
.
loading
=
true
;
repairDetail
({
id
:
this
.
billI
d
id
:
i
d
})
.
then
(
res
=>
{
if
(
res
.
data
)
{
...
...
@@ -587,7 +595,6 @@
item
.
uid
=
random_string
();
});
this
.
form
=
{
id
:
data
.
id
,
customerName
:
data
.
customer
.
name
,
customerPhone
:
data
.
customer
.
phone
,
receivableAmount
:
data
.
receivableAmount
,
...
...
@@ -617,14 +624,16 @@
repairRecordId
:
data
.
id
};
}
// this.faultRecord = data.faultRecord || {
// category: '',
// machineModel: '',
// repairResult: '',
// symptom: '',
// repairRecordId: data.id
// };
this
.
showRecord
=
this
.
info
.
faultRecord
.
id
?
true
:
false
;
if
(
this
.
billId
)
{
this
.
form
.
id
=
data
.
id
this
.
form
.
copyId
=
''
this
.
showRecord
=
data
.
faultRecord
.
id
?
true
:
false
;
}
else
if
(
this
.
copyId
)
{
this
.
showRecord
=
data
.
faultRecord
.
id
?
true
:
false
;
this
.
form
.
id
=
''
this
.
form
.
copyId
=
data
.
id
this
.
faultRecord
.
id
=
''
}
},
handleListChange
(
lists
)
{
this
.
form
.
attach
=
lists
;
...
...
pages/maintain-bill/detail.vue
View file @
d2df992c
<
template
>
<view
class=
"maintain-detail"
>
<NavbarRight
backTextBold
backText=
"详情"
text=
"删除"
:image=
"deleteImage"
@
click=
"handlClickDelete
"
/>
<NavbarRight
backTextBold
backText=
"详情"
text=
"删除"
secondText=
"复制账单"
:image=
"deleteImage"
:secondImage=
"fuzhiImage"
@
click=
"handlClickNav
"
/>
<view
class=
"content-view"
>
<scroll-view
scroll-y
...
...
@@ -15,7 +15,10 @@
enable-back-to-top
>
<view
class=
"scroll-view"
>
<view
class=
"status-view"
>
<view
class=
"head-view"
>
<CellMaintainBill
:info=
"info"
type=
"detail"
/>
</view>
<!--
<view
class=
"status-view"
>
<text
:style=
"'color:' + statusSetting[info.settleState.code].color"
>
{{
statusSetting
[
info
.
settleState
.
code
].
text
}}
</text>
·
<text
:style=
"'color:' + statusSetting[info.sendStatus.code].color"
>
{{
statusSetting
[
info
.
sendStatus
.
code
].
text
}}
</text>
...
...
@@ -29,14 +32,32 @@
</view>
<view
v-else
class=
"line-view"
></view>
</view>
</view>
<view
class=
"money-view part-view"
>
</view>
-->
<view
class=
"info-view"
>
<template
v-if=
"info.expenseDetails && info.expenseDetails.length > 0"
>
<view
class=
"expense-details"
>
<view
class=
"expense-title-view"
>
收据明细
</view>
<view
class=
"extend-view"
v-if=
"isCollection"
>
<view
class=
"extend-label"
>
交来
</view>
<view
class=
"extend-value"
>
{{
info
.
extend
.
collectionReason
||
''
}}
</view>
</view>
<template
v-else
>
<view
:class=
"['expense-item-view',
{last: index + 1 == info.expenseDetails.length}]" v-for="(item, index) in info.expenseDetails" :key="index">
<view
class=
"expense-left-view"
>
{{
item
.
name
}}
</view>
<view
class=
"expense-middle-view"
>
{{
formatCount
(
item
.
unitPrice
)
+
'/'
+
item
.
unit
+
'*'
+
item
.
number
}}
</view>
<view
class=
"expense-right-view"
>
{{
formatCount
(
item
.
total
)
}}
</view>
</view>
</
template
>
</view>
<view
class=
"middle-image-view"
><image
:src=
"middleImage"
></image></view>
</template>
<view
class=
"money-view"
>
<view
class=
"list-view"
v-for=
"(item, index) in moneyKeys"
:key=
"index"
>
<view
class=
"item-view"
>
<view
class=
"label-view"
>
{{ item.title }}
</view>
<view
v-if=
"index != 2"
class=
"value-view"
>
¥{{ item.value }}
</view>
<view
v-else
class=
"right-view"
>
<view
class=
"money-view"
:style=
"'color:' + item.color"
>
¥
{{
item
.
value
}}
</view>
<view
class=
"money-
text-
view"
:style=
"'color:' + item.color"
>
¥{{ item.value }}
</view>
|
<view
class=
"button-view"
...
...
@@ -50,7 +71,9 @@
</view>
</view>
</view>
<view
class=
"remark-view part-view"
v-if=
"info.remark || (info.attach && info.attach.length > 0)"
>
</view>
<view
class=
"remark-view"
v-if=
"info.remark || (info.attach && info.attach.length > 0)"
>
<view
class=
"title-view"
>
备注信息:
</view>
<view
class=
"remark-content-view"
>
<text
class=
"remark-text"
>
{{ info.remark }}
</text>
...
...
@@ -67,7 +90,7 @@
</view>
</view>
</view>
<view
class=
"record-list-view
part-view
"
v-if=
"info.histories && info.histories.length > 0"
>
<view
class=
"record-list-view"
v-if=
"info.histories && info.histories.length > 0"
>
<view
class=
"title-view"
>
账单履历
</view>
<u-time-line>
<u-time-line-item
v-for=
"(item, index) in info.histories"
:key=
"index"
nodeTop=
"10"
>
...
...
@@ -121,13 +144,16 @@
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
;
import
PopNormal
from
'@/components/pop-normal'
;
import
CellMaintainBill
from
'@/components/cell-maintain-bill'
;
import
{
repairDetail
,
repairSettle
,
repairSync
,
repairDelete
,
repairSend
}
from
'@/api/maintain/index.js'
;
import
{
formatCount
}
from
'@/utils/common.js'
;
export
default
{
components
:
{
NavbarRight
,
PopNormal
PopNormal
,
CellMaintainBill
},
data
()
{
return
{
...
...
@@ -151,12 +177,18 @@ export default {
deleteImage
()
{
return
this
.
baseUrl
+
'shanchuzhangdanxiangqing@3x.png'
;
},
fuzhiImage
()
{
return
this
.
baseUrl
+
'fuzhizhangdan@3x.png'
},
homeImage
()
{
return
this
.
baseUrl
+
'huishouye@3x.png'
;
},
isSure
()
{
return
this
.
info
.
sendStatus
.
code
==
'SURE'
||
this
.
info
.
settleState
.
code
==
'YES'
;
},
middleImage
()
{
return
this
.
baseUrl
+
'fengexuxian@3x-3.png'
;
},
// sendStatus WAIT:未发送;WAIT_SURE:未确定;SURE:已确定
// settleState NO:未结清;YES:已结清
statusSetting
()
{
...
...
@@ -207,6 +239,9 @@ export default {
isRefund
()
{
return
this
.
info
.
type
==
'refund'
},
isCollection
()
{
return
this
.
info
.
type
==
'collection'
},
moneyKeys
()
{
return
[
{
...
...
@@ -277,6 +312,13 @@ export default {
confirmText
:
'确定'
,
content
:
'是否将该账单转入账单明细统计?'
,
bottomTip
:
''
},
{
title
:
'操作提醒'
,
type
:
'normal'
,
confirmText
:
'确定'
,
content
:
'是否复制该账单?'
,
bottomTip
:
''
}
];
},
...
...
@@ -404,8 +446,12 @@ export default {
}
}
},
handlClickDelete
()
{
this
.
current
=
0
;
handlClickNav
(
index
)
{
if
(
index
==
0
)
{
this
.
current
=
0
;
}
else
{
this
.
current
=
3
}
this
.
visible
=
true
;
},
handleClickOperate
()
{
...
...
@@ -540,30 +586,42 @@ export default {
}
index
++
;
}
// 回首页
this
.
toCreatePage
();
this
.
toCreatePage
({
billId
:
this
.
billId
});
},
toCreatePage
()
{
toCreatePage
(
params
,
type
=
'navigateTo'
)
{
this
.
$u
.
route
({
url
:
'pages/maintain-bill/create'
,
type
:
'navigateTo'
,
params
:
{
billId
:
this
.
billId
}
type
:
type
,
params
:
params
});
},
handleClickConfirm
(
select
)
{
if
(
this
.
current
==
0
)
{
// 删除账单
this
.
repairDelete
(
select
);
}
else
if
(
this
.
current
==
1
)
{
// 标记为已结清
this
.
repairSettle
();
}
else
if
(
this
.
current
==
2
)
{
// 同步账单
this
.
repairSync
();
switch
(
this
.
current
)
{
case
0
:
// 删除账单
this
.
repairDelete
(
select
);
break
case
1
:
// 标记为已结清
this
.
repairSettle
();
break
case
2
:
// 同步账单
this
.
repairSync
();
break
case
3
:
// 复制账单
this
.
copyBill
();
break
}
},
copyBill
()
{
this
.
toCreatePage
({
copyId
:
this
.
billId
},
'redirectTo'
);
},
handleClickPreview
(
index
)
{
uni
.
previewImage
({
urls
:
this
.
info
.
attach
,
...
...
@@ -601,15 +659,91 @@ export default {
.scroll-view
{
padding-bottom
:
44rpx
;
}
.status-view
{
font-weight
:
bold
;
font-size
:
40rpx
;
// .status-view {
// font-weight: bold;
// font-size: 40rpx;
// }
.head-view
{
margin-bottom
:
24rpx
;
}
.part-view
{
.info-view
{
border-radius
:
16rpx
;
overflow
:
hidden
;
.expense-details
{
background-color
:
#ffffff
;
.expense-title-view
{
font-size
:
32rpx
;
color
:
#333333
;
font-weight
:
bold
;
padding
:
24rpx
24rpx
8rpx
24rpx
;
}
.extend-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-start
;
padding
:
24rpx
;
.extend-label
{
width
:
200rpx
;
flex-shrink
:
0
;
text-align
:
left
;
color
:
#8D8D8D
;
flex-shrink
:
0
;
}
.extend-value
{
text-align
:
right
;
flex
:
1
;
font-weight
:
bold
;
color
:
#333333
;
}
}
.expense-item-view
{
margin
:
0
24rpx
;
height
:
108rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
28rpx
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
text-align
:
right
;
border-bottom
:
2rpx
solid
#F6F7FA
;
&
.last
{
border-bottom
:
0
;
}
.expense-left-view
{
width
:
200rpx
;
flex-shrink
:
0
;
text-align
:
left
;
color
:
#8D8D8D
}
.expense-middle-view
{
width
:
240rpx
;
flex-shrink
:
0
;
font-weight
:
bold
;
margin-left
:
6rpx
;
}
.expense-right-view
{
width
:
200rpx
;
flex-shrink
:
0
;
font-weight
:
bold
;
margin-left
:
6rpx
;
}
}
}
}
.middle-image-view
{
height
:
24rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
position
:
relative
;
}
.money-view
{
padding
:
16rpx
24rpx
24rpx
24rpx
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
margin-top
:
24rpx
;
.list-view
{
.item-view
{
padding
:
24rpx
0
8rpx
0
;
...
...
@@ -619,7 +753,7 @@ export default {
font-size
:
28rpx
;
.label-view
{
color
:
#8
d8d8d
;
color
:
#8
D8D8D
;
flex-shrink
:
0
;
}
.value-view
{
...
...
@@ -635,23 +769,13 @@ export default {
margin
:
16rpx
0
;
}
}
}
.info-view
{
.title-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin
:
16rpx
0
8rpx
0
;
}
}
.money-view
{
.right-view
{
color
:
#8
d8d8d
;
color
:
#8
D8D8D
;
font-size
:
28rpx
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.money-view
{
.money-
text-
view
{
font-weight
:
bold
;
margin-right
:
16rpx
;
}
...
...
@@ -666,9 +790,13 @@ export default {
}
}
.remark-view
{
padding
:
16rpx
24rpx
24rpx
24rpx
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
margin-top
:
24rpx
;
font-size
:
28rpx
;
.title-view
{
color
:
#8
d8d8d
;
color
:
#8
D8D8D
;
margin
:
16rpx
0
8rpx
0
;
}
.remark-content-view
{
...
...
@@ -698,6 +826,10 @@ export default {
}
}
.record-list-view
{
padding
:
16rpx
24rpx
24rpx
24rpx
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
margin-top
:
24rpx
;
.title-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
...
...
@@ -721,6 +853,7 @@ export default {
}
.record-time
{
text-align
:
right
;
color
:
#8D8D8D
;
}
}
}
...
...
pages/mine/input/input.vue
View file @
d2df992c
...
...
@@ -187,6 +187,42 @@ export default {
height
:
240
,
empty
:
true
};
case
'pop-shop-name'
:
return
{
title
:
'店铺名称'
,
type
:
'textarea'
,
placeholder
:
'填写店铺名称20字以内'
,
maxlength
:
20
,
height
:
240
,
empty
:
true
};
case
'pop-shop-address'
:
return
{
title
:
'店铺地址'
,
type
:
'textarea'
,
placeholder
:
'填写店铺地址信息'
,
maxlength
:
30
,
height
:
240
,
empty
:
true
};
case
'pop-shop-phone'
:
return
{
title
:
'联系电话'
,
type
:
'number'
,
placeholder
:
'填写联系电话'
,
maxlength
:
11
,
height
:
240
,
empty
:
true
};
case
'pop-shop-lister'
:
return
{
title
:
'收款人'
,
type
:
'textarea'
,
placeholder
:
'填写收款人'
,
maxlength
:
10
,
height
:
240
,
empty
:
true
};
}
}
},
...
...
pages/workpoint/project-bill/components/bill-detail.vue
View file @
d2df992c
...
...
@@ -11,23 +11,19 @@
</view>
<view
class=
"detail-right"
>
<view
class=
"detail-right-label"
>
{{
detail
.
type
.
desc
}}
</view>
<view
class=
"detail-right-value"
:class=
"
{ 'detail-right-status': redAmount }">
{{
detail
.
amount
}}
</view>
<view
class=
"detail-right-value"
:class=
"
{ 'detail-right-status': redAmount }">
{{
amount
}}
</view>
</view>
</view>
</
template
>
<
script
>
import
{
workTypeOptions
}
from
'@/utils/options/workpoint
'
;
import
{
formatCount
}
from
'@/utils/common.js
'
;
export
default
{
props
:
{
detail
:
{
type
:
Object
,
default
:
()
=>
{}
},
current
:
{
type
:
Number
,
default
:
0
}
},
computed
:
{
redAmount
()
{
...
...
@@ -36,6 +32,9 @@ export default {
return
false
;
}
return
parseFloat
(
amount
)
<
0
;
},
amount
()
{
return
formatCount
(
Number
(
this
.
detail
.
amount
||
0
))
}
},
data
()
{
...
...
@@ -56,11 +55,12 @@ export default {
.detail
{
background
:
#ffffff
;
border-radius
:
16upx
;
padding
:
24upx
;
padding
:
0
24upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
24upx
;
min-height
:
136rpx
;
.content
{
width
:
420upx
;
display
:
flex
;
...
...
@@ -87,8 +87,9 @@ export default {
font-weight
:
bold
;
}
&
-value
{
margin-top
:
12rpx
;
color
:
#8d8d8d
;
margin-top
:
18rpx
;
color
:
#8D8D8D
;
font-size
:
24rpx
;
}
}
}
...
...
@@ -97,10 +98,11 @@ export default {
font-size
:
28upx
;
line-height
:
28upx
;
&
-label
{
color
:
#8d8d8d
;
color
:
#8D8D8D
;
font-size
:
24rpx
;
}
&
-value
{
margin-top
:
1
2
rpx
;
margin-top
:
1
8
rpx
;
color
:
#333333
;
font-weight
:
bold
;
}
...
...
pages/workpoint/project-bill/components/cell-project-bill.vue
0 → 100644
View file @
d2df992c
<
template
>
<view
class=
"cell-project-bill"
>
<view
class=
"content-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleCickCell, 500)"
>
<view
class=
"left-view"
>
<view
class=
"image-view"
>
{{
values
.
imagekName
}}
</view>
<view
class=
"name-view"
>
{{
values
.
memberName
}}
</view>
</view>
<view
class=
"right-view"
>
<view
class=
"item-view"
v-for=
"item in amountKeys"
:key=
"item.key"
>
<view
class=
"value-view"
>
{{
values
[
item
.
key
]
}}
</view>
<view
class=
"label-view"
>
{{
item
.
name
}}
</view>
</view>
<view
class=
"item-view, second"
v-for=
"item in numberKeys"
:key=
"item.key"
>
<view
class=
"value-view"
>
{{
values
[
item
.
key
]
}}
</view>
<view
class=
"label-view"
>
{{
item
.
name
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
formatCount
}
from
'@/utils/common.js'
;
export
default
{
props
:
{
member
:
{
type
:
Object
,
default
()
{
return
{
borrowingAmount
:
''
,
// 借支金额
contractorAmount
:
''
,
// 包工金额
contractorNum
:
0
,
// 包工笔数
normalWorkTime
:
0
,
// 上班工时
overWorkTIme
:
0
,
// 加班工时
settleAmount
:
''
,
// 结算金额
timeAmount
:
''
,
// 记工金额
memberId
:
''
,
memberName
:
''
,
}
},
},
},
data
()
{
return
{}
},
computed
:
{
// 项目工资:工时 + 包工 = 总
// 未结: 总 - 已结
values
()
{
let
all
=
Number
(
this
.
member
.
contractorAmount
||
0
)
+
Number
(
this
.
member
.
timeAmount
||
0
)
return
{
imagekName
:
(
this
.
member
.
memberName
||
''
).
substring
((
this
.
member
.
memberName
||
''
).
length
-
2
),
memberId
:
this
.
member
.
memberId
,
memberName
:
this
.
member
.
memberName
,
settleAmount
:
formatCount
(
Number
(
this
.
member
.
settleAmount
||
0
)),
// 已结工资
borrowingAmount
:
formatCount
(
Number
(
this
.
member
.
contractorAmount
||
0
)),
// 借支金额
unsettleAmount
:
formatCount
(
all
-
Number
(
this
.
member
.
settleAmount
||
0
)),
// 未结工资
normalWorkTime
:
this
.
member
.
normalWorkTime
,
// 上班工时
overWorkTIme
:
this
.
member
.
overWorkTIme
,
// 加班工量
contractorNum
:
this
.
member
.
contractorNum
,
// 包工笔数
contractorAmount
:
formatCount
(
Number
(
this
.
member
.
contractorAmount
||
0
)),
// 包工工钱
}
},
amountKeys
()
{
return
[
{
key
:
'unsettleAmount'
,
name
:
'未结'
},
{
key
:
'settleAmount'
,
name
:
'已结'
},
{
key
:
'borrowingAmount'
,
name
:
'借支'
},
]
},
numberKeys
()
{
return
[
{
key
:
'normalWorkTime'
,
name
:
'上班(工)'
},
{
key
:
'overWorkTIme'
,
name
:
'加班(工)'
},
{
key
:
'contractorNum'
,
name
:
'包工(笔)'
},
]
}
},
created
()
{
},
methods
:
{
handleCickCell
()
{
this
.
$emit
(
'select'
,
this
.
member
.
memberId
)
}
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.cell-project-bill
{
min-height
:
272rpx
;
border-radius
:
16rpx
;
background-color
:
#ffffff
;
overflow
:
hidden
;
.content-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.left-view
{
min-height
:
272rpx
;
flex-shrink
:
0
;
width
:
186rpx
;
display
:
flex
;
align-items
:
center
;
flex-direction
:
column
;
justify-content
:
center
;
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#333333
;
background-image
:
linear-gradient
(
to
right
,
#F4FFFC
0%
,
#FFFFFF
50%
);
padding
:
40rpx
24rpx
;
.image-view
{
width
:
72rpx
;
height
:
72rpx
;
background-color
:
#02a074
;
border-radius
:
16rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#ffffff
;
font-size
:
26rpx
;
margin-bottom
:
24rpx
;
}
.name-view
{
max-width
:
136rpx
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
.right-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-wrap
:
wrap
;
margin
:
40rpx
0
;
padding
:
0
24rpx
;
border-left
:
2rpx
solid
#F6F7FA
;
.item-view
{
min-width
:
140rpx
;
text-align
:
center
;
margin-bottom
:
24rpx
;
&
.second
{
margin-bottom
:
0
;
}
.value-view
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
10rpx
;
}
.label-view
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#8D8D8D
;
font-size
:
24rpx
}
}
}
}
}
</
style
>
pages/workpoint/project-bill/components/summary-content.vue
0 → 100644
View file @
d2df992c
<
template
>
<view
class=
"summary-content"
>
<view
class=
"content-view"
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
scroll-anchoring
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
refresher-background=
"#F6F7FA"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<view
class=
"head"
>
<view
class=
"head-view"
>
<view
class=
"title-view"
>
<view
class=
"left-view"
>
<view
class=
"select-view"
hover-class=
"u-hover-class"
@
click=
"handleClickShowDateRange"
>
<view
class=
"date-view"
>
{{
dateString
||
'全部时段'
}}
</view>
<u-icon
name=
"arrow-down-fill"
color=
"#8D8D8D"
size=
"24"
></u-icon>
</view>
</view>
</view>
<view
:class=
"['bill-count-view',
{ more: showMore }]">
<SummaryCount
:detail=
"statistics"
@
infoShow=
"handleShowInfo"
/>
</view>
<view
class=
"show-more-view"
@
click=
"$u.throttle(handleClickShowMore, 500)"
hover-class=
"u-hover-class"
>
<u-icon
:name=
"showMore ? 'arrow-up' : 'arrow-down'"
color=
"#02A074"
size=
"32"
></u-icon>
<view
class=
"more-text"
>
{{
showMore
?
'点击收起'
:
'更多数据'
}}
</view>
</view>
</view>
</view>
<view
class=
"list-view"
v-if=
"records && records.length > 0"
>
<view
v-for=
"(item, index) in records"
:key=
"index"
class=
"item-view"
>
<CellProjectBill
:member=
"item"
@
select=
"handleSelectCell"
/>
</view>
<view
class=
"load-more-view"
v-show=
"!loading"
>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F6F7FA"
></u-loadmore>
</view>
</view>
<NoData
v-else-if=
"!loading"
customStyle=
"margin-top:100rpx"
:image=
"currentNoData.image"
:text=
"currentNoData.text"
/>
</scroll-view>
</view>
<view
class=
"loading-view"
v-if=
"loading && !freshing"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<DateRangePicker
ref=
"date-range-picker"
v-model=
"daterange"
:canReset=
"true"
type=
"daterange"
@
change=
"handleClickChange"
>
<view
style=
"left:200%"
></view>
</DateRangePicker>
<PopNormal
:visible
.
sync=
"visible"
title=
"加班工量"
confirmText=
"我知道了"
:showCancel=
"false"
>
<view
class=
"pop-content"
>
如您在记工时填写为
<text
class=
"green-text"
>
[加班小时]
</text>
,将根据加班设置换算工量;如果设置为
<text
class=
"green-text"
>
[按小时算]
</text>
则根据上班设置进行工量换算。
</view>
</PopNormal>
</view>
</
template
>
<
script
>
import
DateRangePicker
from
'@/components/date-range-picker/uni-datetime-picker.vue'
;
import
CellProjectBill
from
'./cell-project-bill'
;
import
PopNormal
from
'@/components/pop-normal'
;
import
NoData
from
'@/components/no-data'
;
import
SummaryCount
from
'./summary-count.vue'
;
import
{
getStatistics
,
getStatisticsItem
}
from
'@/api/workpoint/project-bill.js'
;
export
default
{
components
:
{
DateRangePicker
,
CellProjectBill
,
NoData
,
SummaryCount
,
PopNormal
},
props
:
{
projectId
:
{
type
:
String
,
default
:
''
},
},
data
()
{
return
{
visible
:
false
,
daterange
:
[],
records
:
[],
loading
:
true
,
loadStatus
:
'loading'
,
triggered
:
true
,
freshing
:
false
,
statistics
:
{
number
:
0
,
actualAmount
:
0
,
receivableAmount
:
0
},
showMore
:
false
};
},
computed
:
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
;
},
currentNoData
()
{
return
{
image
:
this
.
baseUrl
+
'wuweixiuzhangdan@3x.png'
,
text
:
'当前暂无账单信息'
};
},
dateString
()
{
return
this
.
daterange
.
length
>
0
&&
this
.
daterange
[
0
]
&&
this
.
daterange
[
1
]
?
`
${
this
.
daterange
[
0
]}
-
${
this
.
daterange
[
1
]}
`
:
''
;
},
start
()
{
return
this
.
daterange
.
length
>
0
&&
this
.
daterange
[
0
]
?
this
.
daterange
[
0
]
+
' 00:00:00'
:
''
;
},
end
()
{
return
this
.
daterange
.
length
>
0
&&
this
.
daterange
[
1
]
?
this
.
daterange
[
1
]
+
' 23:59:59'
:
''
;
},
},
created
()
{
console
.
log
(
'-----created-----'
)
uni
.
$on
(
'project-bill-summary'
,
res
=>
{
this
.
reloadList
();
});
this
.
freshing
=
false
;
// this.reloadList();
},
destroyed
()
{
uni
.
$off
(
'project-bill-summary'
);
},
onShow
()
{
},
methods
:
{
reloadList
()
{
this
.
loadStatus
=
'loading'
;
this
.
getStatisticsItem
();
this
.
getStatistics
()
},
getStatisticsItem
()
{
if
(
this
.
current
==
1
)
{
this
.
loading
=
true
;
}
getStatisticsItem
({
projectId
:
this
.
projectId
,
happenStart
:
this
.
start
,
happenEnd
:
this
.
end
,
})
.
then
(
res
=>
{
this
.
records
=
res
.
data
||
[]
this
.
loadStatus
=
'nomore'
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
freshing
)
{
this
.
triggered
=
false
;
this
.
freshing
=
false
;
}
});
},
500
)
this
.
loading
=
false
;
})
.
catch
(
err
=>
{
this
.
loading
=
false
;
console
.
log
(
err
);
});
},
getStatistics
()
{
getStatistics
({
projectId
:
this
.
projectId
,
happenStart
:
this
.
start
,
happenEnd
:
this
.
end
,
})
.
then
(
res
=>
{
let
data
=
res
.
data
;
this
.
statistics
=
data
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
onRefresh
()
{
if
(
this
.
freshing
)
return
;
this
.
freshing
=
true
;
this
.
reloadList
();
},
onRestore
()
{
this
.
triggered
=
'restore'
;
// 需要重置
},
changeSearch
()
{
this
.
reloadList
();
},
handleClickChange
(
range
)
{
this
.
daterange
=
range
;
this
.
reloadList
();
},
handleSelectCell
(
id
)
{
this
.
$u
.
route
({
url
:
'pages/workpoint/project-bill/project-bill'
,
type
:
'navigateTo'
,
params
:
{
memberId
:
id
,
projectId
:
this
.
projectId
}
});
},
handleClickShowMore
()
{
this
.
showMore
=
!
this
.
showMore
},
handleClickShowDateRange
()
{
this
.
$refs
[
'date-range-picker'
].
show
();
},
handleShowInfo
(
show
)
{
this
.
visible
=
show
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.summary-content
{
height
:
100%
;
background-color
:
#f6f7fa
;
overflow
:
auto
;
.head
{
margin
:
24rpx
0
;
}
.head-view
{
padding
:
0
24rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
}
.title-view
{
height
:
96rpx
;
color
:
#333333
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
2rpx
solid
#F6F7FA
;
.left-view
{
display
:
flex
;
align-items
:
center
;
height
:
100%
;
.select-view
{
display
:
flex
;
align-items
:
center
;
font-size
:
24rpx
;
font-weight
:
bold
;
.date-view
{
margin-right
:
16rpx
;
}
}
.reset-view
{
width
:
120rpx
;
height
:
48rpx
;
border-radius
:
8rpx
;
border
:
2rpx
solid
#666666
;
color
:
#666666
;
font-size
:
24rpx
;
margin-left
:
32rpx
;
text-align
:
center
;
line-height
:
48rpx
;
}
}
.right-view
{
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
font-size
:
24rpx
;
.icon-view
{
width
:
28rpx
;
height
:
28rpx
;
border-radius
:
8rpx
;
border
:
2rpx
solid
#333333
;
margin-right
:
12rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
.filter
{
border
:
2rpx
solid
#02a074
;
}
}
}
}
.bill-count-view
{
overflow
:
hidden
;
height
:
148rpx
;
&
.more
{
height
:
280rpx
;
}
}
.show-more-view
{
background-color
:
#ffffff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
88rpx
;
margin-top
:
-32rpx
;
.more-text
{
margin-left
:
8rpx
;
color
:
#02A074
;
font-size
:
26rpx
;
}
}
.content-view
{
height
:
100%
;
overflow
:
auto
;
padding
:
0rpx
24rpx
;
.list-view
{
.item-view
{
margin-bottom
:
24rpx
;
}
}
.load-more-view
{
padding-bottom
:
44rpx
;
}
}
.loading-view
{
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
top
:
50%
;
left
:
0
;
position
:
fixed
;
}
.pop-content
{
margin-bottom
:
24rpx
;
font-size
:
32rpx
;
color
:
#333333
;
.green-text
{
color
:
#02A074
;
}
}
}
</
style
>
pages/workpoint/project-bill/components/summary-count.vue
0 → 100644
View file @
d2df992c
<
template
>
<view
class=
"summary-count"
>
<view
class=
"content-view"
>
<view
class=
"item-view"
v-for=
"(item, index) in infoKeys"
:key=
"index"
>
<view
class=
"value-view"
>
{{
values
[
item
.
key
]
}}
</view>
<view
class=
"label-view"
@
click=
"handleClickInfo(item.showTip)"
:hover-class=
"item.showTip ? 'u-hover-class' : ''"
>
<view>
{{
item
.
name
}}
</view>
<u-icon
class=
"icon-view"
v-if=
"item.showTip"
name=
"info-circle-fill"
color=
"#02A074"
size=
"24"
></u-icon>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
keepWFull
}
from
'@/utils/common.js'
;
export
default
{
props
:
{
detail
:
{
type
:
Object
,
default
()
{
return
{
borrowingAmount
:
''
,
// 借支金额
contractorAmount
:
''
,
// 包工金额
contractorNum
:
0
,
// 包工笔数
normalWorkTime
:
0
,
// 上班工时
overWorkTIme
:
0
,
// 加班工时
settleAmount
:
''
,
// 结算金额
timeAmount
:
''
,
// 记工金额
}
}
}
},
computed
:
{
// 项目工资:工时 + 包工 = 总
// 未结: 总 - 已结
values
()
{
let
all
=
parseFloat
(
this
.
detail
.
contractorAmount
||
0
)
+
parseFloat
(
this
.
detail
.
timeAmount
||
0
)
return
{
all
:
keepWFull
(
all
),
// 项目工资
settleAmount
:
keepWFull
(
parseFloat
(
this
.
detail
.
settleAmount
||
0
)),
// 已结工资
borrowingAmount
:
keepWFull
(
parseFloat
(
this
.
detail
.
contractorAmount
||
0
)),
// 借支金额
unsettleAmount
:
keepWFull
(
all
-
parseFloat
(
this
.
detail
.
settleAmount
||
0
)),
// 未结工资
normalWorkTime
:
this
.
detail
.
normalWorkTime
,
// 上班工时
overWorkTIme
:
this
.
detail
.
overWorkTIme
,
// 加班工量
contractorNum
:
this
.
detail
.
contractorNum
,
// 包工笔数
contractorAmount
:
keepWFull
(
parseFloat
(
this
.
detail
.
contractorAmount
||
0
)),
// 包工工钱
}
},
infoKeys
()
{
return
[
{
key
:
'all'
,
name
:
'项目工资'
},
{
key
:
'settleAmount'
,
name
:
'已结工资'
},
{
key
:
'borrowingAmount'
,
name
:
'借支金额'
},
{
key
:
'unsettleAmount'
,
name
:
'未结工资'
},
{
key
:
'normalWorkTime'
,
name
:
'上班工时'
},
{
key
:
'overWorkTIme'
,
name
:
'加班工量'
,
showTip
:
true
,
},
{
key
:
'contractorNum'
,
name
:
'包工笔数'
},
{
key
:
'contractorAmount'
,
name
:
'包工工钱'
}
]
}
},
data
()
{
return
{
};
},
methods
:
{
handleClickInfo
(
show
)
{
if
(
!
show
)
return
this
.
$emit
(
'infoShow'
,
show
)
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.summary-count
{
.content-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-wrap
:
wrap
;
.item-view
{
min-width
:
140rpx
;
text-align
:
center
;
margin
:
24rpx
0
;
.value-view
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
10rpx
;
}
.label-view
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#8D8D8D
;
font-size
:
24rpx
;
.icon-view
{
margin-left
:
4rpx
;
}
}
}
}
}
</
style
>
pages/workpoint/project-bill/project-bill.vue
View file @
d2df992c
This diff is collapsed.
Click to expand it.
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