|
|
@@ -905,8 +905,8 @@ class StoreOrderController
|
|
|
['type', 1],
|
|
|
]);
|
|
|
if (!$data['order_id']) return app('json')->fail('数据不存在');
|
|
|
- $orderInfo = StoreOrder::where('order_id', $data['order_id'])->where('store_id', SystemStoreStaff::where('uid', $uid)->value('store_id'))->where('paid', 1)->where('refund_status', 0)->find();
|
|
|
- if (!$orderInfo) return app('json')->fail('订单不存在于该门店或未支付或已退款');
|
|
|
+ $orderInfo = StoreOrder::where('order_id', $data['order_id'])->where('store_id', SystemStoreStaff::where('uid', $uid)->value('store_id'))->find();
|
|
|
+ if (!$orderInfo) return app('json')->fail('订单不存在于该门店');
|
|
|
if ($orderInfo['deposit'] == $orderInfo['deposit_back']) return app('json')->fail('已退完押金!不能再退款了');
|
|
|
if (!$data['refund_price']) return app('json')->fail('请输入退款金额');
|
|
|
$refund_price = $data['refund_price'];
|