文件还在测试中

This commit is contained in:
2026-08-08 15:53:53 +08:00
parent 5f1e7adb64
commit 8101177cb5
241 changed files with 18074 additions and 22 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Controllers\PSI;
use App\Controllers\Controller;
use App\Models\PSI\StockMove;
use App\Models\PSI\Material;
use App\Models\PSI\Product;
/** 库存流水台账(所有出入库变动记录) */
class StockController extends Controller
{
public function index()
{
$moves = (new StockMove())->all();
$moves = array_reverse($moves);
$nameMap = [];
foreach ((new Material())->all() as $m) { $nameMap['material:' . $m['id']] = $m['name']; }
foreach ((new Product())->all() as $p) { $nameMap['product:' . $p['id']] = $p['name']; }
return $this->renderSubsys('psi', 'psi/stock', ['moves' => $moves, 'nameMap' => $nameMap], \psi_nav(), 'stock');
}
}