Jelajahi Sumber

按钮权限

zhouhao 2 tahun lalu
induk
melakukan
aac069dac0

+ 9 - 7
src/views/supply/apply/apply_list.vue

@@ -381,7 +381,7 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
+                    $checkBtnRole('apply', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     ((!scope.row.automaticStatus &&
                     scope.row.examineStatus === 'SAVE') || (
                       scope.row.automaticStatus &&
@@ -397,7 +397,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
+                    $checkBtnRole('apply', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     !scope.row.automaticStatus &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -409,7 +409,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
+                    $checkBtnRole('examine', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     !scope.row.automaticStatus &&
                     scope.row.examineStatus === 'OK'
                   "
@@ -433,7 +433,7 @@
                 </el-button>
                 <el-button
                   v-if="
-                    $checkBtnRole('edit', $route.meta.roles) &&
+                    $checkBtnRole('edit', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                       ((!scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                       scope.row.type === 2) ||
@@ -449,7 +449,7 @@
                 </el-button>
                 <el-button
                   v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
+                    $checkBtnRole('examine', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     !scope.row.automaticStatus &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -461,7 +461,7 @@
                 <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('del', $route.meta.roles) &&
+                    $checkBtnRole('del', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     ((!scope.row.automaticStatus &&
                     scope.row.examineStatus !== 'OK') )
                   "
@@ -581,7 +581,9 @@ export default {
         status: '',
         remark: ''
       },
-      categoryList: []
+      categoryList: [],
+      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
+
     }
   },
 

+ 9 - 7
src/views/supply/apply/engin_list.vue

@@ -410,7 +410,7 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                   $checkBtnRole('apply', $route.meta.roles) &&
+                   $checkBtnRole('apply', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                    ( (!scope.row.automaticStatus &&
                     scope.row.examineStatus === 'SAVE' ) ||
                       (scope.row.automaticStatus &&
@@ -425,7 +425,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
+                    !scope.row.automaticStatus && (!isCustomer && scope.row.type!==2) &&
                     $checkBtnRole('apply', $route.meta.roles) &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -437,7 +437,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
+                    !scope.row.automaticStatus && (!isCustomer && scope.row.type!==2) &&
                     $checkBtnRole('examine', $route.meta.roles) &&
                     scope.row.examineStatus === 'OK'
                   "
@@ -461,7 +461,7 @@
                 </el-button>
                 <el-button
                   v-if="
-                  $checkBtnRole('edit', $route.meta.roles) &&
+                  $checkBtnRole('edit', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
                     ((!scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                       scope.row.type === 2 ) ||
@@ -476,7 +476,7 @@
                 </el-button>
                 <el-button
                   v-if="
-                    !scope.row.automaticStatus &&
+                    !scope.row.automaticStatus && (!isCustomer && scope.row.type!==2) &&
                     $checkBtnRole('examine', $route.meta.roles) &&
                     scope.row.examineStatus === 'WAIT'
                   "
@@ -488,7 +488,7 @@
                 <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="$checkBtnRole('del', $route.meta.roles) &&
+                  v-if="$checkBtnRole('del', $route.meta.roles) && (!isCustomer && scope.row.type!==2) &&
 ( (!scope.row.automaticStatus && scope.row.examineStatus !== 'OK'))"
                   style="margin-left: 10px"
                   title="确定删除吗?"
@@ -609,7 +609,9 @@ export default {
         remark: ''
       },
       isShow: false,
-      categoryList: []
+      categoryList: [],
+      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
+
     }
   },