修复分销明细详情总数显示问题

This commit is contained in:
2025-12-24 15:56:03 +08:00
parent 0736726336
commit 4d7c388f74

View File

@@ -50,8 +50,8 @@
style="align-items: baseline; justify-content: flex-end" style="align-items: baseline; justify-content: flex-end"
> >
<text class="color-666 font-12"> 总计</text> <text class="color-666 font-12"> 总计</text>
<text class="font-16 color-333 font-700" v-if="centerUserInfo"> <text class="font-16 color-333 font-700" >
{{ centerUserInfo.totalIncome }}</text {{ totalIncome }}</text
> >
</view> </view>
@@ -113,6 +113,7 @@
<scroll-view <scroll-view
class="popup-list" class="popup-list"
direction="vertical" direction="vertical"
:scroll-y="true"
@scrollend="scrollBottom" @scrollend="scrollBottom"
> >
<view <view
@@ -301,6 +302,7 @@ async function centerUser() {
} }
onShow(() => {}); onShow(() => {});
onLoad(async (opt) => { onLoad(async (opt) => {
await getCouponShopsAjax(); await getCouponShopsAjax();
@@ -314,13 +316,24 @@ onLoad(async (opt) => {
} }
if (opt.shopId) { if (opt.shopId) {
querForm.value.shopId = opt.shopId; querForm.value.shopId = opt.shopId;
const findItem = couponShops.value.find((item) => item.id == opt.shopId); const findItem = shopList.value.find((item) => item.shopId == opt.shopId);
querForm.value.shopName = findItem.shopName || ""; querForm.value.shopName = findItem.shopName || "";
} }
centerUser(); centerUser();
getIncomeDetailsAjax(); getIncomeDetailsAjax();
}); });
const totalIncome=computed(()=>{
if(!querForm.value.shopId){
return centerUserInfo.value?(centerUserInfo.value.totalIncome||0):0;
}
const findItem = shopList.value.find((item) => item.shopId == querForm.value.shopId );
if(findItem){
return findItem.income||0
}
return 0
})
watch( watch(
() => querForm.value.status, () => querForm.value.status,
(newVal, oldVal) => { (newVal, oldVal) => {