Compare commits

..

No commits in common. "8d60cb6200d832d0cc95d69e6dfb27e3664e40df" and "2046ab60f0a71430e2ba20dc1397fcc51fca8807" have entirely different histories.

7 changed files with 137 additions and 165 deletions

View File

@ -1,4 +0,0 @@
export const apiArr = {
walletList: "/api/v2/wechat/wallet/list", // 商户钱包
walletChangeList: "/api/v2/wechat/wallet/change/list", // 商户钱包变更详情
};

View File

@ -246,8 +246,7 @@
<view class="wealBox"> <view class="wealBox">
<view class="wealBoxItem wealBoxItem1"> <view class="wealBoxItem wealBoxItem1">
<view class="wealBoxItemTop"> <view class="wealBoxItemTop">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_fen.png" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_fen.png" mode="aspectFit">
mode="aspectFit">
</image> </image>
<view>石榴分</view> <view>石榴分</view>
</view> </view>
@ -260,8 +259,7 @@
</view> </view>
<view class="wealBoxItem wealBoxItem2"> <view class="wealBoxItem wealBoxItem2">
<view class="wealBoxItemTop"> <view class="wealBoxItemTop">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_zi.png" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_zi.png" mode="aspectFit">
mode="aspectFit">
</image> </image>
<view>石榴籽</view> <view>石榴籽</view>
</view> </view>
@ -274,8 +272,7 @@
</view> </view>
<view class="wealBoxItem wealBoxItem3"> <view class="wealBoxItem wealBoxItem3">
<view class="wealBoxItemTop"> <view class="wealBoxItemTop">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_jin.png" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_jin.png" mode="aspectFit"/>
mode="aspectFit" />
<view>石榴金</view> <view>石榴金</view>
</view> </view>
<view> <view>
@ -377,7 +374,6 @@ export default {
// //
verifyCode: '', verifyCode: '',
totalPrice: 0,
}; };
}, },
computed: { computed: {
@ -524,10 +520,8 @@ export default {
{ {
goods_id: item.goods_id, goods_id: item.goods_id,
count: item.count, count: item.count,
price: item.price,
}, },
], ],
adver_id: item.adver_id,
} }
request(apiArr.updateCar, "POST", params).then(res => { request(apiArr.updateCar, "POST", params).then(res => {
uni.showToast({ uni.showToast({
@ -539,20 +533,37 @@ export default {
// //
calculateTotal(order) { calculateTotal(order) {
const currentTime = new Date().getTime();
if (order === 'order1') { if (order === 'order1') {
let total = 0; let total = 0;
this.orderList1.forEach(goods => { this.orderList1.forEach(goods => {
// 使item.price //
total += goods.price * goods.count; const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
if (currentTime >= startTime && currentTime <= endTime) {
// total += goods.commodity_goods_info.group_buy_price * goods.count + goods.commodity_goods_info.freight;
total += goods.commodity_goods_info.group_buy_price * goods.count;
} else {
// total += goods.commodity_goods_info.sales_price * goods.count + goods.commodity_goods_info.freight;
total += goods.commodity_goods_info.sales_price * goods.count;
}
}); });
// //
return total.toFixed(2); return total.toFixed(2);
} else { } else {
let total = 0; let total = 0;
this.orderList2.forEach(goods => { this.orderList2.forEach(goods => {
// 使item.price // //
// const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
// const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
// if (currentTime >= startTime && currentTime <= endTime) {
// // total += goods.commodity_goods_info.group_buy_price * goods.count + goods.commodity_goods_info.freight;
// total += goods.commodity_goods_info.group_buy_price * goods.count;
// } else {
// // total += goods.commodity_goods_info.sales_price * goods.count + goods.commodity_goods_info.freight;
// total += goods.commodity_goods_info.sales_price * goods.count;
// }
total += goods.price * goods.count; total += goods.price * goods.count;
this.totalPrice = total.toFixed(2);
}); });
// //
return total.toFixed(2); return total.toFixed(2);
@ -643,7 +654,7 @@ export default {
const params = { const params = {
user_id: uni.getStorageSync('userId'), user_id: uni.getStorageSync('userId'),
// shopCarListisAdvertrue // shopCarListisAdvertrue
order_cate: this.carList.some(item => item.isAdver === true) ? 3 : (isGroupBuyValid ? 2 : 1), order_cate : this.carList.some(item => item.isAdver === true) ? 3 : (isGroupBuyValid ? 2 : 1),
goods_list: Object.keys(this.supplierGroups).map(supplierId => { goods_list: Object.keys(this.supplierGroups).map(supplierId => {
const group = this.supplierGroups[supplierId]; const group = this.supplierGroups[supplierId];
const firstItem = group[0]; const firstItem = group[0];
@ -664,10 +675,14 @@ export default {
merchant_id: ztAddress.address_id, merchant_id: ztAddress.address_id,
group_buy_activity_id: firstItem.commodity_goods_info.group_buy_activity_id, group_buy_activity_id: firstItem.commodity_goods_info.group_buy_activity_id,
goods_and_count: group.map(item => { goods_and_count: group.map(item => {
const activityInfo = item.commodity_goods_info.group_buy_activity_info;
const isGroupBuy = activityInfo &&
currentTime >= new Date(activityInfo.start_time).getTime() &&
currentTime <= new Date(activityInfo.end_time).getTime();
return { return {
goods_id: item.goods_id, goods_id: item.goods_id,
count: item.count, count: item.count,
price: item.price, price: isGroupBuy ? item.commodity_goods_info.group_buy_price : item.commodity_goods_info.sales_price,
freight: item.commodity_goods_info.freight, freight: item.commodity_goods_info.freight,
} }
}) })

View File

@ -317,7 +317,7 @@ export default {
is_published: 1, is_published: 1,
jump_target: 1, jump_target: 1,
mini_program_url: "/packages/community/repairList/index", mini_program_url: "/packages/community/repairList/index",
nav_icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/noValFunction1.png", nav_icon: picUrl + "/static/images/2025-07-05/db3s1b1lyxawt8cnke.png",
nav_name: "报事报修", nav_name: "报事报修",
other_appid: "", other_appid: "",
other_path: "", other_path: "",
@ -331,7 +331,7 @@ export default {
is_published: 1, is_published: 1,
jump_target: 1, jump_target: 1,
mini_program_url: "/packages/community/propertyPayment/index", mini_program_url: "/packages/community/propertyPayment/index",
nav_icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/noValFunction2.png", nav_icon: picUrl + "/static/images/2025-07-05/db3s1t7d1k0qmuha61.png",
nav_name: "物业缴费", nav_name: "物业缴费",
other_appid: "", other_appid: "",
other_path: "", other_path: "",
@ -345,7 +345,7 @@ export default {
is_published: 1, is_published: 1,
jump_target: 1, jump_target: 1,
mini_program_url: "/packages/community/providentFund/index", mini_program_url: "/packages/community/providentFund/index",
nav_icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/noValFunction3.png", nav_icon: picUrl + "/static/images/2025-07-05/db3s29e33rd7rsrecf.png",
nav_name: "物业公积金", nav_name: "物业公积金",
other_appid: "", other_appid: "",
other_path: "", other_path: "",

View File

@ -25,16 +25,16 @@
<view class="walletBox"> <view class="walletBox">
<view class="walletBox_top">钱包</view> <view class="walletBox_top">钱包</view>
<view class="walletBox_content"> <view class="walletBox_content">
<view class="walletBox_item" @click="goWallet(1, walletInfo.guarantee.toFixed(2))"> <view class="walletBox_item" @click="goWallet(1)">
<view>{{ walletInfo.guarantee ? walletInfo.guarantee.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">保证金</view> <view class="walletBox_item_text">保证金</view>
</view> </view>
<view class="walletBox_item" @click="goWallet(2, walletInfo.receivable.toFixed(2))"> <view class="walletBox_item" @click="goWallet(2)">
<view>{{ walletInfo.receivable ? walletInfo.receivable.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">应收</view> <view class="walletBox_item_text">应收</view>
</view> </view>
<view class="walletBox_item" @click="goWallet(3, walletInfo.handling_fee.toFixed(2))"> <view class="walletBox_item" @click="goWallet(3)">
<view>{{ walletInfo.handling_fee ? walletInfo.handling_fee.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">手续费</view> <view class="walletBox_item_text">手续费</view>
</view> </view>
</view> </view>
@ -98,7 +98,6 @@ import {
import { import {
apiArr apiArr
} from '../../../api/community'; } from '../../../api/community';
import { apiArr as walletApi } from '../../../api/wallet';
export default { export default {
@ -126,7 +125,6 @@ export default {
url: "/packages/customerService/chattingRecords/index", url: "/packages/customerService/chattingRecords/index",
} }
], ],
walletInfo: {},
} }
}, },
onLoad(options) { onLoad(options) {
@ -137,16 +135,8 @@ export default {
this.getShopList(); this.getShopList();
}, },
methods: { methods: {
//
getWalletInfo() {
const params = {
merchant_id: this.selectedShop.id,
}
request(walletApi.walletList, 'POST', params, { silent: false }).then(res => {
this.walletInfo = res;
})
},
// //
getShopList() { getShopList() {
request(apiArr.getShopList, 'POST', {}, { silent: false }).then(res => { request(apiArr.getShopList, 'POST', {}, { silent: false }).then(res => {
@ -156,14 +146,11 @@ export default {
this.shopList = res.rows; this.shopList = res.rows;
if (this.shopList.length > 0) { if (this.shopList.length > 0) {
this.selectedShop = this.shopList[0]; this.selectedShop = this.shopList[0];
// selectedShopgetWalletInfo()
this.getWalletInfo();
} }
}) })
}, },
// goWallet(type) {
goWallet(type, amount) { NavgateTo('/packages/storeManagement/wallet/index?type=' + type);
NavgateTo('/packages/storeManagement/wallet/index?type=' + type + '&merchant_id=' + this.selectedShop.id + '&amount=' + amount);
}, },
changeTab(index) { changeTab(index) {
this.active = index; this.active = index;

View File

@ -15,60 +15,56 @@
<view> <view>
<view class="balance-title">{{ topVal }}</view> <view class="balance-title">{{ topVal }}</view>
<view class="balance-amount">{{ balance }}</view> <view class="balance-amount">{{ balance }}</view>
<!-- <view v-if="topVal == '保证金'" class="balance-text"> <view class="balance-icon" v-if="topVal != '保证金'">
去充值
</view> -->
<view class="balance-icon">
<image src="http://localhost:8080/user_wallet2.png" mode="widthFix" /> <image src="http://localhost:8080/user_wallet2.png" mode="widthFix" />
</view> </view>
<view v-else class="balance-text">
去充值
</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 变动记录 --> <!-- 变动记录 -->
<view class="records-container"> <view class="records-container">
<!-- <view class="tabs" v-if="topVal == '保证金' && records.length > 0"> <view class="tabs" v-if="topVal == '保证金'">
<view v-for="(item, index) in tabList" :key="index" <view v-for="(item, index) in tabList" :key="index"
:class="['tabItem', selectedTab === item.id ? 'active2' : '']" @click="selectTab(index, item)"> :class="['tabItem', selectedTab === item.id ? 'active2' : '']" @click="selectTab(index, item)">
{{ item.tabName }} {{ item.tabName }}
</view> </view>
</view> -->
<view v-if="records.length == 0">
<view class="records-list">暂无变动记录</view>
</view> </view>
<view class="records-list" v-else> <view class="records-list">
<view class="record-item" v-for="(record, index) in records" :key="index"> <view class="record-item" v-for="(record, index) in records" :key="index">
<view class="record-info"> <view class="record-info">
<view class="record-name">{{ record.change_reason == 1 ? '下单' : '退单' }} - {{ <view class="record-name">{{ record.name }}</view>
record.related_order }}</view> <view class="record-time">{{ record.time }}</view>
<view class="record-time">{{ record.change_time }}</view>
</view> </view>
<view class="record-amount" v-if="topVal == '保证金'"> <view class="record-amount" v-if="topVal == '保证金'">
<view> <view>
<text :class="['amount-sign', record.change_reason == 1 ? 'positive' : 'negative']">{{ <text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
record.change_reason == 1 ? '+' : '-' }}</text> record.amount.startsWith('+') ? '+' : '-' }}</text>
<text :class="['amount-value', record.change_reason == 1 ? 'positive' : 'negative']">¥{{ <text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
record.amount_change }}</text> record.amount.replace(/[+-]/, '') }}</text>
</view> </view>
<view class="record-balance">:¥{{ record.balance_after }}</view> <view class="record-balance">:¥{{ record.remain }}</view>
</view> </view>
<view class="record-amount" v-else-if="topVal == '应收'"> <view class="record-amount" v-else-if="topVal == '应收'">
<view :class="['amount-sign', record.change_reason == 1 ? 'positive' : 'negative']">{{ <view :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
record.change_reason == 1 ? '收款' : '退款' }}</view> record.amount.startsWith('+') ? '收款' : '退款' }}</view>
<view> <view>
<text :class="['amount-sign', record.change_reason == 1 ? 'positive' : 'negative']">{{ <text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
record.change_reason == 1 ? '+' : '-' }}</text> record.amount.startsWith('+') ? '+' : '-' }}</text>
<text :class="['amount-value', record.change_reason == 1 ? 'positive' : 'negative']">¥{{ <text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
record.amount_change }}</text> record.amount.replace(/[+-]/, '') }}</text>
</view> </view>
</view> </view>
<view class="record-amount" v-else> <view class="record-amount" v-else>
<view class="record-balance">手续费</view> <view class="record-balance">手续费</view>
<view> <view>
<text class="amount-sign">{{ record.change_reason == 1 ? '+' : '-' }}</text> <text class="amount-sign">{{ record.amount.startsWith('+') ? '+' : '-' }}</text>
<text class="amount-sign">¥{{ record.amount_change }}</text> <text class="amount-sign">¥{{ record.amount.replace(/[+-]/, '') }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -78,16 +74,27 @@
</template> </template>
<script> <script>
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index'; import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
import { apiArr as walletApi } from '../../../api/wallet';
export default { export default {
data() { data() {
return { return {
top: "", top: "",
localHeight: "", localHeight: "",
topVal: "", topVal: "",
balance: "", balance: "160.80",
records: [], 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"
}
],
tabList: [ tabList: [
{ {
id: 0, id: 0,
@ -102,8 +109,7 @@ export default {
tabName: '消费记录' tabName: '消费记录'
} }
], ],
selectedTab: 0, selectedTab: 0
merchant_id: "",
} }
}, },
onLoad(options) { onLoad(options) {
@ -111,8 +117,6 @@ export default {
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.topVal = options.type == 1 ? '保证金' : (options.type == 2 ? '应收' : '手续费'); this.topVal = options.type == 1 ? '保证金' : (options.type == 2 ? '应收' : '手续费');
this.balance = options.amount;
this.merchant_id = options.merchant_id;
this.getWalletInfo(); this.getWalletInfo();
}, },
methods: { methods: {
@ -122,24 +126,21 @@ export default {
}); });
}, },
selectTab(index, item) { selectTab(index, item) {
console.log("🚀 ~ selectTab ~ item:", item)
this.selectedTab = item.id; this.selectedTab = item.id;
}, },
// //
getWalletInfo() { getWalletInfo() {
const params = { //
merchant_id: this.merchant_id, // 使
} console.log('获取钱包信息');
request(walletApi.walletChangeList, 'POST', params, { silent: false }).then(res => { //
let filteredRows = res.rows; // request('/api/wallet/info', 'GET').then(res => {
if (this.topVal == '保证金') { // if (res.code === 0) {
filteredRows = res.rows.filter(item => item.change_category == 5); // this.balance = res.data.balance;
} else if (this.topVal == '应收') { // this.records = res.data.records;
filteredRows = res.rows.filter(item => item.change_category == 2); // }
} else { // })
filteredRows = res.rows.filter(item => item.change_category == 3);
}
this.records = filteredRows;
})
} }
} }
} }

View File

@ -17,20 +17,20 @@
<view class="walletBox"> <view class="walletBox">
<view class="walletBox_top">钱包</view> <view class="walletBox_top">钱包</view>
<view class="walletBox_content"> <view class="walletBox_content">
<view class="walletBox_item" @click="goWallet(1, walletInfo.receivable.toFixed(2))"> <view class="walletBox_item" @click="goWallet(1)">
<view>{{ walletInfo.receivable ? walletInfo.receivable.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">应收</view> <view class="walletBox_item_text">应收</view>
</view> </view>
<view class="walletBox_item" @click="goWallet(2, walletInfo.received.toFixed(2))"> <view class="walletBox_item" @click="goWallet(2)">
<view>{{ walletInfo.received ? walletInfo.received.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">已收</view> <view class="walletBox_item_text">已收</view>
</view> </view>
<view class="walletBox_item" @click="goWallet(3, walletInfo.pending.toFixed(2))"> <view class="walletBox_item" @click="goWallet(3)">
<view>{{ walletInfo.pending ? walletInfo.pending.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">待收物业公积金</view> <view class="walletBox_item_text">待收物业公积金</view>
</view> </view>
<view class="walletBox_item" @click="goWallet(4, walletInfo.handling_fee.toFixed(2))"> <view class="walletBox_item" @click="goWallet(4)">
<view>{{ walletInfo.handling_fee ? walletInfo.handling_fee.toFixed(2) : "0.00" }}</view> <view>999.00</view>
<view class="walletBox_item_text">手续费</view> <view class="walletBox_item_text">手续费</view>
</view> </view>
</view> </view>
@ -64,15 +64,13 @@ import {
} from "../../../utils"; } from "../../../utils";
import { apiArr } from "../../../api/community"; import { apiArr } from "../../../api/community";
import { apiArr as walletApi } from '../../../api/wallet';
export default { export default {
data() { data() {
return { return {
communityVal: "切换小区", communityVal: "切换小区",
showWorkOrderSection: false, showWorkOrderSection: false,
communityList: [], communityList: []
walletInfo: {},
} }
}, },
async onLoad() { async onLoad() {
@ -94,8 +92,6 @@ export default {
uni.setStorageSync('changeWorkOrderData', { id: res.rows[0].community_id, name: res.rows[0].name }); uni.setStorageSync('changeWorkOrderData', { id: res.rows[0].community_id, name: res.rows[0].name });
this.communityVal = res.rows[0].name; this.communityVal = res.rows[0].name;
} }
//
this.getWalletInfo();
}); });
}, },
async onShow() { async onShow() {
@ -111,32 +107,11 @@ export default {
} }
}, },
methods: { methods: {
// goWallet(type) {
getWalletInfo() { if (type == 2) {
const changeCommData = uni.getStorageSync('changeWorkOrderData'); return
if (!changeCommData) {
return;
} }
const params = { NavgateTo('/packages/workOrderDashboard/wallet/index?type=' + type);
community_id: changeCommData.id,
}
request(walletApi.walletList, 'POST', params, { silent: false }).then(res => {
this.walletInfo = res;
})
},
goWallet(type, amount) {
const changeCommData = uni.getStorageSync('changeWorkOrderData');
if (!changeCommData) {
uni.showToast({
title: '请先选择小区',
icon: 'none'
});
return;
}
// if (type == 2) {
// return
// }
NavgateTo('/packages/workOrderDashboard/wallet/index?type=' + type + '&community_id=' + changeCommData.id + '&amount=' + amount);
}, },
addCommunity() { addCommunity() {
NavgateTo("/packages/workOrderDashboard/myCommunity/index"); NavgateTo("/packages/workOrderDashboard/myCommunity/index");

View File

@ -25,26 +25,22 @@
<!-- 余额变动记录 --> <!-- 余额变动记录 -->
<view class="records-container"> <view class="records-container">
<view class="records-title" v-if="topVal == '待收物业公积金'">物业费公积金变动记录</view> <view class="records-title" v-if="topVal == '待收物业公积金'">物业费公积金变动记录</view>
<view v-if="records.length == 0"> <view class="records-list">
<view class="records-list">暂无变动记录</view>
</view>
<view class="records-list" v-else>
<view class="record-item" v-for="(record, index) in records" :key="index"> <view class="record-item" v-for="(record, index) in records" :key="index">
<view class="record-info"> <view class="record-info">
<view class="record-name">{{ record.change_reason == 1 ? '下单' : '退单' }} - {{ <view class="record-name">{{ record.name }}</view>
record.related_order }}</view> <view class="record-time">{{ record.time }}</view>
<view class="record-time">{{ record.change_time }}</view>
</view> </view>
<view class="record-amount"> <view class="record-amount">
<view class="record-balance" v-if="topVal == '应收' || topVal == '已收'">{{ record.change_reason == 1 ? '收款' : <view class="record-balance" v-if="topVal == '应收'">{{ record.amount.startsWith('+') ? '收款' :
'退款' }}</view> '退款' }}</view>
<view class="record-balance" v-else-if="topVal == '待收物业公积金'">待收</view> <view class="record-balance" v-else-if="topVal == '待收物业公积金'">待收</view>
<view class="record-balance" v-else-if="topVal == '手续费'">手续费</view> <view class="record-balance" v-else-if="topVal == '手续费'">手续费</view>
<view> <view>
<text :class="['amount-sign', record.change_reason == 1 ? 'positive' : 'negative']">{{ <text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
record.change_reason == 1 ? '+' : '-' }}</text> record.amount.startsWith('+') ? '+' : '-' }}</text>
<text :class="['amount-value', record.change_reason == 1 ? 'positive' : 'negative']">¥{{ <text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
record.amount_change }}</text> record.amount.replace(/[+-]/, '') }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -54,17 +50,27 @@
</template> </template>
<script> <script>
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index'; import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
import { apiArr as walletApi } from '../../../api/wallet';
export default { export default {
data() { data() {
return { return {
top: "", top: "",
localHeight: "", localHeight: "",
topVal: "", topVal: "",
balance: "", balance: "160.80",
records: [], records: [
community_id: "", {
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) { onLoad(options) {
@ -72,8 +78,6 @@ export default {
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.getTypeName(options.type); this.getTypeName(options.type);
this.balance = options.amount;
this.community_id = options.community_id;
this.getWalletInfo(); this.getWalletInfo();
}, },
methods: { methods: {
@ -102,22 +106,16 @@ export default {
}, },
// //
getWalletInfo() { getWalletInfo() {
const params = { //
community_id: this.community_id, // 使
} console.log('获取钱包信息');
request(walletApi.walletChangeList, 'POST', params, { silent: false }).then(res => { //
let filteredRows = res.rows; // request('/api/wallet/info', 'GET').then(res => {
if (this.topVal == '应收') { // if (res.code === 0) {
filteredRows = res.rows.filter(item => item.change_category == 2); // this.balance = res.data.balance;
} else if (this.topVal == '已收') { // this.records = res.data.records;
filteredRows = res.rows.filter(item => item.change_category == 1); // }
} else if (this.topVal == '待收物业公积金') { // })
filteredRows = res.rows.filter(item => item.change_category == 4);
} else {
filteredRows = res.rows.filter(item => item.change_category == 3);
}
this.records = filteredRows;
})
} }
} }
} }