CaiWuXiTong/app/Models/Business/CourierFreightRow.php
qiuxiang f805920fda 快递运费:新增「店铺名称 / 快递单号 / 条形码」列,并按「财务系统运费整理.xlsx」重新导入
- 迁移:courier_freight_rows 增加 express_no / barcode / shop_name(可空)
- 导入器支持可选列(快递单号 / 条形码 / 店铺名称),老文件缺这三列也能导;XlsxSheetReader 支持可选列表头
- 页面与导出新增三列;运费差 / 结算运费 / 其他附加费汇总 / 退件费 表头与取数逻辑不变
- 测试:新增新列导入、老文件兼容、页面展示用例
2026-10-12 11:56:00 +08:00

49 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Models\Business;
use App\Abstracts\Model;
/**
* 财务经营报表 › 快递运费(来源:快递方提供的成本运费明细导入)。
*/
class CourierFreightRow extends Model
{
protected $table = 'courier_freight_rows';
protected $fillable = [
'company_id',
'source',
'part',
'transaction_no',
'express_no',
'barcode',
'shop_name',
'freight_amount',
];
protected $casts = [
'freight_amount' => 'decimal:4',
];
public static function columnLabels(): array
{
return [
'source' => '来源',
'part' => '成品配件',
'transaction_no' => '交易单号',
'express_no' => '快递单号',
'barcode' => '条形码',
'shop_name' => '店铺名称',
'freight_amount' => '提供成本运费',
];
}
public static function fieldTypes(): array
{
return [
'freight_amount' => 'currency',
];
}
}