main
鹿和sa0ChunLuyu 1 week ago
parent f33a70e6a8
commit b1a952614f

@ -1197,7 +1197,7 @@ public function BatchChangeLocked(Request $request)
WHERE roster_detail_id IN ({$idsStr})
AND appointment_type_id IN ({$atypeIdsStr})";
$u2 = DB::update($sql);
if ($u2 > 0) {
if ($u2 !== false) {
return \Yz::Return(true, '批量占位成功', []);
} else {
return \Yz::echoError1('批量占位失败');

@ -215,6 +215,19 @@ public function GetCheckPdf()
$room['entrust_date_time'] = $minDateTime === $maxDateTime
? $minDateTime
: $minDateTime . ' ~ ' . $maxDateTime;
//检查须知:从该诊室所有检查项目读取 check_notice去重过滤
$itemNames = array_column($room['items'], 'entrust');
$notices = DB::table('s_check_item')
->whereIn('item_name', $itemNames)
->where('status', 1)
->where('is_del', 0)
->pluck('check_notice')
->filter()
->unique()
->values()
->toArray();
$room['check_notice'] = implode("\n", $notices);
}
}
}
@ -511,6 +524,19 @@ public function GenerateGroupedCheckPdf()
$room['entrust_date_time'] = $minDateTime === $maxDateTime
? $minDateTime
: $minDateTime . ' ~ ' . $maxDateTime;
//检查须知:从该诊室所有检查项目读取 check_notice去重过滤
$itemNames = array_column($room['items'], 'entrust');
$notices = DB::table('s_check_item')
->whereIn('item_name', $itemNames)
->where('status', 1)
->where('is_del', 0)
->pluck('check_notice')
->filter()
->unique()
->values()
->toArray();
$room['check_notice'] = implode("\n", $notices);
}
}
}

@ -31,7 +31,7 @@
@foreach ($patient['rooms'] as $roomKey => $room)
<div class="page">
<div class="PrintShenQingDan">
<div style="padding-bottom: 20px; position: relative;">
<div style="padding-bottom: 5px; position: relative;">
<div style="width: 100%; text-align: center; font-size: 26px;">秦皇岛市中医医院</div>
<div style="width: 100%; text-align: center; font-size: 18px; font-weight: bold;">检查预约回执单</div>
<div style="width: 200px; height: 50px; position: absolute; right: 10px; top: 0;">
@ -40,7 +40,7 @@
</div>
</div>
<div style="border-top: 1px solid #333; border-bottom: 1px solid #333; padding-left: 4px; padding-top: 10px; padding-bottom: 10px;">
<div style="border-top: 1px solid #333; border-bottom: 1px solid #333; padding-left: 4px; padding-top: 5px; padding-bottom: 5px;">
<table style="border: none; font-size: 18px; width: 100%;">
<tr style="border: none;">
<td style="border: none; width: 23%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">姓名</span>{{ $patient['patient_name'] }}</td>
@ -51,11 +51,11 @@
<tr style="border: none;">
<td style="border: none; width: 23%; text-align: left;"><span style="display: inline-block; width: 3em;">{{ $patient['patient_type_label'] }}号</span>{{ $patient['patient_id'] }}</td>
@if ($patient['patient_type'] == 0)
<td style="border: none; width: 34%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">病区</span>{{ $patient['warddesc'] }}</td>
<td style="border: none; width: 16%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">床号</span>{{ $patient['bedno'] }}</td>
<td style="border: none; width: 27%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
<td style="border: none; width: 33%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">病区</span>{{ $patient['warddesc'] }}</td>
<td style="border: none; width: 15%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">床号</span>{{ $patient['bedno'] }}</td>
<td style="border: none; width: 29%; text-align: left; white-space: nowrap;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
@else
<td style="border: none; width: 40%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
<td style="border: none; width: 41%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
<td style="border: none; width: 16%; text-align: left;"></td>
<td style="border: none; width: 24%; text-align: left;"></td>
@endif
@ -63,7 +63,7 @@
</table>
</div>
<div style="border-bottom: 1px solid #333; padding-left: 4px; padding-top: 10px; padding-bottom: 10px;">
<div style="border-bottom: 1px solid #333; padding-left: 4px; padding-top: 5px; padding-bottom: 5px;">
<table style="border: none;">
<tr style="border: none; vertical-align: top;">
<td style="width: 15%; border: none; font-size: 20px; font-weight: 900; text-align: left; white-space: nowrap;">检查项目:</td>
@ -84,7 +84,7 @@
</table>
</div>
<div style="padding-left: 4px; padding-top: 10px; padding-bottom: 10px;">
<div style="padding-left: 4px; padding-top: 5px; padding-bottom: 5px;">
<table style="border: none;">
<tr style="border: none;">
<td style="width: 15%; border: none; font-size: 20px; font-weight: 900; text-align: left; vertical-align: top;">温馨提示:</td>
@ -97,14 +97,18 @@
</table>
</div>
<div style="border-top: 1px solid #333; padding-left: 8px; padding-top: 10px; padding-bottom: 10px;">
<div style="border-top: 1px solid #333; padding-left: 8px; padding-top: 6px; padding-bottom: 6px; min-height: 50px;">
<div style="font-size: 20px; font-weight: 900;">检查须知:</div>
@if (isset($room['check_notice']) && $room['check_notice'] !== '')
<div style="font-size: 18px;">
腹部检查禁食4小时腹部、盆腔、泌尿系统检查请尽量饮水充盈肠道及膀胱危重病人需由家属陪同孕妇及婴幼儿请慎行检查。
@foreach(explode("\n", $room['check_notice']) as $line)
<div>{{ $line }}</div>
@endforeach
</div>
@endif
</div>
<div style="text-align: right; border-top: 1px solid #333; font-size: 18px; padding-top: 10px; padding-bottom: 10px;">
<div style="text-align: right; border-top: 1px solid #333; font-size: 18px; padding-top: 5px; padding-bottom: 5px;">
申请时间:{{ $room['entrust_date_time'] }}
</div>
</div>

@ -113,7 +113,7 @@
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0)">
<span> {{item3.jiancheng}}</span><span><span v-if="item3.locked_count" class="yellow bold-text">{{item3.locked_count}}</span><span v-if="item3.locked_count">/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
</template>
</div>
@ -345,12 +345,9 @@
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.limited">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
<template v-else>
剩余数量不一致
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
@ -1029,11 +1026,11 @@
return
}
initBatchOccupyForm()
// planTableData count
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelCounts = {} // { [appointment_type_id]: number[] }
const channelRemaining = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelCounts[ch.id] = []
channelRemaining[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -1041,22 +1038,22 @@
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id) && cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelCounts[ci.appointment_type_id]) {
channelCounts[ci.appointment_type_id].push(ci.count)
if (channelRemaining[ci.appointment_type_id]) {
channelRemaining[ci.appointment_type_id].push(ci.count - ci.used_count)
}
})
}
}
})
// count
//
const limits = {}
batchChannels.forEach(ch => {
const vals = channelCounts[ch.id]
const vals = channelRemaining[ch.id]
if (vals.length > 0) {
const allSame = vals.every(v => v === vals[0])
const minVal = Math.min(...vals)
limits[ch.id] = {
limited: allSame,
maxValue: allSame ? vals[0] : null
limited: true,
maxValue: minVal
}
} else {
limits[ch.id] = { limited: false, maxValue: null }

@ -113,7 +113,7 @@
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0)">
<span> {{item3.jiancheng}}</span><span><span v-if="item3.locked_count" class="yellow bold-text">{{item3.locked_count}}</span><span v-if="item3.locked_count">/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
</template>
</div>
@ -345,12 +345,9 @@
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.limited">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
<template v-else>
剩余数量不一致
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
@ -1044,11 +1041,11 @@
return
}
initBatchOccupyForm()
// planTableData count
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelCounts = {} // { [appointment_type_id]: number[] }
const channelRemaining = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelCounts[ch.id] = []
channelRemaining[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -1056,22 +1053,22 @@
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id) && cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelCounts[ci.appointment_type_id]) {
channelCounts[ci.appointment_type_id].push(ci.count)
if (channelRemaining[ci.appointment_type_id]) {
channelRemaining[ci.appointment_type_id].push(ci.count - ci.used_count)
}
})
}
}
})
// count
//
const limits = {}
batchChannels.forEach(ch => {
const vals = channelCounts[ch.id]
const vals = channelRemaining[ch.id]
if (vals.length > 0) {
const allSame = vals.every(v => v === vals[0])
const minVal = Math.min(...vals)
limits[ch.id] = {
limited: allSame,
maxValue: allSame ? vals[0] : null
limited: true,
maxValue: minVal
}
} else {
limits[ch.id] = { limited: false, maxValue: null }

Loading…
Cancel
Save