From aaf244eed628cba25adff37ddf8b041a37a7f8fe Mon Sep 17 00:00:00 2001 From: sangchengzhi <2305486879@qq.com> Date: Tue, 13 Jan 2026 16:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=93=E6=A3=80=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=89=B9=E6=AE=8A=E6=97=B6?= =?UTF-8?q?=E6=AE=B5=E4=B8=8D=E8=AE=A9=E7=BC=B4=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Ghxq.vue | 12 + src/views/JiaoFei_detail.vue | 12 + src/views/ZYCharge.vue | 13 ++ src/views/Zstj_detail.vue | 90 +++++++- src/views/Zstj_tc.vue | 431 +++++++++++++++++++++++++++++++---- 5 files changed, 506 insertions(+), 52 deletions(-) diff --git a/src/views/Ghxq.vue b/src/views/Ghxq.vue index 5bfe350..7044f97 100644 --- a/src/views/Ghxq.vue +++ b/src/views/Ghxq.vue @@ -357,6 +357,18 @@ export default { if( _this.yuyue.m > 0 && _this.radiovalue1 == ''){ Toast("请选择支付方式"); return; + } + // 检查当前时间是否在23:48-00:01之间,这个时间段内禁止充值 + const now = new Date(); + const hours = now.getHours(); + const minutes = now.getMinutes(); + + if ((hours === 23 && minutes >= 48) || (hours === 0 && minutes <= 1)) { + Toast({ + message: '当前时间段(23:48-00:01)正在对账,暂不支持支付操作,请0点过后再试!', + duration: 5000 + }); + return; } console.log("card",_this.card.cardNo); if(_this.radiovalue1 == "微信医保支付" && _this.card.cardNo !="90120746" ){ diff --git a/src/views/JiaoFei_detail.vue b/src/views/JiaoFei_detail.vue index 16db3f2..c4f98be 100644 --- a/src/views/JiaoFei_detail.vue +++ b/src/views/JiaoFei_detail.vue @@ -256,6 +256,18 @@ export default { if (!this.radiovalue1) { Toast('请选择支付方式'); return; + } + // 检查当前时间是否在23:48-00:01之间,这个时间段内禁止充值 + const now = new Date(); + const hours = now.getHours(); + const minutes = now.getMinutes(); + + if ((hours === 23 && minutes >= 48) || (hours === 0 && minutes <= 1)) { + Toast({ + message: '当前时间段(23:48-00:01)正在对账,暂不支持支付操作,请0点过后再试!', + duration: 5000 + }); + return; } // 设置支付状态为进行中 this.isPaying = true; diff --git a/src/views/ZYCharge.vue b/src/views/ZYCharge.vue index 232f33c..89aa7f9 100644 --- a/src/views/ZYCharge.vue +++ b/src/views/ZYCharge.vue @@ -208,6 +208,19 @@ return; }) }, onConfirm() { + // 检查当前时间是否在23:48-00:01之间,这个时间段内禁止充值 + const now = new Date(); + const hours = now.getHours(); + const minutes = now.getMinutes(); + + if ((hours === 23 && minutes >= 48) || (hours === 0 && minutes <= 1)) { + Toast({ + message: '当前时间段(23:48-00:01)正在对账,暂不支持支付操作,请0点过后再试!', + duration: 5000 + }); + return; + } + if(this.zyinfo.YJJKC < this.chargemoney){ Toast({ message: '今日线上剩余可充值额度不足,请调整充值金额或到收费室进行充值!', diff --git a/src/views/Zstj_detail.vue b/src/views/Zstj_detail.vue index 3e6a529..5c8cf9c 100644 --- a/src/views/Zstj_detail.vue +++ b/src/views/Zstj_detail.vue @@ -2,7 +2,16 @@
-
+ + +
+
+
+
数据加载中...
+
+
+ +
@@ -30,10 +39,13 @@

+

项目价格:¥{{ item.price }}

项目说明:{{ item.explain }}

注意事项:{{ item.detailData.specialRequests }}

+

项目详情:{{ item.detailData.program_items }}

+
@@ -55,7 +67,8 @@ export default { data() { return { detailList: [], // 存储多个项目及其详情 - seldate: "" // 预约日期 + seldate: "", // 预约日期 + globalLoading: true // 全局加载状态 }; }, mounted() { @@ -64,6 +77,7 @@ export default { if (!itemsStr) { Toast("未传入项目信息"); + this.globalLoading = false; return; } @@ -73,6 +87,7 @@ export default { } catch (e) { Toast("项目数据解析失败"); console.error(e); + this.globalLoading = false; } }, computed: { @@ -86,6 +101,7 @@ export default { methods: { // 初始化项目列表并获取每个项目的详情 getData(items) { + console.log("传入的items", items); // 初始化项目列表 this.detailList = items.map(item => ({ ...item, @@ -93,14 +109,17 @@ export default { detailData: null })); - // 循环调用 apiGetDetail 获取每个项目详情 - this.detailList.forEach((item, index) => { - apiGetDetail({ + // 创建所有API请求的Promise数组 + const requestPromises = this.detailList.map((item, index) => { + console.log("当前项目", item); + return apiGetDetail({ programId: item.id, - bookindDate: this.seldate + bookindDate: this.seldate, + Type: item.type, }) .then(res => { const data = res.data; + console.log(data); const detailData = { time: data.time || "时间未定", time_period: data.time_period, @@ -110,9 +129,10 @@ export default { : data.time_period === "PM" ? "下午" : "全天", - specialRequests: data.specialRequests || "无特殊要求" + specialRequests: data.specialRequests || "无特殊要求", + program_items: data.program_items || item.description || "无具体项目说明", + price: item.price, }; - // 使用 $set 确保响应式更新 this.$set(this.detailList[index], 'detailData', detailData); }) @@ -121,7 +141,9 @@ export default { const failData = { time: "获取失败", time_period2: "", - specialRequests: "信息加载异常" + specialRequests: "信息加载异常", + program_items: item.description || "无具体项目说明", + price: item.price, }; this.$set(this.detailList[index], 'detailData', failData); }) @@ -129,6 +151,17 @@ export default { this.$set(this.detailList[index], 'loading', false); }); }); + + // 等待所有请求完成后关闭全局加载状态 + Promise.all(requestPromises) + .then(() => { + console.log("所有项目详情加载完成"); + this.globalLoading = false; + }) + .catch(err => { + console.error("部分请求失败", err); + this.globalLoading = false; + }); }, // 计算年龄的函数 getAgeFromIdNo(idNo) { @@ -194,6 +227,7 @@ yuyue() { programId: item.id, time: detail.time || '', timePeriod: detail.time_period || '', + type:item.type }; }); @@ -258,6 +292,44 @@ yuyue() { \ No newline at end of file