Commit 2b7f87e0 by 赵增煜

处方单筛选列表搜索bug修复

parent bfa0058a
......@@ -49,6 +49,12 @@ public function prescriptionList(Request $request)
$query->where('pharmacy_id', $pharmacy->id);
}
// 客开 0 店开 1
$open_source = $request->input('open_source');
if (in_array($open_source, [0, 1], true)) {
$query->where('open_source', $open_source);
}
// 时间段
$start_time = $request->input('start_time');
if ($start_time) {
......@@ -61,7 +67,7 @@ public function prescriptionList(Request $request)
// 状态
$status = $request->input('status');
if ($status) {
if (in_array($status, [0, 1, 2], true)) {
$query->where('status', $status);
}
......@@ -258,7 +264,8 @@ public function create(Request $request)
$doctorLog->save();
}
if ($pharmacy->is_auto == 1) {
// 药店自动审方(必须处方单待审方)
if ($pharmacy->is_auto == 1 && $prescription->status == PrescriptionModel::PRESCRIPTION_STATUS_REVIEWING) {
$prescription->status = PrescriptionModel::PRESCRIPTION_STATUS_SUCCESS;
$prescription->save();
// 生成药师审方日志
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment