From 9df69b10067eb4a3e5b5909903b8d77f2fda1a3d Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 11 Jun 2026 13:39:31 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat:=E9=9A=90=E7=A7=81=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/take-out-setting.vue | 79 ++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/src/views/mch/mch-manage/components/take-out-setting.vue b/src/views/mch/mch-manage/components/take-out-setting.vue index 16401197..bc3a04ff 100644 --- a/src/views/mch/mch-manage/components/take-out-setting.vue +++ b/src/views/mch/mch-manage/components/take-out-setting.vue @@ -71,7 +71,7 @@
- 预留报餐配置内容区,后续可以继续补充统计规则、时段限制、报餐说明等配置项。 + 暂无
@@ -150,6 +150,32 @@ +
+
+
+
商城配置
+
+
+
+
+
启用商城
+
控制商户商城相关能力开关
+
+ +
+
+ + +
+
+
+
+ 暂无 +
+
+ @@ -176,8 +202,10 @@ const props = withDefaults(defineProps<{ // 定义变量内容 const formDialogRef = ref() const selectObjs = ref([]) +const mallSelectIds = ref([]) const createDefaultFunctionScope = () => ({ + mallEnable: false, orderingFoodEnable: false, tableReservation: false, takeOutEnable: false, @@ -201,7 +229,30 @@ const apptState: BasicTableProps = reactive({ pageList: hardApptApi.fetchList, }) -const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(apptState) +const { getDataList, sortChangeHandle, tableStyle } = useTable(apptState) + +const fetchMallConfigList = async () => { + return { + data: { + records: [], + total: 0, + }, + } +} + +const mallTableState: BasicTableProps = reactive({ + createdIsNeed: false, + queryForm: { + merchId: null, + }, + pageList: fetchMallConfigList, +}) + +const { + getDataList: getMallDataList, + sortChangeHandle: mallSortChangeHandle, + tableStyle: mallTableStyle, +} = useTable(mallTableState) const { yes_no_type, daily_menu } = useDict('yes_no_type', 'daily_menu') watch( @@ -242,6 +293,8 @@ async function getMchDetail() { state.mchDetail = data apptState.queryForm.deptId = data.deptId getDataList() + mallTableState.queryForm.merchId = data.id + getMallDataList(false) } catch (error) { console.log("获取食堂详情详情", error); } @@ -280,6 +333,28 @@ function handleReportFoodSwitchChange(value: boolean) { return handleFunctionScopeChange("orderingFoodEnable", value, "报餐配置") } +function handleMallSwitchChange(value: boolean) { + return handleFunctionScopeChange("mallEnable", value, "商城配置") +} + +function handleMallSelectionChange(rows: any[]) { + mallSelectIds.value = (rows || []).map((row: any) => row?.id).filter(Boolean) +} + +function handleMallAdd() { + useMessage().info("商城配置功能开发中") +} + +function handleMallEdit(id?: string) { + void id + useMessage().info("商城配置功能开发中") +} + +function handleMallDelete(ids: string[]) { + if (!ids?.length) return + useMessage().info("商城配置功能开发中") +} + // 删除操作 const handleDelete = async (ids: string[]) => { try { From 3dfd3f64003d9a2407be7dd451d08de0cf1e83f1 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 11 Jun 2026 14:18:27 +0800 Subject: [PATCH 02/11] 1 --- src/api/admin/user.ts | 20 ++++++++++++++++---- src/components/Select/SelectUser.vue | 18 ++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/api/admin/user.ts b/src/api/admin/user.ts index 509dd42f..609c5674 100644 --- a/src/api/admin/user.ts +++ b/src/api/admin/user.ts @@ -1,4 +1,4 @@ -import request, {CommonHeaderEnum} from "/@/utils/request" +import request, { CommonHeaderEnum } from "/@/utils/request" /** * 同步用户食堂信息 @@ -17,6 +17,18 @@ export const list = () => { }) } +export const pageSelect = (query: any) => { + return request({ + url: "/admin/user/select", + method: "post", + params: { + current: query.current, + size: query.size, + }, + data: query, + }) +} + export const pageList = (query: any) => { return request({ url: "/admin/user/page", @@ -41,9 +53,9 @@ export const getObj = (id: String) => { return request({ url: "/admin/user/details/" + id, method: "get", - headers: { - [CommonHeaderEnum.ENC_FLAG]: true, - }, + headers: { + [CommonHeaderEnum.ENC_FLAG]: true, + }, }) } diff --git a/src/components/Select/SelectUser.vue b/src/components/Select/SelectUser.vue index a19896a2..15d4013a 100644 --- a/src/components/Select/SelectUser.vue +++ b/src/components/Select/SelectUser.vue @@ -1,17 +1,7 @@ + @@ -129,15 +138,18 @@ import { BasicTableProps, useTable } from "/@/hooks/table" import { displayPrice } from "/@/utils/formatMoney" import { useDict } from "/@/hooks/dict" import { getDicts } from "/@/api/admin/dict" +import { parseTime } from "/@/utils/formatTime" import * as hardTotalApi from "/@/api/hard/hard-total" const DeptPersonTotalTable = defineAsyncComponent(() => import("./components/dept-person-total-table.vue")) +const ProductTotalTable = defineAsyncComponent(() => import("./components/product-total-table.vue")) // 定义查询字典 const { daily_menu } = useDict("daily_menu") const deptPersonTotalTableRef = ref() +const productTotalTableRef = ref() // 搜索变量 const queryRef = ref() diff --git a/src/views/hard/canteen-product-total/components/product-total-table.vue b/src/views/hard/canteen-product-total/components/product-total-table.vue index 0ca8a7be..da3777e7 100644 --- a/src/views/hard/canteen-product-total/components/product-total-table.vue +++ b/src/views/hard/canteen-product-total/components/product-total-table.vue @@ -1,6 +1,16 @@ From a1360b97563baa0021ffebd47c547d9d01fcca33 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 16 Jun 2026 10:23:58 +0800 Subject: [PATCH 07/11] =?UTF-8?q?feat:=E8=8F=9C=E5=93=81=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hard/hard-total.ts | 15 +++++++++++++++ .../components/product-total-table.vue | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/api/hard/hard-total.ts b/src/api/hard/hard-total.ts index d220d722..cd2fd4e4 100644 --- a/src/api/hard/hard-total.ts +++ b/src/api/hard/hard-total.ts @@ -56,6 +56,21 @@ export function canteenProudctQuery(query: any) { }) } +/** + * 菜品出售商户统计 + */ +export function canteenProudctMchQuery(query: any) { + return request({ + url: "/hard/hard-canteen-total-log/proudct-mch-query", + method: "post", + params: { + current: query.current, + size: query.size, + }, + data: query, + }) +} + export function pageListDept(query?: any) { return request({ url: "/hard/hard-total/page-list-dept", diff --git a/src/views/hard/canteen-product-total/components/product-total-table.vue b/src/views/hard/canteen-product-total/components/product-total-table.vue index da3777e7..c8fad71b 100644 --- a/src/views/hard/canteen-product-total/components/product-total-table.vue +++ b/src/views/hard/canteen-product-total/components/product-total-table.vue @@ -14,6 +14,7 @@ + - + @@ -385,6 +400,22 @@ const selectionChangHandle = (objs: { id: string }[]) => { multiple.value = !objs.length } +// 手动核销 +const doCancel = async (row: any) => { + try { + await useMessageBox().confirm(`是否手动核销用户'${row.username}',总价为${displayPrice(row.totalPrice)}的预约订单?`) + } catch { + return + } + try { + await hardOrder.adminRserveCancelOrder(row.id) + getDataList() + useMessage().success("核销成功") + } catch (err: any) { + useMessage().error(err.msg) + } +} + // 删除操作 const handleDelete = async (ids: string[]) => { try { @@ -422,7 +453,7 @@ const getSummaries = (param: SummaryMethodProps) => { { column: "totalPrice", columnName: "商品总价", color: "#67C260" }, { column: "extraPrice", columnName: "额外支付", color: "#F56E9B" }, { column: "payPrice", columnName: "实际支付", color: "#355CF6" }, - ].forEach(({ column, columnName, color }: any, index: number) => { + ].forEach(({ column, columnName, color }: any) => { const values = data.map((item) => Number(item[column])) if (!values.every((value) => Number.isNaN(value))) { priceVNode.push( From 99642377d5926eda231c92f24bbb088a7aacac1b Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 16 Jun 2026 18:08:01 +0800 Subject: [PATCH 10/11] 11 --- src/views/hard/hard-order/index.vue | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue index 33f5f288..d87af1c4 100644 --- a/src/views/hard/hard-order/index.vue +++ b/src/views/hard/hard-order/index.vue @@ -224,9 +224,9 @@