6
0
Fork 0

添加批零订单待发货选项卡

release
vine_liutk 2022-02-11 17:45:01 +08:00
parent 056e8f0833
commit b4861ae30e
2 changed files with 14 additions and 3 deletions

View File

@ -18,9 +18,12 @@ class DealerOrderFilter extends ModelFilter
case 'wait_paid'://待收款 case 'wait_paid'://待收款
$this->onlyPaid(); $this->onlyPaid();
break; break;
case 'wait_shippinged'://待收 case 'wait_shipping'://待发
$this->onlyShipping(); $this->onlyShipping();
break; break;
case 'wait_shippinged'://待收货
$this->onlyShippinged();
break;
case 'completed'://已完成 case 'completed'://已完成
$this->onlyCompleted(); $this->onlyCompleted();
break; break;

View File

@ -88,17 +88,25 @@ class DealerOrder extends Model
} }
/** /**
* 待收款+待发货 * 待收款
*/ */
public function scopeOnlyPaid($query) public function scopeOnlyPaid($query)
{ {
return $query->where('status', DealerOrderStatus::Confirming); return $query->where('status', DealerOrderStatus::Confirming);
} }
/**
* 待发货
*/
public function scopenOnliyShipping($query)
{
return $query->where('status', DealerOrderStatus::Paid);
}
/** /**
* 已发货/待收货 * 已发货/待收货
*/ */
public function scopeOnlyShipping($query) public function scopeOnlyShippinged($query)
{ {
// return $query->whereIn('status', [ // return $query->whereIn('status', [
// DealerOrderStatus::Confirming, DealerOrderStatus::Paid, DealerOrderStatus::Shipped, // DealerOrderStatus::Confirming, DealerOrderStatus::Paid, DealerOrderStatus::Shipped,