From 98b011db3c89d50f6fa452178e68216d87242267 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 3 Aug 2024 18:04:37 +0800 Subject: [PATCH] 1 --- .env.development | 4 +- src/api/workbench.ts | 8 + .../order/store_order_cart_info/index.vue | 29 +- src/views/statistics/order_product/index.vue | 28 +- src/views/statistics/product/index copy.vue | 316 ++++++++++++++++++ src/views/statistics/product/index.vue | 229 +++++-------- 6 files changed, 446 insertions(+), 168 deletions(-) create mode 100644 src/views/statistics/product/index copy.vue diff --git a/.env.development b/.env.development index 4dea79e61..7fd25d497 100644 --- a/.env.development +++ b/.env.development @@ -2,9 +2,9 @@ NODE_ENV = 'development' VITE_NOW_TYPE = 'dist' # Base API -# VITE_APP_BASE_URL='http://192.168.1.231:8545' +VITE_APP_BASE_URL='http://192.168.1.231:8545' # VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn' # VITE_APP_BASE_URL='https://multi-store.lihaink.cn' -VITE_APP_BASE_URL='http://192.168.1.6:8545' +# VITE_APP_BASE_URL='http://192.168.1.6:8545' # VITE_APP_BASE_URL='https://ceshi-multi-store.lihaink.cn' diff --git a/src/api/workbench.ts b/src/api/workbench.ts index 99a9e203b..3ccd0a194 100644 --- a/src/api/workbench.ts +++ b/src/api/workbench.ts @@ -38,3 +38,11 @@ export function apiGetTopTrade(params: any) { export function product_order(params: any) { return request.get({ url: '/workbench/product_order', params }) } +// 实时订单商品合计统计 +export function product_month_order(params: any) { + return request.get({ url: '/workbench/product_month_order', params }) +} +// 实时订单商品合计统计 +export function store_order_cart_info_curve(params: any) { + return request.get({ url: '/store_order_cart_info/StoreOrderCartInfo/curve', params }) +} diff --git a/src/views/order/store_order_cart_info/index.vue b/src/views/order/store_order_cart_info/index.vue index e15490846..0b332413f 100644 --- a/src/views/order/store_order_cart_info/index.vue +++ b/src/views/order/store_order_cart_info/index.vue @@ -36,11 +36,14 @@ - @@ -135,18 +138,30 @@ import feedback from '@/utils/feedback' import { apiStoreCategoryLists } from '@/api/store_category' import { useRoute } from 'vue-router' import { apiSystemStoreLists } from '@/api/system_store' +import moment from 'moment' const route = useRoute() const detailsRef = ref(null) +const startEndTime = ref([new Date(), new Date()]) + // 查询条件 const queryParams = reactive({ - start_time: '', - end_time: '', + start_time: moment(startEndTime.value[0]).format('YYYY-MM-DD') + ' 00:00:00', + end_time: moment(startEndTime.value[1]).format('YYYY-MM-DD') + ' 23:59:59', is_group: '', store_id: '' }) - +const changeStartEndTime = () => { + if (startEndTime.value[0] && startEndTime.value[1]) { + queryParams.start_time = moment(startEndTime.value[0]).format('YYYY-MM-DD') + ' 00:00:00' + queryParams.end_time = moment(startEndTime.value[1]).format('YYYY-MM-DD') + ' 23:59:59' + } else { + queryParams.start_time = '' + queryParams.end_time = '' + } + getLists() +} const storeloading = ref(false) const storeList = ref([]) const remoteMethod = (e = '') => { diff --git a/src/views/statistics/order_product/index.vue b/src/views/statistics/order_product/index.vue index cdf699e6c..b02c96bb3 100644 --- a/src/views/statistics/order_product/index.vue +++ b/src/views/statistics/order_product/index.vue @@ -3,11 +3,14 @@ - @@ -96,18 +99,31 @@ import feedback from '@/utils/feedback' import { apiStoreCategoryLists } from '@/api/store_category' import { useRoute } from 'vue-router' import { apiSystemStoreLists } from '@/api/system_store' +import moment from 'moment' const route = useRoute() const detailsRef = ref(null) +const startEndTime = ref([new Date(), new Date()]) + // 查询条件 const queryParams = reactive({ - start_time: '', - end_time: '', + start_time: moment(startEndTime.value[0]).format('YYYY-MM-DD') + ' 00:00:00', + end_time: moment(startEndTime.value[1]).format('YYYY-MM-DD') + ' 23:59:59', is_all: '', store_id: '' }) +const changeStartEndTime = () => { + if (startEndTime.value[0] && startEndTime.value[1]) { + queryParams.start_time = moment(startEndTime.value[0]).format('YYYY-MM-DD') + ' 00:00:00' + queryParams.end_time = moment(startEndTime.value[1]).format('YYYY-MM-DD') + ' 23:59:59' + } else { + queryParams.start_time = '' + queryParams.end_time = '' + } + getLists() +} const storeloading = ref(false) const storeList = ref([]) const remoteMethod = (e = '') => { diff --git a/src/views/statistics/product/index copy.vue b/src/views/statistics/product/index copy.vue new file mode 100644 index 000000000..39b1baa58 --- /dev/null +++ b/src/views/statistics/product/index copy.vue @@ -0,0 +1,316 @@ + + + + + 商品概况 + + 时间筛选: + + 查询 + + + + + + + + + + + {{ item.name }} + {{ item.num }} + + + + + + + + 商品趋势 + + 时间筛选: + + 查询 + + + + + + + + + 商品排行 + + 时间筛选: + + 查询 + + + + + + + + + + + + + + + + + + + + {{ row.profit }}% + + + + + + + + + + + + diff --git a/src/views/statistics/product/index.vue b/src/views/statistics/product/index.vue index 39b1baa58..0d41af4ce 100644 --- a/src/views/statistics/product/index.vue +++ b/src/views/statistics/product/index.vue @@ -1,84 +1,78 @@ - + 商品概况 时间筛选: - + 查询 - + - - + + + + - {{ item.name }} - {{ item.num }} + {{ item.store_name }} + 销量:{{ item.cart_num }}{{ item.unit_name }} + 规格:{{ item.store_info }} + 商品趋势 - + - - - 商品排行 - - 时间筛选: - - 查询 - - - - - - - - - - - - - - - - - - - - {{ row.profit }}% - - - - - -