ソースを参照

德邦打印--剔除权限

king 4 年 前
コミット
590921cccf

+ 8 - 5
app/Http/Controllers/ControlPanelController.php

@@ -172,12 +172,15 @@ class ControlPanelController extends Controller
 
         //data数据处理
         $real_data = [];
-        foreach ($machines as $v){
-            $temp = [$v['name']];
-            foreach ($data as $val){
-                array_push($temp, array_column($val, $v['id'])? array_sum( array_column($val, $v['id'])) : 0);
+        foreach ($machines as $v) {
+            $temp = [];
+            foreach ($data as $val) {
+                array_push($temp, array_column($val, $v['id']) ? array_sum(array_column($val, $v['id'])) : 0);
+            }
+            if (array_sum($temp) > 0) {
+                array_unshift($temp, $v['name']);
+                array_push($real_data, $temp);
             }
-            array_push($real_data,$temp);
         }
         array_unshift($title, 'product');
         array_unshift($real_data, $title);

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

@@ -185,7 +185,7 @@ class WaybillController extends Controller
             DB::rollBack();
             return "调度失败".$e->getMessage();
         }
-        return redirect('transport/waybill/index')->with('successTip','运单“'.$waybill->waybill_number.'”调度成功 '. ($msg??''));
+        return redirect('transport/waybill/index')->with('successTip','运单“'.$waybill->waybill_number.'”创建成功 '. ($msg??''));
     }
 
     public function checkWaybillPriceModel($logistic_id,$destination_city_id,$carrier_weight,$carrier_weight_unit_id){