From cf23bcebe3ee4e92e238a7568e7f17b97b32b685 Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 23 Oct 2026 13:39:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=88=90=E6=9C=AC=EF=BC=9A?= =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E5=8D=95=E5=8F=B7=E4=BF=9D=E6=8C=81=E4=B8=9A?= =?UTF-8?q?=E7=BB=A9=E6=98=8E=E7=BB=86=E5=8E=9F=E5=A7=8B=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/SyncStoreReceiptProductCost.php | 7 ++++++- .../pages/financial-operations/product-costs.blade.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/SyncStoreReceiptProductCost.php b/app/Console/Commands/SyncStoreReceiptProductCost.php index 8ddda55d..75a3848a 100644 --- a/app/Console/Commands/SyncStoreReceiptProductCost.php +++ b/app/Console/Commands/SyncStoreReceiptProductCost.php @@ -307,6 +307,11 @@ class SyncStoreReceiptProductCost extends Command $mismatchRows = 0; foreach ($billByCore as $core => $bill) { + // 展示单号与业绩明细完全一致;$core 只用于订单侧清洗后匹配。 + $displayOrderNo = (string) ($bill->online_order_no ?? ''); + if ($displayOrderNo === '') { + $displayOrderNo = $core; + } foreach ($this->costLines($lines[$core] ?? []) as $line) { $short = $shortNames['by_provider'][$line['warehouse']] ?? ''; $price = $short !== '' ? ($prices[$short . "\0" . $line['sku']] ?? null) : null; @@ -370,7 +375,7 @@ class SyncStoreReceiptProductCost extends Command 'platform' => $bill->platform, 'occurred_date' => $bill->occurred_date, 'store_name' => $bill->store_name, - 'online_order_no' => $core, + 'online_order_no' => $displayOrderNo, 'warehouse' => $line['warehouse'] !== '' ? $line['warehouse'] : null, 'warehouse_short_name' => $short !== '' ? $short : null, 'product_code' => $line['sku'], diff --git a/resources/views/business/pages/financial-operations/product-costs.blade.php b/resources/views/business/pages/financial-operations/product-costs.blade.php index 7c231fc1..3f43c36a 100644 --- a/resources/views/business/pages/financial-operations/product-costs.blade.php +++ b/resources/views/business/pages/financial-operations/product-costs.blade.php @@ -106,6 +106,7 @@
口径:以「业绩明细」的账单行为基数(发生时间 / 店铺名称 / 线上单号),按「店铺 + 线上订单号」展开订单侧商品行, 只取收入金额有数据且不为 0 的账单行,「种菜金额」有数据(>0)的账单行整条排除、不参与匹配; + 线上单号直接展示业绩明细中的原始格式;匹配订单时仍使用清洗后的核心单号。 一行 = 一个发货仓库的一个商品;发货仓库取订单的聚水潭仓库名称, 仓库简称按仓库映射表用「仓储方」匹配「仓库名含主仓」的那条取简称(没有主仓行时认同名仓库, 常州简尚家居有限公司对应映射表里的「配件单仓」行),