完成物业模块的钱包页面

This commit is contained in:
赵毅 2025-09-29 15:12:08 +08:00
parent c87d3dfb5d
commit c118145c8b
5 changed files with 351 additions and 11 deletions

View File

@ -634,6 +634,8 @@ image {
.walletBox_item{ .walletBox_item{
margin: 20rpx 30rpx; margin: 20rpx 30rpx;
display: block;
text-align: center;
font-size: 35rpx; font-size: 35rpx;
} }

View File

@ -113,3 +113,39 @@
margin: 0 auto; margin: 0 auto;
} }
} }
.walletBox {
flex: 1;
background: linear-gradient(to right, #fbf1db, #f4d7b3);
border-radius: 25rpx;
padding: 30rpx;
margin: 20rpx;
}
.walletBox_top {
font-size: 32rpx;
color: #222222;
font-weight: 600;
padding-bottom: 20rpx;
position: relative;
}
.walletBox_content{
display: flex;
justify-content: space-between;
}
.walletBox_item{
/* margin: 20rpx 30rpx; */
width: 25%;
display: block;
text-align: center;
font-size: 35rpx;
}
.walletBox_item_text{
color: #8d5017;
text-align: center;
font-size: 28rpx;
margin-top: 10rpx;
}

View File

@ -2,26 +2,50 @@
<view class="container"> <view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"> <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add" @click="addCommunity"> <view class="searchBox_add" @click="addCommunity">
<image class="top-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder_community.png" mode="aspectFill"></image> <image class="top-image"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder_community.png" mode="aspectFill">
</image>
<view class="emptyCommunity"> <view class="emptyCommunity">
{{ communityVal }} {{ communityVal }}
</view> </view>
</view> </view>
</view> </view>
<!-- 背景图片区域 --> <!-- 背景图片区域 -->
<view class="bg-image-container"> <!-- <view class="bg-image-container">
<image class="bg-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrderDashboardImg.png" mode=""></image> <image class="bg-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrderDashboardImg.png" mode=""></image>
</view> -->
<view class="walletBox">
<view class="walletBox_top">钱包</view>
<view class="walletBox_content">
<view class="walletBox_item" @click="goWallet(1)">
<view>999.00</view>
<view class="walletBox_item_text">应收</view>
</view>
<view class="walletBox_item" @click="goWallet(2)">
<view>999.00</view>
<view class="walletBox_item_text">已收</view>
</view>
<view class="walletBox_item" @click="goWallet(3)">
<view>999.00</view>
<view class="walletBox_item_text">待收物业公积金</view>
</view>
<view class="walletBox_item" @click="goWallet(4)">
<view>999.00</view>
<view class="walletBox_item_text">手续费</view>
</view>
</view>
</view> </view>
<view class="work-order-section"> <view class="work-order-section">
<view v-for="(item, index) in 9" :key="index"> <view v-for="(item, index) in 9" :key="index">
<view class="work-order-card" v-if="index == 1 && showWorkOrderSection" <view class="work-order-card" v-if="index == 1 && showWorkOrderSection"
@click="navigateToWorkOrderDashboard"> @click="navigateToWorkOrderDashboard">
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder.png" mode="aspectFill" /> <image class="work-order-icon"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder.png" mode="aspectFill" />
<text class="work-order-text">工单台</text> <text class="work-order-text">工单台</text>
</view> </view>
<view class="work-order-card" v-if="index == 0" <view class="work-order-card" v-if="index == 0" @click="navigateToRoutingInspection">
@click="navigateToRoutingInspection"> <image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png"
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png" mode="aspectFill" /> mode="aspectFill" />
<text class="work-order-text">巡更巡检</text> <text class="work-order-text">巡更巡检</text>
</view> </view>
<view class="work-order-card" v-else></view> <view class="work-order-card" v-else></view>
@ -83,6 +107,12 @@ export default {
} }
}, },
methods: { methods: {
goWallet(type) {
if (type == 2) {
return
}
NavgateTo('/packages/workOrderDashboard/wallet/index?type=' + type);
},
addCommunity() { addCommunity() {
NavgateTo("/packages/workOrderDashboard/myCommunity/index"); NavgateTo("/packages/workOrderDashboard/myCommunity/index");
}, },

View File

@ -0,0 +1,147 @@
page {
background-color: #f6f7fb;
}
.header {
width: 750rpx;
padding-bottom: 20rpx;
background-color: #ffffff;
}
.searchBox {
display: flex;
align-items: center;
z-index: 2;
}
.searchBox_left {
box-sizing: border-box;
padding-left: 20rpx;
position: absolute;
left: 0;
}
.searchBox_mid {
font-size: 32rpx;
color: #222222;
flex: 1;
text-align: center;
}
/* 余额显示部分样式 */
.balance-container {
width: 93%;
height: 250rpx;
background-color: #ffffff;
margin-bottom: 15rpx;
padding: 25rpx;
}
.balance-content {
height: 100%;
display: flex;
position: relative;
align-items: center;
padding-left: 50rpx;
color: #894b11;
background: linear-gradient(to top right, #f6e2b7, #eab16a);
border-radius: 25rpx;
}
.balance-title {
font-size: 45rpx;
font-weight: 500;
margin-bottom: 20rpx;
}
.balance-amount {
font-size: 70rpx;
font-weight: 500;
}
.balance-icon {
position: absolute;
right: 50rpx;
top: 50%;
transform: translateY(-50%);
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.balance-icon image {
width: 200rpx;
height: 200rpx;
}
/* 余额变动记录样式 */
.records-container {
margin-top: 30rpx;
padding: 0 40rpx;
background-color: #ffffff;
padding: 25rpx;
}
.records-title {
font-size: 36rpx;
font-weight: bold;
color: #222222;
margin-bottom: 30rpx;
}
.records-list {
width: 100%;
}
.record-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx 0;
border-bottom: 1rpx solid #EEEEEE;
}
.record-info {
flex: 1;
}
.record-name {
font-size: 32rpx;
color: #222222;
margin-bottom: 10rpx;
}
.record-time {
font-size: 26rpx;
color: #999999;
}
.record-amount {
text-align: right;
}
.amount-sign {
font-size: 28rpx;
}
.amount-value {
font-size: 36rpx;
font-weight: bold;
}
.positive {
color: #51c651;
}
.negative {
color: #FF4444;
}
.record-balance {
font-size: 26rpx;
color: #999999;
margin-top: 10rpx;
}

View File

@ -0,0 +1,125 @@
<template>
<view>
<view class="header">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_left" @click="back">
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
</view>
<view class="searchBox_mid">{{ topVal }}</view>
</view>
</view>
<!-- 余额显示部分 -->
<view class="balance-container">
<view class="balance-content">
<view>
<view class="balance-title">{{ topVal }}</view>
<view class="balance-amount">{{ balance }}</view>
<view class="balance-icon">
<image src="http://localhost:8080/user_wallet2.png" mode="widthFix" />
</view>
</view>
</view>
</view>
<!-- 余额变动记录 -->
<view class="records-container">
<view class="records-title" v-if="topVal == '待收物业公积金'">物业费公积金变动记录</view>
<view class="records-list">
<view class="record-item" v-for="(record, index) in records" :key="index">
<view class="record-info">
<view class="record-name">{{ record.name }}</view>
<view class="record-time">{{ record.time }}</view>
</view>
<view class="record-amount">
<view class="record-balance" v-if="topVal == '应收'">{{ record.amount.startsWith('+') ? '收款' :
'退款' }}</view>
<view class="record-balance" v-else-if="topVal == '待收物业公积金'">待收</view>
<view class="record-balance" v-else-if="topVal == '手续费'">手续费</view>
<view>
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
record.amount.startsWith('+') ? '+' : '-' }}</text>
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
record.amount.replace(/[+-]/, '') }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
export default {
data() {
return {
top: "",
localHeight: "",
topVal: "",
balance: "160.80",
records: [
{
name: "退单-1312312317972",
time: "2025-08-12 13:00:00",
amount: "-1808.5",
remain: "286.79"
},
{
name: "退单-1312312317972",
time: "2025-08-12 13:00:00",
amount: "-1808.5",
remain: "286.79"
}
]
}
},
onLoad(options) {
const meun = menuButtonInfo();
this.top = meun.top;
this.localHeight = meun.height;
this.getTypeName(options.type);
this.getWalletInfo();
},
methods: {
back() {
uni.navigateBack({
delta: 1
});
},
//
getTypeName(type) {
const numType = parseInt(type);
switch (numType) {
case 1:
this.topVal = '应收';
break;
case 2:
this.topVal = '已收';
break;
case 3:
this.topVal = '待收物业公积金';
break;
case 4:
this.topVal = '手续费';
break;
}
},
//
getWalletInfo() {
//
// 使
console.log('获取钱包信息');
//
// request('/api/wallet/info', 'GET').then(res => {
// if (res.code === 0) {
// this.balance = res.data.balance;
// this.records = res.data.records;
// }
// })
}
}
}
</script>
<style>
@import url("./index.css");
</style>