Bläddra i källkod

问题追踪件 修改

ajun 5 år sedan
förälder
incheckning
81cefba164

+ 8 - 0
app/Http/Controllers/TestController.php

@@ -572,4 +572,12 @@ class TestController extends Controller
             $order->update(['logistic_id'=>$logistics->id]);
         }
     }
+
+    public function updateClient(){
+        $orderTrackings = OrderTracking::query()->with('commodities.package.order')->get();
+        $orderNo = data_get($orderTrackings,'*.commodities.package.order.code');
+        $orders =  Order::query()->where('code',$orderNo)->get();
+        OracleDOCOrderHeader::query()->whereIn('orderno',data_get('*'))->first();
+
+    }
 }

+ 2 - 1
app/Services/OrderPackageCommoditiesService.php

@@ -580,7 +580,8 @@ class OrderPackageCommoditiesService
             foreach ($actAllocationDetails as $actAllocationDetail) {
                 $logistic_number = $actAllocationDetail->picktotraceid;
                 if(in_array($logistic_number,['*','',null])){continue;}
-                $order_package = $order_package_logistic_numbers_map[$logistic_number];
+                $order_package = $order_package_logistic_numbers_map[$logistic_number] ?? false;
+                if(!$order_package){continue;}
                 $key = ' owner_code='.$actAllocationDetail->code.' code='.$actAllocationDetail->sku;
                 $commodity = $commodities_owner_code_code_map[$key] ?? false;
                 if(!$commodity){continue;}

+ 3 - 0
app/Services/OrderPackageService.php

@@ -453,6 +453,9 @@ class OrderPackageService
             $params = ['id'=>$order_package_id,'bulk' => null,'weight' => null];
             foreach ($orderPackageCommodity_list as $orderPackageCommodity) {
                 $commodity = $orderPackageCommodity->commodity;
+                if(!$commodity['length'] || !$commodity['width'] || !$commodity['height']){
+                    continue;
+                }
                 $bulk = bcmul($commodity['length'],$commodity['width'],5);
                 $bulk = bcmul($commodity['height'],$bulk,5);
                 $params['bulk'] +=  $bulk;

+ 19 - 35
resources/views/order/issue/index.blade.php

@@ -92,7 +92,7 @@
                         @endcannot
                         <th class="one-layer align-middle" rowspan="2" style="min-width: 120px">最终状态</th>
                         @cannot('订单管理-问题件-客户不可见')
-                        <th class="one-layer align-middle td-yellow" rowspan="2" style="min-width: 165px;">登记日期</th>
+                        <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 165px;">登记日期</th>
                         @endcannot
 
                         <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 165px;">订单日期</th>
@@ -678,9 +678,11 @@
                 this.isShowOrderInfo = false;
                 this.isShowRejectedBill= false;
                 this.isShowSecondOrderInfo= false;
-                let tr = $('.table-body')[0];
-                let countShow = $(tr).children('.child-layer-1').length;
+                let tr = $('.tr-yellow')[1];
+                let countShow = $(tr).children('.one-layer').length;
+                console.log(countShow);
                 $('.header-1').attr('colspan',countShow);
+
                 $('.tooltipTarget').tooltip({'trigger': 'hover'});
                 $('#list').removeClass("d-none");
 
@@ -745,55 +747,37 @@
                     deep: true
                 },
                 isShowOrderInfo(newValue){
-                    let tr = $('.table-body')[0];
+                    let tr = $('.tr-yellow')[1];
                     setTimeout(function(){
-                        let countShow = $(tr).children('.child-layer-2').length;
-                        let countHide = $(tr).children('.child-layer-2-hide').length;
-                        if(newValue){countHide+=2;}
-                        if(newValue===true){
-                            $('.header-2').attr('colspan',countHide+countShow);
+                        let countShow = $(tr).children('.tow-layer').length;
+                        if(newValue){
+                            $('.header-2').attr('colspan',countShow+2);
                         }else{
                             $('.header-2').attr('colspan',countShow);
                         }
                     },2);
                 },
                 isShowRejectedBill(newValue){
-                    let tr = $('.table-body')[0];
+                    let tr = $('.tr-yellow')[1];
                     let _this = this;
                     setTimeout(function(){
-                        let countShow = $(tr).children('.child-layer-3').length+2;
-                        let countHide = $(tr).children('.child-layer-3-hide').length;
-                        if(this.isShowRejectedBill){countHide+=4;}
-                        if(this.isShowSecondOrderInfo){countHide+=2;}
-                        if(newValue === true){
-                            countHide+=4;
-                        }
-                        if(_this.isShowSecondOrderInfo === true){
-                            countHide+=2;
-                        }
-                        if(newValue===true){
-                            $('.header-3').attr('colspan',countHide+countShow);
+                        let countShow = $(tr).children('.three-layer').length;
+                        if(newValue){
+                            $('.header-3').attr('colspan',countShow + 2 + (_this.isShowSecondOrderInfo?6:2));
                         }else{
-                            $('.header-3').attr('colspan',countShow);
+                            $('.header-3').attr('colspan',countShow+ 2 + (_this.isShowSecondOrderInfo?6:2));
                         }
                     },2);
                 },
                 isShowSecondOrderInfo(newValue){
-                    let tr = $('.table-body')[0];
+                    let tr = $('.tr-yellow')[1];
                     let _this = this;
                     setTimeout(function(){
-                        let countShow = $(tr).children('.child-layer-3').length+2;
-                        let countHide = $(tr).children('.child-layer-3-hide').length;
-                        if(_this.isShowRejectedBill === true){
-                            countHide+=4;
-                        }
-                        if(newValue === true){
-                            countHide+=2;
-                        }
-                        if(newValue===true){
-                            $('.header-3').attr('colspan',countHide+countShow);
+                        let countShow = $(tr).children('.three-layer').length;
+                        if(newValue){
+                            $('.header-3').attr('colspan',countShow + 2 + (_this.isShowRejectedBill?4:2));
                         }else{
-                            $('.header-3').attr('colspan',countShow+countHide);
+                            $('.header-3').attr('colspan',countShow + 2 + (_this.isShowRejectedBill?4:2));
                         }
                     },2);
                 },