|
|
|
|
@ -116,7 +116,14 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="address" width="90" label="已用/总数">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span @click="UsedCountClick(scope.row)" style="font-weight: 700;color:cornflowerblue;cursor: pointer;">{{scope.row.used_count}}/{{scope.row.count}}</span>
|
|
|
|
|
<span @click="UsedCountClick(scope.row)"
|
|
|
|
|
:style="{
|
|
|
|
|
'font-weight': 700,
|
|
|
|
|
'color': scope.row.isAvailable ? 'cornflowerblue' : '#c0c4cc',
|
|
|
|
|
'cursor': 'pointer'
|
|
|
|
|
}">
|
|
|
|
|
{{scope.row.used_count}}/{{scope.row.count}}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -144,7 +151,13 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="address" width="90" label="已用/总数">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
{{scope.row.used_count}}/{{scope.row.count}}
|
|
|
|
|
<span
|
|
|
|
|
:style="{
|
|
|
|
|
'font-weight': 700,
|
|
|
|
|
'color': scope.row.isAvailable ? 'cornflowerblue' : '#c0c4cc'
|
|
|
|
|
}">
|
|
|
|
|
{{scope.row.used_count}}/{{scope.row.count}}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -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) => {
|
|
|
|
|
|