This commit is contained in:
Your Name
2026-05-14 11:00:56 +08:00
parent 37fa160c24
commit 928f75e016
301 changed files with 1820 additions and 318 deletions
@@ -8,6 +8,8 @@ use app\adminapi\lists\BaseAdminDataLists;
use app\adminapi\logic\dept\DeptLogic;
use app\adminapi\logic\stats\YejiStatsLogic;
use app\adminapi\logic\tcm\PrescriptionOrderLogic;
use app\common\enum\ExportEnum;
use app\common\lists\ListsExcelInterface;
use app\common\lists\ListsExtendInterface;
use app\common\lists\ListsSearchInterface;
use app\common\lists\Traits\HasDataScopeFilter;
@@ -23,7 +25,7 @@ use think\facade\Config;
use think\facade\Db;
use think\db\Query;
class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExtendInterface
class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExtendInterface, ListsExcelInterface
{
use HasDataScopeFilter;
@@ -558,6 +560,10 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
PrescriptionOrderLogic::appendLinkedAppointmentsToListRows($lists, $this->params);
}
if ((int) $this->export === ExportEnum::EXPORT) {
PrescriptionOrderLogic::appendPrescriptionOrderListExportRows($lists, $this->adminInfo);
}
return $lists;
}
@@ -601,6 +607,39 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
return $base;
}
public function setFileName(): string
{
return '处方业务订单';
}
public function setExcelFields(): array
{
return [
'export_fulfillment_status_text' => '履约状态',
'export_order_time' => '创建时间',
'doctor_name' => '医生姓名',
'export_patient_name' => '患者姓名',
'export_patient_gender' => '性别',
'export_patient_age' => '年龄',
'export_patient_phone' => '手机号',
'assistant_name' => '医助名字',
'export_center_label' => '一中心还是二中心',
'export_assistant_dept' => '医助部门',
'export_channel' => '渠道',
'export_medication_form' => '药品形态',
'export_medication_days' => '天数',
'export_amount' => '总金额',
'export_paid_amount' => '已付金额',
'export_agency_collect' => '代收金额',
'export_tracking_number' => '快递单号',
'export_supply_mode' => '甘草还是自营',
'export_gancao_prescription_cost' => '处方成本',
'export_first_visit_assistant' => '初诊医助',
'export_rx_audit_time' => '审核时间',
'export_rx_auditor' => '审核人',
];
}
/**
* 业绩看板侧栏专用:约诊/接诊条数,与 YejiStatsLogic::applyConsultFiltersAlignedWithAppointmentLists 同口径
* doctor_appointment.status=3appointment_date 落入区间,有效医助 COALESCE(挂号.assistant_id,诊单.assistant_id))。