Ver Fonte

feature 统计功能增加&收货统计

ylong há 7 meses atrás
pai
commit
ab3244c92a

+ 15 - 9
pages.json

@@ -100,12 +100,12 @@
 						"navigationBarTitleText": "根据快递单号或订单号查询"
 					}
 				},
-                {
-                    "path": "detail/user-orders",
-                    "style": {
-                        "navigationBarTitleText": "用户所有订单"
-                    }
-                },
+				{
+					"path": "detail/user-orders",
+					"style": {
+						"navigationBarTitleText": "用户所有订单"
+					}
+				},
 				{
 					"path": "detail/index",
 					"style": {
@@ -139,7 +139,13 @@
 				{
 					"path": "statistic/after-sale",
 					"style": {
-						"navigationBarTitleText": "售后统计"
+						"navigationBarTitleText": "售后统计查询"
+					}
+				},
+				{
+					"path": "statistic/after-sale-result",
+					"style": {
+						"navigationBarTitleText": "售后统计结果"
 					}
 				},
 				{
@@ -197,7 +203,7 @@
 						"navigationBarTitleText": "订单查询"
 					}
 				},
-                {
+				{
 					"path": "wms/order-query-list",
 					"style": {
 						"navigationBarTitleText": "订单查询结果"
@@ -209,7 +215,7 @@
 						"navigationBarTitleText": "库位订单"
 					}
 				},
-                {
+				{
 					"path": "wms/location-order-list",
 					"style": {
 						"navigationBarTitleText": "库位订单查询结果"

+ 108 - 0
pages/index/statistic/after-sale-result.vue

@@ -0,0 +1,108 @@
+<template>
+	<view class="common-page" style="padding:0">
+		<PageScroll requestStr="/app/orderStat/afterOrderDailyStat" @updateList="updateList" ref="scrollRef"
+			:otherParams="otherParams">
+			<u-sticky :customNavHeight="0">
+				<view class="search-area flex-d">
+					<view class="flex-a">
+						<view class="text-item flex-2">申请时段</view>
+						<view class="text-item flex-1">售后订单数</view>
+						<view class="text-item flex-1">发出订单数</view>
+						<view class="text-item flex-1">未发订单数</view>
+					</view>
+				</view>
+			</u-sticky>
+			<view class="list-con">
+				<view class="flex-a list-item stat-header" v-if="dataList.length > 0">
+					<view class="text-item flex-2" style="flex:2">
+						<view v-if="otherParams.startTime && otherParams.endTime">
+							<view class="flex-d">
+								<view class="text-item flex-1">{{otherParams.startTime}}</view>
+								<view class="text-item flex-1">{{otherParams.endTime}}</view>
+							</view>
+						</view>
+						<view v-else>合计</view>
+					</view>
+					<view class="text-item flex-1">{{total.refundOrderNum}}</view>
+					<view class="text-item flex-1">{{total.sendOrderNum}}</view>
+					<view class="text-item flex-1">{{total.notSendBookNum}}</view>
+				</view>
+
+				<view v-for="(item,index) in dataList" :key="index" class="flex-a list-item">
+					<view class="text-item flex-2" style="flex:2">{{item.statDate}}</view>
+					<view class="text-item flex-1">{{item.refundOrderNum}}</view>
+					<view class="text-item flex-1">{{item.sendOrderNum}}</view>
+					<view class="text-item flex-1">{{item.notSendBookNum}}</view>
+				</view>
+			</view>
+		</PageScroll>
+	</view>
+</template>
+
+<script setup>
+import { reactive, ref, onMounted } from 'vue';
+import PageScroll from '@/components/pageScroll/index.vue'
+import { onLoad } from '@dcloudio/uni-app'
+
+const otherParams = ref({
+	startTime: '',
+	endTime: ''
+})
+
+const scrollRef = ref(null)
+const refreshList = () => {
+	scrollRef.value?.resetUpScroll()
+	getStatData()
+}
+
+let dataList = ref([])
+const updateList = (data) => {
+	dataList.value = data
+}
+
+const total = ref({
+	refundOrderNum: 0,
+	sendOrderNum: 0,
+	notSendBookNum: 0
+})
+
+//获取时段统计数据
+const getStatData = () => {
+	uni.$u.http.get('/app/orderStat/afterOrderStat', {
+		startTime: otherParams.value.startTime,
+		endTime: otherParams.value.endTime
+	}).then(res => {
+		total.value = res.data
+	})
+}
+
+onLoad((options) => {
+	if (options.startTime && options.endTime) {
+		otherParams.value.startTime = decodeURIComponent(options.startTime)
+		otherParams.value.endTime = decodeURIComponent(options.endTime)
+	}
+	getStatData()
+})
+</script>
+
+<style lang="scss">
+.search-area {
+	padding: 24rpx;
+	background-color: #ffffff;
+	z-index: 9;
+}
+
+.stat-header {
+	background-color: #3bb54b;
+}
+
+.flex-2 {
+	flex: 2;
+}
+
+.list-item {
+	border-bottom: 1rpx solid #f5f5f5;
+	font-size: 24rpx !important;
+	padding: 10rpx 0;
+}
+</style> 

+ 45 - 76
pages/index/statistic/after-sale.vue

@@ -1,88 +1,57 @@
 <template>
 	<view class="common-page" style="padding:0">
-		<PageScroll requestStr="/team/token/shop/invite/page" @updateList="updateList" ref="scrollRef"
-			:otherParams="otherParams">
-			<u-sticky :customNavHeight="0">
-				<view class="search-area flex-d">
-					<view class="flex-a mb-12">
-						<text class="font-13 mr-10">开始时间:</text>
-						<uni-datetime-picker type="datetime" v-model="form.startTime" />
-					</view>
-					<view class="flex-a">
-						<text class="font-13 mr-10">结束时间:</text>
-						<uni-datetime-picker type="datetime" v-model="form.endTime" />
-						<u-button type="primary" custom-style="width:160rpx;height:72rpx;margin-left:10px">查询</u-button>
-					</view>
-					<u-divider></u-divider>
-					<view class="flex-a">
-						<view class="text-item flex-1">审核日期</view>
-						<view class="text-item flex-1">订单数量</view>
-						<view class="text-item flex-1">审书数量</view>
-						<view class="text-item flex-1">实际回收</view>
-					</view>
-				</view>
-			</u-sticky>
-			<view class="list-con">
-				<view v-for="(item,index) in dataList" :key="index" class="flex-a">
-					<view class="text-item flex-1">{{item.date}}</view>
-					<view class="text-item flex-1">{{item.orderNum}}</view>
-					<view class="text-item flex-1">{{item.auditNum}}</view>
-					<view class="text-item flex-1">{{item.trueNum}}</view>
-				</view>
+		<view class="search-area flex-d">
+			<view class="flex-a mb-20">
+				<text class="font-13 mr-10">开始时间:</text>
+				<uni-datetime-picker type="datetime" v-model="searchParams.startTime" placeholder="请选择开始时间" />
 			</view>
-		</PageScroll>
+			<view class="flex-a">
+				<text class="font-13 mr-10">结束时间:</text>
+				<uni-datetime-picker type="datetime" v-model="searchParams.endTime" placeholder="请选择结束时间" />
+			</view>
+		</view>
+		<view class="footer">
+			<u-button type="primary" @click="handleSearch" text="查询" customStyle="width:100%;height:100rpx;margin:0 auto;" />
+		</view>
 	</view>
 </template>
 
 <script setup>
-	import {
-		reactive
-	} from 'vue';
-	import PageScroll from '@/components/pageScroll/index.vue'
-	import {
-		ref
-	} from 'vue';
-	import {
-		onLoad
-	} from '@dcloudio/uni-app'
-
-	const otherParams = ref({
-		sender: '',
-	})
-	const scrollRef = ref(null)
-	const refreshList = () => {
-		scrollRef.value?.resetUpScroll()
-	}
+import { ref } from 'vue';
 
-	let dataList = ref([{
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	}, {
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	}, {
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	}])
-	const updateList = (data) => {
-		dataList.value = data
-	}
+const searchParams = ref({
+	startTime: '',
+	endTime: ''
+})
 
-	const form = reactive({
-		startTime: "",
-		endTime: ''
+const handleSearch = () => {
+	uni.navigateTo({
+		url: `/pages/index/statistic/after-sale-result?startTime=${encodeURIComponent(searchParams.value.startTime)}&endTime=${encodeURIComponent(searchParams.value.endTime)}`
 	})
+}
 </script>
+
 <style lang="scss">
-	.search-area {
-		padding: 24rpx;
-		background-color: #ffffff;
-		z-index: 9;
-	}
-</style>
+.common-page {
+	display: flex;
+	flex-direction: column;
+	min-height: 90vh;
+	padding: 0;
+	overflow: hidden;
+}
+
+.search-area {
+	background-color: #ffffff;
+	border-radius: 8rpx;
+}
+
+.footer {
+	margin-top: auto;
+	background-color: #ffffff;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	box-shadow: 0 -2rpx 4rpx rgba(0, 0, 0, 0.1);
+}
+</style> 

+ 45 - 63
pages/index/statistic/audit.vue

@@ -1,71 +1,53 @@
 <template>
-	<view class="common-page" style="padding:0">
-		<PageScroll requestStr="/team/token/shop/invite/page" @updateList="updateList" ref="scrollRef"
-			:otherParams="otherParams">
-			<u-sticky :customNavHeight="0">
-				<view class="search-area flex-a">
-					<view class="text-item flex-1">审核日期</view>
-					<view class="text-item flex-1">订单数量</view>
-					<view class="text-item flex-1">审书数量</view>
-					<view class="text-item flex-1">实际回收</view>
-				</view>
-			</u-sticky>
-			<view class="list-con">
-				<view v-for="(item,index) in dataList" :key="index" class="flex-a">
-					<view class="text-item flex-1">{{item.date}}</view>
-					<view class="text-item flex-1">{{item.orderNum}}</view>
-					<view class="text-item flex-1">{{item.auditNum}}</view>
-					<view class="text-item flex-1">{{item.trueNum}}</view>
-				</view>
-			</view>
-		</PageScroll>
-	</view>
+    <view class="common-page" style="padding: 0">
+        <PageScroll
+            requestStr="/app/orderStat/bookcheckStat"
+            @updateList="updateList"
+            ref="scrollRef"
+        >
+            <u-sticky :customNavHeight="0">
+                <view class="search-area flex-a">
+                    <view class="text-item flex-1">审核日期</view>
+                    <view class="text-item flex-1">订单数量</view>
+                    <view class="text-item flex-1">审书数量</view>
+                    <view class="text-item flex-1">实际回收</view>
+                </view>
+            </u-sticky>
+            <view class="list-con">
+                <view
+                    v-for="(item, index) in dataList"
+                    :key="index"
+                    class="flex-a"
+                >
+                    <view class="text-item flex-1">{{ item.statDate }}</view>
+                    <view class="text-item flex-1">{{ item.orderNum }}</view>
+                    <view class="text-item flex-1">{{
+                        item.checkBookNum
+                    }}</view>
+                    <view class="text-item flex-1">{{
+                        item.recycleBookNum
+                    }}</view>
+                </view>
+            </view>
+        </PageScroll>
+    </view>
 </template>
 
 <script setup>
-	import {
-		reactive
-	} from 'vue';
-	import PageScroll from '@/components/pageScroll/index.vue'
-	import {
-		ref
-	} from 'vue';
-	import {
-		onLoad
-	} from '@dcloudio/uni-app'
+import PageScroll from "@/components/pageScroll/index.vue";
+import { ref } from "vue";
 
-	const otherParams = ref({
-		sender: '',
-	})
-	const scrollRef = ref(null)
-	const refreshList = () => {
-		scrollRef.value?.resetUpScroll()
-	}
+const scrollRef = ref(null);
 
-	let dataList = ref([{
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	},{
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	},{
-		date: '2024-10-24',
-		orderNum: 423,
-		auditNum: 293,
-		trueNum: 323
-	}])
-	const updateList = (data) => {
-		dataList.value = data
-	}
+let dataList = ref([]);
+const updateList = (data) => {
+    dataList.value = data;
+};
 </script>
 <style lang="scss">
-	.search-area {
-		padding: 24rpx;
-		background-color: #ffffff;
-		z-index: 9;
-	}
-</style>
+.search-area {
+    padding: 24rpx;
+    background-color: #ffffff;
+    z-index: 9;
+}
+</style>

+ 33 - 53
pages/index/statistic/package.vue

@@ -1,61 +1,41 @@
 <template>
-	<view class="common-page" style="padding:0">
-		<PageScroll requestStr="/team/token/shop/invite/page" @updateList="updateList" ref="scrollRef"
-			:otherParams="otherParams">
-			<u-sticky :customNavHeight="0">
-				<view class="search-area flex-a">
-					<view class="text-item flex-1">审核日期</view>
-					<view class="text-item flex-1">数量</view>
-				</view>
-			</u-sticky>
-			<view class="list-con">
-				<view v-for="(item,index) in dataList" :key="index" class="flex-a">
-					<view class="text-item flex-1">{{item.date}}</view>
-					<view class="text-item flex-1">{{item.orderNum}}</view>
-				</view>
-			</view>
-		</PageScroll>
-	</view>
+  <view class="common-page" style="padding: 0">
+    <PageScroll
+      requestStr="/app/orderStat/splitOrderStat"
+      @updateList="updateList"
+      ref="scrollRef"
+    >
+      <u-sticky :customNavHeight="0">
+        <view class="search-area flex-a">
+          <view class="text-item flex-1">日期</view>
+          <view class="text-item flex-1">数量</view>
+        </view>
+      </u-sticky>
+      <view class="list-con">
+        <view v-for="(item, index) in dataList" :key="index" class="flex-a">
+          <view class="text-item flex-1">{{ item.statDate }}</view>
+          <view class="text-item flex-1">{{ item.statNum }}</view>
+        </view>
+      </view>
+    </PageScroll>
+  </view>
 </template>
 
 <script setup>
-	import {
-		reactive
-	} from 'vue';
-	import PageScroll from '@/components/pageScroll/index.vue'
-	import {
-		ref
-	} from 'vue';
-	import {
-		onLoad
-	} from '@dcloudio/uni-app'
+import PageScroll from "@/components/pageScroll/index.vue";
+import { ref } from "vue";
 
-	const otherParams = ref({
-		sender: '',
-	})
-	const scrollRef = ref(null)
-	const refreshList = () => {
-		scrollRef.value?.resetUpScroll()
-	}
+const scrollRef = ref(null);
 
-	let dataList = ref([{
-		date: '2024-10-24',
-		orderNum: 423,
-	}, {
-		date: '2024-10-24',
-		orderNum: 423,
-	}, {
-		date: '2024-10-24',
-		orderNum: 423,
-	}])
-	const updateList = (data) => {
-		dataList.value = data
-	}
+let dataList = ref([]);
+const updateList = (data) => {
+  dataList.value = data;
+};
 </script>
 <style lang="scss">
-	.search-area {
-		padding: 24rpx;
-		background-color: #ffffff;
-		z-index: 9;
-	}
-</style>
+.search-area {
+  padding: 24rpx;
+  background-color: #ffffff;
+  z-index: 9;
+}
+</style>

+ 4 - 1
pages/order/index.vue

@@ -59,7 +59,7 @@
                 <u-cell
                     title="收货统计"
                     isLink
-                    @click="navigateToDetail('/pages/statistics/receive')"
+                    @click="navigateToDetail('/pages/order/stat/receive-stat')"
                 ></u-cell>
                 <u-cell
                     title="全部订单"
@@ -147,6 +147,9 @@ const getOrderStatData = async () => {
 
 // 页面跳转
 const navigateToDetail = (path) => {
+    if(path!='/pages/order/stat/receive-stat'){
+        return;
+    }
     uni.navigateTo({
         url: path,
     });

+ 52 - 5
pages/order/stat/receive-stat.vue

@@ -1,13 +1,60 @@
 <template>
-	<view>
-		
+	<view class="common-page" style="padding:0">
+		<PageScroll requestStr="/app/stock/godownSignStat" @updateList="updateList" ref="scrollRef">
+			<u-sticky :customNavHeight="0">
+				<view class="search-area flex-a">
+					<view class="text-item flex-1">月份</view>
+					<view class="text-item flex-1">收货单量</view>
+					<view class="text-item flex-1">收货仓库</view>
+				</view>
+			</u-sticky>
+			<view class="list-con">
+				<view v-for="(item, index) in dataList" :key="index" class="flex-a">
+					<view class="text-item flex-1">{{ item.statDate }}</view>
+					<view class="text-item flex-1">{{ item.num }}</view>
+					<view class="text-item flex-1">{{ item.godownName }}</view>
+				</view>
+			</view>
+		</PageScroll>
 	</view>
 </template>
 
 <script setup>
-	
+import PageScroll from '@/components/pageScroll/index.vue'
+import { ref } from 'vue';
+
+const scrollRef = ref(null)
+const refreshList = () => {
+	scrollRef.value?.resetUpScroll()
+}
+
+let dataList = ref([])
+const updateList = (data) => {
+	dataList.value = data || []
+}
 </script>
 
-<style>
-	       
+<style lang="scss">
+.search-area {
+	padding: 10rpx 0;
+	background-color: #ffffff;
+	z-index: 9;
+
+}
+.common-page{
+	min-height: 100vh;
+	background-color: #f5f5f5;
+}
+.text-item {
+	text-align: center;
+	font-size: 28rpx;
+	line-height: 60rpx;
+}
+
+.list-con {
+	padding-top: 10rpx;
+	.flex-a {
+		border-bottom: 1rpx solid #f5f5f5;
+	}
+}
 </style>