瀏覽代碼

添加权限

chenrui 3 年之前
父節點
當前提交
3984a60500

+ 2 - 1
src/config/router.config.js

@@ -726,7 +726,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '出入库明细',
                   icon: 'monitor',
-                  hidden: true
+                  hidden: true,
+                  permission: 'B_inventoryInventoryQueryStock'
                 }
               }
             ]

+ 2 - 1
src/views/customerManagement/customerInfo/list.vue

@@ -118,7 +118,8 @@
             id="customerManagementList-del-btn">删除</a-button> -->
         </template>
         <template slot="enableAction" slot-scope="text, record">
-          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+          <a-switch v-if="$hasPermissions('B_customer_customerInfo_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+          <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
         </template>
       </s-table>
     </a-spin>

+ 15 - 2
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -60,6 +60,7 @@
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
               <a-button
                 type="primary"
+                v-if="$hasPermissions('B_inventoryInventoryQueryExport')"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
@@ -102,8 +103,20 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
-          <a-button size="small" type="link" class="button-warning" @click="goWarehouseDetail(record)" id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_inventoryInventoryQueryDetail')"
+            class="button-success"
+            @click="goDetail(record)"
+            id="inventoryQueryList-detail-btn">库存详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
+            class="button-warning"
+            @click="goWarehouseDetail(record)"
+            id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
         </template>
       </s-table>
     </a-spin>

+ 11 - 5
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -1,6 +1,6 @@
 <template>
   <a-card size="small" :bordered="false" class="inventoryWarningList-wrap">
-	  <a-spin :spinning="spinning" tip="Loading...">
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="pageInit(1)">
@@ -83,8 +83,8 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button type="primary" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
-        <span style="margin-left: 8px">
+        <a-button type="primary" v-if="$hasPermissions('B_inventoryWarningBatchSave')" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
+        <span style="margin-left: 8px" v-if="$hasPermissions('B_inventoryWarningBatchSave')">
           <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
@@ -153,7 +153,13 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button type="primary" size="small" class="button-info" @click="handleSave(record)" id="inventoryWarningList-add-btn">保存</a-button>
+          <a-button
+            type="primary"
+            v-if="$hasPermissions('B_inventoryWarningSave')"
+            size="small"
+            class="button-info"
+            @click="handleSave(record)"
+            id="inventoryWarningList-add-btn">保存</a-button>
         </template>
       </a-table>
     </a-spin>
@@ -315,7 +321,7 @@ export default {
           this.selectedRowKeys = []
           this.selectedRows = []
           this.spinning = false
-        }else{
+        } else {
           this.spinning = false
         }
       })

+ 3 - 3
src/views/inventoryManagement/satelliteWarehouseInventory/list.vue

@@ -10,7 +10,7 @@
           :rules="rules"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          @keyup.enter.native="getStockList(1)" >
+          @keyup.enter.native="handleSearch" >
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称" prop="customer.customerSn">
@@ -36,7 +36,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="satelliteWarehouseInventoryList-replenishment" type="primary" @click="handleReplenishment">补货清单</a-button>
+        <a-button v-if="$hasPermissions('B_satelliteWarehouseInventoryDetail')" id="satelliteWarehouseInventoryList-replenishment" type="primary" @click="handleReplenishment">补货清单</a-button>
       </div>
       <!-- 列表 -->
       <a-table
@@ -52,7 +52,7 @@
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
+          <a-button size="small" v-if="$hasPermissions('B_satelliteWarehouseInventoryAdd')" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
         </template>
       </a-table>
     </a-spin>

+ 2 - 2
src/views/productManagement/productInfo/list.vue

@@ -86,7 +86,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1820, y: tableHeight }"
+        :scroll="{ x: 1880, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -161,7 +161,7 @@ export default {
         { title: '产品编码', dataIndex: 'code', width: 220, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center', ellipsis: true },
         { title: '经销批发价', dataIndex: 'specialPrice', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '终端价', dataIndex: 'terminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },