Commit 0565bcdd by 杨树贤

罗盘前提

parent 3f63849a
Showing with 13 additions and 13 deletions
...@@ -153,7 +153,7 @@ class SupplierFilter ...@@ -153,7 +153,7 @@ class SupplierFilter
$query->whereHas('attachment', function ($query) { $query->whereHas('attachment', function ($query) {
$query->where('field_name', 'cooperation_agreement'); $query->where('field_name', 'cooperation_agreement');
}); });
}else{ } else {
$query->whereDoesntHave('attachment', function ($query) { $query->whereDoesntHave('attachment', function ($query) {
$query->where('field_name', 'cooperation_agreement'); $query->where('field_name', 'cooperation_agreement');
}); });
...@@ -353,44 +353,44 @@ class SupplierFilter ...@@ -353,44 +353,44 @@ class SupplierFilter
$query->where('uploaded_sku', 1); $query->where('uploaded_sku', 1);
break; break;
case "not_yunxin": case "not_yunxin":
$query->where('stockup_type', 'NOT LIKE', '%5%'); $query->where('stockup_type', 'NOT LIKE', '%5%')->where('uploaded_sku', 1);
break; break;
case "not_yunxin_and_has_sku": case "not_yunxin_and_has_sku":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', '>', 0); $query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', '>', 0)->where('uploaded_sku', 1);
break; break;
case "not_yunxin_expired": case "not_yunxin_expired":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', 0); $query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1);
break; break;
case "not_yunxin_and_has_no_sku": case "not_yunxin_and_has_no_sku":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1); $query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1)->where('uploaded_sku', 1);
break; break;
case "yunxin": case "yunxin":
$query->where('stockup_type', 'LIKE', '%5%'); $query->where('stockup_type', 'LIKE', '%5%')->where('uploaded_sku', 1);
break; break;
case "yunxin_and_has_sku": case "yunxin_and_has_sku":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', '>', 0); $query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', '>', 0)->where('uploaded_sku', 1);
break; break;
case "yunxin_expired": case "yunxin_expired":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', 0); $query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1);
break; break;
case "yunxin_and_has_no_sku": case "yunxin_and_has_no_sku":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1); $query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', 0)->where('uploaded_sku', 1)->where('uploaded_sku', 1);
break; break;
case "yunxin_expired_at_days": case "yunxin_expired_at_days":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_expired_in_days', '!=', 0); $query->where('stockup_type', 'LIKE', '%5%')->where('sku_expired_in_days', '!=', 0)->where('uploaded_sku', 1);
break; break;
case "not_yunxin_expired_at_days": case "not_yunxin_expired_at_days":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_expired_in_days', '!=', 0); $query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_expired_in_days', '!=', 0)->where('uploaded_sku', 1);
break; break;
case "no_quality_assurance_agreement_all": case "no_quality_assurance_agreement_all":
$query->whereDoesntHave('attachment', function ($query) { $query->whereDoesntHave('attachment', function ($query) {
$query->where('field_name', 'quality_assurance_agreement'); $query->where('field_name', 'quality_assurance_agreement');
})->where('uploaded_sku', '>', 0); })->where('uploaded_sku', 1);
break; break;
case "no_cooperation_agreement": case "no_cooperation_agreement":
$query->whereDoesntHave('attachment', function ($query) { $query->whereDoesntHave('attachment', function ($query) {
$query->where('field_name', 'cooperation_agreement'); $query->where('field_name', 'cooperation_agreement');
})->where('uploaded_sku', '>', 0); })->where('uploaded_sku', 1);
break; break;
} }
return $query; return $query;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment