你好
This commit is contained in:
gr
2026-05-14 16:27:49 +08:00
286 changed files with 979 additions and 346 deletions
@@ -104,6 +104,7 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
$this->applyPatientIdFilter($query);
$this->applyExpressCompanyFilter($query);
$this->applyExpressKeywordFilter($query);
$this->applyServiceChannelFilter($query);
$this->applySupplyModeFilter($query);
if (!$this->shouldBypassListVisibilityForDiagnosisEdit()) {
$this->applyCreatorOrOwnPrescriptionVisibility($query);
@@ -200,6 +201,24 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
$query->whereRaw("(($po) OR ($et))");
}
/**
* 服务渠道:未指派传 service_channel=0 时命中「空串」或「0」(varchar)
*/
private function applyServiceChannelFilter(Query $query): void
{
$raw = $this->params['service_channel'] ?? '';
if ($raw === '' || $raw === null) {
return;
}
$v = trim((string) $raw);
if ($v === '0') {
$query->whereRaw("(TRIM(IFNULL(`service_channel`,'')) = '' OR `service_channel` = '0')");
return;
}
$query->where('service_channel', '=', $v);
}
/**
* 供货方式:甘草(已上传甘草药方单号)/ 自营(无甘草单号,走药房直发等)
*
@@ -626,6 +645,7 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
'export_center_label' => '一中心还是二中心',
'export_assistant_dept' => '医助部门',
'export_channel' => '渠道',
'export_guahao_channel_source' => '自媒体渠道(挂号渠道来源)',
'export_medication_form' => '药品形态',
'export_medication_days' => '天数',
'export_amount' => '总金额',