|
@@ -272,6 +272,7 @@ class OrderController extends AuthController
|
|
'guardian_name' => 'required|max:50',
|
|
'guardian_name' => 'required|max:50',
|
|
'relationship_type' => 'required|integer',
|
|
'relationship_type' => 'required|integer',
|
|
'is_need_insurance' => 'in:0,1',
|
|
'is_need_insurance' => 'in:0,1',
|
|
|
|
+ 'team_id' => 'integer',
|
|
]);
|
|
]);
|
|
$user = $this->user;
|
|
$user = $this->user;
|
|
|
|
|
|
@@ -326,7 +327,11 @@ class OrderController extends AuthController
|
|
$addPack['total_nurses_limit_amount'] = $addPack['nurses_limit_amount'];
|
|
$addPack['total_nurses_limit_amount'] = $addPack['nurses_limit_amount'];
|
|
$addPack['label'] = json_decode($addPack['label'], true);
|
|
$addPack['label'] = json_decode($addPack['label'], true);
|
|
$addPack['is_need_insurance'] = !empty($req['is_need_insurance']) ? $req['is_need_insurance'] : 0;
|
|
$addPack['is_need_insurance'] = !empty($req['is_need_insurance']) ? $req['is_need_insurance'] : 0;
|
|
- $addPack['team_id'] = json_decode($addPack['team_id'], true);
|
|
|
|
|
|
+ $pack_team_ids = json_decode($addPack['team_id'], true);
|
|
|
|
+ if (!empty($req['team_id'])) {
|
|
|
|
+ $pack_team_ids = [$req['team_id']];
|
|
|
|
+ }
|
|
|
|
+ $addPack['team_id'] = $pack_team_ids;
|
|
OrderPack::create($addPack);
|
|
OrderPack::create($addPack);
|
|
|
|
|
|
//如果有优惠券就标记优惠券为已使用
|
|
//如果有优惠券就标记优惠券为已使用
|