Browse Source

Merge branch 'waybill_ZD'

LD 6 years ago
parent
commit
63c29dc5e7
1 changed files with 22 additions and 9 deletions
  1. 22 9
      resources/views/weight/package/statistics.blade.php

+ 22 - 9
resources/views/weight/package/statistics.blade.php

@@ -303,24 +303,37 @@
                             }
                             }
                             return true;
                             return true;
                         });
                         });
-                    };
-                    let logistics=data.selectedLogistics;
-                    if (logistics.length>0){
-                        for (let i=0;i<logistics.length;i++){
+                        let logistics=data.selectedLogistics;
+                        if (logistics.length>0){
+                            for (let i=0;i<logistics.length;i++){
+                                data.logisticsAll.every(function (logistic) {
+                                    if (logistic.id==logistics[i]){
+                                        data.logistics[logistic.id]=logistic.name;
+                                        return false;
+                                    }
+                                    return  true;
+                                });
+                            }
+                        }else{
+                            data.logisticsAll.every(function (logistic) {
+                                data.logistics[logistic.id]=logistic.name;
+                                return true;
+                            });
+                        }
+                    }
+                    if (uriParts.length<=1){
+                        data.packages.every(function (package) {
                             data.logisticsAll.every(function (logistic) {
                             data.logisticsAll.every(function (logistic) {
-                                if (logistic.id==logistics[i]){
+                                if (package.logistic_id==logistic.id){
                                     data.logistics[logistic.id]=logistic.name;
                                     data.logistics[logistic.id]=logistic.name;
                                     return false;
                                     return false;
                                 }
                                 }
                                 return  true;
                                 return  true;
                             });
                             });
-                        }
-                    }else{
-                        data.logisticsAll.every(function (logistic) {
-                            data.logistics[logistic.id]=logistic.name;
                             return true;
                             return true;
                         });
                         });
                     }
                     }
+
                 },
                 },
                 owner_seek:function (e) {
                 owner_seek:function (e) {
                     let _this=this;
                     let _this=this;