emis-app/pages/user/bunsStatic.vue

157 lines
4.8 KiB
Vue
Raw Normal View History

2023-12-20 15:17:23 +00:00
<template>
2024-05-23 08:37:07 +00:00
<tpx-page>
<view class="">
<view class="sta-item">
<u-row justify="between">
<text class="font-30 font-weight">业务统计</text>
2025-01-12 09:54:44 +00:00
<view style="width: 460rpx;;">
<tpx-date-input v-model:value="searchParam._date" @change="handleReloadData" placeholder="请选择时间"
:toolsRangesList="dateRangeList"
></tpx-date-input>
2024-05-23 08:37:07 +00:00
</view>
</u-row>
2023-12-20 15:17:23 +00:00
<u-row custom-style="margin: 20rpx 0 0 0;">
<u-col span="3" :custom-style="`border-right: 2rpx solid #E8E8E8;`">
2025-01-05 05:51:59 +00:00
<u-text :text="staticInfo.totalNum" bold="true" size="32" align="center" color="#B12D29"></u-text>
2024-05-23 08:37:07 +00:00
<u-text margin="10rpx 0 0 0" text="总票数" size="28" color="#999" align="center"></u-text>
2023-12-20 15:17:23 +00:00
</u-col>
<u-col span="3" :custom-style="`border-right: 2rpx solid #E8E8E8;`">
2025-01-05 05:51:59 +00:00
<u-text :text="staticInfo.totalParcelQty" bold="true" size="32" align="center" color="#B12D29"></u-text>
2024-05-23 08:37:07 +00:00
<u-text margin="10rpx 0 0 0" text="总件数" size="28" color="#999" align="center"></u-text>
2023-12-20 15:17:23 +00:00
</u-col>
<u-col span="3" :custom-style="`border-right: 2rpx solid #E8E8E8;`">
2025-01-05 05:51:59 +00:00
<u-text :text="staticInfo.totalBillWeight" bold="true" size="32" align="center" color="#B12D29"></u-text>
2024-05-23 08:37:07 +00:00
<u-text margin="10rpx 0 0 0" text="总重量" size="28" color="#999" align="center"></u-text>
2023-12-20 15:17:23 +00:00
</u-col>
<u-col span="3">
2025-01-05 05:51:59 +00:00
<u-text :text="staticInfo.totalVolume" bold="true" size="32" align="center" color="#B12D29"></u-text>
2024-05-23 08:37:07 +00:00
<u-text margin="10rpx 0 0 0" text="总体积" size="28" color="#999" align="center"></u-text>
2023-12-20 15:17:23 +00:00
</u-col>
</u-row>
</view>
2024-05-23 08:37:07 +00:00
2025-01-05 05:51:59 +00:00
<view class="pl-30 pr-30 pt-10 pb-10">
<view v-for="(item) in statList" class="sta-item radius-20">
<text class="font-30 font-weight">{{item.countryName}}</text>
2024-05-23 08:37:07 +00:00
<u-row custom-style="margin: 20rpx 0 0 0;">
2025-01-05 05:51:59 +00:00
<u-col span="4" :custom-style="`border-right: 2rpx solid #E8E8E8;`">
<view class="text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.kdTotalNum}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">票</span>
</view>
<view class="mt-10 text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.kdTotalBillWeight}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">KG</span>
</view>
<view class="mt-10 text-center">快递</view>
2024-05-23 08:37:07 +00:00
</u-col>
2025-01-05 05:51:59 +00:00
<u-col span="4" :custom-style="`border-right: 2rpx solid #E8E8E8;`">
<view class="text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.kyTotalNum}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">票</span>
</view>
<view class="mt-10 text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.kyTotalBillWeight}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">KG</span>
</view>
<view class="mt-10 text-center">空运</view>
2024-05-23 08:37:07 +00:00
</u-col>
2025-01-05 05:51:59 +00:00
<u-col span="4">
<view class="text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.wlTotalNum}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">票</span>
</view>
<view class="mt-10 text-center">
2025-01-05 06:20:02 +00:00
<span class="clr-prm font-weight font-28">{{item.wlTotalBillWeight}}</span>
2025-01-05 05:51:59 +00:00
<span class="clr-sub pl-10">KG</span>
</view>
<view class="mt-10 text-center">物流</view>
2024-05-23 08:37:07 +00:00
</u-col>
</u-row>
</view>
2025-01-05 05:51:59 +00:00
<tpx-empty v-if="statList.length == 0"></tpx-empty>
2024-05-23 08:37:07 +00:00
</view>
2023-12-20 15:17:23 +00:00
</view>
2024-05-23 08:37:07 +00:00
</tpx-page>
2023-12-20 15:17:23 +00:00
</template>
<script>
import { dateRangeList } from "@/common/enum"
2025-01-05 05:51:59 +00:00
import * as apiService from "@/common/api"
2025-01-15 17:16:40 +00:00
import dayjs from "dayjs"
2023-12-20 15:17:23 +00:00
export default {
props: {
},
data() {
return {
2025-01-12 09:54:44 +00:00
dateRangeList,
2023-12-20 15:17:23 +00:00
searchParam: {
2025-01-15 17:16:40 +00:00
_date: [
`${dayjs().format('YYYY-MM-DD')} 00:00:00`,
`${dayjs().format('YYYY-MM-DD')} 23:59:59`
],
2025-01-05 05:51:59 +00:00
},
queryOption: {
},
staticInfo: {},
statList: [],
2023-12-20 15:17:23 +00:00
}
},
onShareAppMessage() {
return {
}
},
2025-01-05 05:51:59 +00:00
onLoad(queryOption) {
this.queryOption = queryOption
this.initData();
},
2023-12-20 15:17:23 +00:00
methods: {
2025-01-12 09:54:44 +00:00
transSearchPm(param) {
let cpParam = JSON.parse(JSON.stringify(param))
cpParam.beginDate = cpParam?._date?.[0]
cpParam.endDate = cpParam?._date?.[1]
return cpParam
},
2025-01-05 05:51:59 +00:00
async initData(opt = {}){
2025-01-12 09:54:44 +00:00
const cpParam = this.transSearchPm(this.searchParam)
2025-01-05 05:51:59 +00:00
let params = {
params:{
2025-01-12 09:54:44 +00:00
...cpParam,
2025-01-05 05:51:59 +00:00
...opt,
},
_loading: true,
}
const statRes = await apiService.getMyBizStatInfo(params)
this.staticInfo = statRes.data || {}
const statListRes = await apiService.getMyBizStatList(params)
this.statList = statListRes.data || []
},
2025-01-12 09:54:44 +00:00
handleReloadData(){
setTimeout(()=> {
this.initData()
}, 400)
},
2023-12-20 15:17:23 +00:00
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page{
height: 100% !important;
}
</style>
<style scoped lang="scss">
.sta-item{
margin-bottom: 20rpx;
padding: 30rpx;
background-color: #fff;
}
</style>