PDF 批量占位 批量修改

main
鹿和sa0ChunLuyu 1 week ago
parent aff7e67158
commit df6a88186c

@ -1101,4 +1101,106 @@ public function BatchChangeInfoAdmin(Request $request)
return \Yz::echoError1('批量修改失败');
}
}
//批量修改号源数量(不修改占位)
public function BatchChangeCount(Request $request)
{
$userid = $request->get('userid');
$department_id = request('department_id');
// 判断是否是管理员操作
$isAdmin = !empty($department_id);
if ($isAdmin) {
// 管理员模式使用传参的科室ID
} else {
// 普通用户模式从用户信息获取科室ID
$userInfo = DB::table('users')->where(['id' => $userid])->get();
$department_id = $userInfo[0]->department_id;
}
$ids = request('ids');
$max_total = request('max_total');
$coutsInfo = request('coutsInfo');
if (empty($ids) || empty($coutsInfo)) {
return \Yz::echoError1('参数错误');
}
// 只更新 count 和 max_total不修改 locked_count
$appointmentTypeIds = array_column($coutsInfo, 'appointment_type_id');
$countSql = 'CASE appointment_type_id ';
foreach ($coutsInfo as $v) {
$countSql .= 'WHEN ' . intval($v['appointment_type_id']) . ' THEN ' . intval($v['count'] ?? 0) . ' ';
}
$countSql .= 'END';
$idsStr = implode(',', array_map('intval', $ids));
$atypeIdsStr = implode(',', array_map('intval', $appointmentTypeIds));
$sql = "UPDATE s_source_roster_detail_count
SET count = {$countSql},
max_total = {$max_total}
WHERE roster_detail_id IN ({$idsStr})
AND appointment_type_id IN ({$atypeIdsStr})";
$u2 = DB::update($sql);
if ($u2 > 0) {
return \Yz::Return(true, '批量修改成功', []);
} else {
return \Yz::echoError1('批量修改失败');
}
}
//批量修改号源占位(不修改数量)
public function BatchChangeLocked(Request $request)
{
$userid = $request->get('userid');
$department_id = request('department_id');
$isAdmin = !empty($department_id);
if (!$isAdmin) {
$userInfo = DB::table('users')->where(['id' => $userid])->get();
$department_id = $userInfo[0]->department_id;
}
$ids = request('ids');
$coutsInfo = request('coutsInfo');
if (empty($ids) || empty($coutsInfo)) {
return \Yz::echoError1('参数错误');
}
// 获取所有选中记录的渠道剩余号源,取最小值做校验
$allRecords = DB::table('s_source_roster_detail_count')
->whereIn('roster_detail_id', $ids)
->whereIn('appointment_type_id', array_column($coutsInfo, 'appointment_type_id'))
->get()
->groupBy('appointment_type_id');
foreach ($coutsInfo as $v) {
$atypeId = intval($v['appointment_type_id']);
$newLocked = intval($v['locked_count'] ?? 0);
$records = $allRecords->get($atypeId);
if ($records) {
// 计算该渠道在所有选中记录中的最小剩余号源
$minRemaining = null;
foreach ($records as $r) {
$remaining = intval($r->count) - intval($r->used_count);
if ($minRemaining === null || $remaining < $minRemaining) {
$minRemaining = $remaining;
}
}
if ($newLocked > $minRemaining) {
return \Yz::echoError1('占位数量不能大于剩余号源的最小值,最多' . $minRemaining . '个');
}
}
}
// 只更新 locked_count不修改 count 和 max_total
$appointmentTypeIds = array_column($coutsInfo, 'appointment_type_id');
$lockedSql = 'CASE appointment_type_id ';
foreach ($coutsInfo as $v) {
$lockedSql .= 'WHEN ' . intval($v['appointment_type_id']) . ' THEN ' . intval($v['locked_count'] ?? 0) . ' ';
}
$lockedSql .= 'END';
$idsStr = implode(',', array_map('intval', $ids));
$atypeIdsStr = implode(',', array_map('intval', $appointmentTypeIds));
$sql = "UPDATE s_source_roster_detail_count
SET locked_count = {$lockedSql}
WHERE roster_detail_id IN ({$idsStr})
AND appointment_type_id IN ({$atypeIdsStr})";
$u2 = DB::update($sql);
if ($u2 > 0) {
return \Yz::Return(true, '批量占位成功', []);
} else {
return \Yz::echoError1('批量占位失败');
}
}
}

@ -42,6 +42,7 @@ public function GetCheckPdf()
}
$type = request('Type', 'old');
$dev = request('Dev', '0');
$p_type = config('app.globals.患者类型');
$resultList = [];
$normalIds = []; //正常的医嘱号列表
@ -219,6 +220,14 @@ public function GetCheckPdf()
}
unset($typeGroup, $patient, $room);
// Dev模式直接输出PDF不生成文件
if ($dev == '1') {
$pdf = SnappyPdf::loadView('pdf.GroupedCheckPdf', ['groups' => $groups])
->setOption('page-size', 'a5')
->setOption('orientation', 'landscape');
return $pdf->inline('CheckPdf.pdf');
}
//为每个room生成独立的PDF文件
$datePath = date('Y/m/d');
$storageDir = 'CheckPdf/' . $datePath;
@ -268,8 +277,8 @@ public function GetCheckPdf()
//检查文件是否存在,不存在则生成
if (!File::exists($filePath)) {
$pdf = SnappyPdf::loadView('pdf.GroupedCheckPdf', ['groups' => $tempGroups])
->setOption('page-size', 'a4')
->setOption('orientation', 'portrait');
->setOption('page-size', 'a5')
->setOption('orientation', 'landscape');
$pdf->save($filePath);
}

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>检查项目清</title>
<title>检查预约回执</title>
<style>
body {
margin: 0;
@ -33,7 +33,7 @@
<div class="PrintShenQingDan">
<div style="padding-bottom: 20px; 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: 100%; text-align: center; font-size: 18px; font-weight: bold;">检查预约回执</div>
<div style="width: 200px; height: 50px; position: absolute; right: 10px; top: 0;">
<img src="data:image/png;base64,{{ $patient['barcode'] }}" style="display: block; margin: 0 auto; max-width: 100%; height: auto;" />
<div style="text-align: center;">{{ $patient['barcode_text'] }}</div>
@ -44,20 +44,20 @@
<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>
<td style="border: none; width: 33%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">性别</span>{{ $patient['user_sex_label'] }}</td>
<td style="border: none; width: 18%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">年龄</span>{{ $patient['age'] }}</td>
<td style="border: none; width: 26%; text-align: left;"><span style="display: inline-block; width: 4em;">病人类型</span>{{ $patient['patient_type_label'] }}</td>
<td style="border: none; width: 37%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">性别</span>{{ $patient['user_sex_label'] }}</td>
<td style="border: none; width: 16%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">年龄</span>{{ $patient['age'] }}</td>
<td style="border: none; width: 24%; text-align: left;"><span style="display: inline-block; width: 4em;">病人类型</span>{{ $patient['patient_type_label'] }}</td>
</tr>
<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: 33%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">病区</span>{{ $patient['warddesc'] }}</td>
<td style="border: none; width: 18%; text-align: left;"><span style="display: inline-block; width: 3em; letter-spacing: 0.5em;">床号</span>{{ $patient['bedno'] }}</td>
<td style="border: none; width: 26%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
<td style="border: none; width: 37%; 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: 24%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
@else
<td style="border: none; width: 33%; text-align: left;"><span style="display: inline-block; width: 4em;">联系电话</span>{{ $patient['user_phone'] }}</td>
<td style="border: none; width: 18%; text-align: left;"></td>
<td style="border: none; width: 26%; text-align: left;"></td>
<td style="border: none; width: 37%; 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
</tr>
</table>

@ -129,6 +129,8 @@
Route::post('admin/PlanDetailBatchUpdateAdmin','App\Http\Controllers\API\Admin\YeWu\PlanListController@DetailBatchUpdateAdmin');//管理员批量修改单个号源明细
Route::post('admin/PlanListBatchChangeInfo','App\Http\Controllers\API\Admin\YeWu\PlanListController@BatchChangeInfo');//批量修改号源(统一提交)
Route::post('admin/PlanListBatchChangeInfoAdmin','App\Http\Controllers\API\Admin\YeWu\PlanListController@BatchChangeInfoAdmin');//管理员批量修改号源(统一提交)
Route::post('admin/PlanListBatchChangeCount','App\Http\Controllers\API\Admin\YeWu\PlanListController@BatchChangeCount');//批量修改号源数量(不修改占位)
Route::post('admin/PlanListBatchChangeLocked','App\Http\Controllers\API\Admin\YeWu\PlanListController@BatchChangeLocked');//批量修改号源占位(不修改数量)
Route::post('admin/SaveLockedCount','App\Http\Controllers\API\Admin\YeWu\PlanListController@SaveLockedCount');//保存占位数量
Route::post('admin/GetMainList','App\Http\Controllers\API\Admin\YeWu\WorkMainController@GetList');//获取主表列表
Route::post('admin/GetMainListByDept','App\Http\Controllers\API\Admin\YeWu\WorkMainController@GetListByDept');//管理员获取主表列表(支持科室切换)
@ -218,7 +220,7 @@
Route::post('/PacsSignIn','App\Http\Controllers\API\Third\PacsController@SignIn' );//路径起名字有问题,实际是给报到机的
Route::post('/PacsCancelSignIn','App\Http\Controllers\API\Third\PacsController@CancelSignIn' );//路径起名字有问题,实际是给报到机的
Route::post('/GetEntrustInfo','App\Http\Controllers\API\Third\PacsController@GetEntrustInfo' );
Route::post('/GetCheckPdf','App\Http\Controllers\API\PdfController@GetCheckPdf' );
Route::any('/GetCheckPdf','App\Http\Controllers\API\PdfController@GetCheckPdf' );
Route::post('/GenerateGroupedCheckPdf','App\Http\Controllers\API\PdfController@GenerateGroupedCheckPdf' );
Route::post('/SignInOnPacs','App\Http\Controllers\API\Third\PacsController@SignInOnPacs' );//给Pacs用通知本系统到检场景不经过报到机直接人工窗口

@ -399,6 +399,14 @@ export const PlanListBatchChangeInfo = (data = {}) => {
export const PlanListBatchChangeInfoAdmin = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListBatchChangeInfoAdmin', data: data })
}
//批量修改号源数量(不修改占位)
export const PlanListBatchChangeCount = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListBatchChangeCount', data: data })
}
//批量修改号源占位(不修改数量)
export const PlanListBatchChangeLocked = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanListBatchChangeLocked', data: data })
}
//admin获取主表列表
export const GetMainList = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetMainList', data: data })

@ -67,8 +67,6 @@
<el-button class="do_button" type="success" @click="YuYueButtonClick(1)"></el-button>
<el-button class="do_button" type="warning" @click="YuYueButtonClick(2)"></el-button>
<el-button class="do_button" type="danger" @click="CancelYuYueFunc()"></el-button>
<el-button style="display: none;" ref="print_shenqingdan_button"
v-print="'#shenqingdan'">打印申请单隐藏按钮</el-button>
<el-button @click="print_shenqingdan()"></el-button>
<el-checkbox-group v-model="auto_print" style="margin-left: 12px;">
<el-checkbox label="1">预约完成后打印申请单</el-checkbox>
@ -120,15 +118,6 @@
</div>
</el-dialog>
<div id="shenqingdan" v-show="shenqingdan_show" style="position: relative;">
<div v-for="(item1, index1) in shenqingdan_list" :key="index1">
<div v-for="(item, index) in item1.itemInfo" :key="index">
<div v-if="item.entrust.list_status == 1" style="height: 100vh;">
<ShenQingDan :printInfo="item.entrust"></ShenQingDan>
</div>
</div>
</div>
</div>
</div>
</template>
@ -150,7 +139,6 @@
DoctorCancelYuYue,
GetPlanUsedList
} from '@/api/api.js'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
const props = defineProps({
YuYueInfo: {
@ -183,9 +171,6 @@
let UsedListShow = ref(false)
let UsedList = ref([])
let auto_print = ref(['1'])
let shenqingdan_show = ref(false)
let shenqingdan_list = ref([])
let print_shenqingdan_button = ref(null)
// ==================== ====================
const getWeekday = (date1) => {
@ -627,46 +612,27 @@
// ==================== ====================
const print_shenqingdan = () => {
//
const selectedEntrustInfo = []
const grouped = {}
selectedRows.value.forEach(row => {
if (!grouped[row.reg_num]) {
grouped[row.reg_num] = {
entrustid: [],
reg_num: row.reg_num,
episodeid: row.episodeid
}
selectedEntrustInfo.push(grouped[row.reg_num])
}
grouped[row.reg_num].entrustid.push(row.entrust_id)
})
getMainDetail_duoren({
entrustInfo: selectedEntrustInfo,
appointment_type: props.YuYueInfo.appointment_type,
}).then(res => {
if (res.status) {
let enable = true
shenqingdan_list.value = res.data.info
shenqingdan_list.value.forEach((v) => {
if (v.mainInfo.list_status != 1) {
ElMessage.error(v.mainInfo.entrust + " 不可打印,请重新选择")
enable = false
}
})
if (enable) {
shenqingdan_show.value = true
nextTick(function () {
print_shenqingdan_button.value.$el.click()
setTimeout(function () {
shenqingdan_show.value = false
}, 200)
})
}
} else {
ElMessage.error(res.msg)
}
//
const invalidRows = selectedRows.value.filter(r => r.list_status != 1)
if (invalidRows.length > 0) {
ElMessage.error(invalidRows.map(r => r.entrust).join('、') + " 不可打印,请重新选择")
return
}
const ids = selectedRows.value.map(r => r.entrust_id)
const params = ids.map(id => 'OrderNoList[]=' + id).join('&')
const url = import.meta.env.VITE_APP_API + 'GetCheckPdf?Dev=1&Type=single&' + params
fetch(url)
.then(res => res.blob())
.then(blob => {
const blobUrl = URL.createObjectURL(blob)
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = blobUrl
iframe.onload = () => {
iframe.contentWindow.print()
URL.revokeObjectURL(blobUrl)
}
document.body.appendChild(iframe)
})
}

@ -89,8 +89,6 @@
<el-button class="do_button" type="success" @click="YuYueButtonClick(1)"></el-button>
<el-button class="do_button" type="warning" @click="YuYueButtonClick(2)"></el-button>
<el-button class="do_button" type="danger" @click="CancelYuYueFunc()"></el-button>
<el-button style="display: none;" ref="print_shenqingdan_button"
v-print="'#shenqingdan'">打印申请单隐藏按钮</el-button>
<el-button @click="print_shenqingdan()"></el-button>
<div style="display: flex; flex-direction: column; margin-left: 12px;">
<el-checkbox-group v-model="auto_print">
@ -142,12 +140,6 @@
</div>
<div id="shenqingdan" v-show="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
<el-dialog
v-model="TanChuangMsgDialogVisible"
title="提示"
@ -224,8 +216,7 @@
import {
ref,
onMounted,
watch,computed,
nextTick
watch,computed
} from 'vue'
import {
getMainDetail,
@ -233,14 +224,13 @@
CheckIsDaiJian,
PlanYuYue,
CheckEntrstItemGroup2,
DoctorCancelYuYue,GetConfigInfo2,CreateJianChaShenQingDanPdf,GetOptimalPlan
DoctorCancelYuYue,GetConfigInfo2,GetOptimalPlan
} from '@/api/api.js'
import {
ElMessage,
ElMessageBox
} from 'element-plus'
import { WarningFilled } from '@element-plus/icons-vue'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
const props = defineProps({
reg_num: {
type: String
@ -276,8 +266,8 @@
let planTableData = ref([]);
let loading = ref(false);
let planLoading = ref(false);
let print_shenqingdan_button = ref(null)
let highlightedPlanIds = ref([])
let auto_print = ref(['1']);
let buttonsDisabled = ref(true)
let zhenShiList = ref([]);
let activeZhenShi = ref('');
let selectedPlanId = ref(0)
@ -286,9 +276,7 @@
let selectedRows = ref([])
let isHandlingSelection = ref(true) //
let lastSelection = ref([]) //
let auto_print = ref(['1']);
let shenqingdan_show = ref(false);
let buttonsDisabled = ref(true)
let highlightedPlanIds = ref([])
let handleType = ref('add');
let startDate = ref('');
let systemConfigs=ref([]);//
@ -1787,48 +1775,29 @@
}
})
}
//pdf
const CreateJianChaShenQingDanPdfFunc=(entrustIds)=>{
const ids = entrustIds || selectedEntrustId.value
CreateJianChaShenQingDanPdf({
OrderNoList: ids,
}).then(res => {
if(res.status){
}
})
}
//
let shenqingdan_list = ref([])
const print_shenqingdan = (entrustIds) => {
const ids = entrustIds || selectedEntrustId.value
getMainDetail({
regnum: props.reg_num,
entrustid: ids.join(','),
episodeid: props.episode_id,
appointment_type: props.appointment_type
}).then(res => {
if (res.status) {
let enable = true
shenqingdan_list.value = res.data.info
shenqingdan_list.value.forEach((v, i) => {
if (v.maininfo.list_status != 1) {
ElMessage.error(v.maininfo.entrust + " 不可打印,请重新选择")
enable = false
}
})
if (enable) {
shenqingdan_show.value = true
nextTick(() => {
print_shenqingdan_button.value.$el.click()
setTimeout(() => {
shenqingdan_show.value = false
}, 200)
})
}
} else {
ElMessage.error(res.msg)
//
const invalidRows = selectedRows.value.filter(r => ids.includes(r.entrust_id) && r.list_status != 1)
if (invalidRows.length > 0) {
ElMessage.error(invalidRows.map(r => r.entrust).join('、') + " 不可打印,请重新选择")
return
}
const params = ids.map(id => 'OrderNoList[]=' + id).join('&')
const url = import.meta.env.VITE_APP_API + 'GetCheckPdf?Dev=1&Type=single&' + params
fetch(url)
.then(res => res.blob())
.then(blob => {
const blobUrl = URL.createObjectURL(blob)
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = blobUrl
iframe.onload = () => {
iframe.contentWindow.print()
URL.revokeObjectURL(blobUrl)
}
document.body.appendChild(iframe)
})
}
const DatePickerChange = () => {

@ -49,6 +49,7 @@
<el-button type="warning" @click="BatchDisable()" style="margin-left: 10px;">批量禁用</el-button>
<el-button type="success" @click="BatchEnable()" style="margin-left: 10px;">批量启用</el-button>
<el-button type="primary" @click="openBatchModify()" style="margin-left: 10px;">批量修改</el-button>
<el-button type="warning" @click="openBatchOccupy()" style="margin-left: 10px;">批量占位</el-button>
</el-row>
</div>
<div style="display: flex;" class="planInfo">
@ -305,25 +306,19 @@
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="4">渠道名称</el-col>
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
<el-col :span="8">占用</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="4" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="4" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
@ -332,6 +327,43 @@
<el-button type="primary" @click="execBatchModify()" :disabled="batchModifyRunning">确定修改</el-button>
</template>
</el-dialog>
<!-- 批量占位弹窗 -->
<el-dialog v-model="BatchOccupyDialogVisible" title="批量占位" width="45%" :close-on-click-modal="false">
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@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">
最大可占: {{ 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;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<el-button @click="BatchOccupyDialogVisible = false" :disabled="batchOccupyRunning">取消</el-button>
<el-button type="warning" @click="execBatchOccupy()" :disabled="batchOccupyRunning">确定占位</el-button>
</template>
</el-dialog>
<!-- 错误汇总弹窗 -->
<el-dialog v-model="BatchErrorDialogVisible" title="修改结果" width="40%">
<div>
@ -372,6 +404,8 @@
PlanListBatchEnable,
PlanDetailBatchUpdate,
PlanListBatchChangeInfo,
PlanListBatchChangeCount,
PlanListBatchChangeLocked,
GetPlanUsedList,
SaveLockedCount
} from '@/api/api.js'
@ -865,28 +899,24 @@
const initBatchForm = () => {
batchForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
count: '',
locked_count: ''
count: ''
}))
}
initBatchForm()
const batchTotalCount = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
})
const batchTotalLocked = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.locked_count) || 0), 0)
})
const openBatchModify = () => {
if (selectedPlanArr.value.length == 0) {
ElMessage.error('请至少勾选1条记录')
return
}
initBatchForm()
// planTableData
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelValues = {} // { appointment_type_id: { count: [], locked_count: [] } }
const channelValues = {}
batchChannels.forEach(ch => {
channelValues[ch.id] = { count: [], locked_count: [] }
channelValues[ch.id] = { count: [] }
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -896,7 +926,6 @@
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
channelValues[ci.appointment_type_id].locked_count.push(ci.locked_count)
}
})
}
@ -908,8 +937,7 @@
const allSame = arr => arr.length > 0 && arr.every(v => v === arr[0])
return {
appointment_type_id: ch.id,
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : '',
locked_count: vals.locked_count.length > 0 && allSame(vals.locked_count) ? vals.locked_count[0] : ''
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : ''
}
})
batchProgress.value = 0
@ -923,17 +951,10 @@
const execBatchModify = async () => {
//
for (const item of batchForm.value) {
const count = Number(item.count)
const locked = Number(item.locked_count)
if (count < 0 || locked < 0) {
if (Number(item.count) < 0) {
ElMessage.error('数量不能为负数')
return
}
if (locked > count) {
const chName = batchChannels.find(c => c.id === item.appointment_type_id)?.name || ''
ElMessage.error(`${chName} 的占用数量不能大于数量`)
return
}
}
// 0
const allZero = batchForm.value.every(item => Number(item.count) === 0)
@ -958,12 +979,10 @@
const ids = [...selectedPlanArr.value]
const coutsInfo = batchForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0,
locked_count: Number(item.locked_count) || 0
count: Number(item.count) || 0
}))
batchModifyRunning.value = true
try {
const res = await PlanListBatchChangeInfo({
const res = await PlanListBatchChangeCount({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo
@ -982,6 +1001,104 @@
ElMessage.error('请求异常')
}
}
//
let BatchOccupyDialogVisible = ref(false)
let batchOccupyRunning = ref(false)
let batchOccupyForm = ref([])
let batchOccupyLimits = ref({}) // { [appointment_type_id]: { limited: bool, maxValue: number } }
const initBatchOccupyForm = () => {
batchOccupyForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
locked_count: ''
}))
}
initBatchOccupyForm()
const batchOccupyTotalLocked = computed(() => {
return batchOccupyForm.value.reduce((s, item) => s + (Number(item.locked_count) || 0), 0)
})
const onOccupyInput = (ci, val) => {
const ch = batchChannels[ci]
const limit = batchOccupyLimits.value[ch.id]
if (limit?.limited && Number(val) > limit.maxValue) {
batchOccupyForm.value[ci].locked_count = limit.maxValue
}
}
const openBatchOccupy = () => {
if (selectedPlanArr.value.length == 0) {
ElMessage.error('请至少勾选1条记录')
return
}
initBatchOccupyForm()
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelCounts = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelCounts[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
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)
}
})
}
}
})
// count
const limits = {}
batchChannels.forEach(ch => {
const vals = channelCounts[ch.id]
if (vals.length > 0) {
const allSame = vals.every(v => v === vals[0])
limits[ch.id] = {
limited: allSame,
maxValue: allSame ? vals[0] : null
}
} else {
limits[ch.id] = { limited: false, maxValue: null }
}
})
batchOccupyLimits.value = limits
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
const execBatchOccupy = async () => {
//
for (const item of batchOccupyForm.value) {
if (Number(item.locked_count) < 0) {
ElMessage.error('占用数量不能为负数')
return
}
}
batchOccupyRunning.value = true
const ids = [...selectedPlanArr.value]
const coutsInfo = batchOccupyForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
locked_count: Number(item.locked_count) || 0
}))
try {
const res = await PlanListBatchChangeLocked({
ids: ids,
coutsInfo: coutsInfo
})
batchOccupyRunning.value = false
if (res && res.status) {
BatchOccupyDialogVisible.value = false
ElMessage.success('批量占位完成')
GetList()
} else {
ElMessage.error(res?.msg || '批量占位失败')
batchOccupyRunning.value = false
}
} catch (e) {
batchOccupyRunning.value = false
ElMessage.error('请求异常')
}
}
let MingXiDialogVisible = ref(false);
let MingXiLoading = ref(false)
let MingXiList = ref(null);

@ -49,6 +49,7 @@
<el-button type="warning" @click="BatchDisable()" style="margin-left: 10px;">批量禁用</el-button>
<el-button type="success" @click="BatchEnable()" style="margin-left: 10px;">批量启用</el-button>
<el-button type="primary" @click="openBatchModify()" style="margin-left: 10px;">批量修改</el-button>
<el-button type="warning" @click="openBatchOccupy()" style="margin-left: 10px;">批量占位</el-button>
</el-row>
</div>
<div style="display: flex;" class="planInfo">
@ -305,25 +306,19 @@
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="4">渠道名称</el-col>
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
<el-col :span="8">占用</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="4" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="4" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
@ -332,6 +327,43 @@
<el-button type="primary" @click="execBatchModify()" :disabled="batchModifyRunning">确定修改</el-button>
</template>
</el-dialog>
<!-- 批量占位弹窗 -->
<el-dialog v-model="BatchOccupyDialogVisible" title="批量占位" width="45%" :close-on-click-modal="false">
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@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">
最大可占: {{ 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;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<el-button @click="BatchOccupyDialogVisible = false" :disabled="batchOccupyRunning">取消</el-button>
<el-button type="warning" @click="execBatchOccupy()" :disabled="batchOccupyRunning">确定占位</el-button>
</template>
</el-dialog>
<!-- 错误汇总弹窗 -->
<el-dialog v-model="BatchErrorDialogVisible" title="修改结果" width="40%">
<div>
@ -372,6 +404,8 @@
PlanListBatchEnableAdmin,
PlanDetailBatchUpdateAdmin,
PlanListBatchChangeInfoAdmin,
PlanListBatchChangeCount,
PlanListBatchChangeLocked,
GetPlanUsedList,
SaveLockedCount
} from '@/api/api.js'
@ -879,28 +913,24 @@
const initBatchForm = () => {
batchForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
count: '',
locked_count: ''
count: ''
}))
}
initBatchForm()
const batchTotalCount = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
})
const batchTotalLocked = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.locked_count) || 0), 0)
})
const openBatchModify = () => {
if (selectedPlanArr.value.length == 0) {
ElMessage.error('请至少勾选1条记录')
return
}
initBatchForm()
// planTableData
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelValues = {} // { appointment_type_id: { count: [], locked_count: [] } }
const channelValues = {}
batchChannels.forEach(ch => {
channelValues[ch.id] = { count: [], locked_count: [] }
channelValues[ch.id] = { count: [] }
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -910,7 +940,6 @@
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
channelValues[ci.appointment_type_id].locked_count.push(ci.locked_count)
}
})
}
@ -922,8 +951,7 @@
const allSame = arr => arr.length > 0 && arr.every(v => v === arr[0])
return {
appointment_type_id: ch.id,
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : '',
locked_count: vals.locked_count.length > 0 && allSame(vals.locked_count) ? vals.locked_count[0] : ''
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : ''
}
})
batchProgress.value = 0
@ -937,17 +965,10 @@
const execBatchModify = async () => {
//
for (const item of batchForm.value) {
const count = Number(item.count)
const locked = Number(item.locked_count)
if (count < 0 || locked < 0) {
if (Number(item.count) < 0) {
ElMessage.error('数量不能为负数')
return
}
if (locked > count) {
const chName = batchChannels.find(c => c.id === item.appointment_type_id)?.name || ''
ElMessage.error(`${chName} 的占用数量不能大于数量`)
return
}
}
// 0
const allZero = batchForm.value.every(item => Number(item.count) === 0)
@ -972,12 +993,10 @@
const ids = [...selectedPlanArr.value]
const coutsInfo = batchForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0,
locked_count: Number(item.locked_count) || 0
count: Number(item.count) || 0
}))
batchModifyRunning.value = true
try {
const res = await PlanListBatchChangeInfoAdmin({
const res = await PlanListBatchChangeCount({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
@ -997,6 +1016,105 @@
ElMessage.error('请求异常')
}
}
//
let BatchOccupyDialogVisible = ref(false)
let batchOccupyRunning = ref(false)
let batchOccupyForm = ref([])
let batchOccupyLimits = ref({}) // { [appointment_type_id]: { limited: bool, maxValue: number } }
const initBatchOccupyForm = () => {
batchOccupyForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
locked_count: ''
}))
}
initBatchOccupyForm()
const batchOccupyTotalLocked = computed(() => {
return batchOccupyForm.value.reduce((s, item) => s + (Number(item.locked_count) || 0), 0)
})
const onOccupyInput = (ci, val) => {
const ch = batchChannels[ci]
const limit = batchOccupyLimits.value[ch.id]
if (limit?.limited && Number(val) > limit.maxValue) {
batchOccupyForm.value[ci].locked_count = limit.maxValue
}
}
const openBatchOccupy = () => {
if (selectedPlanArr.value.length == 0) {
ElMessage.error('请至少勾选1条记录')
return
}
initBatchOccupyForm()
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelCounts = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelCounts[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
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)
}
})
}
}
})
// count
const limits = {}
batchChannels.forEach(ch => {
const vals = channelCounts[ch.id]
if (vals.length > 0) {
const allSame = vals.every(v => v === vals[0])
limits[ch.id] = {
limited: allSame,
maxValue: allSame ? vals[0] : null
}
} else {
limits[ch.id] = { limited: false, maxValue: null }
}
})
batchOccupyLimits.value = limits
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
const execBatchOccupy = async () => {
//
for (const item of batchOccupyForm.value) {
if (Number(item.locked_count) < 0) {
ElMessage.error('占用数量不能为负数')
return
}
}
batchOccupyRunning.value = true
const ids = [...selectedPlanArr.value]
const coutsInfo = batchOccupyForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
locked_count: Number(item.locked_count) || 0
}))
try {
const res = await PlanListBatchChangeLocked({
ids: ids,
coutsInfo: coutsInfo,
department_id: searchInfo.value.department_id
})
batchOccupyRunning.value = false
if (res && res.status) {
BatchOccupyDialogVisible.value = false
ElMessage.success('批量占位完成')
GetList()
} else {
ElMessage.error(res?.msg || '批量占位失败')
batchOccupyRunning.value = false
}
} catch (e) {
batchOccupyRunning.value = false
ElMessage.error('请求异常')
}
}
let MingXiDialogVisible = ref(false);
let MingXiLoading = ref(false)
let MingXiList = ref(null);

@ -94,7 +94,6 @@
<el-button type="warning" @click="openIframe(2)"></el-button>
<el-button type="primary" @click="SignInFunc()" style="margin-left: 40px;">报到</el-button>
<el-button v-if="false" type="danger" @click="CancelSignFunc()"></el-button>
<el-button style="display: none;" ref="print_shenqingdan_button" v-print="'#shenqingdan'"></el-button>
<el-button @click="print_shenqingdan()"></el-button>
<el-button v-if="false" v-print="'#tablelist'" >打印表格</el-button>
@ -225,67 +224,11 @@
</div>
</el-dialog>
<div id="shenqingdan" v-show="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<!-- <div>
<div style="width: 100%;text-align: center;font-size: 22px;">秦皇岛市中医医院</div>
<div style="width: 100%;text-align: center;font-size: 18px;font-weight: bold;">检查预约回执单</div>
<div style="width:200px;height:50px;-webkit-print-color-adjust: exact; position: absolute;right: 10px;top:0px;">
<div style="display: flex;justify-content: center;" v-html="item.maininfo.barcode" ></div>
<div style="text-align: center">{{item.maininfo.app_num}}</div>
</div>
</div>
<div style="border-top: 1px solid #333; border-bottom: 1px solid #333;padding-left: 4px;">
<table style="border: none;font-size: 16px; width: 100%;">
<tr style="border: none;">
<td style="border: none; text-align: left;">姓名{{item.maininfo.user_name}}</td>
<td style="border: none; text-align: left;">性别{{item.maininfo.user_sex_label}}</td>
<td style="border: none; text-align: left;">年龄{{item.maininfo.age}}</td>
<td style="border: none; text-align: left;">病人类型{{item.maininfo.patient_type_label}}</td>
</tr>
<tr style="border: none;">
<td style="border: none; text-align: left;">{{item.maininfo.patient_type_label}}{{item.maininfo.reg_num}}</td>
<td style="border: none; text-align: left;">病区{{item.maininfo.warddesc ?? ''}}</td>
<td style="border: none; text-align: left;">床号{{item.maininfo.bedno ?? ''}}</td>
<td style="border: none; text-align: left;">联系电话{{item.maininfo.user_phone}}</td>
</tr>
</table>
</div>
<div style="border-bottom: 1px solid #333;font-size: 18px;padding-left: 8px;">
<div>检查项目{{item.maininfo.entrust}}</div>
<div>预约时间{{item.maininfo.reservation_date}} {{item.maininfo.period_begin_time.substring(0, 5)}}-{{item.maininfo.period_end_time.substring(0, 5)}} {{item.maininfo.weekday_label}}</div>
<div>检查地点{{item.maininfo.department_resources?.department_resources_name}}</div>
</div>
<div style="padding-left: 4px;">
<table style="border: none;">
<tr style="border: none;">
<td style="width: 15%;border: none;font-size: 18px;font-weight: 700;text-align: left;">温馨提示</td>
<td style="text-align: left;border: none;font-size: 16px;">
<div>1预约后请您及时缴费门诊患者预约成功后60分钟内不缴费系统会自动取消您的预约申请自动取消后如需继续预约请到相关检查科室重新预约</div>
<div>2预约时间为8点~10点的请8点到登记处签到预约时间为10点~12点的请10点前到登记处签到便于工作人员进行检查评估和准备</div>
<div>3预约时间不是实际检查时间以现场登记后排队号为准</div>
</td>
</tr>
</table>
</div>
<div style="border-top: 1px solid #333;padding-left: 8px;">
<div style="font-size: 18px;font-weight: 700;">检查须知</div>
<div style="font-size: 16px;">
腹部检查禁食4小时腹部盆腔泌尿系统检查请尽量饮水充盈肠道及膀胱危重病人需由家属陪同孕妇及婴幼儿请慎行检查
</div>
</div>
<div style="text-align: right; border-top: 1px solid #333; font-size: 16px;">
申请时间2025-05-01
</div> -->
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
<el-dialog v-model="TiShiShow" title="提示" width="40%" >
<div v-for="(item,index) in successItem" :key="index" style="font-size:16px;">
<table style="margin-top: -30px;">
<tr><td colspan="2" style="font-weight: 700; font-size: 18px;color:#4b6493">{{item.entrust}}<el-tag type="success" size="large">预约成功</el-tag></td></tr>
<tr><td colspan="2" style="font-weight: 700; font-size: 18px;color:#4b6493">{{item.entrus }}<el-tag type="success" size="large">预约成功</el-tag></td></tr>
<tr><td style="font-weight: 700;">体检号</td><td>{{item.signInData[0].checkNo}}</td></tr>
<tr><td style="font-weight: 700;">排队号</td><td>{{item.signInData[0].queueNo}}</td></tr>
<tr><td style="font-weight: 700;">等待人数</td><td>{{item.signInData[0].currentNum}}</td></tr>
@ -323,7 +266,6 @@
ElMessage,
ElMessageBox
} from 'element-plus'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
import YuYue202506 from '@/components/Yewu/YuYue202506.vue'
let pinia = usePinia()
@ -333,7 +275,6 @@
let YuYueVueDialogVisible=ref(false);
let YuYueKey=ref(0);
let AutoGroup=ref(true);//
let shenqingdan_show=ref(false);
let do_type = ref(0) //12
let loading = ref(false)
let entrust_ids=ref('')
@ -602,7 +543,7 @@
let next = true
tableSelected.value.forEach((v) => {
if (v.list_status != 1) {
ElMessage.error(`${v.entrust} 无需取消`)
ElMessage.error(`${v.entrus } 无需取消`)
next = false
}
})
@ -734,46 +675,31 @@
//
let print_shenqingdan_button=ref(null);
let shenqingdan_list=ref([])
const print_shenqingdan=()=>{
if(tableSelected.value.length !==1){
ElMessage.error('请选择1项进行打印')
return false
}
getMainDetail({
regnum: tableSelected.value[0].reg_num,
entrustid: tableSelected.value[0].entrust_id,
episodeid: tableSelected.value[0].episodeid,
appointment_type:4
}).then(res => {
if (res.status) {
let enable=true
shenqingdan_list.value=res.data.info
shenqingdan_list.value.forEach((v,i)=>{
if(v.maininfo.list_status!=1){
ElMessage.error(v.maininfo.entrust+" 不可打印,请重新选择")
enable=false
}
})
if(enable){
shenqingdan_show.value=true
nextTick(function(){
print_shenqingdan_button.value.$el.click()
setTimeout(function(){
shenqingdan_show.value=false
},200)
})
return
}
}else{
ElMessage.error(res.msg)
const row = tableSelected.value[0]
if (row.list_status != 1) {
ElMessage.error(row.entrust + ' 不可打印,请重新选择')
return
}
const params = 'OrderNoList[]=' + row.entrust_id
const url = import.meta.env.VITE_APP_API + 'GetCheckPdf?Dev=1&Type=single&' + params
fetch(url)
.then(res => res.blob())
.then(blob => {
const blobUrl = URL.createObjectURL(blob)
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = blobUrl
iframe.onload = () => {
iframe.contentWindow.print()
URL.revokeObjectURL(blobUrl)
}
document.body.appendChild(iframe)
})
}
const closeYuYueDialog=()=>{
GetList()

@ -98,7 +98,6 @@
<el-button type="danger" @click="cancel()"></el-button>
<el-button type="warning" @click="openIframe(2)"></el-button>
<el-button type="primary" @click="SignInFunc()" style="margin-left: 40px;">报到</el-button>
<el-button style="display: none;" ref="print_shenqingdan_button" v-print="'#shenqingdan'"></el-button>
<el-button @click="print_shenqingdan()"></el-button>
</el-row>
@ -225,11 +224,6 @@
</div>
</el-dialog>
<div id="shenqingdan" v-show="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
<el-dialog v-model="TiShiShow" title="提示" width="40%" >
<div v-for="(item,index) in successItem" :key="index" style="font-size:16px;">
@ -275,7 +269,6 @@
ElMessage,
ElMessageBox
} from 'element-plus'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
import YuYue202506 from '@/components/Yewu/YuYue202506.vue'
let pinia = usePinia()
@ -283,7 +276,6 @@
let YuYueVueDialogVisible=ref(false);
let YuYueKey=ref(0);
let AutoGroup=ref(true);
let shenqingdan_show=ref(false);
let do_type = ref(0)
let loading = ref(false)
let entrust_ids=ref('')
@ -671,42 +663,30 @@
LogDataJson.value = data
}
let loginUserinfo=ref(null);
let print_shenqingdan_button=ref(null);
let shenqingdan_list=ref([])
const print_shenqingdan=()=>{
if(tableSelected.value.length !==1){
ElMessage.error('请选择1项进行打印')
return false
}
getMainDetail({
regnum: tableSelected.value[0].reg_num,
entrustid: tableSelected.value[0].entrust_id,
episodeid: tableSelected.value[0].episodeid,
appointment_type:4
}).then(res => {
if (res.status) {
let enable=true
shenqingdan_list.value=res.data.info
shenqingdan_list.value.forEach((v,i)=>{
if(v.maininfo.list_status!=1){
ElMessage.error(v.maininfo.entrust+" 不可打印,请重新选择")
enable=false
}
})
if(enable){
shenqingdan_show.value=true
nextTick(function(){
print_shenqingdan_button.value.$el.click()
setTimeout(function(){
shenqingdan_show.value=false
},200)
})
return
}
}else{
ElMessage.error(res.msg)
const row = tableSelected.value[0]
if (row.list_status != 1) {
ElMessage.error(row.entrust + ' 不可打印,请重新选择')
return
}
const params = 'OrderNoList[]=' + row.entrust_id
const url = import.meta.env.VITE_APP_API + 'GetCheckPdf?Dev=1&Type=single&' + params
fetch(url)
.then(res => res.blob())
.then(blob => {
const blobUrl = URL.createObjectURL(blob)
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = blobUrl
iframe.onload = () => {
iframe.contentWindow.print()
URL.revokeObjectURL(blobUrl)
}
document.body.appendChild(iframe)
})
}
const closeYuYueDialog=()=>{

@ -41,8 +41,6 @@
<el-button type="warning" @click="openYuYue(2)"></el-button>
<!-- <el-button type="primary" @click="SignInFunc()" style="margin-left: 40px;">报到</el-button>
<el-button type="danger" @click="CancelSignFunc()"></el-button> -->
<el-button style="display: none;" ref="print_shenqingdan_button"
v-print="'#shenqingdan'">打印申请单隐藏按钮</el-button>
<el-button @click="print_shenqingdan()"></el-button>
<el-button v-print="'#tablelist'"></el-button>
@ -150,62 +148,6 @@
{{LogDataJson}}
</div>
</el-dialog>
<div id="shenqingdan" v-show="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<!-- <div>
<div style="width: 100%;text-align: center;font-size: 22px;">秦皇岛市中医医院</div>
<div style="width: 100%;text-align: center;font-size: 18px;font-weight: bold;">检查预约回执单</div>
<div style="width:200px;height:50px;-webkit-print-color-adjust: exact; position: absolute;right: 10px;top:0px;">
<div style="display: flex;justify-content: center;" v-html="item.maininfo.barcode" ></div>
<div style="text-align: center">{{item.maininfo.app_num}}</div>
</div>
</div>
<div style="border-top: 1px solid #333; border-bottom: 1px solid #333;padding-left: 4px;">
<table style="border: none;font-size: 16px; width: 100%;">
<tr style="border: none;">
<td style="border: none; text-align: left;">姓名{{item.maininfo.user_name}}</td>
<td style="border: none; text-align: left;">性别{{item.maininfo.user_sex_label}}</td>
<td style="border: none; text-align: left;">年龄{{item.maininfo.age}}</td>
<td style="border: none; text-align: left;">病人类型{{item.maininfo.patient_type_label}}</td>
</tr>
<tr style="border: none;">
<td style="border: none; text-align: left;">{{item.maininfo.patient_type_label}}{{item.maininfo.reg_num}}</td>
<td style="border: none; text-align: left;">病区{{item.maininfo.warddesc ?? ''}}</td>
<td style="border: none; text-align: left;">床号{{item.maininfo.bedno ?? ''}}</td>
<td style="border: none; text-align: left;">联系电话{{item.maininfo.user_phone}}</td>
</tr>
</table>
</div>
<div style="border-bottom: 1px solid #333;font-size: 18px;padding-left: 8px;">
<div>检查项目{{item.maininfo.entrust}}</div>
<div>预约时间{{item.maininfo.reservation_date}} {{item.maininfo.period_begin_time.substring(0, 5)}}-{{item.maininfo.period_end_time.substring(0, 5)}} {{item.maininfo.weekday_label}}</div>
<div>检查地点{{item.maininfo.department_resources?.department_resources_name}}</div>
</div>
<div style="padding-left: 4px;">
<table style="border: none;">
<tr style="border: none;">
<td style="width: 15%;border: none;font-size: 18px;font-weight: 700;text-align: left;">温馨提示</td>
<td style="text-align: left;border: none;font-size: 16px;">
<div>1预约后请您及时缴费门诊患者预约成功后60分钟内不缴费系统会自动取消您的预约申请自动取消后如需继续预约请到相关检查科室重新预约</div>
<div>2预约时间为8点~10点的请8点到登记处签到预约时间为10点~12点的请10点前到登记处签到便于工作人员进行检查评估和准备</div>
<div>3预约时间不是实际检查时间以现场登记后排队号为准</div>
</td>
</tr>
</table>
</div>
<div style="border-top: 1px solid #333;padding-left: 8px;">
<div style="font-size: 18px;font-weight: 700;">检查须知</div>
<div style="font-size: 16px;">
腹部检查禁食4小时腹部盆腔泌尿系统检查请尽量饮水充盈肠道及膀胱危重病人需由家属陪同孕妇及婴幼儿请慎行检查
</div>
</div>
<div style="text-align: right; border-top: 1px solid #333; font-size: 16px;">
申请时间2025-05-01
</div> -->
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
</div>
</template>
@ -220,7 +162,6 @@
ElMessageBox
} from 'element-plus'
import YuYue from '@/components/Yewu/YuYue.vue'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
import {
GetMainList,
CancelYuYue,
@ -245,7 +186,6 @@
let tableref = ref(null)
let tableSelected = ref([]);
let Is_AutoDuoRen = ref([]); //
let shenqingdan_show = ref(false);
const PageSizeChange = (e) => { //
pageSize.value = e
GetList()
@ -576,48 +516,32 @@
LogDataJson.value = data
}
//
let print_shenqingdan_button = ref(null);
let shenqingdan_list = ref([])
const print_shenqingdan = () => {
if (tableSelected.value.length !== 1) {
ElMessage.error('请选择1项进行打印')
return false
}
getMainDetail({
regnum: tableSelected.value[0].reg_num,
entrustid: tableSelected.value[0].entrust_id,
episodeid: tableSelected.value[0].episodeid,
appointment_type: 4
}).then(res => {
if (res.status) {
let enable = true
shenqingdan_list.value = res.data.info
shenqingdan_list.value.forEach((v, i) => {
if (v.maininfo.list_status != 1) {
ElMessage.error(v.maininfo.entrust + " 不可打印,请重新选择")
enable = false
}
})
if (enable) {
shenqingdan_show.value = true
nextTick(function() {
print_shenqingdan_button.value.$el.click()
setTimeout(function() {
shenqingdan_show.value = false
}, 200)
})
}
} else {
ElMessage.error(res.msg)
}
return
}
const row = tableSelected.value[0]
if (row.list_status != 1) {
ElMessage.error(row.entrust + ' 不可打印,请重新选择')
return
}
const params = 'OrderNoList[]=' + row.entrust_id
const url = import.meta.env.VITE_APP_API + 'GetCheckPdf?Dev=1&Type=single&' + params
fetch(url)
.then(res => res.blob())
.then(blob => {
const blobUrl = URL.createObjectURL(blob)
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = blobUrl
iframe.onload = () => {
iframe.contentWindow.print()
URL.revokeObjectURL(blobUrl)
}
document.body.appendChild(iframe)
})
}
const getStorageData = () => {
if (sessionStorage.getItem("LoginUserInfo")) {
loginUserinfo.value = JSON.parse(sessionStorage.getItem("LoginUserInfo"))
}
}
onMounted(() => {
loginType.value = sessionStorage.getItem('LoginType')
if (pinia.baseInfoStatus) {

Loading…
Cancel
Save