This commit is contained in:
Your Name
2026-03-19 12:19:00 +08:00
parent 7832514f28
commit 7147c8e148
243 changed files with 1662 additions and 437 deletions
@@ -69,6 +69,14 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
// 权限控制:普通员工只能看自己创建的订单
$this->filterByPermission($where);
// 处理患者关联状态:pending=待关联, associated=已关联
$patientAssociation = $this->params['patient_association'] ?? '';
if ($patientAssociation === 'pending') {
$where[] = ['patient_id', 'null', ''];
} elseif ($patientAssociation === 'associated') {
$where[] = ['patient_id', 'not null', ''];
}
// 处理患者关键词搜索(从诊单表搜索)
if (!empty($this->params['patient_keyword'])) {
$where[] = ['patient_id', 'in', function ($query) {
@@ -106,6 +114,14 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
// 权限控制:普通员工只能看自己创建的订单
$this->filterByPermission($where);
// 处理患者关联状态
$patientAssociation = $this->params['patient_association'] ?? '';
if ($patientAssociation === 'pending') {
$where[] = ['patient_id', 'null', ''];
} elseif ($patientAssociation === 'associated') {
$where[] = ['patient_id', 'not null', ''];
}
// 处理患者关键词搜索(从诊单表搜索)
if (!empty($this->params['patient_keyword'])) {
$where[] = ['patient_id', 'in', function ($query) {