|
|
@@ -69,14 +69,27 @@ class StorageService
|
|
|
$options["uomDesc02"] = '号';
|
|
|
break;
|
|
|
default:
|
|
|
- $task = $tasks[0];
|
|
|
- $options["detail01"] = $task->materialBox->code ?? '';
|
|
|
- $options["detail02"] = "货品过多请自行核对";
|
|
|
- $options["detail03"] = "波次:".$task->doc_code ?
|
|
|
- (Order::query()->with("batch")->where("code",$task->doc_code)->first()->batch->code ?? '无') : '无';
|
|
|
+ $count = count(array_unique(array_column($tasks->toArray(),"commodity_id")));
|
|
|
+ if ($count==1){
|
|
|
+ $options["detail01"] = $tasks[0]->bar_code;
|
|
|
+ $options["detail02"] = "";
|
|
|
+ $options["detail03"] = "";
|
|
|
+ foreach ($tasks as $task){
|
|
|
+ if (mb_strlen($options["detail02"])>20){
|
|
|
+ $options["detail03"] .= $task->bin_number."号-".$task->amount."件,";
|
|
|
+ }else $options["detail02"] .= $task->bin_number."号-".$task->amount."件,";
|
|
|
+ }
|
|
|
+ $options["detail02"] = rtrim($options["detail02"],",");
|
|
|
+ $options["detail03"] = rtrim($options["detail03"],",");
|
|
|
+ }else{
|
|
|
+ $task = $tasks[0];
|
|
|
+ $options["detail01"] = $task->materialBox->code ?? '';
|
|
|
+ $options["detail02"] = "货品过多请自行核对";
|
|
|
+ $options["detail03"] = "波次:".$task->doc_code ?
|
|
|
+ (Order::query()->with("batch")->where("code",$task->doc_code)->first()->batch->code ?? '无') : '无';
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
app("CacheShelfService")->lightUp($stationTaskMaterialBox->station->code,'2','0',$options);
|
|
|
Cache::forget("CACHE_SHELF_OCCUPANCY_{$stationTaskMaterialBox->station->id}");//关闭无限亮灯
|
|
|
}
|