修改缴费记录和对公

This commit is contained in:
2024-09-10 11:07:45 +08:00
parent 6e2608925c
commit 8482453da0
11 changed files with 120 additions and 20 deletions

View File

@@ -16,6 +16,7 @@ Page({
list: [
],
way: ["现金", "银行卡", "支付宝", "微信", "云闪付","对公转账", "小程序-微信支付"],
show: false,
columns: [],
type: "",
@@ -40,6 +41,18 @@ Page({
title: "表计"
})
},
clickType() {
this.setData({
type: "pay",
columns: [
{id: undefined, name: "全部" },
{id: 1, name: "对公" },
{id: 2, name: "微信" },
],
show: true,
title: "充值类型"
})
},
onOk(e) {
const { type, value = {} } = e.detail;
if (type === "year") {
@@ -50,9 +63,13 @@ Page({
this.onChangeMeter(value)
return;
}
if (type === "pay") {
this.onChangePay(value)
return;
}
},
onChangeYear(e) {
const { codeId } = this.data;
const { codeId, pay } = this.data;
const currentYear = e
this.setData({
year: currentYear,
@@ -60,11 +77,11 @@ Page({
show: false,
title: ""
})
this.init(currentYear, codeId)
this.init(currentYear, codeId, pay)
},
onChangeMeter(e) {
const { id, code } = e;
const { year } = this.data;
const { id, code, } = e;
const { year, pay } = this.data;
this.setData({
codeId: id,
meterCode: code,
@@ -72,7 +89,19 @@ Page({
show: false,
title: ""
})
this.init(year, id)
this.init(year, id, pay)
},
onChangePay(e) {
const { id, name } = e;
console.log('e', e)
const { year, codeId } = this.data;
this.setData({
payType: name,
type: "",
show: false,
title: ""
})
this.init(year,codeId, id, )
},
/**
* 生命周期函数--监听页面显示
@@ -102,8 +131,8 @@ Page({
meterList: data || [],
})
},
async init(year, codeId) {
const { code, message, data = [], amount = 0 } = await getRechargeList(year, codeId);
async init(year, codeId, pay) {
const { code, message, data = [], amount = 0 } = await getRechargeList(year, codeId, pay);
if (code !== OK) {
alertInfo(message)
return;

View File

@@ -11,7 +11,7 @@
<van-icon name="arrow-down" custom-class="down" />
</view>
<view class="tenementPicker" bind:tap="clickType">
<view wx:if="{{typeText}}" class="tenementName"> {{ typeText }} </view>
<view wx:if="{{payType}}" class="tenementName"> {{ payType }} </view>
<view wx:else> 全部类型 </view>
<van-icon name="arrow-down" custom-class="down" />
</view>
@@ -25,9 +25,14 @@
<view class="codeTime">
<view class="code"> {{ item.meter.address }} </view>
<view class="time"> {{ item.time }} </view>
<view class="way"> {{ way[item.paymentType] }} </view>
</view>
<view class="money"> {{ item.money }}元 </view>
<van-icon name="arrow" />
<view class="rechargeStatus rechargeWait" wx:if="{{item.orderStatus === 1}}"> 处理中 </view>
<view class="rechargeStatus rechargeBack" wx:elif="{{item.orderStatus === 2}}"> 已退回 </view>
<view class="rechargeStatus rechargeSuccess" wx:else> 充值成功 </view>
</view>
</view>
</view>

View File

@@ -28,6 +28,7 @@
border-right: 0;
border-top: 0;
align-items: center;
position: relative;
}
.recordsItem:last-child {
border-bottom: 0;
@@ -89,4 +90,30 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.way {
margin-top: 10rpx;
font-size: 24rpx;
}
.rechargeStatus {
position: absolute;
right: 0;
top: 0;
z-index: 99;
font-size: 26rpx;
padding: 4rpx 10rpx;
}
.rechargeWait {
background-color: rgb(234,226,26);
}
.rechargeSuccess {
background-color: rgb(88,165,141);
}
.rechargeBack {
background-color: rgb(229,229,229);
}