|
|
|
|
@ -550,7 +550,7 @@ class OrdersController extends CommonController
|
|
|
|
|
DB::beginTransaction();
|
|
|
|
|
try {
|
|
|
|
|
$order = Orders::with(["customer", "patient", "product", "productItem", "productParamedicLevel"])->find($id);
|
|
|
|
|
if (request()->paramedic_id && $order->paramedic_id && (request()->paramedic_id != $order->paramedic_id)) {
|
|
|
|
|
if ($order->isOngoing() && $order->paramedic_id != request()->paramedic_id) {
|
|
|
|
|
return response()->json([
|
|
|
|
|
"errorcode" => "103",
|
|
|
|
|
"errormsg" => "修改订单不包含护工更改,更换护工请移步"
|
|
|
|
|
@ -600,7 +600,7 @@ class OrdersController extends CommonController
|
|
|
|
|
$order->update($update);
|
|
|
|
|
|
|
|
|
|
//如果原本的护工id为空且新提交了护工id,视同为派单
|
|
|
|
|
if (!$order->paramedic_id && request()->paramedic_id) {
|
|
|
|
|
if ($order->isPending && request()->paramedic_id) {
|
|
|
|
|
$order->update([
|
|
|
|
|
"paramedic_id" => request()->paramedic_id,
|
|
|
|
|
"status" => Orders::STATUS_ONGOING
|
|
|
|
|
|