Procházet zdrojové kódy

修复waybill的覆盖

Zhouzhendong před 5 roky
rodič
revize
e245362171

+ 0 - 4
app/Http/Controllers/WaybillsController.php

@@ -3,9 +3,7 @@
 namespace App\Http\Controllers;
 
 
-use App\Http\Controllers\Api\thirdPart\flux\WaybillController;
 use App\UploadFile;
-use App\User;
 use App\WaybillAuditLog;
 use App\WaybillPriceModel;
 use App\Carrier;
@@ -638,8 +636,6 @@ class WaybillsController extends Controller
             $thumbnail=storage_path('app/public/'.$uploadFile->url.'-thumbnail.'.$uploadFile->type);
             if (file_exists($bulky) && file_exists($common) && file_exists($thumbnail)){
                 unlink($bulky);unlink($common);unlink($thumbnail);
-            }else{
-                return ['success'=>false];
             }
         }
         UploadFile::where('table_name','waybills')->whereIn('table_id',$ids)->delete();

+ 1 - 1
resources/views/layouts/menu.blade.php

@@ -17,7 +17,7 @@
                     <span class="fa fa-calendar-check-o" style="color: #1b4b72"></span>
                     订单管理</a></li> @endcan
         @can('运输管理')
-            <li class="nav-item"><a href="{{url("files")}}" class="nav-link"
+            <li class="nav-item"><a href="{{url("waybill/index")}}" class="nav-link"
                                     :class="{active:isActive('waybill',1)}">
                     <span class="fa fa-truck" style="color: #4c2584"></span>
                     运输管理</a></li> @endcan

+ 5 - 0
resources/views/waybill/index.blade.php

@@ -713,6 +713,11 @@
                     $('#'+id).remove();
                 },
                 deleteImg(){
+                    if (this.checkData.length <= 0) {
+                        tempTip.setDuration(2000);
+                        tempTip.showSuccess('没有勾选任何记录');
+                        return;
+                    }
                     if (!confirm('确定要删除所选图片吗?'))return;
                     let _this=this;
                     axios.post('{{url('waybill/deleteImg')}}',{ids:_this.checkData})