From 679207521de8f216787dcc7be743c362a8d46bc4 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 24 Nov 2025 15:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/edit-discount.vue | 384 +++++---- data/index.js | 33 + http/api/account/tableOrderStatistic.js | 13 + http/api/order/summary.js | 23 + http/http.js | 4 +- main.js | 3 + pageBwc/index/index.vue | 5 +- pageMarket/distribution/components/config.vue | 2 +- pageMarket/distribution/level-list.vue | 8 +- pageMarket/newUserDiscount/index.vue | 7 +- .../components/my-date-pickerview.vue | 807 ++++++++--------- pageSalesSummary/index.vue | 749 ++++++++-------- pageSalesSummary/productSalesRanking.vue | 269 +++--- pageSalesSummary/table.vue | 346 ++++++++ pages.json | 11 +- pages/appliccation/marketing.vue | 2 +- pages/index/components/Stats.vue | 546 ++++++------ pages/index/components/my-date-pickerview.vue | 810 +++++++++--------- pages/index/components/statistics.vue | 720 ++++++++-------- pages/login/index.vue | 2 + 20 files changed, 2610 insertions(+), 2134 deletions(-) create mode 100644 data/index.js create mode 100644 http/api/account/tableOrderStatistic.js create mode 100644 http/api/order/summary.js create mode 100644 pageSalesSummary/table.vue diff --git a/components/my-components/edit-discount.vue b/components/my-components/edit-discount.vue index c34851f..bd8614e 100644 --- a/components/my-components/edit-discount.vue +++ b/components/my-components/edit-discount.vue @@ -1,201 +1,223 @@ - - - - - 应付金额 - - {{form.price}} - - - - 实收金额 - - - - - - 优惠折扣 - - - - - % - - - - - - - - - 修改 - - 取消 - - - - - + + + + + 应付金额 + + {{ form.price }} + + + + 实收金额 + + + + + + 优惠折扣 + + + + + % + + + + + + + + 修改 + + 取消 + + + + + \ No newline at end of file +.placeholder-class { + font-size: 28rpx; +} + diff --git a/data/index.js b/data/index.js new file mode 100644 index 0000000..f80dc5b --- /dev/null +++ b/data/index.js @@ -0,0 +1,33 @@ +import dayjs from "dayjs"; +export const timeList = [ + { + label: "今天", + value: "today", + beginDate: dayjs().format("YYYY-MM-DD"), + endDate: dayjs().format("YYYY-MM-DD"), + }, + { + label: "昨天", + value: "yesterday", + beginDate: dayjs().subtract(1, "day").format("YYYY-MM-DD"), + endDate: dayjs().subtract(1, "day").format("YYYY-MM-DD"), + }, + { + label: "本周", + value: "this_week", + beginDate: dayjs().startOf("week").format("YYYY-MM-DD"), + endDate: dayjs().endOf("week").format("YYYY-MM-DD"), + }, + { + label: "本月", + value: "this_month", + beginDate: dayjs().startOf("month").format("YYYY-MM-DD"), + endDate: dayjs().endOf("month").format("YYYY-MM-DD"), + }, + { + label: "自定义", + value: "custom", + beginDate: "", + endDate: "", + }, +]; diff --git a/http/api/account/tableOrderStatistic.js b/http/api/account/tableOrderStatistic.js new file mode 100644 index 0000000..1f1e882 --- /dev/null +++ b/http/api/account/tableOrderStatistic.js @@ -0,0 +1,13 @@ +import http from "@/http/http.js"; +const request = http.request; +const urlType = "account"; + +export function tableOrderStatistic(data) { + return request({ + url: `${urlType}/admin/tableOrderStatistic`, + method: "GET", + data: { + ...data, + }, + }); +} \ No newline at end of file diff --git a/http/api/order/summary.js b/http/api/order/summary.js new file mode 100644 index 0000000..285125a --- /dev/null +++ b/http/api/order/summary.js @@ -0,0 +1,23 @@ +import http from "@/http/http.js"; +const request = http.request; +const urlType = "order"; + +export function tableSummaryList(data) { + return request({ + url: `${urlType}/admin/table/summary/list`, + method: "GET", + data: { + ...data, + }, + }); +} + +export function saleSummaryPage(data) { + return request({ + url: `${urlType}/admin/sale/summary/page`, + method: "GET", + data: { + ...data, + }, + }); + } \ No newline at end of file diff --git a/http/http.js b/http/http.js index 3059424..6fceecc 100644 --- a/http/http.js +++ b/http/http.js @@ -15,8 +15,8 @@ import infoBox from "@/commons/utils/infoBox.js"; import go from "@/commons/utils/go.js"; import { reject } from "lodash"; // 设置node环境 -// envConfig.changeEnv(storageManage.env('production')) -envConfig.changeEnv(storageManage.env("development")); +// envConfig.changeEnv(storageManage.env('production')) //正式 +envConfig.changeEnv(storageManage.env("development")); //测试 // 测试服 // #ifdef H5 diff --git a/main.js b/main.js index ccd5728..2ac4d0a 100644 --- a/main.js +++ b/main.js @@ -10,6 +10,9 @@ import * as Pinia from 'pinia'; import { createUnistorage } from "pinia-plugin-unistorage"; + +uni.$utils=utils + // 设置node环境 envConfig.changeEnv(storageManage.env()) diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue index 968b9b6..ae13880 100644 --- a/pageBwc/index/index.vue +++ b/pageBwc/index/index.vue @@ -7,7 +7,10 @@ 霸王餐 设置充值消费的N倍,当前订单立即免单 - + diff --git a/pageMarket/distribution/level-list.vue b/pageMarket/distribution/level-list.vue index 2a61107..3c47c5b 100644 --- a/pageMarket/distribution/level-list.vue +++ b/pageMarket/distribution/level-list.vue @@ -271,7 +271,13 @@ function cancel(){ } onLoad(()=>{ showDetailListSwitch.value=distributionStore.config.levelConfigList.map(()=>true) - form.levelConfigList=[...distributionStore.config.levelConfigList||[]] + const levelConfigList=[...distributionStore.config.levelConfigList||[]] + form.levelConfigList=levelConfigList.length?levelConfigList:[ + { name:'', + levelOneCommission:'', + inviteCount:'', + costAmount:''} + ] form.upgradeType=distributionStore.config.upgradeType }) diff --git a/pageMarket/newUserDiscount/index.vue b/pageMarket/newUserDiscount/index.vue index 6233117..8f0bb2b 100644 --- a/pageMarket/newUserDiscount/index.vue +++ b/pageMarket/newUserDiscount/index.vue @@ -157,7 +157,7 @@ \ No newline at end of file +.item { + line-height: 34px; + text-align: center; +} + diff --git a/pageSalesSummary/index.vue b/pageSalesSummary/index.vue index d2b9dee..98c9620 100644 --- a/pageSalesSummary/index.vue +++ b/pageSalesSummary/index.vue @@ -1,426 +1,401 @@ - - - - {{v.label}} - - - - + + + + {{ v.label }} + + + + - - - 实收金额(元) - {{list.saleAmount?list.saleAmount:0}} - - - 优惠金额(元) - {{list.discountAmount?list.discountAmount:0}} - - - 客单价(元) - {{list.customerUnitPrice?list.customerUnitPrice:0}} - - - 会员消费(元) - {{list.memberPayAmount?list.memberPayAmount:0}} - - - 新增会员(人) - {{list.newMemberCount?list.newMemberCount:0}} - - - 翻台率(%) - {{list.tableTurnoverRate?list.tableTurnoverRate:0}} - - - - - - - - - - 商品名称 - 总数量 - 金额 - - - - - - - {{item.productName}} - - {{item.number}} - {{item.amount || '无'}} - - - - - - - - - 更多 - - + + + 实收金额(元) + {{ list.saleAmount ? list.saleAmount : 0 }} + + + 优惠金额(元) + + {{ list.discountAmount ? list.discountAmount : 0 }} + + + + 客单价(元) + + {{ list.customerUnitPrice ? list.customerUnitPrice : 0 }} + + + + 会员消费(元) + + {{ list.memberPayAmount ? list.memberPayAmount : 0 }} + + + + 新增会员(人) + + {{ list.newMemberCount ? list.newMemberCount : 0 }} + + + + 翻台率(%) + + {{ list.tableTurnoverRate ? list.tableTurnoverRate : 0 }} + + + + + + + + + + 商品名称 + 总数量 + 金额 + + + + + + + {{ item.productName }} + + {{ item.saleCount || 0 }} + {{ item.saleAmount || 0 }} + + + + + + + + 更多 + + \ No newline at end of file +.min-page { + height: 20vh; +} + diff --git a/pageSalesSummary/productSalesRanking.vue b/pageSalesSummary/productSalesRanking.vue index 46e07bc..867af9f 100644 --- a/pageSalesSummary/productSalesRanking.vue +++ b/pageSalesSummary/productSalesRanking.vue @@ -1,153 +1,156 @@ - - - - - - - 商品名称 - 总数量 - 金额 - - - {{item.productName}} - {{item.number}} - {{item.amount || '无'}} - - - - - - + + + + + + 商品名称 + 总数量 + 金额 + + + {{ item.productName }} + {{ item.saleCount || 0 }} + {{ item.saleAmount || 0 }} + + + + + diff --git a/pageSalesSummary/table.vue b/pageSalesSummary/table.vue new file mode 100644 index 0000000..a1b5b44 --- /dev/null +++ b/pageSalesSummary/table.vue @@ -0,0 +1,346 @@ + + + + + {{ v.label }} + + + + + + + + + + + + 区域名称 + 台桌号 + 订单数量 + 订单金额 + + + + + + + {{ item.areaName }} + + {{ item.tableName || "" }} + {{ item.orderCount || 0 }} + {{ item.orderAmount || 0 }} + + + + + + + + + + + + + + + + + + diff --git a/pages.json b/pages.json index 6f9db8b..e0e95d8 100644 --- a/pages.json +++ b/pages.json @@ -401,7 +401,16 @@ "style": { "navigationBarTitleText": "商品销售排行" } - }] + }, + { + "pageId": "PAGES_TABLE_SALES_RANKING", + "path": "table", + "style": { + "navigationBarTitleText": "桌台统计" + } + } + + ] }, { "root": "pageLineUp", diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue index e15262a..ea60459 100644 --- a/pages/appliccation/marketing.vue +++ b/pages/appliccation/marketing.vue @@ -58,7 +58,7 @@ const menuList = ref([ { title: '新客立减', icon: '', - pageUrl: 'PAGES_ORDER_INDEX', + pageUrl: 'PAGES_MARKET_NEW_USER_DISCOUNT', intro: '首单下单减免金额' }, { diff --git a/pages/index/components/Stats.vue b/pages/index/components/Stats.vue index 0537364..a7983af 100644 --- a/pages/index/components/Stats.vue +++ b/pages/index/components/Stats.vue @@ -1,302 +1,294 @@ - - - - - - {{ v.title }} - - - - - - - - - 成交金额 (元) - {{ list?list.sale.incomeAmountAll:0}} - - - - 消费笔数 - {{ list?list.vip.useNum:0 }} - - - 退款金额 (元) - {{ list?list.sale.outAmount:0}} - - - 消费金额 - {{ list?list.vip.useAmount:0 }} - - - - - 会员充值(元) - {{ cal.cert2Dollar(memberData.payAmount) }} - - - 会员消费(元) - {{ cal.cert2Dollar(Math.abs(memberData.changeAmount)) }} - + + + + + + {{ v.title }} + + + + + + + + + 成交金额 (元) + {{ list ? list.sale.incomeAmountAll : 0 }} + + + + 消费笔数 + {{ list ? list.vip.useNum : 0 }} + + + 退款金额 (元) + {{ list ? list.sale.outAmount : 0 }} + + + 消费金额 + {{ list ? list.vip.useAmount : 0 }} + + + + + 会员充值(元) + {{ + cal.cert2Dollar(memberData.payAmount) + }} + + + 会员消费(元) + {{ + cal.cert2Dollar(Math.abs(memberData.changeAmount)) + }} + - - 会员消费笔数 - {{ memberData.changeCount }} - - - - - - + + 会员消费笔数 + {{ memberData.changeCount }} + + + + + + \ No newline at end of file + .quick-money { + height: 110rpx; + border-radius: 20rpx; + color: $J-color-t29; + } +} + diff --git a/pages/index/components/my-date-pickerview.vue b/pages/index/components/my-date-pickerview.vue index 1e8085d..af81cb9 100644 --- a/pages/index/components/my-date-pickerview.vue +++ b/pages/index/components/my-date-pickerview.vue @@ -1,30 +1,40 @@ - - - - 筛选日期时间 - - - - - - - - - {{item}}年 - - - {{item}}月 - - - {{item}}日 - - - - 至 - - - {{item}}年 - - - {{item}}月 - - - {{item}}日 - - - - - - - - 确定 - - - - + + + + + 确定 + + + \ No newline at end of file +.item { + line-height: 34px; + text-align: center; +} + diff --git a/pages/index/components/statistics.vue b/pages/index/components/statistics.vue index baf17ce..4c08745 100644 --- a/pages/index/components/statistics.vue +++ b/pages/index/components/statistics.vue @@ -1,59 +1,82 @@ - - - 数据统计 - - - - - - {{v.label}} - - - - - - - - - - + + + 数据统计 + + + + + + {{ v.label }} + + + + + + + + + + + + 营业额 + + + + + + 退款 + + + + + + + + + + + + {{ item.payType }} + + - - 营业额 - - - - - - 退款 - - - - - - - - - - - - {{item.payType}} - - + + {{ item.payAmount }} + + + + - - {{item.payAmount}} - - - - - - - - - - + + + \ No newline at end of file + .block { + width: 18rpx; + height: 18rpx; + box-sizing: border-box; + background: #fff; + position: absolute; + border-top: 0.5rpx solid #629ffa; + border-left: 0.5rpx solid #629ffa; + left: 30rpx; + top: 6rpx; + transform: rotate(45deg); + transform-origin: center; + transition: all 0.2s linear; + } +} + diff --git a/pages/login/index.vue b/pages/login/index.vue index 90e55f9..296ac27 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -273,9 +273,11 @@ */ async function loginFinishFunc(loginBizData) { // 保存 token + console.log('loginBizData',loginBizData) storageManage.setLogin(loginBizData) storageManage.token(loginBizData.tokenInfo) uni.setStorageSync("promission",loginBizData.promissionList) + uni.setStorageSync("shopId",loginBizData.shopInfo.id) // var time1 = new Date(); // var time2 = new Date(loginBizData.expireDate);