财务经营报表 › 快递运费 之前是空页面。现在: - 新增 courier_freight_rows 表(来源 / 成品配件 / 交易单号 / 提供成本运费); - 新增 courier-freight:import 命令(xlsx / csv,按表头名匹配,支持 --replace); - 把聚水潭导出用的 xlsx 流式读取器改成通用名 XlsxSheetReader(本次文件 57.8 万行、解压后 115MB,必须流式读); - 页面按来源 / 成品配件 / 交易单号查询,列设置与分页复用通用目录表。
43 lines
875 B
PHP
43 lines
875 B
PHP
<?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',
|
||
'freight_amount',
|
||
];
|
||
|
||
protected $casts = [
|
||
'freight_amount' => 'decimal:4',
|
||
];
|
||
|
||
public static function columnLabels(): array
|
||
{
|
||
return [
|
||
'source' => '来源',
|
||
'part' => '成品配件',
|
||
'transaction_no' => '交易单号',
|
||
'freight_amount' => '提供成本运费',
|
||
];
|
||
}
|
||
|
||
public static function fieldTypes(): array
|
||
{
|
||
return [
|
||
'freight_amount' => 'currency',
|
||
];
|
||
}
|
||
}
|