添加实收统计模块

This commit is contained in:
zhouyanli
2026-07-23 09:49:42 +08:00
parent 51b7b5d20a
commit 255a8791d0
3 changed files with 143 additions and 73 deletions

View File

@@ -0,0 +1,55 @@
<template>
<view class="page_padding">
<view class="revenue_statistics_box flex-1 flex flex-col">
<view class="nav flex items-center">
<view class="line"></view>
<text class="title">实收统计</text>
</view>
<view class="content flex-1 flex flex-col items-center justify-center">
<text class="placeholder">实收统计页面</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
onShow(() => {
// TODO: 加载实收统计数据
})
</script>
<style scoped lang="scss">
.revenue_statistics_box {
background: #f9f9f9;
padding: 20rpx 40rpx;
position: relative;
flex: 1;
overflow: hidden;
box-sizing: border-box;
.nav {
margin-bottom: 40rpx;
font-weight: 550;
font-size: 32rpx;
color: #333333;
line-height: 40rpx;
.line {
width: 6rpx;
height: 28rpx;
background: #4d5dfa;
margin-right: 10rpx;
}
}
.content {
.placeholder {
font-size: 28rpx;
color: #999;
}
}
}
</style>

View File

@@ -125,6 +125,12 @@
"style": {
"navigationBarTitleText": "选择房屋"
}
},
{
"path": "revenue_statistics",
"style": {
"navigationBarTitleText": "实收统计"
}
}
]
},

View File

@@ -99,79 +99,20 @@
<!-- 网格布局功能 -->
<view class="function-container">
<!-- 第一行功能:故障上报、一键开门、工单大厅、我的工单 -->
<template v-for="item in functionList" :key="item.action">
<view
class="function-item"
@click="goToReport"
v-if="permStore.hasPermi('butler:fault:report')"
@click="handleFunctionClick(item)"
v-if="permStore.hasPermi(item.permKey)"
>
<image
class="item-icon"
src="https://wuyeadmin.bugtc.com/images/imgs/fault-report.png"
:src="item.icon"
mode="aspectFit"
></image>
<text class="item-text">故障上报</text>
</view>
<view
class="function-item"
@click="goToOneOpenDoor"
v-if="permStore.hasPermi('butler:door:open')"
>
<image
class="item-icon"
src="https://wuyeadmin.bugtc.com/images/imgs/open.png"
mode="aspectFit"
></image>
<text class="item-text">一键开门</text>
</view>
<view
class="function-item"
@tap="goToTicketHall"
v-if="permStore.hasPermi('butler:workOrder:hall')"
>
<image
class="item-icon"
src="https://wuyeadmin.bugtc.com/images/imgs/work-order.png"
mode="aspectFit"
></image>
<text class="item-text">工单大厅</text>
</view>
<view
class="function-item"
@tap="goToMyTicket"
v-if="permStore.hasPermi('butler:workOrder:mine')"
>
<image
class="item-icon"
src="https://wuyeadmin.bugtc.com/images/imgs/my-work.png"
mode="aspectFit"
></image>
<text class="item-text">我的工单</text>
</view>
<view
class="function-item"
@tap="goToComplaint"
v-if="permStore.hasPermi('butler:complaint:handle')"
>
<image
class="item-icon"
src="https://wuyeadmin.bugtc.com/images/imgs/complaint.png"
mode="aspectFit"
></image>
<text class="item-text">投诉处理</text>
</view>
<view
class="function-item"
@tap="goToReplacement_record"
v-if="permStore.hasPermi('butler:meter:replace')"
>
<image
class="item-icon"
src="https://wuye.ckdzkj.com/images/home/updateDevice.png"
mode="aspectFit"
></image>
<text class="item-text">仪表换新</text>
<text class="item-text">{{ item.text }}</text>
</view>
</template>
</view>
</view>
</view>
@@ -268,6 +209,74 @@ const goToReplacement_record = () => {
url: '/pageSubPack/instrument/replacement_record'
})
}
// 跳转到实收统计
const goToRevenueStatistics = () => {
uni.navigateTo({
url: '/pageSubPack/instrument/revenue_statistics'
})
}
// 功能列表数据
const functionList = [
{
permKey: 'butler:fault:report',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/fault-report.png',
text: '故障上报',
action: 'goToReport'
},
{
permKey: 'butler:door:open',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/open.png',
text: '一键开门',
action: 'goToOneOpenDoor'
},
{
permKey: 'butler:workOrder:hall',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/work-order.png',
text: '工单大厅',
action: 'goToTicketHall'
},
{
permKey: 'butler:workOrder:mine',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/my-work.png',
text: '我的工单',
action: 'goToMyTicket'
},
{
permKey: 'butler:complaint:handle',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/complaint.png',
text: '投诉处理',
action: 'goToComplaint'
},
{
permKey: 'butler:meter:replace',
icon: 'https://wuye.ckdzkj.com/images/home/updateDevice.png',
text: '仪表换新',
action: 'goToReplacement_record'
},
{
permKey: 'butler:revenue:statistics',
icon: 'https://wuyeadmin.bugtc.com/images/imgs/revenue-statistics.png',
text: '实收统计',
action: 'goToRevenueStatistics'
}
]
// 统一点击处理
const actionMap = {
goToReport,
goToOneOpenDoor,
goToTicketHall,
goToMyTicket,
goToComplaint,
goToReplacement_record,
goToRevenueStatistics
}
const handleFunctionClick = (item) => {
const handler = actionMap[item.action]
if (handler) handler()
}
// 获取当前小区
const currentVillageData = () => {
// 先重置,避免新账号无小区时仍显示旧账号的小区