diff --git a/src/api/store.ts b/src/api/store.ts index fe1bb85..7c65455 100644 --- a/src/api/store.ts +++ b/src/api/store.ts @@ -275,4 +275,18 @@ export function deleteRechargeActivity(id: number) { */ export function toggleRechargeActivityStatus(data: {store_id: number, state: number}) { return http.Post('/storeapi/Store/operateRecharge', data) +} + +/** + * 获取门店充值明细列表 + */ +export interface IGetStoreRechargeListParams { + page: number + size: number + store_id: number + month?: string +} + +export function getStoreRechargeList(data: IGetStoreRechargeListParams) { + return http.Post('/storeapi/user/storeRechargeLists', data) } \ No newline at end of file diff --git a/src/bundle/finance/detail.vue b/src/bundle/finance/detail.vue index 5a8ac7a..03158f2 100644 --- a/src/bundle/finance/detail.vue +++ b/src/bundle/finance/detail.vue @@ -22,7 +22,7 @@ - + + + - ¥{{ bill.amount }} diff --git a/src/bundle/finance/finance.vue b/src/bundle/finance/finance.vue index f97d9fb..b7d3e8b 100644 --- a/src/bundle/finance/finance.vue +++ b/src/bundle/finance/finance.vue @@ -53,7 +53,7 @@ 【{{ item?.room?.title }}】{{ item?.group?.title || '' }} - + + + - {{ item.amount }} @@ -67,6 +67,7 @@ 预定 续单 核销 + 充值 提现 @@ -82,6 +83,7 @@ 提现时间:{{ item.create_time }} 核销时间:{{ item.create_time }} 取消订单时间:{{ item.create_time }} + 充值时间:{{ item.create_time }} diff --git a/src/bundle/user/recharge-list.vue b/src/bundle/user/recharge-list.vue index f9ce2bc..6ff932e 100644 --- a/src/bundle/user/recharge-list.vue +++ b/src/bundle/user/recharge-list.vue @@ -13,41 +13,41 @@ - + - 充值¥2000.46 - 赠金¥500.00 + 充值¥{{ totalRechargeMoney }} + 赠金¥{{ totalGiftMoney }} - + - 门店充值1000送500 + 门店充值{{ item.recharge_price }}送{{ item.gift_price }} - +1000.00 - + +{{ item.recharge_price }} + - 客户昵称:茶址客户昵称 - 手机:13585423654 + 客户昵称:{{ item.nickname || '--' }} + 手机:{{ item.mobile }} - 充值金额:¥1000 - 赠金:¥500 + 充值金额:¥{{ item.recharge_price }} + 赠金:¥{{ item.gift_price }} - 充值时间:2025-08-05 19:09:52 + 充值时间:{{ item.pay_time }} @@ -64,6 +64,7 @@ import { onPageScroll, onReachBottom } from '@dcloudio/uni-app' import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js" import { useStoreStore } from '@/store' + import { getStoreRechargeList } from '@/api/store' const OSS = inject('OSS') const useStore = useStoreStore() @@ -78,9 +79,11 @@ textNoMore: '~ 已经到底啦 ~', //无更多数据的提示 } const list = ref>([]) // 茶室列表 + const totalRechargeMoney = ref(0) // 总充值金额 + const totalGiftMoney = ref(0) // 总赠金金额 // 日期过滤 - const value = ref(Date.now()) + const filterDate = ref(Date.now()) onLoad((args) => { }) @@ -91,21 +94,26 @@ * @param mescroll */ upCallback: (mescroll) => { + // 需要留一下数据为空的时候显示的空数据图标内容 - // const filter = { - // page: mescroll.num, - // size: mescroll.size, - // store_id: useStore.defaultStore.id, - // } + const filter = { + page: mescroll.num, + size: mescroll.size, + store_id: useStore.defaultStore.id, + month: RechargeList.handleFormatDate(filterDate.value) + } - // getStoreMemberList(filter).then((res) => { - // const curPageData = res.list || [] // 当前页数据 - // if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表 - // list.value = list.value.concat(curPageData) //追加新数据 - // mescroll.endSuccess(curPageData.length, Boolean(res.more)) - // }).catch(() => { + getStoreRechargeList(filter).then((res) => { + totalRechargeMoney.value = res.total_recharge_price // 总充值金额 + totalGiftMoney.value = res.total_gift_price // 总赠金金额 + + const curPageData = res.list || [] // 当前页数据 + if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表 + list.value = list.value.concat(curPageData) //追加新数据 + mescroll.endSuccess(curPageData.length, Boolean(res.more)) + }).catch(() => { mescroll.endErr() // 请求失败, 结束加载 - // }) + }) }, /** @@ -136,6 +144,17 @@ handleSearch: () => { list.value = [] getMescroll().resetUpScroll() + }, + + /** + * 格式化时间 + */ + handleFormatDate: (timestamp: number) => { + const d = new Date(timestamp) + const year = d.getFullYear() + const month = d.getMonth() + 1 + const monthStr = month < 10 ? `0${month}` : `${month}` + return `${year}-${monthStr}` } } diff --git a/src/bundle/user/user-detail.vue b/src/bundle/user/user-detail.vue index 0a31444..95dfba8 100644 --- a/src/bundle/user/user-detail.vue +++ b/src/bundle/user/user-detail.vue @@ -29,11 +29,11 @@ - + - {{ user.expiration_time }}到期 + {{ user.expiration_time || '--' }}到期 diff --git a/src/bundle/user/user-list.vue b/src/bundle/user/user-list.vue index 666bb42..a640bd1 100644 --- a/src/bundle/user/user-list.vue +++ b/src/bundle/user/user-list.vue @@ -44,13 +44,13 @@ - 150,000.00 + {{ totalRechargeMoney || 0 }} 实际充值(元) - - 10,000.00 + @@ -60,7 +60,7 @@ 客户信息 - + - + - - - - + + + + - {{ item?.user?.nickname }} + {{ item.nickname }} - + - {{ item?.user?.mobile }} - {{ item?.remark }} + {{ item.mobile }} + 门店余额{{ item.store_money || '--' }} + {{ item.remark }} - + - - - - @@ -137,10 +134,12 @@ const keywords = ref('') // 搜索关键词 const menuTab = ref([ {type: 'all', name: '全部'}, - {type: 'recharge', name: '充值卡'}, - {type: 'vip', name: '会员卡'}, + // {type: 'recharge', name: '充值卡'}, + // {type: 'vip', name: '会员卡'}, ]) const currentTab = ref('all') + const totalRechargeMoney = ref(0) // 总充值金额 + const totalGiftMoney = ref(0) // 总赠送金额 onLoad((args) => { }) @@ -152,20 +151,23 @@ */ upCallback: (mescroll) => { // 需要留一下数据为空的时候显示的空数据图标内容 - // const filter = { - // page: mescroll.num, - // size: mescroll.size, - // store_id: useStore.defaultStore.id, - // } + const filter = { + page: mescroll.num, + size: mescroll.size, + store_id: useStore.defaultStore.id, + search: keywords.value, + } - // getStoreMemberList(filter).then((res) => { - // const curPageData = res.list || [] // 当前页数据 - // if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表 - // list.value = list.value.concat(curPageData) //追加新数据 - // mescroll.endSuccess(curPageData.length, Boolean(res.more)) - // }).catch(() => { + getStoreMemberList(filter).then((res) => { + totalRechargeMoney.value = res.totalMoney + + const curPageData = res.list || [] // 当前页数据 + if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表 + list.value = list.value.concat(curPageData) //追加新数据 + mescroll.endSuccess(curPageData.length, Boolean(res.more)) + }).catch(() => { mescroll.endErr() // 请求失败, 结束加载 - // }) + }) }, /**