订单信息

This commit is contained in:
liu
2026-08-11 18:35:54 +08:00
parent cba0e7d1bb
commit 5a3995d6ba
6 changed files with 194 additions and 45 deletions
+21 -8
View File
@@ -14,16 +14,18 @@ class StoreOrderModel extends Model
{
use HasFactory;
/** 状态:待汇总(可被采购单生成归集、可取消) */
public const STATUS_PENDING = 0;
/** 状态:已汇总(已生成采购单) */
public const STATUS_SUMMARIZED = 1;
/** 状态:待接单(可被采购单生成归集、可取消) */
public const int STATUS_PENDING = 0;
/** 状态:已接单(已生成采购单) */
public const int STATUS_SUMMARIZED = 1;
/** 状态:采购中 */
public const int STATUS_DELIVERING = 2;
/** 状态:配送中 */
public const STATUS_DELIVERING = 2;
public const int STATUS_DISTRIBUTION = 3;
/** 状态:已完成 */
public const STATUS_COMPLETED = 3;
public const int STATUS_COMPLETED = 4;
/** 状态:已取消 */
public const STATUS_CANCELLED = 9;
public const int STATUS_CANCELLED = 9;
protected $table = 'store_order';
protected $primaryKey = 'id';
@@ -35,17 +37,28 @@ class StoreOrderModel extends Model
'total_quantity',
'total_weight',
'total_amount',
'product_amount',
'added_amount',
'box_num',
'tray_num',
'status',
'remark',
];
protected $casts = [
'store_id' => 'integer',
'purchase_id' => 'integer',
'statement_id' => 'integer',
'order_date' => 'date:Y-m-d',
'total_quantity' => 'decimal:2',
'total_quantity' => 'integer',
'total_weight' => 'decimal:3',
'total_amount' => 'decimal:2',
'product_amount' => 'decimal:2',
'added_amount' => 'decimal:2',
'box_num' => 'integer',
'tray_num' => 'integer',
'status' => 'integer',
'created_at' => 'datetime:Y-m-d H:i:s',
];
/**