From 82742bb0ec1d47c9f41c54a98f3e0b38166e3703 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B2=A9=E4=BB=9488?= <>
Date: Sun, 18 Jan 2026 16:39:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E8=BF=87=E6=95=B0=E9=87=8F=E7=BD=AE?=
=?UTF-8?q?=E7=81=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
YiJi-admin/src/components/Yewu/YuYue.vue | 36 ++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/YiJi-admin/src/components/Yewu/YuYue.vue b/YiJi-admin/src/components/Yewu/YuYue.vue
index 66f5525..510d57a 100644
--- a/YiJi-admin/src/components/Yewu/YuYue.vue
+++ b/YiJi-admin/src/components/Yewu/YuYue.vue
@@ -116,7 +116,14 @@
- {{scope.row.used_count}}/{{scope.row.count}}
+
+ {{scope.row.used_count}}/{{scope.row.count}}
+
@@ -144,7 +151,13 @@
- {{scope.row.used_count}}/{{scope.row.count}}
+
+ {{scope.row.used_count}}/{{scope.row.count}}
+
@@ -341,6 +354,17 @@
//获取某日可用号源
const GetEnablePlanFunc = (date, entrustids) => {
loading.value = true
+
+ // 计算当前选中项目所需的总座位数
+ let totalUseSeats = 0
+ MainInfo.value.forEach((v, i) => {
+ v.itemInfo.forEach((v2, i2) => {
+ if (v2.selected && v2.item.use_seats) {
+ totalUseSeats += v2.item.use_seats
+ }
+ })
+ })
+
GetEnablePlan({
regnum: MainInfo.value[MainInfoKey.value].mainInfo.reg_num,
entrustid: entrustids,
@@ -350,6 +374,14 @@
}).then(res => {
loading.value = false
if (res.status) {
+ // 标记不可用的号源
+ res.data.plan_list.forEach((plan, index) => {
+ // 计算号源可用数量
+ const availableCount = plan.count - plan.used_count
+ // 如果可用数量小于总座位数,则标记为不可用
+ plan.isAvailable = availableCount >= totalUseSeats
+ })
+
if (res.data.appointment_date == table_date1.value) {
tableData1.value = res.data
tableData1.value.plan_list.forEach((v, i) => {