调试水电费支付
This commit is contained in:
@@ -257,7 +257,6 @@ const getMyActivityListData = async (pageNum = 1) => {
|
|||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
villageId:uni.getStorageSync('currentVillageId')
|
villageId:uni.getStorageSync('currentVillageId')
|
||||||
}
|
}
|
||||||
// status 为空时不传,返回全部
|
|
||||||
if (myFilter.value !== '') {
|
if (myFilter.value !== '') {
|
||||||
params.status = myFilter.value
|
params.status = myFilter.value
|
||||||
}
|
}
|
||||||
@@ -388,7 +387,6 @@ onShow(() => {
|
|||||||
* 页面加载时监听刷新事件(来自详情页)
|
* 页面加载时监听刷新事件(来自详情页)
|
||||||
*/
|
*/
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 监听详情页报名/取消报名后的刷新通知
|
|
||||||
uni.$on('refreshActivityList', (data) => {
|
uni.$on('refreshActivityList', (data) => {
|
||||||
getActivityListData(1)
|
getActivityListData(1)
|
||||||
})
|
})
|
||||||
@@ -434,14 +432,11 @@ watch(() => myFilter.value, () => {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 滚动区域 */
|
|
||||||
.scroll-container {
|
.scroll-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 顶部图片 */
|
|
||||||
.top-img {
|
.top-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
|
|||||||
@@ -157,6 +157,11 @@ export const getTopUpDetailsByMonth = (data) => {
|
|||||||
return post(`/api/topUp/billDetails/listByMonth`, data)
|
return post(`/api/topUp/billDetails/listByMonth`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 水电表余额查询
|
||||||
|
export const getSelectByDeviceCode = (data) => {
|
||||||
|
return post('/api/topUp/selectByDeviceCode', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,15 +29,15 @@
|
|||||||
|
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">户号</text>
|
<text class="info-label">户号</text>
|
||||||
<text class="info-value">{{ paymentItem.deviceCode || '-' }}</text>
|
<text class="info-value">{{ paymentItem.deviceCode}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">户主</text>
|
<text class="info-label">户主</text>
|
||||||
<text class="info-value">{{ paymentItem.name || '-' }}</text>
|
<text class="info-value">{{ paymentItem.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">地址</text>
|
<text class="info-label">地址</text>
|
||||||
<text class="info-value">{{ paymentItem.fullAddress || '-' }}</text>
|
<text class="info-value">{{ paymentItem.fullAddress}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="border-bottom: 2rpx solid #c7c7c7;padding-bottom:20rpx;"></view> -->
|
<!-- <view style="border-bottom: 2rpx solid #c7c7c7;padding-bottom:20rpx;"></view> -->
|
||||||
<!-- 缴费金额输入 -->
|
<!-- 缴费金额输入 -->
|
||||||
@@ -107,6 +107,7 @@
|
|||||||
onShow,
|
onShow,
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
import {getSelectByDeviceCode} from '@/pageSubPack/api/apiSub.js'
|
||||||
|
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
@@ -122,7 +123,9 @@
|
|||||||
initPaymentData()
|
initPaymentData()
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {})
|
onShow(() => {
|
||||||
|
getBalance()
|
||||||
|
})
|
||||||
|
|
||||||
// 初始化缴费数据
|
// 初始化缴费数据
|
||||||
const initPaymentData = () => {
|
const initPaymentData = () => {
|
||||||
@@ -133,6 +136,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询单条余额(水电费通用),从小程序返回后刷新
|
||||||
|
const getBalance = () => {
|
||||||
|
if (!paymentItem.deviceCode) return
|
||||||
|
const deviceTypeMap = { '电费': '1', '水费': '2' }
|
||||||
|
getSelectByDeviceCode({
|
||||||
|
deviceCode: paymentItem.deviceCode,
|
||||||
|
type: deviceTypeMap[paymentItem.type]
|
||||||
|
}).then(res => {
|
||||||
|
const data = res.data
|
||||||
|
if (data && data.balance !== undefined && data.balance !== null) {
|
||||||
|
arrearsAmount.value = Math.abs(data.balance || 0).toFixed(2)
|
||||||
|
payAmount.value = Math.abs(data.balance || 0)
|
||||||
|
outstandingPayment.value = data.balance < 0
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('查询余额失败', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
@@ -218,9 +240,7 @@
|
|||||||
|
|
||||||
// 返回缴费列表
|
// 返回缴费列表
|
||||||
const handleBackToList = () => {
|
const handleBackToList = () => {
|
||||||
uni.redirectTo({
|
uni.navigateBack();
|
||||||
url: '/pageSubPack/payment-list/paymentIndex'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 类型码转中文名展示
|
// 类型码转中文名展示
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ onShow(() => {
|
|||||||
isFirstShow.value = false
|
isFirstShow.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 返回列表时刷新(例如从支付小程序返回后)
|
|
||||||
fetchBills()
|
fetchBills()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<view class="bill-status debt" v-if="item.balance<0">已欠费</view>
|
<view class="bill-status debt" v-if="item.balance<0">已欠费</view>
|
||||||
<text :class="item.balance<0 ? 'balance-debt' : 'balance-normal'">(余额:{{item.balance|| 0.00}}元)</text>
|
<text :class="item.balance<0 ? 'balance-debt' : 'balance-normal'">(余额:{{item.balance|| 0.00}}元)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bill-desc">{{item.villageName+item.buildingName+item.fullAddress}}</view>
|
<view class="bill-desc">{{item.villageName+'-'+item.buildingName+'-'+item.fullAddress}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="arrow"></view>
|
<view class="arrow"></view>
|
||||||
@@ -197,12 +197,12 @@ const navigateToSelectHome = () => {
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
getCurrentCommunityData()
|
getCurrentCommunityData()
|
||||||
getBillDetails()
|
getBillDetails()
|
||||||
|
getPayList()
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
uni.hideTabBar({ animation: false });
|
uni.hideTabBar({ animation: false });
|
||||||
uni.$on('confirmPayment', slelctHomeData)
|
uni.$on('confirmPayment', slelctHomeData)
|
||||||
getPayList()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
@@ -414,11 +414,10 @@ page {
|
|||||||
.container {}
|
.container {}
|
||||||
|
|
||||||
.bill-list {
|
.bill-list {
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 10rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
min-height: 550rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,12 +497,12 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.details-scroll {
|
.details-scroll {
|
||||||
height: 550rpx;
|
max-height: 550rpx;
|
||||||
padding: 0 0 20rpx 0;
|
padding: 0 0 20rpx 0;
|
||||||
}
|
}
|
||||||
.details-scroll-bill{
|
.details-scroll-bill{
|
||||||
height: 550rpx;
|
max-height: 550rpx;
|
||||||
padding: 0 0 40rpx 0;
|
padding: 0 0 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load-more-status {
|
.load-more-status {
|
||||||
|
|||||||
Reference in New Issue
Block a user