物品修改

This commit is contained in:
2026-02-25 14:46:34 +08:00
parent 30e04b3d4c
commit 73ce99edfb
3 changed files with 13 additions and 3 deletions
+10 -3
View File
@@ -24,12 +24,19 @@ class InvStockLog extends Model
'operator_id', 'operator_id',
'operator_name', 'operator_name',
'remark', 'remark',
'updated_at',
'created_at', 'created_at',
]; ];
protected $casts = [ /**
'created_at' => 'timestamp', * Indicates if the model should be timestamped.
]; *
* @var bool
*/
public $timestamps = true;
protected $dateFormat = 'U';
public const CHANGE_TYPE_IN = 1; // 入库 public const CHANGE_TYPE_IN = 1; // 入库
public const CHANGE_TYPE_OUT_CLAIM = 2; // 出库(领用) public const CHANGE_TYPE_OUT_CLAIM = 2; // 出库(领用)
+2
View File
@@ -159,6 +159,8 @@ class InvItemService
'operator_name' => $name, 'operator_name' => $name,
'remark' => '管理员修改数量', 'remark' => '管理员修改数量',
], $change_qty); ], $change_qty);
return $data;
} }
/** /**
@@ -39,6 +39,7 @@ class InvStockLogService
'operator_id' => $data['operator_id'] ?? null, 'operator_id' => $data['operator_id'] ?? null,
'operator_name' => $data['operator_name'] ?? null, 'operator_name' => $data['operator_name'] ?? null,
'remark' => $data['remark'] ?? null, 'remark' => $data['remark'] ?? null,
'updated_at' => time(),
'created_at' => time(), 'created_at' => time(),
]); ]);
} }