diff --git a/admin/src/views/order/index.vue b/admin/src/views/order/index.vue index 55b865f1..c7682ccd 100644 --- a/admin/src/views/order/index.vue +++ b/admin/src/views/order/index.vue @@ -1,176 +1,275 @@ - + - + - + - + + +
- + + + - + {{ getStatusText(detailData.status) }} @@ -312,14 +436,14 @@ {{ detailData.creator?.name || '-' }} - + {{ detailData.payee_userid }} - + {{ detailData.payer_external_userid }} - + {{ getOrderTypeText(detailData.order_type) }} @@ -340,7 +464,9 @@ 操作记录 -

谁在什么时间对本单做了哪些操作(数据来自服务器记录)。

+

+ 谁在什么时间对本单做了哪些操作(数据来自服务器记录)。 +

- + -

统计范围:{{ statsRangeText }}

+

统计范围:{{ statsRangeText }}

+ -

+

将 {{ selectedOrderIds.length }} 条支付单的「创建人」改为所选医助,并写入各单操作日志。

@@ -438,21 +563,11 @@ /> - 补单支付 - - -
+ + + -
生成中...
+
生成中...
- 小程序二维码 -
+ 小程序二维码 +
订单号:{{ qrcodeOrderNo }}
请使用微信扫描二维码完成支付
-
+
生成失败,请重试
@@ -767,6 +887,15 @@ diff --git a/server/app/adminapi/logic/doctor/AppointmentLogic.php b/server/app/adminapi/logic/doctor/AppointmentLogic.php index f5702c12..640027da 100644 --- a/server/app/adminapi/logic/doctor/AppointmentLogic.php +++ b/server/app/adminapi/logic/doctor/AppointmentLogic.php @@ -578,11 +578,14 @@ class AppointmentLogic extends BaseLogic // 面诊结束:通知对应医助(从诊单 assistant_id 获取) try { $diagnosis = Diagnosis::where('id', $appointment->patient_id)->find(); + if ($diagnosis && !empty($diagnosis->assistant_id)) { $assistantId = (int) $diagnosis->assistant_id; + $patientName = $diagnosis->patient_name ?? '患者'; $doctor = Admin::where('id', $appointment->doctor_id)->find(); $doctorName = $doctor ? $doctor->name : '医生'; + ChatNotifyLogic::addConsultationCompleteNotify( $assistantId, $patientName, diff --git a/server/app/adminapi/logic/tcm/PrescriptionLogic.php b/server/app/adminapi/logic/tcm/PrescriptionLogic.php index 78b1c708..7b588106 100644 --- a/server/app/adminapi/logic/tcm/PrescriptionLogic.php +++ b/server/app/adminapi/logic/tcm/PrescriptionLogic.php @@ -773,6 +773,7 @@ class PrescriptionLogic } $diagnosisId = (int) ($appointment->patient_id ?? 0); + if ($diagnosisId <= 0) { Log::info('createSystemAutoFromCompletedAppointment: no diagnosis (patient_id), skip appt=' . $appointmentId); @@ -826,6 +827,18 @@ class PrescriptionLogic $visitNo = '1K' . str_pad((string) $diagnosisId, 8, '0', STR_PAD_LEFT); $herbs = []; + + /** 与手动开方一致:存一份当前诊单详情快照(/admin 开方时用 tcmDiagnosisDetail → 同源 DiagnosisLogic::detail) */ + $caseSnapshot = []; + try { + $snap = DiagnosisLogic::detail(['id' => $diagnosisId]); + $caseSnapshot = is_array($snap) ? $snap : []; + } catch (\Throwable $e) { + Log::warning( + 'createSystemAutoFromCompletedAppointment: case_record snapshot failed diagnosis=' + . $diagnosisId . ' ' . $e->getMessage() + ); + } $data = [ 'sn' => $sn, @@ -850,7 +863,7 @@ class PrescriptionLogic 'tongue' => (string) ($diagnosis->tongue ?? ''), 'tongue_image' => '', 'clinical_diagnosis' => $clinical, - 'case_record' => [], + 'case_record' => $caseSnapshot, 'herbs' => $herbs, 'dose_count' => 1, 'dose_unit' => '剂', @@ -876,7 +889,7 @@ class PrescriptionLogic 'creator_id' => $doctorId, 'assistant_id' => $assistantIdForRx, ]; - + $prescription = new Prescription(); $prescription->save($data);