新版预约

main
yanzai 5 months ago
parent 813b47c930
commit 0c65bce7b6

@ -89,6 +89,8 @@ class EntrustController extends Controller
->get();
if (count($info)===0) return \Yz::echoError1('登记号'.$entrustInfo['reg_num'].'没有找到对应医嘱信息');
$mainInfo=$info[0];
$itemInfo=[];
foreach ($info as $value){
@ -96,6 +98,33 @@ class EntrustController extends Controller
->leftJoin('s_check_item_device as b','a.id','=','b.item_id')
->where(['a.item_code' => $value->entrust_code,'a.status'=>1,"a.is_del"=>0])->first();
$source=null;
if(!empty($value->reservation_sources)){
$source=DB::table('s_department_resources')->where(['id'=>$value->reservation_sources])->first();
}
$value->department_resources=$source;
$value->user_sex_label='';
if($value->user_sex==1){
$value->user_sex_label='男';
}
if($value->user_sex==2){
$value->user_sex_label='女';
}
$value->age=\Tools::getAgeFromBirthday($value->user_brithday);
//患者类型
$p_type=config('app.globals.患者类型');
$value->patient_type_label=$p_type[$value->patient_type] ?? '';
//星期
$value->weekday_label=\Tools::GetWeekName($value->reservation_date);
$generator = new \Picqer\Barcode\BarcodeGeneratorHTML();
$tiaoma= $generator->getBarcode($value->app_num, $generator::TYPE_CODE_128, 2, 40);
$updatedHtml = preg_replace('/background-color:\s*black\s*;/i', 'background-color: black !important;', $tiaoma);
$value->barcode=$updatedHtml;
$msg='';
if(!$ii){
$msg="检查项目不可用";

@ -54,6 +54,7 @@ class WorkMainController extends Controller
$value->weekday_label=\Tools::GetWeekName($value->reservation_date);
$msg='';
if(count($ii)==0){
$msg="检查项目不可用";
}
@ -260,7 +261,7 @@ class WorkMainController extends Controller
$entrustTime=[$value->reservation_date.' '.$value->period_begin_time,$value->reservation_date.' '.$value->period_end_time];
$planTime=[$plan->date.' '.$plan->begin_time,$plan->date.' '.$plan->end_time];
if ($entrustTime[0] <= $planTime[1] && $planTime[0] <= $entrustTime[1]) {
return \Yz::echoError1('当前时段存在待检项目:'.$value->entrust.'时间:'.$value->reservation_date.' '.substr($value->period_begin_time, 0, 5).'-'.substr($value->period_end_time, 0, 5).' 请确认是否继续预约');
return \Yz::echoError1('当前时段存在待检项目:'.$value->entrust.'时间:'.$value->reservation_date.' '.substr($value->period_begin_time, 0, 5).'-'.substr($value->period_end_time, 0, 5).' 请确认是否继续预约');
}
}
}

@ -8,27 +8,63 @@ use Illuminate\Support\Facades\DB;
class CheckItemController extends Controller
{
public function UpdateItemClass()
{
$data = [
'consTypeId' => 'EXAMSHEETTYPE'
];
$His = new HisController();
$res = $His::Get("查询所有检查项目分类", $data);
$success_count=0;
if ($res['code'] == 200) {
$res_data = $res['data'];
foreach ($res_data as $data_k => $data_v) {
$type= DB::table('s_check_item_class')->where(['consInfoCode' => $data_v['consInfoCode']])->first();
$data=[
'item_class_name'=> $data_v['consInfoName'],
'pid'=> 1,
'CTC_Code'=> $data_v['consInfoName'],
'CTC_Desc'=> $data_v['consInfoName'],
'CTC_Status'=> 1,
'consInfoCode'=> $data_v['consInfoCode'],
];
if(!!$type){
$u= DB::table('s_check_item_class')->where(['id'=>$type->id])->update([
'item_class_name'=> $data_v['consInfoName'],
'CTC_Code'=> $data_v['consInfoName'],
'CTC_Desc'=> $data_v['consInfoName'],
]);
}else{
$u= DB::table('s_check_item_class')->insert($data);
}
if($u) $success_count++;
}
}
return \Yz::JsonReturn(true,"更新完成",['success_count'=>$success_count]);
}
public function UpdateCheckItem(){
$url='http://192.168.80.39:7801/roc/order-service/api/v1/order/order-term/undrug/query';
$termClassId = request('termClassId');
if(!isset($termClassId)){
return \Yz::echoError1('类别id不能为空');
}
$data=[];
$where=[];
if($termClassId<>'all'){
if($termClassId<>'all'){ //155为检查项目 不要使用all
$data=[
'termClassId' => $termClassId,
];
$where=['termClassId'=>$termClassId];
}
$res=\Tools::Get($url,$data,'更新检查项目');
$His = new HisController();
$res = $His::Get("查询非药品列表", $data);
if($res['code']==200){
$res_data=$res['data'];
if(isset($res_data['list']) and !empty($res_data['list'])){
$db_data=DB::table('s_check_item')->where($where)->get();//库里的数据
$db_data=DB::table('s_check_item')->get();//库里的数据
//根据 接收数据的undrugId和库里的item_code进行比对如果库里存在则更新如果库里没有则添加如果库里有但是接收数据里没有则在库里标记is_del=0
$db_map = [];
foreach ($db_data as $db_item) {
@ -45,27 +81,53 @@ class CheckItemController extends Controller
// 添加到接收 ID 列表
$received_ids[] = $item_code;
$item_class_id=null;
$class_type= DB::table('s_check_item_class')->where(['consInfoCode'=>$item['sheetType']])->first();
if($class_type and !empty($item['sheetType'])){
$item_class_id=$class_type->id;
}
$department_arr=[];
//优先取默认科室如果存在默认则忽略范围科室。2025-06-24 与叶工微信群沟通
if(isset($item['defaultExecDepts']) and !empty($item['defaultExecDepts'])){
$department_arr=[$item['defaultExecDepts']];
}else{
if(isset($item['execDepts']) and !empty($item['execDepts'])){
foreach ($item['execDepts'] as $dept) {
$department_arr[]=$dept['code'];
}
}
}
// 快速查找是否已存在该 item_code
if (isset($db_map[$item_code])) {
// 存在则更新
DB::table('s_check_item')
->where('item_code', $item_code)
->update([
'termClassId'=>$item['termClassId'],
'item_class_id'=>$item_class_id,
'sheetType'=>$item['sheetType'],
'item_name' => $item_name,
'item_desc' => $item_name,
'is_del' => 0, // 取消删除标记
'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE),
]);
} else {
// 不存在则插入新记录
DB::table('s_check_item')->insert([
'termClassId'=>$item['termClassId'],
'item_class_id'=>$item_class_id,
'sheetType'=>$item['sheetType'],
'item_code' => $item_code,
'item_name' => $item_name,
'item_desc' => $item_name,
'reservation_method' =>'0,1,2,3,4',
'limosis' =>0,
'check_time' =>0,
'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE),
]);
$this->updateBindDrivers($item_code,$department_arr);
}
}
// 处理数据库中存在但远程没有返回的数据,标记为删除
@ -87,4 +149,33 @@ class CheckItemController extends Controller
return \Yz::echoError1('更新失败');
}
}
//绑定设备
public function updateBindDrivers($item_code,$department_arr)
{
$iteminfo=DB::table('s_check_item')->where('item_code',$item_code)->first();
$departments = DB::table('s_department')->whereIn('department_number',$department_arr)->get();
$department_ids=[];
foreach ($departments as $department) {
$department_ids[]=$department->id;
}
if(count($department_ids)>0 and !!$iteminfo){
$devices=DB::table('s_department_resources_device')->whereIn('department_id',$department_ids)->pluck('device_id')->toArray();
//删除库里项目和设备绑定关系
DB::table('s_check_item_device')->where(['item_id'=>$iteminfo->id])->whereIn('device_id',$devices)->delete();
$data=[];
foreach ($devices as $device) {
$data[]=[
'item_id' => $iteminfo->id,
'device_id' => $device,
];
}
if(count($devices)>0 and !!$iteminfo){
//插入表
DB::table('s_check_item_device')->insert($data);
}
}
}
}

@ -15,13 +15,13 @@ class HisController extends Controller
{
public static $request;
public static $baseUrl = 'http://192.168.80.39:7801';
public static function Api($url_code)
{
$api['查询检查申请单'] = "/roc/order-service/api/v1/apply/pacs/apply/create/query";
$api['查询科室列表'] = "/roc/curr-web/api/v1/common/dept/query";
$api['查询人员列表'] = "/roc/curr-web/api/v1/common/employee/query";
$api['查询非药品物价项目列表'] = "/roc/curr-web/api/v1/curr/unpharmaceutical/undrug/eisaiOrDiagnose/query";
$api['查询非药品列表'] = "/roc/order-service/api/v1/order/order-term/undrug/query";
$api['查询所有检查项目分类'] = "/roc/order-service/api/v1/order/order-term/dawn-code/query?consTypeId=EXAMSHEETTYPE";
return $api["{$url_code}"] ?? $url_code;
}
@ -32,7 +32,10 @@ class HisController extends Controller
self::RequestLog(self::$baseUrl . $url_address, $data, $url_code, 'Roc接口');
$response = Http::withHeaders([])->get(self::$baseUrl . $url_address, $data);
$response = Http::withHeaders([
'Domain' => 'QhdLK_YYGL',
'Key' => 'f7ed8036-b7a1-41ec-80f6-0e180efba1f4'
])->get(self::$baseUrl . $url_address, $data);
// dd(self::BuildAuthorization($nonce, $timestamp, $base64Signature));
if ($response->successful()) {

@ -73,7 +73,18 @@ class PlanListService
$placeholders = implode(',', array_fill(0, count($commonDevice), '?'));
$appointment_types_placeholders = implode(',', array_fill(0, count($appointment_types), '?'));
$canshu = array_merge($commonDevice, [$department_id->id, $appointment_date], $appointment_types);
//如果日期为字符串 则转为数组
$appointment_date_arr=[];
if(is_array($appointment_date)){
$appointment_date_arr=$appointment_date;
$appointment_date=implode(',', $appointment_date);
}else{
$appointment_date_arr=[$appointment_date];
}
$appointment_dates_placeholders = implode(',', array_fill(0, count($appointment_date_arr), '?'));
$canshu = array_merge($commonDevice, [$department_id->id], $appointment_date_arr, $appointment_types);
$plan = DB::select("SELECT
a.*,
dd.devices,
@ -99,7 +110,7 @@ FROM
) AS dd ON a.id = dd.roster_detail_id
WHERE
a.department_id = ?
AND a.date = ?
AND a.date IN ($appointment_dates_placeholders)
AND a.STATUS = 1
AND a.is_del = 0
AND b.is_del = 0

@ -123,6 +123,7 @@ Route::group(['middleware'=>['log']],function () {
Route::post('admin/AutoYuYue','App\Http\Controllers\API\Admin\YeWu\PlanListController@AutoYuYue');//自动预约
Route::post('admin/updateCheckItem','App\Http\Controllers\API\His\CheckItemController@UpdateCheckItem');//调用his更新检查项目
Route::post('admin/UpdateItemClass','App\Http\Controllers\API\His\CheckItemController@UpdateItemClass');//调用his更新检查项目分类
Route::post('admin/HisGetDepartmentList','App\Http\Controllers\API\His\DepartmentController@GetDepartmentList');//获取his科室列表
Route::post('admin/HisGetUserList','App\Http\Controllers\API\His\UserController@GetUserList');//获取his用户列表
});

@ -31,7 +31,8 @@ Route::get('/test','App\Http\Controllers\TestController@DBtest' );
//his跳到此路由再跳转到对应的系统页面
Route::get('/yiji', function (Request $request) {
$queryString = $request->server('QUERY_STRING'); // 获取原始查询字符串
return redirect("http://192.168.80.76/jq_page/appointment.html?".$queryString);
//return redirect("http://192.168.80.76/jq_page/appointment.html?".$queryString);
return redirect("http://192.168.80.76/admin/#/doctorappointment?".$queryString);
});
//cas 登录

@ -16,6 +16,7 @@
"pinia": "^2.1.6",
"qrcode": "^1.5.3",
"s": "^1.0.0",
"scss": "^0.2.4",
"vue": "^3.3.4",
"vue-router": "^4.2.4",
"vue3-print-nb": "^0.1.4"
@ -27,6 +28,7 @@
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"prettier": "^3.0.3",
"sass": "^1.89.2",
"vite": "^4.4.9"
}
},
@ -569,6 +571,302 @@
"node": ">= 8"
}
},
"node_modules/@parcel/watcher": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz",
"integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"dependencies": {
"detect-libc": "^1.0.3",
"is-glob": "^4.0.3",
"micromatch": "^4.0.5",
"node-addon-api": "^7.0.0"
},
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"optionalDependencies": {
"@parcel/watcher-android-arm64": "2.5.1",
"@parcel/watcher-darwin-arm64": "2.5.1",
"@parcel/watcher-darwin-x64": "2.5.1",
"@parcel/watcher-freebsd-x64": "2.5.1",
"@parcel/watcher-linux-arm-glibc": "2.5.1",
"@parcel/watcher-linux-arm-musl": "2.5.1",
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
"@parcel/watcher-linux-arm64-musl": "2.5.1",
"@parcel/watcher-linux-x64-glibc": "2.5.1",
"@parcel/watcher-linux-x64-musl": "2.5.1",
"@parcel/watcher-win32-arm64": "2.5.1",
"@parcel/watcher-win32-ia32": "2.5.1",
"@parcel/watcher-win32-x64": "2.5.1"
}
},
"node_modules/@parcel/watcher-android-arm64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz",
"integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-darwin-arm64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz",
"integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-darwin-x64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz",
"integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-freebsd-x64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz",
"integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm-glibc": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz",
"integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm-musl": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz",
"integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm64-glibc": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz",
"integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm64-musl": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz",
"integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-x64-glibc": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz",
"integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-x64-musl": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz",
"integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-arm64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz",
"integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-ia32": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz",
"integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-x64": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz",
"integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@pkgr/utils": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz",
@ -1028,6 +1326,21 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chokidar": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
"dev": true,
"dependencies": {
"readdirp": "^4.0.1"
},
"engines": {
"node": ">= 14.16.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@ -1192,6 +1505,19 @@
"node": ">=0.4.0"
}
},
"node_modules/detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
"dev": true,
"optional": true,
"bin": {
"detect-libc": "bin/detect-libc.js"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/dijkstrajs": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
@ -1904,6 +2230,12 @@
"node": ">= 4"
}
},
"node_modules/immutable": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz",
"integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==",
"dev": true
},
"node_modules/import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@ -2291,6 +2623,13 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true
},
"node_modules/node-addon-api": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
"dev": true,
"optional": true
},
"node_modules/normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
@ -2335,6 +2674,14 @@
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
"node_modules/ometa": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/ometa/-/ometa-0.2.2.tgz",
"integrity": "sha512-LZuoK/yjU3FvrxPjUXUlZ1bavCfBPqauA7fsNdwi+AVhRdyk2IzgP3JRnevvjzQ6fKHdUw8YISshf53FmpHrng==",
"engines": {
"node": ">= 0.2.0"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -2672,6 +3019,19 @@
}
]
},
"node_modules/readdirp": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
"dev": true,
"engines": {
"node": ">= 14.18.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@ -2870,6 +3230,37 @@
"node": ">=0.8"
}
},
"node_modules/sass": {
"version": "1.89.2",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.89.2.tgz",
"integrity": "sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==",
"dev": true,
"dependencies": {
"chokidar": "^4.0.0",
"immutable": "^5.0.2",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=14.0.0"
},
"optionalDependencies": {
"@parcel/watcher": "^2.4.1"
}
},
"node_modules/scss": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/scss/-/scss-0.2.4.tgz",
"integrity": "sha512-4u8V87F+Q/upVhUmhPnB4C1R11xojkRkWjExL2v0CX2EXTg18VrKd+9JWoeyCp2VEMdSpJsyAvVU+rVjogh51A==",
"dependencies": {
"ometa": "0.2.2"
},
"engines": {
"node": ">= 0.2.0"
}
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",

@ -18,6 +18,7 @@
"pinia": "^2.1.6",
"qrcode": "^1.5.3",
"s": "^1.0.0",
"scss": "^0.2.4",
"vue": "^3.3.4",
"vue-router": "^4.2.4",
"vue3-print-nb": "^0.1.4"
@ -29,6 +30,7 @@
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"prettier": "^3.0.3",
"sass": "^1.89.2",
"vite": "^4.4.9"
}
}

@ -297,7 +297,9 @@ export const GetLoglist = (data = {}) => {
export const CheckEntrstItemGroup = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/CheckEntrstItemGroup', data: data })
}
export const CheckEntrstItemGroup2 = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'admin/CheckEntrstItemGroup', data: data })
}
//查询医嘱详情
export const getMainDetail = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'admin/getMainDetail', data: data })

@ -0,0 +1,87 @@
<template>
<div class="PrintShenQingDan">
<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="printInfo.barcode"></div>
<div style="text-align: center">{{printInfo.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;">姓名{{printInfo.user_name}}</td>
<td style="border: none; text-align: left;">性别{{printInfo.user_sex_label}}</td>
<td style="border: none; text-align: left;">年龄{{printInfo.age}}</td>
<td style="border: none; text-align: left;">病人类型{{printInfo.patient_type_label}}</td>
</tr>
<tr style="border: none;">
<td style="border: none; text-align: left;">
{{printInfo.patient_type_label}}{{printInfo.reg_num}}
</td>
<td style="border: none; text-align: left;">病区{{printInfo.warddesc ?? ''}}</td>
<td style="border: none; text-align: left;">床号{{printInfo.bedno ?? ''}}</td>
<td style="border: none; text-align: left;">联系电话{{printInfo.user_phone}}</td>
</tr>
</table>
</div>
<div style="border-bottom: 1px solid #333;font-size: 18px;padding-left: 8px;">
<div>检查项目{{printInfo.entrust}}</div>
<div>预约时间{{printInfo.reservation_date}}
{{printInfo.period_begin_time.substring(0, 5)}}-{{printInfo.period_end_time.substring(0, 5)}}
{{printInfo.weekday_label}}
</div>
<div>检查地点{{printInfo.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>
</div>
</template>
<script setup>
import {
ref,
onMounted,watch
} from 'vue'
import {
GetEnableDepartmentList,
SaveDepartmentResource
} from '@/api/api.js'
import {
ElMessage
} from 'element-plus'
const props = defineProps({
printInfo: {
type:Object
},
})
</script>
<style scoped>
.PrintShenQingDan {
height: 100vh;
}
</style>

@ -170,11 +170,58 @@
<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;">
<div style="width: 100%;text-align: center;font-size: 14px;">演示医院</div>
<div style="width: 100%;text-align: center;font-size: 18px;font-weight: bold;">检查申请单</div>
<div style="width: 100%; border: 1px solid #ccc;padding: 20px;">
<div>检查项目{{item.entrust.entrust}}</div>
<!-- <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.entrust.barcode" ></div>
<div style="text-align: center">{{item.entrust.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.entrust.user_name}}</td>
<td style="border: none; text-align: left;">性别{{item.entrust.user_sex_label}}</td>
<td style="border: none; text-align: left;">年龄{{item.entrust.age}}</td>
<td style="border: none; text-align: left;">病人类型{{item.entrust.patient_type_label}}</td>
</tr>
<tr style="border: none;">
<td style="border: none; text-align: left;">{{item.entrust.patient_type_label}}{{item.entrust.reg_num}}</td>
<td style="border: none; text-align: left;">病区{{item.entrust.warddesc ?? ''}}</td>
<td style="border: none; text-align: left;">床号{{item.entrust.bedno ?? ''}}</td>
<td style="border: none; text-align: left;">联系电话{{item.entrust.user_phone}}</td>
</tr>
</table>
</div>
<div style="border-bottom: 1px solid #333;font-size: 18px;padding-left: 8px;">
<div>检查项目{{item.entrust.entrust}}</div>
<div>预约时间{{item.entrust.reservation_date}} {{item.entrust.period_begin_time.substring(0, 5)}}-{{item.entrust.period_end_time.substring(0, 5)}} {{item.entrust.weekday_label}}</div>
<div>检查地点{{item.entrust.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.entrust"></ShenQingDan>
</div>
</div>
</div>
@ -202,6 +249,7 @@
DoctorCancelYuYue,
GetPlanUsedList
} from '@/api/api.js'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
const props = defineProps({
YuYueInfo: {
type: Object

@ -0,0 +1,787 @@
<template>
<div class="YuYue202506">
<div class="patientInfo" v-if="patientInfo">
<span class="name">{{patientInfo.user_name}}</span>{{patientInfo.user_sex_label}} {{patientInfo.age}}
登记号<span class="value">{{patientInfo.reg_num}} </span> 电话<span
class="value">{{patientInfo.user_phone}}</span>
</div>
<div v-else>
获取患者信息失败
</div>
<div class="entrustList">
<el-table :data="entrustTableDate" style="width: 100%;" row-key="id" v-loading="loading"
ref="entrustTableRef" :row-class-name="setRowClassName" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :selectable="selectable" />
<el-table-column prop="tishi_msg" label="">
<template #default="scope">
<span v-if="scope.row.tishi_msg!=''" class="errMsg">{{scope.row.tishi_msg}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="list_status" label="医嘱状态" width="80">
<template #default="scope">
<el-tag v-if="scope.row.list_status===0" class="ml-2" type="info"></el-tag>
<el-tag v-if="scope.row.list_status===1" class="ml-2" type="success"></el-tag>
<el-tag v-if="scope.row.list_status===2" class="ml-2"></el-tag>
<el-tag v-if="scope.row.list_status===3" class="ml-2" type="warning"></el-tag>
</template>
</el-table-column>
<el-table-column prop="entrust" label="项目" width="250" />
<el-table-column prop="is_pay" label="是否交费" width="80">
<template #default="scope">
<span v-if="scope.row.is_pay==1"></span>
<span v-if="scope.row.is_pay==0"></span>
</template>
</el-table-column>
<el-table-column prop="department_resources.department_resources_name" label="预约资源" width="120" />
<el-table-column prop="reservation_date" label="预约日期" width="120" />
<el-table-column prop="check_begin_time" label="预约时间" width="120">
<template #default="scope">
<span
v-if="scope.row.period_begin_time && scope.row.period_end_time ">{{scope.row.period_begin_time.substring(0, 5)}}~{{scope.row.period_end_time.substring(0, 5)}}</span>
</template>
</el-table-column>
<el-table-column prop="limosis" label="是否空腹">
<template #default="scope">
<span v-if="scope.row.limosis==0"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="reservation_department" label="申请科室" width="120" />
<el-table-column prop="" label="医嘱时间" width="160">
<template #default="scope">
{{scope.row.entrust_date}} {{scope.row.entrust_time}}
</template>
</el-table-column>
<el-table-column prop="docotr" label="申请医生" />
</el-table>
</div>
<div class="planInfo">
<div style="display: flex;justify-content: space-between; margin-top: 8px;margin-bottom: 8px;">
<div style="display: flex;">
<div v-for="(item ,index) in zhenShiList" :key="index"
:class="{'ZhenShiButton zhenshiButton_active': activeZhenShi === item,'ZhenShiButton': activeZhenShi !== item}"
@click="zhenshiClick(item)">{{item}}</div>
<div class="shuxian"></div>
<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>
</el-checkbox-group>
</div>
<div>
<el-date-picker v-model="startDate" type="date" placeholder="跳转日期" @change="DatePickerChange()" />
</div>
</div>
<div v-loading="planLoading" style="border: 1px solid #efefef;">
<table class="planTable">
<tr style="background-color: #f1f1f1;" v-if="selectedRows.length>0">
<td style="width: 120px;"></td>
<td style="font-weight: 700;" v-for="(item,index) in date_list">{{item.substring(5, 10)}}
{{getWeekday(item)}}
</td>
</tr>
<tr v-for="(item,index) in planTableData" :key="index" class="table_plan_row" v-if="date_list.length>0 && planTableData.length>0">
<td v-for="(item2,index2) in item" :key="index2" :class="{
'planActive': (selectedPlanId === item2.id && selectedPlanId !==0 && selectedPlanId),
'plandisable': !item2.enable && index2 !=='time_range'
}" @click="PlanClick(item2.id)"><span
v-if="index2=='time_range'">{{item2}}</span><span>{{item2.use_count}}</span></td>
</tr>
</table>
<div v-if="selectedRows.length==0">
<el-empty description="请选择项目" />
</div>
<div v-if="selectedRows.length>0 && planTableData.length==0">
<el-empty description="暂无号源" />
</div>
</div>
</div>
<div id="shenqingdan" v-if="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
</div>
</template>
<script setup>
import {
ref,
onMounted,
watch
} from 'vue'
import {
getMainDetail,
GetEnablePlan,
CheckIsDaiJian,
PlanYuYue,
CheckEntrstItemGroup2,
DoctorCancelYuYue
} from '@/api/api.js'
import {
ElMessage,
ElMessageBox
} from 'element-plus'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
const props = defineProps({
reg_num: {
type: String
},
entrust_ids: {
type: String
},
episode_id: {
type: String
},
appointment_type: {
type: Number
},
dotype: {
type: Number
}
})
let entrustTableRef = ref(null)
let patientInfo = ref(null)
let entrustTableDate = ref([]);
let planTableData = ref([]);
let loading = ref(false);
let planLoading = ref(false);
let zhenShiList = ref([]);
let activeZhenShi = ref('');
let selectedPlanId = ref(0)
let selectedMianListId = ref([]) //id
let selectedEntrustId = ref([]) //entrust_id
let selectedRows = ref([])
let isHandlingSelection = ref(true) //
let lastSelection = ref([]) //
let print_shenqingdan_button = ref(null)
let auto_print = ref(['1']);
let shenqingdan_show = ref(false);
let handleType = ref('add');
let startDate = ref('');
const getWeekday = (date1) => {
let days = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const date = new Date(date1); //
const dayOfWeek = date.getDay();
return days[dayOfWeek]
}
const handleSelectionChange = (selection) => {
selectedMianListId.value = []
selectedEntrustId.value = []
zhenShiList.value = []
planTableData.value = []
activeZhenShi.value = ''
selectedRows.value = selection;
selectedRows.value.forEach((v, i) => {
selectedMianListId.value.push(v.id)
selectedEntrustId.value.push(v.entrust_id)
})
// id id.------------vvvv
const allPlanIdsSame = selectedRows.value.every(
(v) => v.roster_id === selectedRows.value[0]?.roster_id
);
if (allPlanIdsSame) {
selectedPlanId.value = selectedRows.value[0]?.roster_id;
if(selectedPlanId.value!==0 && selectedPlanId.value){
startDate.value=selectedRows.value[0]?.reservation_date
date_list.value = getDatesAfter(selectedRows.value[0]?.reservation_date)
activeZhenShi.value=selectedRows.value[0]?.department_resources?.department_resources_name
}
} else {
selectedPlanId.value = 0;
}
//--------------------------------------------------------------^^^^^
lastSelection.value.forEach(lastRow => {
if (!selectedRows.value.find(s => s === lastRow)) {
handleType.value = 'cancel'
}
});
if(selectedRows.value.length==0){//
handleType.value = 'add'
lastSelection.value=[]
}
console.log(handleType.value)
if (selectedEntrustId.value.length > 0 && isHandlingSelection.value) {
if (handleType.value === 'add' && selectedRows.value[0].list_status==0) {
FindAllMatchItem();
} else {
GetEnablePlanFunc();
}
}
}
const isSelected = (row) => {
return selectedRows.value.findIndex(item => item.id === row.id) > -1;
}
const setRowClassName = ({
row,
rowIndex
}) => {
if (row.tishi_msg != "") {
return 'disabled-row';
}
if (isSelected(row)) {
return 'selected-row';
}
}
const selectable = (row, index) => {
if (row.tishi_msg != "") {
return false;
} else {
return true;
}
}
const GetMainInfo = () => {
let tempSelected = selectedMianListId.value
entrustTableDate.value = []
loading.value = true
getMainDetail({
regnum: props.reg_num,
entrustid: props.entrust_ids,
episodeid: props.episode_id,
appointment_type: props.appointment_type
}).then(res => {
loading.value = false
if (res.status) {
if (res.data.info.length > 0) {
let info = res.data.info
patientInfo.value = info[0].maininfo
info.forEach((v, i) => {
let item_entrust_info = v.maininfo
item_entrust_info.tishi_msg = v.msg
item_entrust_info.limosis = v.iteminfo[0]?.limosis
entrustTableDate.value.push(item_entrust_info)
})
if (tempSelected.length > 0) {
tempSelected.forEach((v, i) => {
entrustTableDate.value.forEach((v2, i2) => {
if (v == v2.id) {
entrustTableRef.value.toggleRowSelection(entrustTableDate
.value[i2], true)
}
})
})
} else { //
for (let i = 0; i < entrustTableDate.value.length; i++) {
if (entrustTableDate.value[i].tishi_msg == '') {
entrustTableRef.value.toggleRowSelection(entrustTableDate.value[i], true)
if(entrustTableDate.value[i].roster_id!=null){
selectedPlanId.value=entrustTableDate.value[i].roster_id
startDate.value=entrustTableDate.value[i].reservation_date
date_list.value = getDatesAfter(entrustTableDate.value[i].reservation_date)
activeZhenShi.value=entrustTableDate.value[i].department_resources?.department_resources_name
}
break;
}
}
}
}
} else {
ElMessage.error(res.msg)
}
})
}
const FindAllMatchItem = () => {
console.log(11111)
let list = []
//selectedRows.value.reverse();
if (selectedRows.value[0].list_status != 0) return false //
entrustTableDate.value.forEach((v, i) => {
if (v.list_status == 0 && v.tishi_msg == "") {
if (v.id == selectedRows.value[0].id) {
list.push({
name: v.entrust,
rowid: i,
first: 1
})
} else {
list.push({
name: v.entrust,
rowid: i,
first: 0
})
}
}
})
if (list.length >= 2) {
loading.value = true
CheckEntrstItemGroup2({
items: list
}).then(res => {
loading.value = false
if (res.status) {
list.forEach((v, i) => {
isHandlingSelection.value = false
entrustTableRef.value.toggleRowSelection(entrustTableDate.value[v.rowid],
false)
})
let rowids = res.data.rowids
// autoSeleted(d)
rowids.forEach((v, i) => {
isHandlingSelection.value = false
entrustTableRef.value.toggleRowSelection(entrustTableDate.value[v], true)
})
lastSelection.value = selectedRows.value
GetEnablePlanFunc()
} else {
ElMessage.error(res.msg)
}
isHandlingSelection.value = true
})
} else {
lastSelection.value = selectedRows.value
GetEnablePlanFunc()
}
}
let date_list = ref([]);
const GetEnablePlanFunc = () => {
if( selectedEntrustId.value.length==0){
ElMessage.error("请选择检查项目")
return false;
}
planLoading.value = true
GetEnablePlan({
regnum: props.reg_num,
entrustid: selectedEntrustId.value,
episodeid: props.episode_id,
appointment_type: props.appointment_type,
date: date_list.value
}).then(res => {
planLoading.value = false
planTableData.value = []
zhenShiList.value=[]
if (res.status) {
let plans = res.data.plan_list
if (plans.length > 0) {
if (activeZhenShi.value == '') activeZhenShi.value = plans[0].department_resources_name
const timeSlotsSet = new Set();
const zhenshiSet = new Set();
plans.forEach(v => {
if (v.department_resources_name == activeZhenShi.value) {
const timeRange =
`${v.begin_time.substring(0,5)}-${v.end_time.substring(0,5)}`;
timeSlotsSet.add(timeRange);
}
zhenshiSet.add(v.department_resources_name)
});
zhenShiList.value = zhenshiSet
const timeSlots = Array.from(timeSlotsSet).sort(); //
// Step 2:
timeSlots.forEach(timeRange => {
const row = {
time_range: timeRange
};
date_list.value.forEach(date => {
const matchingPlan = plans.find(
v =>
`${v.begin_time.substring(0,5)}-${v.end_time.substring(0,5)}` ===
timeRange && v.date === date && v
.department_resources_name == activeZhenShi.value
);
let plan_enable = false
if (matchingPlan) {
if (matchingPlan.count - matchingPlan.used_count > 0) {
plan_enable = true
}
row[date] = {
use_count: `${matchingPlan.used_count}/${matchingPlan.count}`,
id: matchingPlan.id,
enable: plan_enable
};
} else {
row[date] = {
use_count: "0/0",
id: null,
enable: plan_enable
};
}
});
planTableData.value.push(row);
});
}
} else {
ElMessage.error(res.msg)
}
})
}
const processData = (data) => {
const result = {};
data.forEach(record => {
const deptName = record.department_resources_name;
if (!result[deptName]) {
result[deptName] = {};
}
const date = record.date;
if (!result[deptName][date]) {
result[deptName][date] = [];
}
//
record.remaining_count = record.count - record.used_count;
//
result[deptName][date].push({
id: record.id,
roster_id: record.roster_id,
weekname: record.weekname,
begin_time: record.begin_time,
end_time: record.end_time,
remaining_count: record.remaining_count,
status: record.status
//
});
});
return result;
}
const zhenshiClick = (zhenshi) => {
activeZhenShi.value = zhenshi
GetEnablePlanFunc()
}
const PlanClick = (planid) => {
console.log(planid)
if (planid != undefined) {
selectedPlanId.value = planid
checkDaijianFuc()
}
}
const checkDaijianFuc = () => {
planLoading.value = true
CheckIsDaiJian({
reg_num: props.reg_num,
planid: selectedPlanId.value
}).then(res => {
planLoading.value = false
if (res.status) {
} else {
ElMessageBox.confirm(
res.msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
})
.catch(() => {
})
}
})
}
const YuYueButtonClick = (type) => {
if (selectedEntrustId.length == 0) {
ElMessage.error("请选择检查项目")
return false;
}
if (selectedPlanId.value == 0 || selectedPlanId.value == '') {
ElMessage.error("请选择号源")
return false;
}
let msg='确定预约此时间吗?'
if(type==2){
msg='确定改约至此时间吗?'
}
ElMessageBox.confirm(
msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
startYuYue(type)
})
.catch(() => {
})
}
const startYuYue = (type) => {
planLoading.value = true
PlanYuYue({
mainlistid: selectedMianListId.value,
planid: selectedPlanId.value,
appointment_type: props.appointment_type,
dotype: type, //12
}).then(res => {
planLoading.value = false
if (res.status) {
GetMainInfo()
if (auto_print.value.length > 0) {
print_shenqingdan()
}
} else {
ElMessageBox.confirm(
res.msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
showCancelButton: false
}
)
.then(() => {
})
.catch(() => {
})
}
})
}
//
const CancelYuYueFunc = () => {
ElMessageBox.confirm(
'确定取消预约吗?',
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
loading.value = true
const promises = selectedRows.value.map((v) => {
return DoctorCancelYuYue({
MainListId: v.id,
reg_num: v.reg_num,
}).then(res => {
if (res.status) {
ElMessage.success('取消成功')
} else {
ElMessage.error(res.msg)
}
}).catch(err => {
ElMessage.error('取消失败')
console.error(err)
})
})
//
await Promise.all(promises)
loading.value = false
GetMainInfo()
})
}
//
let shenqingdan_list = ref([])
const print_shenqingdan = () => {
getMainDetail({
regnum: props.reg_num,
entrustid: selectedEntrustId.value.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
setTimeout(function() {
print_shenqingdan_button.value.$el.click();
shenqingdan_show.value = false
}, 500)
}
} else {
ElMessage.error(res.msg)
}
})
}
const DatePickerChange = () => {
activeZhenShi.value=''
date_list.value = getDatesAfter(startDate.value)
console.log(date_list.value)
GetEnablePlanFunc()
}
function formatDateLocal(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
function getDatesAfter(startDate = new Date(), days = 15) {
const date = new Date(startDate); // Date
const dates = [];
if (isNaN(date.getTime())) {
throw new Error("无效的日期格式");
}
for (let i = 0; i < days; i++) {
const nextDate = new Date(date);
nextDate.setDate(date.getDate() + i);
const formattedDate = formatDateLocal(nextDate);
dates.push(formattedDate);
}
return dates;
}
onMounted(() => {
date_list.value = getDatesAfter()
GetMainInfo()
})
</script>
<style lang="scss" scoped>
.patientInfo {
.name {
font-size: 18px;
font-weight: 700;
}
.value {
font-size: 16px;
font-weight: 700;
}
}
.entrustList {
.errMsg {
color: #f27d7d;
font-weight: 700;
opacity: 1 !important;
}
}
.planInfo {
.planTable {
width: 100%;
background-color: #fff;
text-align: center;
border: 1px solid #f1f1f1;
border-collapse: collapse;
/* 合并边框 */
color: #333;
td {
border: 1px solid #f1f1f1;
padding: 6px;
}
}
.table_plan_row td:first-child {
background-color: #f1f1f1;
border-bottom: 1px solid #e8e8e8;
}
.table_plan_row> :not(:first-child):hover {
background-color: #aeebf0;
cursor: pointer;
color: #fff;
}
.planActive {
background-color: #5bc0de;
color: #fff;
}
.plandisable {
pointer-events: none;
opacity: 0.4;
}
.shuxian {
border-left: 1px solid #dfdfdf;
margin-left: 40px;
margin-right: 40px;
}
.do_button {
width: 100px;
}
}
.ZhenShiButton {
text-align: center;
font-size: 14px;
background-color: #fff;
border: 1px solid #e8e8e8;
width: 120px;
height: 34px;
line-height: 34px;
cursor: default;
}
.zhenshiButton_active {
background-color: #5bc0de;
color: #fff;
}
::v-deep .el-table .disabled-row {
background-color: #f2e3e2;
//pointer-events: none;
/* 禁用鼠标事件 */
opacity: 0.6;
/* 降低透明度 */
}
::v-deep .el-table .selected-row {
background-color: #9cd0de;
}
</style>

@ -48,7 +48,16 @@ const router = createRouter({
meta: {
requiresAuth: false
}
},{
},
{
path: '/doctorappointment',
name: 'DoctorAppointment',
component: () => import('../views/YeWu/DoctorYuYue.vue'),
meta: {
requiresAuth: false
}
},
{
path: '/index',
name: 'Index',
component: Index,

@ -0,0 +1,49 @@
<template>
<div class="DoctorYuYue">
<YuYue202506 :reg_num="reg_num" :entrust_ids="entrust_ids" :episode_id="episode_id" :appointment_type="appointment_type" :dotype="dotype"></YuYue202506>
</div>
</template>
<script setup>
import {
ref,
onMounted
} from 'vue';
import {
ElMessage,
ElMessageBox
} from 'element-plus'
import YuYue202506 from '@/components/Yewu/YuYue202506.vue'
import {
useRoute,
useRouter
} from "vue-router"
const route = useRoute()
const router = useRouter()
let reg_num=ref('')
let entrust_ids=ref([])
let episode_id=ref('')
let appointment_type=ref(null);
let dotype=ref(1)
// reg_num.value='0006946646'
// entrust_ids.value='40890547||1,40890546||1'
// episode_id.value='111043531'
// appointment_type.value=4
// dotype.value=1
reg_num.value=decodeURIComponent(route.query.regnum)
entrust_ids.value=decodeURIComponent(route.query.entrustid)
episode_id.value=decodeURIComponent(route.query.episodeid)
appointment_type.value=4
dotype.value=1
</script>
<style scoped>
.DoctorYuYue{
padding: 10px 20px;
}
</style>

@ -76,6 +76,7 @@
<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>
</el-row>
</div>
<el-table :data="tableData" id="tablelist" style="width: 100%;" row-key="id" v-loading="loading" ref="tableref"
@ -202,7 +203,7 @@
</el-dialog>
<div id="shenqingdan" v-if="shenqingdan_show" style="position: relative;">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<div>
<!-- <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;">
@ -230,7 +231,7 @@
<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>检查地点XXXX</div>
<div>检查地点{{item.maininfo.department_resources?.department_resources_name}}</div>
</div>
<div style="padding-left: 4px;">
<table style="border: none;">
@ -252,7 +253,8 @@
</div>
<div style="text-align: right; border-top: 1px solid #333; font-size: 16px;">
申请时间2025-05-01
</div>
</div> -->
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
</div>
</div>
<el-dialog v-model="TiShiShow" title="提示" width="40%" >
@ -292,6 +294,7 @@
ElMessage,
ElMessageBox
} from 'element-plus'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
let AutoGroup=ref(true);//
let shenqingdan_show=ref(false);
let do_type = ref(0) //12

@ -1,5 +1,5 @@
<template>
<div>
<div>
<el-dialog v-model="YuYueDialogVisible" width="100%" @close="YuYueDialogClose()">
<YuYue style="margin-top: -30px;" :key="YuYueKey" :YuYueInfo="YuYueInfo"></YuYue>
</el-dialog>
@ -50,7 +50,6 @@
<el-checkbox label="1">自动选择多人</el-checkbox>
</el-checkbox-group>
</el-row>
<el-table :data="tableData" @select="TableSelectChange" id="tablelist" ref="tableref" style="width: 100%;" row-key="id"
v-loading="loading">
@ -151,14 +150,61 @@
{{LogDataJson}}
</div>
</el-dialog>
<div id="shenqingdan" v-if="shenqingdan_show">
<div v-for="(item,index) in shenqingdan_list" :key="index">
<div style="width: 100%;text-align: center;font-size: 14px;">演示医院</div>
<div style="width: 100%;text-align: center;font-size: 18px;font-weight: bold;">检查申请单</div>
<div style="width: 100%; border: 1px solid #ccc;padding: 20px;">
<div>检查项目{{item.maininfo.entrust}}</div>
<div id="shenqingdan" v-if="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>
</div>
</template>
@ -173,6 +219,7 @@
ElMessageBox
} from 'element-plus'
import YuYue from '@/components/Yewu/YuYue.vue'
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
import {
GetMainList,
CancelYuYue,

Loading…
Cancel
Save