订单统计接口对接
This commit is contained in:
parent
1c611fe3c3
commit
7c7867be05
|
|
@ -524,5 +524,13 @@ export default {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
|
},
|
||||||
|
async orderStatistics(params = {}) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/order/app/statistics',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@
|
||||||
<!-- 未预约,未派单,上门超时 -->
|
<!-- 未预约,未派单,上门超时 -->
|
||||||
<view class="cu-list grid no-border col-3 margin-top-sm" style="background-color: inherit;">
|
<view class="cu-list grid no-border col-3 margin-top-sm" style="background-color: inherit;">
|
||||||
<view class="cu-item">
|
<view class="cu-item">
|
||||||
<view class="margin-bottom-xs text-xxl">0</view>
|
<view class="margin-bottom-xs text-xxl">{{orderStatistics.newOrderNum}}</view>
|
||||||
<view>未预约</view>
|
<view>新订单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item">
|
<view class="cu-item">
|
||||||
<view class="margin-bottom-xs text-xxl">0</view>
|
<view class="margin-bottom-xs text-xxl">{{orderStatistics.planOrderNum}}</view>
|
||||||
<view>未排单</view>
|
<view>未排单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item">
|
<view class="cu-item">
|
||||||
|
|
@ -49,23 +49,26 @@
|
||||||
<text>即将上门订单</text>
|
<text>即将上门订单</text>
|
||||||
<text class="cuIcon-right"></text>
|
<text class="cuIcon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 轮播 -->
|
<view v-if="!curUserInfo || !curUserInfo.workerId" class="screen-swiper padding text-center">
|
||||||
<swiper v-if="curUserInfo && curUserInfo.workerId" class="screen-swiper" :autoplay="true" :circular="true">
|
未登录
|
||||||
<swiper-item v-for="(item,index) in waitServOrderToday" :key="index">
|
</view>
|
||||||
<view class="padding-sm">
|
<!-- 轮播 -->
|
||||||
<view class="flex justify-between align-center margin-bottom-xs">
|
<swiper v-else-if="waitServOrderToday && waitServOrderToday.length" class="screen-swiper" :autoplay="true" :circular="true">
|
||||||
<view class="text-lg">{{item.goodsName}}</view>
|
<swiper-item v-for="(item,index) in waitServOrderToday" :key="index">
|
||||||
|
<view class="padding-sm">
|
||||||
|
<view class="flex justify-between align-center margin-bottom-xs">
|
||||||
|
<view class="text-lg">{{item.goodsName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
时间:<text class="text-red">{{item.expectTimeStart + ' - ' + item.expectTimeEnd}}</text>
|
时间:<text class="text-red">{{item.expectTimeStart + ' - ' + item.expectTimeEnd}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>地址:{{item.address}}</view>
|
<view>地址:{{item.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view v-else class="screen-swiper padding text-center">
|
<view v-else class="screen-swiper padding text-center text-gray">
|
||||||
未登录
|
今日无待上门订单
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 每周公告 -->
|
<!-- 每周公告 -->
|
||||||
|
|
@ -152,7 +155,8 @@
|
||||||
}],
|
}],
|
||||||
curUserInfo: {},
|
curUserInfo: {},
|
||||||
myInfo: {},
|
myInfo: {},
|
||||||
waitServOrderToday: [],
|
waitServOrderToday: [],
|
||||||
|
orderStatistics: {},
|
||||||
isShowSteer: false,
|
isShowSteer: false,
|
||||||
isAuthWxLoginModal: false,
|
isAuthWxLoginModal: false,
|
||||||
isAuthWxPhoneModal: false,
|
isAuthWxPhoneModal: false,
|
||||||
|
|
@ -207,7 +211,9 @@
|
||||||
}
|
}
|
||||||
this.servModules = newServModules;
|
this.servModules = newServModules;
|
||||||
// 获取今日待上门单
|
// 获取今日待上门单
|
||||||
this.loadTodayWaitServOrder();
|
this.loadTodayWaitServOrder();
|
||||||
|
// 订单统计
|
||||||
|
this.loadOrderStatistics();
|
||||||
},
|
},
|
||||||
async loadTodayWaitServOrder() {
|
async loadTodayWaitServOrder() {
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
|
|
@ -217,6 +223,10 @@
|
||||||
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
});
|
});
|
||||||
this.waitServOrderToday = waitServRes.rows;
|
this.waitServOrderToday = waitServRes.rows;
|
||||||
|
},
|
||||||
|
async loadOrderStatistics() {
|
||||||
|
let res = await this.$request.orderStatistics();
|
||||||
|
this.orderStatistics = res.data;
|
||||||
},
|
},
|
||||||
async chooseEntryType(typeCode) {
|
async chooseEntryType(typeCode) {
|
||||||
let status = 1;
|
let status = 1;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
<view class="cu-list grid no-border col-5 padding-top-sm bg-white">
|
<view class="cu-list grid no-border col-5 padding-top-sm bg-white">
|
||||||
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect">
|
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect">
|
||||||
<view class="margin-bottom-xs">{{item.name}}</view>
|
<view class="margin-bottom-xs">{{item.name}}</view>
|
||||||
<view>(0)</view>
|
<view v-if="item.code === 0">({{orderStatistics.newOrderNum}})</view>
|
||||||
|
<view v-else>(0)</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="0" @tap="statusSelect">
|
<!-- <view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="0" @tap="statusSelect">
|
||||||
<view class="margin-bottom-xs">超时单</view>
|
<view class="margin-bottom-xs">超时单</view>
|
||||||
|
|
@ -331,7 +332,8 @@
|
||||||
ifShowPageMeta: false,
|
ifShowPageMeta: false,
|
||||||
picModalImgList: [],
|
picModalImgList: [],
|
||||||
curDate: '',
|
curDate: '',
|
||||||
curUserInfo: {}
|
curUserInfo: {},
|
||||||
|
orderStatistics: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -366,7 +368,9 @@
|
||||||
this.loadCategoryList();
|
this.loadCategoryList();
|
||||||
this.loadRegionList();
|
this.loadRegionList();
|
||||||
// 初始化指派成员
|
// 初始化指派成员
|
||||||
this.loadTeamMembers();
|
this.loadTeamMembers();
|
||||||
|
// 订单统计
|
||||||
|
this.loadOrderStatistics();
|
||||||
},
|
},
|
||||||
reloadMasterOrderPage(params = {}) {
|
reloadMasterOrderPage(params = {}) {
|
||||||
// this.pageParams = [];
|
// this.pageParams = [];
|
||||||
|
|
@ -379,6 +383,8 @@
|
||||||
this.orderList = [];
|
this.orderList = [];
|
||||||
this.$refs.loadStatusBar.showLoadMore();
|
this.$refs.loadStatusBar.showLoadMore();
|
||||||
this.loadMasterOrderPage();
|
this.loadMasterOrderPage();
|
||||||
|
// 订单统计
|
||||||
|
this.loadOrderStatistics();
|
||||||
},
|
},
|
||||||
async loadMasterOrderPage(params = {}) {
|
async loadMasterOrderPage(params = {}) {
|
||||||
params.pageSize = this.$globalData.initPageSize;
|
params.pageSize = this.$globalData.initPageSize;
|
||||||
|
|
@ -464,6 +470,10 @@
|
||||||
});
|
});
|
||||||
this.myTeamMembers = res.rows;
|
this.myTeamMembers = res.rows;
|
||||||
},
|
},
|
||||||
|
async loadOrderStatistics() {
|
||||||
|
let res = await this.$request.orderStatistics();
|
||||||
|
this.orderStatistics = res.data;
|
||||||
|
},
|
||||||
bindEvent() {
|
bindEvent() {
|
||||||
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue