From 0cc734a724e0e9d02aebf9f6b4d350f005e11c99 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Sat, 2 Aug 2025 15:19:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=A3=9F=E5=A0=82=E8=8F=9C=E5=93=81?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hard/hard-total.ts | 11 + .../components/dept-person-total-table.vue | 249 ++++++++++++++++++ .../components/dept-total-table.vue | 87 ------ src/views/hard/canteen-dept-total/index.vue | 215 +++++++++++---- src/views/hard/hard-order/index.vue | 5 +- 5 files changed, 432 insertions(+), 135 deletions(-) create mode 100644 src/views/hard/canteen-dept-total/components/dept-person-total-table.vue delete mode 100644 src/views/hard/canteen-dept-total/components/dept-total-table.vue diff --git a/src/api/hard/hard-total.ts b/src/api/hard/hard-total.ts index 446b620..d220d72 100644 --- a/src/api/hard/hard-total.ts +++ b/src/api/hard/hard-total.ts @@ -1,5 +1,16 @@ import request from "/@/utils/request" +/** + * 食堂菜品购买部门统计 + */ +export function listByDept(query: any) { + return request({ + url: "/hard/hard-canteen-total-dept/list-by-dept", + method: "post", + data: query, + }) +} + /** * 根据部门 食堂菜品购买统计 */ diff --git a/src/views/hard/canteen-dept-total/components/dept-person-total-table.vue b/src/views/hard/canteen-dept-total/components/dept-person-total-table.vue new file mode 100644 index 0000000..6a2cf14 --- /dev/null +++ b/src/views/hard/canteen-dept-total/components/dept-person-total-table.vue @@ -0,0 +1,249 @@ + + + + + + + + + + + {{ row.username }} + {{ row.userMobile }} + + + + 未知用户 + + + + + + + 商品 + + {{ row.productDesc }} + + + + 用餐时间段 + + + + + + + + + + 订单类型 + + + + + + 支付方式 + + + + + + 订单状态 + + + + + + + + + + 商品总价 + + {{ displayPrice(row.totalPrice, "元", 2) }} + + + + 额外支付 + + {{ displayPrice(row.extraPrice, "元", 2) }} + + + + 实际支付 + + {{ displayPrice(row.payPrice, "元", 2) }} + + + + + + + + 创建时间 + {{ row.createTime }} + + + 支付时间 + {{ row.payTime }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/hard/canteen-dept-total/components/dept-total-table.vue b/src/views/hard/canteen-dept-total/components/dept-total-table.vue deleted file mode 100644 index d71e71d..0000000 --- a/src/views/hard/canteen-dept-total/components/dept-total-table.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - {{ parseTime(row.createTime, "{y}-{m}-{d}") }} - - - - - - - - - \ No newline at end of file diff --git a/src/views/hard/canteen-dept-total/index.vue b/src/views/hard/canteen-dept-total/index.vue index da15848..d5c28c3 100644 --- a/src/views/hard/canteen-dept-total/index.vue +++ b/src/views/hard/canteen-dept-total/index.vue @@ -1,37 +1,115 @@ - - - - - - - - - - - - - - - {{ $t("common.queryBtn") }} - - {{ $t("common.resetBtn") }} - - - - - - - + + + + + + + + + + + + + + {{ $t("common.queryBtn") }} + + {{ $t("common.resetBtn") }} + + + + + + + + + + + + + + + + + + + {{ row.payUserCount || 0 }}人 + + + + + {{ row.timeCount || 0 }}次 + + + + + {{ row.payCount || 0 }}份 + + + + + {{ displayPrice(row.totalPrice) }} + + + + + + 购买人员 + + + + + + + + + + + + + {{ row.deptCount || 0 }}部门 + + + + + {{ row.payUserCount || 0 }}人 + + + + + {{ row.timeCount || 0 }}次 + + + + + {{ row.payCount || 0 }}份 + + + + + {{ displayPrice(row.totalPrice) }} + + + + + + 购买人员 + + + + + + @@ -39,26 +117,47 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue index 00e9077..8f90c58 100644 --- a/src/views/hard/hard-order/index.vue +++ b/src/views/hard/hard-order/index.vue @@ -7,8 +7,8 @@ - - + + @@ -252,7 +252,6 @@ import { useDict } from "/@/hooks/dict" import { displayPrice } from "/@/utils/formatMoney" import { ElLoading, TableColumnCtx } from "element-plus" import { VNode } from "vue" -import { ro } from "element-plus/es/locale" const { push } = useRouter()