ihzero 2024-05-15 23:32:30 +08:00
commit fd226c260b
2 changed files with 22 additions and 10 deletions

View File

@ -24,7 +24,7 @@
</view>
<view class="flex-1">{{ item.store.title }}</view>
<view class="flex-1" v-if="checkPermission(['admin'])">{{
item.expenditure
item.new_customers
}}</view>
<view class="flex-1" v-if="checkPermission(['admin'])">{{
item.sales

View File

@ -4,7 +4,7 @@
<uv-sticky bgColor="#fff" v-if="checkPermission(['admin'])">
<StoreDown color="#333333" @change="storeChange"></StoreDown>
</uv-sticky>
<view class="card">
<uv-tabs
:lineColor="'#ee2c37'"
@ -27,11 +27,16 @@
</view>
<view class="text-center flex-1 tr">
<view class="flex-center h-80rpx" v-if="!isLotteryStore || checkPermission(['admin'])">
<view
class="flex-center h-80rpx"
v-if="!isLotteryStore || checkPermission(['admin'])"
>
<view>支出金额</view>
</view>
<view class="flex-center h-80rpx" v-else></view>
<view class="font-600 flex-center h-80rpx">{{ ledger.expenditure }}</view>
<view class="font-600 flex-center h-80rpx">{{
ledger.expenditure
}}</view>
</view>
<view class="text-center flex-1 tr">
@ -219,7 +224,7 @@ function generateTimeArrayWithLastPeriod() {
.toDate(),
endDate: dayjs(timeRange.current.endDate)
.subtract(1, 'month')
.endOf('month')
.endOf('month'),
}
break
default:
@ -261,12 +266,19 @@ const tabChange1 = (e) => {
const getList = async () => {
const url = tabIndex1.value == 0 ? '/statistics/sales' : '/statistics/stores'
const resData = await http.get(url, {
params: {
start_at: currentC.value.start,
end_at: currentC.value.end,
let params = {
start_at: currentC.value.start,
end_at: currentC.value.end
}
if (tabIndex1.value == 0) {
params = {
...params,
...shoreInfo.value,
},
}
}
const resData = await http.get(url, {
params: params,
})
list.value = resData
}