commit
97d529e465
@ -75,8 +75,10 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (!empty($this->params['store_staff_id'])) {
|
||||
if (!empty($this->params['store_staff_id']) || !empty($this->params['is_store'])) {
|
||||
$this->searchWhere[] = ['store_staff_id', '>', 0];
|
||||
} else {
|
||||
$this->searchWhere[] = ['store_staff_id', '=', 0];
|
||||
}
|
||||
if ($order_rk!='') {
|
||||
$oid=WarehouseOrder::where('financial_pm',1)->where('code','like','%'.$order_rk)->column('id');
|
||||
|
@ -438,6 +438,7 @@ class BeforehandOrderLogic extends BaseLogic
|
||||
WarehouseOrder::where('id', $res['id'])->update(['total_price' => $totalPrice, 'nums' => $finds['nums']]);
|
||||
$order->save(['outbound_id' => $res['id'], 'is_outbound' => 1, 'pay_price' => $totalPrice]);
|
||||
BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->update(['is_buyer' => -1]);
|
||||
self::confirm(['id' => $params['bhoid']]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Throwable $e) {
|
||||
@ -1003,6 +1004,13 @@ class BeforehandOrderLogic extends BaseLogic
|
||||
if ($params['store_id'] > 0) {
|
||||
$where2[] = ['store_id', '=', $params['store_id']];
|
||||
}
|
||||
if (!empty($params['is_store'])) {
|
||||
$where[] = ['store_staff_id', '>', 0];
|
||||
$where2[] = ['store_staff_id', '>', 0];
|
||||
} else {
|
||||
$where[] = ['store_staff_id', '=', 0];
|
||||
$where2[] = ['store_staff_id', '=', 0];
|
||||
}
|
||||
if ($params['start_time'] != '' && $params['end_time'] != '') {
|
||||
$where2[] = ['create_time', 'between', [strtotime($params['start_time']), strtotime($params['end_time'])]];
|
||||
}
|
||||
|
@ -280,8 +280,9 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
||||
PurchaseProductOffer::where('order_id',$find['bhoid'])->where('product_id',$find['product_id'])->update(['delete_time'=>time()]);
|
||||
}
|
||||
$res=BeforehandOrderCartInfo::destroy($params['id']);
|
||||
$pay_price=BeforehandOrderCartInfo::where('bhoid', $params['id'])->sum('pay_price');
|
||||
BeforehandOrder::where('id',$find['bhoid'])->update(['pay_price'=>$pay_price]);
|
||||
$pay_price=BeforehandOrderCartInfo::where('bhoid', $find['bhoid'])->sum('pay_price');
|
||||
$total_price=BeforehandOrderCartInfo::where('bhoid', $find['bhoid'])->sum('total_price');
|
||||
BeforehandOrder::where('id',$find['bhoid'])->update(['pay_price'=>$pay_price, 'total_price'=>$total_price]);
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user