修改缴费记录和对公

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;