Forráskód Böngészése

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 5 éve
szülő
commit
b146c8306d

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

@@ -227,7 +227,7 @@ class CustomerController extends Controller
     public function projectArea(Request $request)
     {
         if(!Gate::allows('项目管理-项目-面积')){ return redirect('denied');  }
-        $areas = app('OwnerAreaReportService')->paginate($request->input(),["owner"=>function($query){$query->with(["customer","ownerStoragePriceModels.unit"]);},"userOwnerGroup"]);
+        $areas = app('OwnerAreaReportService')->paginate($request->input(),["owner.customer","ownerStoragePriceModel.unit","userOwnerGroup"]);
         $ownerGroups = app('UserOwnerGroupService')->getSelection();
         $customers = app('CustomerService')->getSelection();
         $owners = app('OwnerService')->getIntersectPermitting();

+ 12 - 2
app/Http/Controllers/TestController.php

@@ -166,10 +166,20 @@ class TestController extends Controller
 
     public function test()
     {
-        $month = "2021-02";
-        dd(Carbon::parse($month)->lastOfMonth()->format("d"));
+        $error = [];
+        try{
+            $d = 0/0;
+            $this->a(null);
+        }catch (\Error|\Exception $e){
+            $error[] = "错了".$e->getMessage();
+        }
+        throw new \Exception(json_encode($error));
         return view("test");
     }
+    public function a(int $c)
+    {
+        return $c;
+    }
     public function restoreResetInstantBill()
     {
         ini_set('max_execution_time', 2500);

+ 1 - 1
app/Jobs/OrderCreateInstantBill.php

@@ -41,7 +41,7 @@ class OrderCreateInstantBill implements ShouldQueue
                 try{
                     if (!$service->createInstantBill($order))
                         LogService::log(__METHOD__,"ERROR-订单生成即时账单",$order->toJson());
-                }catch (\Exception $e){
+                }catch (\Error|\Exception $e){
                     LogService::log(__METHOD__,"ERROR-订单生成即时账单",$order->toJson()." | ".$e->getMessage());
                     $errors = ["order_".$order->id.":".$e->getMessage()];
                 }

+ 3 - 4
app/Jobs/StoreCreateInstantBill.php

@@ -4,13 +4,11 @@ namespace App\Jobs;
 
 use App\Services\LogService;
 use App\Services\StoreService;
-use App\Store;
 use Illuminate\Bus\Queueable;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Database\Eloquent\Collection;
 use Illuminate\Foundation\Bus\Dispatchable;
 use Illuminate\Queue\InteractsWithQueue;
-use Illuminate\Queue\SerializesModels;
 
 class StoreCreateInstantBill implements ShouldQueue
 {
@@ -38,13 +36,14 @@ class StoreCreateInstantBill implements ShouldQueue
      */
     public function handle(StoreService $service)
     {
+        if (!$this->stores)return;
         $errors = [];
         foreach ($this->stores as $store){
             try{
                 $service->createInstantBill($store);
-            }catch (\Exception $e){
+            }catch (\Error|\Exception $e){
                 LogService::log(__METHOD__,"ERROR-入库生成即时账单",$store->toJson()." | ".$e->getMessage());
-                $errors = ["order_".$store->id.":".$e->getMessage()];
+                $errors = ["store_".$store->id.":".$e->getMessage()];
             }
         }
         if ($errors)throw new \Exception(json_encode($errors));

+ 4 - 4
resources/views/customer/project/create.blade.php

@@ -59,9 +59,9 @@
             <div v-if="base == 'two'">
                 @include("customer.project.part._two")
             </div>
-            <div v-if="base == 'three'">
-                <div v-show="isLoad">@include("customer.project.part._three")</div>
-                <div class="row justify-content-center text-secondary" style="min-height: 200px;margin-left: -25%" v-show="!isLoad">
+            <div v-show="base == 'three'">
+                <div v-if="isLoad">@include("customer.project.part._three")</div>
+                <div class="row justify-content-center text-secondary" style="min-height: 200px;margin-left: -25%" v-if="!isLoad">
                     <div class="align-self-center h1">
                         <i class="fa fa-spinner fa-pulse"></i>
                     </div>
@@ -2552,11 +2552,11 @@
                     return data;
                 },
                 transformData(data,key,font=false){
-                    if (!data[key])return;
                     let html = '<div class="float-left small ';
                     if (font)html += "text-primary font-weight-bold";
                     else html += "text-secondary";
                     html+='">';
+                    if (!data[key])return html+"无</div>";
                     switch (key) {
                         case "amount_interval":
                             data[key].forEach((am,i)=>{

+ 2 - 2
resources/views/customer/project/part/_auditComparison.blade.php

@@ -312,8 +312,8 @@
             </div>
             <div class="modal-footer">
                 <button @click="exeAuditOrRecoverModel()" class="float-right btn" :class="isAudit ? 'btn-success' : 'btn-danger'">
-                    <label v-if="isAudit">审核所有操作</label>
-                    <label v-else>回滚所有操作</label>
+                    <label v-if="isAudit">审核内容确认</label>
+                    <label v-else>回滚内容确认</label>
                 </button>
             </div>
         </div>