修改预订单商品采购状态

This commit is contained in:
DESKTOP-GMUNQ1B\Administrator 2024-12-19 17:29:23 +08:00
parent 48f9e07787
commit 14555837fe

View File

@ -92,7 +92,11 @@ class BeforehandOrderCartInfoLists extends BaseAdminDataLists implements ListsSe
$item['top_cate_id'] = $find['top_cate_id'];
$item['top_cate_name'] = StoreCategory::where('id', $item['top_cate_id'])->value('name');
if ($item->bhoid) {
$status = PurchaseProductOffer::where('order_id', $item->bhoid)->where('product_id', $item->product_id)->value('status');
$rawSql = "JSON_CONTAINS(source_order_info, '{\"source_order_id\": {$item->bhoid}}')";
$status = PurchaseProductOffer::where(['product_id' => $item->product_id])->whereRaw($rawSql)->value('status');
if (is_null($status)) {
$status = PurchaseProductOffer::where('order_id', $item->bhoid)->where('product_id', $item->product_id)->value('status');
}
if ($status == 1) {
$item->status_name = '已完成';
} else {