Kaynağa Gözat

补货列表显示导出存储库位数量

haozi 4 yıl önce
ebeveyn
işleme
d2ea2866af

+ 1 - 1
app/Http/Controllers/ReplenishmentController.php

@@ -64,7 +64,7 @@ class ReplenishmentController extends Controller
             }
 
             foreach ($order['rsLocation'] as $v) {
-                $rsLocation .= $v . ",\r\n";
+                $rsLocation .= $v['location'] . '  :'.$v['qty'].",\r\n";
             }
 
             $data = [

+ 1 - 0
app/Http/Controllers/TestController.php

@@ -134,6 +134,7 @@ use Laravel\Horizon\Events\JobFailed;
 use Monolog\Handler\IFTTTHandler;
 use phpDocumentor\Reflection\Types\Resource_;
 use PhpOffice\PhpSpreadsheet\Calculation\Web\Service;
+use PhpParser\Node\Stmt\DeclareDeclare;
 use Ramsey\Uuid\Uuid;
 use Symfony\Component\ErrorHandler\Error\FatalError;
 

+ 3 - 3
app/Services/ReplenishmentService.php

@@ -135,13 +135,13 @@ sql;
             if (array_key_exists($key, $tmpArray)) {
                 if (is_array($tmpArray[$key]['locationid'])) {
                     if (count($tmpArray[$key]['locationid'])<5){
-                        $tmpArray[$key]['locationid'][] = $row->locationid;
+                        $tmpArray[$key]['locationid'][] = ['location'=>$row->locationid,'qty'=>$row->qty];
                     }
                 } else {
-                    $tmpArray[$key]['locationid'] = array($tmpArray[$key]['locationid'], $row->locationid);
+                    $tmpArray[$key]['locationid'] = array($tmpArray[$key]['locationid'], ['location'=>$row->locationid,'qty'=>$row->qty]);
                 }
             } else {
-                $tmpArray[$key] = array('sku'=>$row->sku,'locationid'=>array($row->locationid));
+                $tmpArray[$key] = array('sku'=>$row->sku,'locationid'=>array(['location'=>$row->locationid,'qty'=>$row->qty]));
             }
         }
         return $tmpArray;

+ 3 - 1
resources/views/inventory/stockOut/index.blade.php

@@ -37,7 +37,9 @@
                     <td>@{{ item.amount }}</td>
                     <td>
                         <ul style="list-style: none">
-                            <li v-for="(v,k) in item.rsLocation" v-if="k<3 || item.moreRaLocation">@{{ v }}</li>
+                            <li v-for="(v,k) in item.rsLocation" v-if="k<3 || item.moreRaLocation">@{{ v.location }}
+                                <span class="font-weight-bold text-dark">&nbsp;&nbsp;&nbsp;:@{{ v.qty }}</span>
+                            </li>
                             <a v-if="item.rsLocation.length >= 3" href="#javascript:;"
                                @click="item.moreRaLocation = !(item.moreRaLocation)">展示更多</a>
                         </ul>