ajun пре 4 година
родитељ
комит
f8fb0620e0

+ 2 - 1
app/Http/Controllers/DischargeTaskController.php

@@ -41,8 +41,9 @@ class DischargeTaskController extends Controller
         }
         $roles = Role::query()->where('name','like','人事%')->get();
         $personnel = app(UserService::class)->hasRoles(Auth::user(),$roles);
+        $personnel = $personnel ? 'true' : 'false';
         if(array_search(Auth::user()["name"],config("users.superAdmin"))!==false){
-            $personnel = true;
+            $personnel = 'true';
         }
         $warehouses = Warehouse::query()->select('id', 'name')->get();
         $facilitators = Facilitator::query()->select('name', 'id')->get();

+ 2 - 0
resources/views/personnel/discharge/task/_table.blade.php

@@ -11,10 +11,12 @@
         <th>单位</th>
         <th>单价</th>
         <th>收费</th>
+        @can('人事管理-卸货-成本可见')
         <template v-if="isPersonnel">
             <th>成本单价</th>
             <th>成本收费</th>
         </template>
+        @endcan
         <th>状态</th>
         <th>备注</th>
         <th>操作</th>