-
![]()
+
午餐
-
+
-
+
{{ dish.name }}
-
¥{{ displayPrice(dish.price) }}
+
¥{{
+ displayPrice(dish.price) }}
@@ -218,23 +221,28 @@ const getCanteenDishesCategory = async () => {
background-image: radial-gradient(#eff4ee 1px, transparent 10px);
background-size: 10px 10px;
}
+
.ink-cloud {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23F7D6C3' d='M50,0C36.7,0,25,11.7,25,25c0,13.3,11.7,25,25,25s25-11.7,25-25C75,11.7,63.3,0,50,0z M50,40c-8.3,0-15-6.7-15-15s6.7-15,15-15s15,6.7,15,15S58.3,40,50,40z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='20s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
+
.scrollbar-hidden::-webkit-scrollbar {
display: none;
}
+
.scrollbar-hidden {
scrollbar-width: none;
-ms-overflow-style: none;
}
+
::selection {
background: #1879ff;
color: #fff;
}
+
.ribbon {
width: 80px;
height: 20px;
diff --git a/src/views/hard/canteen-product-total/components/product-total-table-by-day.vue b/src/views/hard/canteen-product-total/components/product-total-table-by-day.vue
index 7e1e311..1e2c009 100644
--- a/src/views/hard/canteen-product-total/components/product-total-table-by-day.vue
+++ b/src/views/hard/canteen-product-total/components/product-total-table-by-day.vue
@@ -152,6 +152,7 @@ const tableExpandChange = async (e: any) => {
try {
const { data } = await hardTotalApi.productTotalByDept({
hourType: e.hourType,
+ createTimeType: '0',
createTimeStr: parseTime(e.createTime, '{y}-{m}-{d}'),
})
if (data && data.length) {
diff --git a/src/views/hard/canteen-product-total/components/product-total-table-by-month.vue b/src/views/hard/canteen-product-total/components/product-total-table-by-month.vue
index 1fa673b..6261559 100644
--- a/src/views/hard/canteen-product-total/components/product-total-table-by-month.vue
+++ b/src/views/hard/canteen-product-total/components/product-total-table-by-month.vue
@@ -152,7 +152,8 @@ const tableExpandChange = async (e: any) => {
try {
const { data } = await hardTotalApi.productTotalByDept({
hourType: e.hourType,
- createTimeStr: parseTime(e.createTime, '{y}-{m}-{d}'),
+ createTimeType: '1',
+ createTimeStr: parseTime(e.createTime, '{y}-{m}'),
})
if (data && data.length) {
tableChildrenMap.value.set(e.uniqueCode, data)
diff --git a/src/views/hard/canteen-product-total/index.vue b/src/views/hard/canteen-product-total/index.vue
index 44d4281..bfc1888 100644
--- a/src/views/hard/canteen-product-total/index.vue
+++ b/src/views/hard/canteen-product-total/index.vue
@@ -14,10 +14,16 @@
-
+
+
+
+
{{ $t("common.queryBtn") }}
@@ -28,8 +34,8 @@
-
-
+
import { ElMessage } from "element-plus"
+import dayjs from "dayjs"
import other from "/@/utils/other"
import { formatDate } from '/@/utils/formatTime';
@@ -79,12 +86,14 @@ const tabPane = ref([
])
const activeTab = ref("DAY")
+const defaultQueryForm = {
+ hourType: "",
+ merchantId: "",
+ createTimeList: [],
+ createTimeYearStr: dayjs().format("YYYY"),
+}
const state = reactive({
- queryForm: {
- hourType: "",
- merchantId: "",
- createTimeList: [],
- }
+ queryForm: { ...defaultQueryForm }
})
watch(() => [activeTab.value, productTotalTableByDayRef.value, productTotalTableByMonthRef.value], () => {
@@ -126,7 +135,17 @@ const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepT
search()
}
+const tabClick = () => {
+ cancel()
+}
+
const search = () => {
+ if (activeTab.value === "DAY") {
+ state.queryForm.createTimeYearStr = ""
+ }
+ if (activeTab.value === "MONTH") {
+ state.queryForm.createTimeList = []
+ }
switch (activeTab.value) {
case "DAY":
productTotalTableByDayRef.value.doSearch(state.queryForm)
@@ -138,6 +157,7 @@ const search = () => {
}
const cancel = () => {
+ state.queryForm = { ...defaultQueryForm }
switch (activeTab.value) {
case "DAY":
productTotalTableByDayRef.value.doCancel(state.queryForm)
diff --git a/src/views/wallet/wallet-recharge-invoice/index.vue b/src/views/wallet/wallet-recharge-invoice/index.vue
index 5bbf4cd..4775841 100644
--- a/src/views/wallet/wallet-recharge-invoice/index.vue
+++ b/src/views/wallet/wallet-recharge-invoice/index.vue
@@ -13,6 +13,9 @@
+
+
+
From 4c74d5a410a49e1599cac02d873a549303408564 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 15 Jan 2026 19:22:57 +0800
Subject: [PATCH 05/17] =?UTF-8?q?feat:=E9=A3=9F=E5=A0=82=E8=8F=9C=E5=93=81?=
=?UTF-8?q?=E8=B4=AD=E4=B9=B0=E7=BB=9F=E8=AE=A1(=E6=8C=89=E5=A4=A9)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/other.ts | 68 +++++++++++++++++--
.../hard/canteen-product-total/index.vue | 6 ++
2 files changed, 69 insertions(+), 5 deletions(-)
diff --git a/src/utils/other.ts b/src/utils/other.ts
index 2b9b1f9..908cccb 100644
--- a/src/utils/other.ts
+++ b/src/utils/other.ts
@@ -265,8 +265,26 @@ export function downBlobFile(url: any, query: any, fileName: string) {
.then((response) => {
handleBlobFile(response, fileName)
})
- .catch((error) => {
- useMessage().error(error.msg || "下载失败")
+ .catch(async (error) => {
+ let msg = "下载失败"
+ try {
+ if (error instanceof Blob) {
+ const text = typeof (error as any).text === "function" ? await (error as any).text() : ""
+ if (text) {
+ try {
+ const json = JSON.parse(text)
+ msg = json.msg || json.message || msg
+ } catch {
+ msg = text || msg
+ }
+ }
+ } else if (typeof error === "object") {
+ msg = (error as any).msg || (error as any).message || msg
+ }
+ } catch {
+ msg = "下载失败"
+ }
+ useMessage().error(msg)
})
}
@@ -286,8 +304,26 @@ export function postDownBlobFile(url: any, data: any, fileName: string) {
.then((response) => {
handleBlobFile(response, fileName)
})
- .catch((error) => {
- useMessage().error(error.msg || "下载失败")
+ .catch(async (error) => {
+ let msg = "下载失败"
+ try {
+ if (error instanceof Blob) {
+ const text = typeof (error as any).text === "function" ? await (error as any).text() : ""
+ if (text) {
+ try {
+ const json = JSON.parse(text)
+ msg = json.msg || json.message || msg
+ } catch {
+ msg = text || msg
+ }
+ }
+ } else if (typeof error === "object") {
+ msg = (error as any).msg || (error as any).message || msg
+ }
+ } catch {
+ msg = "下载失败"
+ }
+ useMessage().error(msg)
})
}
@@ -334,7 +370,6 @@ export function handleBlobFile(response: any, fileName: string) {
} else if (response.data && response.data instanceof Blob) {
blob = response.data
} else {
- // 尝试构造安全的blob
const safeData = Array.isArray(response) ? response : [response]
blob = new Blob(safeData, { type: "application/octet-stream" })
}
@@ -344,6 +379,29 @@ export function handleBlobFile(response: any, fileName: string) {
return
}
+ if (blob.type === "application/json" || blob.type === "text/plain") {
+ try {
+ const handleText = (t: string) => {
+ try {
+ const json = JSON.parse(t)
+ useMessage().error(json.msg || json.message || "下载失败")
+ } catch {
+ useMessage().error(t || "下载失败")
+ }
+ }
+ if (typeof (blob as any).text === "function") {
+ ;(blob as any).text().then((t: string) => handleText(t))
+ } else {
+ const reader = new FileReader()
+ reader.onload = () => handleText(String(reader.result || ""))
+ reader.readAsText(blob)
+ }
+ } catch {
+ useMessage().error("下载失败")
+ }
+ return
+ }
+
// 3. 验证文件大小 (防止过大文件)
const MAX_FILE_SIZE = 100 * 1024 * 1024 // 100MB限制
if (blob.size > MAX_FILE_SIZE) {
diff --git a/src/views/hard/canteen-product-total/index.vue b/src/views/hard/canteen-product-total/index.vue
index bfc1888..2f78bbe 100644
--- a/src/views/hard/canteen-product-total/index.vue
+++ b/src/views/hard/canteen-product-total/index.vue
@@ -105,6 +105,12 @@ watch(() => [activeTab.value, productTotalTableByDayRef.value, productTotalTable
}
})
+onMounted(() => {
+ nextTick(() => {
+ search()
+ })
+})
+
// 清空搜索条件
const resetQuery = () => {
// 清空搜索条件
From 9df3d669a5f4a86f4873426142b7b51b090eeb02 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Fri, 16 Jan 2026 10:30:19 +0800
Subject: [PATCH 06/17] =?UTF-8?q?feat:=E5=85=85=E5=80=BC/=E6=89=A3?=
=?UTF-8?q?=E6=AC=BE=E7=94=B3=E8=AF=B7=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/hard/canteen-product-total/index.vue | 8 +++++---
src/views/wallet/wallet-recharge-apply/index.vue | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/views/hard/canteen-product-total/index.vue b/src/views/hard/canteen-product-total/index.vue
index 2f78bbe..889dc49 100644
--- a/src/views/hard/canteen-product-total/index.vue
+++ b/src/views/hard/canteen-product-total/index.vue
@@ -44,7 +44,7 @@
-
+