瀏覽代碼

添加权限

caojunjie 4 年之前
父節點
當前提交
2da09af563
共有 2 個文件被更改,包括 16 次插入6 次删除
  1. 4 3
      src/combination/listComponent.vue
  2. 12 3
      src/views/purchaseRequest/index.vue

+ 4 - 3
src/combination/listComponent.vue

@@ -10,6 +10,7 @@
           :icon="item.icon"
           :plain="item.plain?item.plain:false"
           :disabled="item.disabled"
+          :v-hasPermi="item.hasPermi"
           @click="buttonList(item)">
           {{ item.name }}
         </el-button>
@@ -76,9 +77,9 @@
         <template slot-scope="scope">
           <span v-if="item.name === '操作'">
             <span v-if="item.operation == 1">
-              <el-button type="text" @click="viewMethod(scope)">查看</el-button>
+              <el-button type="text" @click="viewMethod(scope)" :v-hasPermi="hasPermi.lookup">查看</el-button>
 <!--              <el-button type="text" @click="modification(scope)">修改</el-button>-->
-              <el-button type="text" @click="deletion(scope)" v-if="scope.row.fBillstatus < 4">删除</el-button>
+              <el-button type="text" @click="deletion(scope)" v-if="scope.row.fBillstatus < 4" :v-hasPermi="hasPermi.disappear">删除</el-button>
             </span>
             <span v-if="item.operation == 2">
               <el-button type="text" @click="deleteRow(scope.$index, tableData)" :disabled="item.disabled">移除</el-button>
@@ -170,7 +171,7 @@ import { addSet, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
 export default {
   name: 'listComponent',
-  props: ['tableData', 'listStyle','queryList','customButton','arrow','setRowList','isItHidden','tatolLabel','listData'],
+  props: ['tableData', 'listStyle','queryList','customButton','arrow','setRowList','isItHidden','tatolLabel','listData','hasPermi'],
   data() {
     return {
       showSetting: false,

+ 12 - 3
src/views/purchaseRequest/index.vue

@@ -20,6 +20,7 @@
         @showSearch="showSearch"
         @feedback="feedback"
         @getList="getList"
+        :hasPermi="hasPermi"
         :isItHidden="isItHidden"
         :customButton="customButton"
         :listStyle="listStyle"
@@ -63,6 +64,7 @@
         @getList="getList"
         @deletRows="deletRows"
         @totalAmount="totalAmount"
+        :hasPermi="hasPermi"
         :tatolLabel="tatolLabel"
         :isItHidden="isItHidden"
         :customButton="contentButton"
@@ -192,6 +194,10 @@ export default {
         fFeeunitid: [],
         fStltypeid: []
       },
+      hasPermi:{
+        lookup:['anpin:stockControl:query'],
+        disappear:['anpin:stockControl:remove']
+      },
       setTimeout:'',
       searchWhether: true,
       pageDisplay: true,
@@ -420,7 +426,8 @@ export default {
           size: 'mini',
           icon: 'el-icon-edit',
           name: '新增',
-          disabled: false
+          disabled: false,
+          hasPermi:['anpin:stockControl:anPingApply']
         },
         // {
         //   type:'warning',
@@ -434,13 +441,15 @@ export default {
           size: 'mini',
           icon: 'el-icon-upload2',
           name: '导出',
-          disabled: false
+          disabled: false,
+          hasPermi:['anpin:stockControl:export']
         }, {
           type: 'success',
           size: 'mini',
           icon: 'el-icon-c-scale-to-original',
           name: '复制新增',
-          disabled: false
+          disabled: false,
+          hasPermi:['anpin:stockControl:generateReceipts']
         }
       ],
       contentButton: [