ANG YU 4 gadi atpakaļ
vecāks
revīzija
581b4e20ab

+ 1 - 2
app/Http/Controllers/SettlementBillExpressFeeDetailController.php

@@ -45,9 +45,8 @@ class SettlementBillExpressFeeDetailController extends Controller implements Set
         $owners = Owner::query()->selectRaw("id,name")->whereIn('id', $permittingOwnerIds)->get();
         $owner = Owner::query()->selectRaw("name,id")->find($owner_id);
         $this->archiveService = app('OwnerBillReportArchiveService');
-        $isArchived = $this->archiveService->isArchived($counting_month, $owner_id, OwnerBillReportArchive::$enums['type']['快递费-明细']);
         $request = $this->buildRequest($request, $counting_month,$owner_id);
-        return view('finance.settlementBills.expressFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request', 'isArchived'));
+        return view('finance.settlementBills.expressFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request'));
     }
 
     public function export(Request $request)

+ 1 - 3
app/Http/Controllers/SettlementBillStoreFeeDetailController.php

@@ -48,10 +48,8 @@ class SettlementBillStoreFeeDetailController extends Controller implements Settl
         ]);
         $owners = Owner::query()->selectRaw("id,name")->whereIn('id', $permittingOwnerIds)->get();
         $owner = Owner::query()->selectRaw("name,id")->find($owner_id);
-        $this->archiveService = app('OwnerBillReportArchiveService');
-        $isArchived = $this->archiveService->isArchived($counting_month, $owner_id, $this->service::TYPE);
         $request = $this->buildRequest($request, $counting_month,$owner_id);
-        return view('finance.settlementBills.storeFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request', 'isArchived'));
+        return view('finance.settlementBills.storeFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request'));
     }
 
     public function export(Request $request)

+ 1 - 2
app/Http/Controllers/SettlementBillStoreOutFeeDetailController.php

@@ -39,9 +39,8 @@ class SettlementBillStoreOutFeeDetailController extends Controller implements Se
         ]);
         $owners = Owner::query()->selectRaw("id,name")->whereIn('id', $permittingOwnerIds)->get();
         $owner = Owner::query()->selectRaw("name,id")->find($owner_id);
-        $isArchived = $this->archiveService->isArchived($counting_month, $owner_id, $this->service::TYPE);
         $request = $this->buildRequest($request, $counting_month,$owner_id);
-        return view('finance.settlementBills.storeOutFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request', 'isArchived'));
+        return view('finance.settlementBills.storeOutFee.detail.index', compact('details', 'paginateParams', 'owners', 'owner', 'request'));
     }
 
     public function export(Request $request)

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

@@ -74,12 +74,12 @@ class SettlementBillStoreOutFeeReportController extends Controller implements Se
         return Export::make($row, $json, "出库费合计");
     }
 
-    private function buildWorkNameFeeTotal($reports, $work_name_fee_total)
+    private function buildWorkNameFeeTotal($reports, $work_name_fee_total): array
     {
         $result = [];
         $reports_grouped = $reports->groupBy('owner_price_operation_id');
         foreach ($work_name_fee_total as $work_name_fee_total_item) {
-            $work_name_fee_total_item['data'] = $reports_grouped[$work_name_fee_total_item['id']];
+            $work_name_fee_total_item['data'] = $reports_grouped[$work_name_fee_total_item['id']]??[];
             $result[] = $work_name_fee_total_item;
         }
         return $result;

+ 7 - 0
app/Services/OwnerLogisticFeeDetailService.php

@@ -112,4 +112,11 @@ class OwnerLogisticFeeDetailService implements \App\Interfaces\SettlementBillDet
     {
         // TODO: Implement add() method.
     }
+
+    public function getTotalFee($owner_id, $counting_month)
+    {
+        // TODO: Implement getTotalFee() method.
+    }
+
+
 }

+ 1 - 1
database/seeds/OwnerAreaReportTableSeeder.php

@@ -15,7 +15,7 @@ class OwnerAreaReportTableSeeder extends Seeder
     public function run()
     {
         OwnerAreaReport::query()->truncate();
-        OwnerStoragePriceModel::query()->truncate();
+//        OwnerStoragePriceModel::query()->truncate();
         $owners = \App\Owner::query()->get();
         foreach ($owners as $owner) {
             $priceModels = factory(OwnerStoragePriceModel::class)->times(2)->create();

+ 1 - 1
database/seeds/OwnerBillReportTableSeeder.php

@@ -12,7 +12,7 @@ class OwnerBillReportTableSeeder extends Seeder
      */
     public function run()
     {
-        OwnerBillReport::query()->truncate();
+//        OwnerBillReport::query()->truncate();
         $owners = \App\Owner::query()->get();
         foreach ($owners as $owner) {
             factory(OwnerBillReport::class)->create([

+ 1 - 1
database/seeds/SettlementBillSeeder.php

@@ -17,7 +17,7 @@ class SettlementBillSeeder extends Seeder
     {
         //清除确定订单记录
         \App\OwnerBillReportArchive::query()->truncate();
-        \App\OwnerFeeDetail::query()->truncate();
+//        \App\OwnerFeeDetail::query()->truncate();
         $this->call([
             //仓储费
             SettlementBillStorageFeeSeeder::class,

+ 0 - 1
resources/views/finance/settlementBills/expressFee/detail/index.blade.php

@@ -73,7 +73,6 @@
                     @endforeach
                 ],
                 owners: [@foreach($owners as $owner){name: '{{ $owner->id }}', value: '{{ $owner->name}}'},@endforeach],
-                isArchived: {!! $isArchived !!},
                 request: {!! $request !!},
                 selectTr: 0,
             },

+ 2 - 2
resources/views/finance/settlementBills/storageFee/index.blade.php

@@ -57,7 +57,7 @@
                     <th>金额</th>
                 </tr>
                 <tr v-for="(areaReport,i) in areaReports">
-                    <td class="text-center pt-4 bg-light">@{{ areaReport.owner_storage_price_model.using_type }}</td>
+                    <td class="text-center pt-4 bg-light">@{{ areaReport.owner_storage_price_model? areaReport.owner_storage_price_model.using_type:'未定义' }}</td>
                     <td class="m-0 p-0">
                         <table class="table table-striped table-sm m-0 p-0">
                             <tr><td>平面区</td></tr>
@@ -73,7 +73,7 @@
                         </table>
                     </td>
                     <td>@{{ areaReport.accounting_area }}</td>
-                    <td>@{{ areaReport.owner_storage_price_model.price }}</td>
+                    <td>@{{ areaReport.owner_storage_price_model?areaReport.owner_storage_price_model.price:0 }}</td>
                     <td class="text-center pt-4 bg-light" v-if="i===0" :rowspan="areaReports.length">@{{ billReport.storage_fee }}</td>
                 </tr>
             </table>

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

@@ -36,10 +36,10 @@
                     <td><input class="checkItem" type="checkbox" :value="detail.id"></td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ detail.owner_fee_detail.worked_at }}</td>
-                    <td>@{{ detail.owner_price_operation.name }}</td>
+                    <td>@{{ detail.owner_price_operation?detail.owner_price_operation.name:'' }}</td>
                     <td>@{{ detail.store_item.asn_line_code }}</td>
                     <td>@{{ detail.store_item.sku }}</td>
-                    <td>@{{ detail.store_item.commodity.name }}</td>
+                    <td>@{{ detail.store_item.commodity?detail.store_item.commodity.name:'' }}</td>
                     <td>@{{ detail.amount}}</td>
                     <td>@{{ detail.unit_price}}</td>
                     <td>@{{ detail.owner_fee_detail.work_fee }}</td>
@@ -62,7 +62,6 @@
                 owner: {!! $owner !!},
                 details: [@foreach($details as $detail){!! $detail !!}, @endforeach],
                 owners: [@foreach($owners as $owner){name: '{{ $owner->id }}', value: '{{ $owner->name}}'},@endforeach],
-                isArchived: {!! $isArchived !!},
                 request: {!! $request !!},
                 selectTr: 0,
             },

+ 1 - 1
resources/views/finance/settlementBills/storeFee/report/index.blade.php

@@ -81,7 +81,7 @@
                     <th>合计</th>
                 </tr>
                 <tr v-for="(report,i) in reports">
-                    <td class="text-center pt-4 bg-light">@{{ report.owner_price_operation.name }}</td>
+                    <td class="text-center pt-4 bg-light">@{{ report.owner_price_operation?report.owner_price_operation.name:'' }}</td>
                     <td class="m-0 p-0">
                         <table class="table table-striped table-sm m-0 p-0">
                             <tr v-for="item in report.data">

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

@@ -34,11 +34,11 @@
                     <td><input class="checkItem" type="checkbox" :value="detail.id"></td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ detail.owner_fee_detail.worked_at }}</td>
-                    <td>@{{ detail.owner_price_operation.name }}</td>
+                    <td>@{{ detail.owner_price_operation?detail.owner_price_operation.name:'' }}</td>
                     <td>@{{ detail.source_bill }}</td>
                     <td>@{{ detail.owner_fee_detail.operation_bill }}</td>
                     <td>@{{ detail.commodity.sku }}</td>
-                    <td>@{{ detail.commodity.name }}</td>
+                    <td>@{{ detail.commodity?detail.commodity.name:'' }}</td>
                     <td>@{{ detail.amount}}</td>
                     <td>@{{ detail.price_remark}}</td>
                     <td>@{{ detail.owner_fee_detail.work_fee }}</td>
@@ -61,7 +61,6 @@
                 owner: {!! $owner !!},
                 details: [@foreach($details as $detail){!! $detail !!}, @endforeach],
                 owners: [@foreach($owners as $owner){name: '{{ $owner->id }}', value: '{{ $owner->name}}'},@endforeach],
-                isArchived: {!! $isArchived !!},
                 request: {!! $request !!},
                 selectTr: 0,
             },