浏览代码

线上与本地引擎不同引起的插入错误

Zhouzhendong 5 年之前
父节点
当前提交
99a0942f5b

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

@@ -182,10 +182,10 @@ class DeliveryAppointmentController extends Controller
         $len = strlen($key);
         $id = substr($key,5,$len-32);
         $md5 = substr($id,0,5).substr($id,5+$len-32);
-        if ($md5!==md5(date("m-d")))return "错误";
+        if ($md5!==md5(date("m-d")))return view("exception.404");
         /** @var \stdClass $appointment */
         $appointment = DeliveryAppointment::query()->with("cars")->find($id);
-        if (!$appointment || $appointment->user_id != Auth::id())return "错误";
+        if (!$appointment || $appointment->user_id != Auth::id())return view("exception.404");
         return $appointment->cars;
     }
 }

+ 1 - 1
app/Http/Controllers/TestController.php

@@ -166,7 +166,7 @@ class TestController extends Controller
            if ($o->owner_price_expresses_count)$arr[] = 2;
            if ($o->owner_price_logistics_count)$arr[] = 3;
            if ($o->owner_price_direct_logistics_count)$arr[] = 4;
-           $o->update(["relevance"=>json_encode($arr)]);
+           $o->update(["relevance"=>$arr]);
        }
     }
     public function zzd(){

+ 2 - 2
app/Services/OwnerService.php

@@ -388,14 +388,14 @@ sql
                 array_splice($relevance,$index,1);
                 $update[] = [
                     "id"=>$ow->id,
-                    "relevance"=>json_encode($relevance),
+                    "relevance"=>$relevance,
                 ];
             }
             if (!$exist && !$isDestroy){
                 array_push($relevance,$type);
                 $update[] = [
                     "id"=>$ow->id,
-                    "relevance"=>json_encode($relevance),
+                    "relevance"=>$relevance,
                 ];
             }
         }

+ 1 - 14
resources/views/customer/project/index.blade.php

@@ -98,27 +98,14 @@
                 owners : [
                     @foreach($owners as $owner)
                     {   id : "{{$owner->id}}",
-                        relevance:[@foreach($owner->relevance ?? [] as $r)@json($r),@endforeach],
+                        relevance:@json($owner->relevance),
                         customer_name:"{{$owner->customer ? $owner->customer->name : ''}}",
-                        //tax_rate  : "{{--{{$owner->tax_rate}}--}}",
                         name : "{{$owner->name}}",
-                        //code : "{{--{{$owner->code}}--}}",
                         created_at : "{{$owner->created_at}}",
-                        /*contracts : [
-                            {{--@foreach($owner->contracts as $contract)
-                            { number:"{{$contract->contract_number}}",salesman:"{{$contract->salesman}}" },
-                            @endforeach--}}
-                        ],*/
                         customer_company_name:"{{$owner->customer ? $owner->customer->company_name : ''}}",
-                        //linkman:"{{--{{$owner->linkman}}--}}",
-                        //phone_number:"{{--{{$owner->phone_number}}--}}",
                         user_owner_group_name:"{{$owner->userOwnerGroup ? $owner->userOwnerGroup->name : ''}}",
                         user_work_group_name:"{{$owner->userWorkGroup ? $owner->userWorkGroup->name : ''}}",
-                        //owner_storage_price_model_using_type:"{{--{{ implode(",",array_unique(array_column(($owner->ownerStoragePriceModels)->toArray(),"using_type")))  }}--}}",
-                        //owner_area_report_accounting_area : "{{--{{ $owner->ownerAreaReport ? $owner->ownerAreaReport->accounting_area : '' }}--}}",
-                        //waring_line_on : "{{--{{$owner->waring_line_on}}--}}",
                         is_activation : "{{$owner->deleted_at ? '否' : '是'}}",
-                        //description : "{{--{{$owner->description}}--}}",
                         ownerStoragePriceModels : {!! $owner->ownerStoragePriceModels !!},
                     },
                     @endforeach

+ 17 - 0
resources/views/store/deliveryAppointment/success.blade.php

@@ -0,0 +1,17 @@
+@extends('layouts.app')
+@section('title')客户预约-盘收一体@endsection
+
+@section('content')
+    <span id="nav2">
+    @component('store.menu')@endcomponent
+    @component('store.deliveryAppointment.menu')@endcomponent
+    </span>
+    <div class="text-center h1">
+        <span></span>
+    </div>
+@stop
+
+@section("lastScript")
+    <script>
+    </script>
+@stop