ANG YU 4 лет назад
Родитель
Сommit
cf31fc87cb

+ 2 - 2
app/Http/Controllers/SettlementBillStoreFeeReportController.php

@@ -63,9 +63,9 @@ class SettlementBillStoreFeeReportController extends Controller
         ]);
         $json = [];
         foreach ($reports as $report) {
-            $operation = $owner_price_operation_fees->firstWhere('owner_price_operation_id', $report['owner_price_operation_id']);
+            $operation = $owner_price_operation_fees->firstWhere('work_name', $report['work_name']);
             $json[] = [
-                $operation['owner_price_operation']['name'] ?? $operation['ownerPriceOperation']['name'],
+                $report['work_name'],
                 $report['unit_price'],
                 $report['amount'],
                 $operation['fee'],

+ 5 - 18
app/Services/OwnerStoreFeeDetailService.php

@@ -24,19 +24,6 @@ class OwnerStoreFeeDetailService
     }
 
 
-//    /**
-//     * @param $type
-//     * @return int|mixed
-//     */
-//    public function switchType($type)
-//    {
-//        //枚举转换
-//        if (is_string($type)) {
-//            $type = OwnerStoreFeeDetail::$enums['type'][$type];
-//        }
-//        return $type;
-//    }
-
     /**
      * @param $counting_month
      * @param $owner_id
@@ -60,13 +47,13 @@ class OwnerStoreFeeDetailService
         foreach ($details as $detail) {
             $results[] = [
                 $detail->ownerFeeDetail->worked_at ?? null,
-                $detail->type ?? null,
-                $detail->storeItem->asn_line_code ?? null,
-                $detail->storeItem->sku ?? null,
-                $detail->storeItem->commodity->name ?? null,
+                $detail->work_name ?? null,
+                $detail->asn_code ?? null,
+                $detail->sku ?? null,
+                $detail->commodity->name ?? null,
                 $detail->amount ?? null,
                 $detail->unit_price ?? null,
-                $detail->ownerFeeDetail->work_fee ?? null,
+                $detail->fee ?? null,
             ];
         }
         return $results;

+ 3 - 2
resources/views/finance/settlementBills/storeFee/detail/index.blade.php

@@ -138,8 +138,9 @@
                     {name: 'index', value: '序号', neglect: true},
                     {name: 'worked_at', value: '作业时间'},
                     {name: 'work_type', value: '作业名称'},
-                    {name: 'asn_number', value: '入库单号'},
-                    {name: 'sku', value: '商品条码'},
+                    {name: 'asn', value: '入库单号'},
+                    {name: 'sku', value: '商家编码'},
+                    {name: 'barcode', value: '商品条码'},
                     {name: 'commodity_name', value: '商品名称'},
                     {name: 'amount', value: '数量'},
                     {name: 'price', value: '单价'},