Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
applet
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
物业总平台
applet
Commits
57146561
提交
57146561
authored
8月 22, 2023
作者:
宋雄
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善缴费统计
上级
f4023a9b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
165 行增加
和
44 行删除
+165
-44
api.js
config/api.js
+18
-0
server_config.js
config/server_config.js
+1
-1
index.vue
pages/payCostProperty/index.vue
+10
-3
index.vue
pages/payCostStatistical/index.vue
+136
-40
没有找到文件。
config/api.js
浏览文件 @
57146561
...
...
@@ -626,4 +626,21 @@ export const payOrderApi = (params = {}, config = {})=> {
.
then
(
res
=>
{
resolve
(
res
)
})
.
catch
(
err
=>
{
reject
(
err
)
})
})
}
// 历史缴费统计
export
const
communityPaymentStatisticsApi
=
(
params
=
{},
config
=
{})
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
http
.
get
(
'/property-community/wechat/communityPayment/statistics'
,
{
data
:
{
...
params
,
residentPhone
:
uni
.
getStorageSync
(
'user_phone'
),
platformCode
:
uni
.
getStorageSync
(
'platform_code'
)
},
...
config
})
.
then
(
res
=>
{
resolve
(
res
)
})
.
catch
(
err
=>
{
reject
(
err
)
})
})
}
\ No newline at end of file
config/server_config.js
浏览文件 @
57146561
...
...
@@ -4,7 +4,7 @@
const
serverConfig
=
{
baseURL
:
"https://life.cloud.hjxbc.cn"
,
imageURL
:
"https://life.cloud.hjxbc.cn/sys/common/static/"
,
// baseURL: "http://192.168.0.10
6
:9999",
// baseURL: "http://192.168.0.10
3
:9999",
// baseURL: "http://192.168.0.119:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
...
...
pages/payCostProperty/index.vue
浏览文件 @
57146561
...
...
@@ -90,9 +90,16 @@
},
toRecord
(
type
)
{
if
(
type
==
1
){
uni
.
navigateTo
({
url
:
'/pages/payCostStatistical/index'
,
});
let
obj
=
freeType
.
find
(
item
=>
item
.
code
===
chargeTypeCode
)
if
(
obj
)
{
uni
.
navigateTo
({
url
:
'/pages/payCostStatistical/index?code='
+
chargeTypeCode
+
'&name='
+
obj
.
name
});
}
else
{
uni
.
navigateTo
({
url
:
'/pages/payCostStatistical/index?code='
+
chargeTypeCode
});
}
}
else
if
(
type
==
2
){
uni
.
navigateTo
({
url
:
'/pages/payCostRecord/index?code='
+
chargeTypeCode
...
...
pages/payCostStatistical/index.vue
浏览文件 @
57146561
...
...
@@ -4,28 +4,30 @@
<view
class=
"property"
>
<view
class=
"user"
>
<view
class=
"name"
>
{{
userName
}}
{{
userPhone
}}
</view>
<view
class=
"add"
>
{{
platformName
}}
</view>
<view
class=
"house-box"
>
<view
class=
"add"
>
{{
platformName
}}
</view>
<picker
@
change=
"onHouseChange"
range-key=
"label"
:range=
"houseList"
>
<view
class=
"uni-input"
>
{{
houseList
[
houseIndex
].
label
}}
</view>
</picker>
</view>
</view>
<view
class=
"screening"
>
<!--
<view
class=
"title"
>
-->
<!--
<view
class=
"picker on"
>
-->
<picker
@
change=
"bindPickerChange"
:value=
"year"
:range=
"yearList"
>
<view
class=
"uni-input"
>
{{
yearList
[
index
]
}}
<image
src=
"../../static/images/icon_up.png"
class=
"icon"
></image></view>
</picker>
<!--
</view>
-->
<!--
</view>
-->
<picker
@
change=
"onYearChange"
:range=
"yearList"
>
<view
class=
"uni-input"
>
{{
yearList
[
index
]
}}
<image
src=
"../../static/images/icon_up.png"
class=
"icon"
></image></view>
</picker>
<view
class=
"content"
>
<view
class=
"text"
>
<view
class=
"name"
>
合计金额(元)
</view>
120
<view
class=
"name"
>
合计金额(元)
</view>
{{
costTotalAmount
}}
</view>
<view
class=
"text"
>
<view
class=
"name"
>
缴费单位
</view>
汉江之星物业公司
<view
class=
"name"
>
缴费单位
</view>
{{
propertyName
}}
</view>
</view>
<view
class=
"bottom"
>
2023年度物业费累计:220元
</view>
<view
class=
"bottom"
v-if=
"index === 0"
>
近三年
{{
costName
}}
累计:
{{
costTotalAmount
}}
元
</view>
<view
class=
"bottom"
v-else
>
{{
yearList
[
index
]
}}
度
{{
costName
}}
累计:
{{
costYearAmount
}}
元
</view>
</view>
<view
class=
"statistical"
>
<qiun-data-charts
type=
"line"
:chartData=
"chartData"
:opts=
"opts"
background=
"
none
"
/>
<qiun-data-charts
type=
"line"
:chartData=
"chartData"
:opts=
"opts"
background=
"
#fff
"
/>
</view>
</view>
</view>
...
...
@@ -33,6 +35,11 @@
</
template
>
<
script
>
import
{
getHouseListApi
,
communityPaymentStatisticsApi
}
from
'@/config/api.js'
import
{
Moment
}
from
'@/utils/moment.js'
let
chargeTypeCode
=
''
export
default
{
data
()
{
...
...
@@ -40,22 +47,24 @@
userName
:
''
,
userPhone
:
''
,
platformName
:
''
,
year
:
''
,
costName
:
''
,
costTotalAmount
:
0
,
costYearAmount
:
0
,
houseList
:
[],
houseIndex
:
0
,
propertyName
:
''
,
index
:
0
,
yearList
:
[
'全部'
,
'2023年'
,
'2022年'
,
'2021年'
],
month
:
''
,
yearList
:
[],
chartData
:
{
categories
:
[
"2023年"
,
"2022年"
,
"2021年"
],
categories
:
[
'2021年'
,
'2022年'
,
'2023年'
],
series
:
[{
"name"
:
"费用统计"
,
"data"
:
[
2000
,
2050
,
10
00
]
"data"
:
[
13
,
34
,
12
00
]
}]
},
opts
:
{
color
:
[
"#6A59F2"
,
"#91CB74"
,
"#FAC858"
,
"#EE6666"
,
"#73C0DE"
,
"#3CA272"
,
"#FC8452"
,
"#9A60B4"
,
"#ea7ccc"
],
padding
:
[
15
,
10
,
0
,
15
],
color
:
[
"#6A59F2"
,
"#91CB74"
,
"#FAC858"
,
"#EE6666"
,
"#73C0DE"
,
"#3CA272"
,
"#FC8452"
,
"#9A60B4"
,
"#ea7ccc"
],
padding
:
[
15
,
10
,
0
,
10
],
enableScroll
:
false
,
legend
:
{},
xAxis
:
{
...
...
@@ -72,23 +81,82 @@
activeType
:
"hollow"
}
},
update
:
true
}
}
},
methods
:
{
bindPickerChange
:
function
(
e
)
{
this
.
index
=
e
.
detail
.
value
async
getHouseList
()
{
let
{
result
}
=
await
getHouseListApi
({
pageNo
:
1
,
pageSize
:
20
,
auditStatus
:
"auditPass"
})
if
(
result
.
total
>
0
)
{
this
.
propertyName
=
result
.
records
[
0
].
propertyName
this
.
houseList
=
result
.
records
.
map
(
item
=>
{
return
{
label
:
item
.
buildingName
+
item
.
unitName
+
item
.
roomName
,
value
:
item
.
roomId
}
})
this
.
getStatistical
()
}
},
async
getStatistical
()
{
let
roomId
=
this
.
houseList
[
this
.
houseIndex
].
value
let
year
=
this
.
index
===
0
?
'0'
:
this
.
yearList
[
this
.
index
].
replace
(
'年'
,
''
)
let
{
result
}
=
await
communityPaymentStatisticsApi
({
roomId
,
chargeTypeCode
,
year
})
let
yearList
=
[]
let
yearData
=
[]
result
.
forEach
(
item
=>
{
if
(
this
.
index
===
0
)
{
yearList
.
push
(
`
${
item
.
YEAR
}
`
)
}
else
{
yearList
.
push
(
`
${
item
.
MONTH
}
`
)
}
yearData
.
push
(
item
.
totalAmount
)
})
this
.
costYearAmount
=
yearData
.
reduce
((
pra
,
cur
)
=>
{
return
pra
+
cur
},
0
)
if
(
this
.
index
===
0
)
{
this
.
costTotalAmount
=
this
.
costYearAmount
}
this
.
chartData
.
categories
=
yearList
this
.
chartData
.
series
=
[
{
name
:
`
${
this
.
costName
}
统计`
,
data
:
yearData
}
]
},
bindPickerChange1
:
function
(
e
)
{
this
.
index1
=
e
.
detail
.
value
onHouseChange
(
e
)
{
this
.
houseIndex
=
Number
(
e
.
detail
.
value
)
this
.
index
=
0
this
.
getStatistical
()
},
async
onYearChange
(
e
)
{
this
.
index
=
Number
(
e
.
detail
.
value
)
this
.
getStatistical
()
}
},
onLoad
(
option
)
{
this
.
userName
=
uni
.
getStorageSync
(
'user_name'
)
this
.
userPhone
=
uni
.
getStorageSync
(
'user_phone'
)
this
.
platformName
=
uni
.
getStorageSync
(
'platform_name'
)
this
.
costName
=
option
.
name
||
'费用'
chargeTypeCode
=
option
.
code
// this.getList()
let
nowYear
=
new
Moment
().
format
(
'YYYY'
)
let
lastYear
=
(
Number
(
nowYear
)
-
1
).
toString
()
+
'年'
let
beforeear
=
(
Number
(
nowYear
)
-
2
).
toString
()
+
'年'
this
.
yearList
=
[
'全部'
,
beforeear
,
lastYear
,
nowYear
+
'年'
]
this
.
getHouseList
()
}
}
</
script
>
...
...
@@ -118,11 +186,49 @@
margin-bottom
:
20rpx
;
}
.add
{
font-size
:
28rpx
;
color
:
#D5DCFF
;
.house-box
{
display
:
flex
;
align-items
:
center
;
.add
{
font-size
:
28rpx
;
color
:
#D5DCFF
;
}
.uni-input
{
color
:
#D5DCFF
;
margin-left
:
30rpx
;
position
:
relative
;
&
:
:
after
{
position
:
absolute
;
content
:
" "
;
width
:
0
;
height
:
0
;
top
:
50%
;
right
:
-15px
;
border-top
:
6px
solid
#D5DCFF
;
border-right
:
6px
solid
transparent
;
border-left
:
6px
solid
transparent
;
transform-origin
:
center
;
transform
:
translateY
(
-50%
);
}
}
}
}
.uni-input
{
font-size
:
28rpx
;
color
:
#373737
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.icon
{
width
:
20rpx
;
height
:
12rpx
;
margin-left
:
15rpx
;
}
.screening
{
margin
:
30rpx
0
;
...
...
@@ -149,19 +255,9 @@
// }
// }
}
.uni-input
{
font-size
:
28rpx
;
color
:
#373737
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.icon
{
width
:
20rpx
;
height
:
12rpx
;
margin-left
:
15rpx
;
}
.content
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论