From 4d7c388f744bdc9992d1ac6e942be1ce453b2c06 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 24 Dec 2025 15:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=94=80=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=AF=A6=E6=83=85=E6=80=BB=E6=95=B0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distribution/income-details/index.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/distribution/income-details/index.vue b/distribution/income-details/index.vue index cebd4e1..8369648 100644 --- a/distribution/income-details/index.vue +++ b/distribution/income-details/index.vue @@ -50,8 +50,8 @@ style="align-items: baseline; justify-content: flex-end" > 总计: - - {{ centerUserInfo.totalIncome }} + {{ totalIncome }} @@ -113,6 +113,7 @@ {}); + onLoad(async (opt) => { await getCouponShopsAjax(); @@ -314,13 +316,24 @@ onLoad(async (opt) => { } if (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 || ""; } centerUser(); 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( () => querForm.value.status, (newVal, oldVal) => {