Browse Source

添加权限

chenrui 1 year ago
parent
commit
82be6c78c3

+ 8 - 8
src/config/router.config.js

@@ -2458,8 +2458,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '轮胎销售统计报表',
-              icon: 'profile'
-              // permission: 'M_tireSalesReportList'
+              icon: 'profile',
+              permission: 'M_tireSalesReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2470,8 +2470,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '轮胎销售统计报表',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_tireSalesReportList'
+                  hidden: true,
+                  permission: 'M_tireSalesReportList'
                 }
               }
             ]
@@ -2906,8 +2906,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '产品追溯列表',
-              icon: 'radar-chart'
-              // permission: 'M_productSourcePathList'
+              icon: 'radar-chart',
+              permission: 'M_productSourcePathList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2918,8 +2918,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '产品追溯列表',
                   icon: 'radar-chart',
-                  hidden: true
-                  // permission: 'M_productSourcePathList'
+                  hidden: true,
+                  permission: 'M_productSourcePathList'
                 }
               }
             ]

+ 5 - 3
src/views/productManagement/productSourcePath/list.vue

@@ -116,7 +116,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_salesOrderTotalExport')"
+                v-if="$hasPermissions('B_productSourceExport')"
                 id="productSourceList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -135,6 +135,7 @@
             type="primary"
             id="outboundOrder-export"
             :loading="loading"
+            v-if="$hasPermissions('B_productSourceImport')"
             @click="openGuideModal = true">导入</a-button>
           <div class="tongji-bar" style="margin-left:10px;">
             产品总款数:<strong>{{ totalData&&(totalData.productTypeNum || totalData.productTypeNum==0) ? totalData.productTypeNum : '0' }}</strong>;
@@ -159,7 +160,8 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
+            <a-button v-if="$hasPermissions('B_productSourceSeeInfo')" size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
+            <span v-else>质保信息</span>
           </template>
         </s-table>
       </a-spin>
@@ -332,7 +334,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 252
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {

+ 3 - 3
src/views/reportData/tireSalesReport/dealerList.vue

@@ -60,7 +60,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_salesOrderTotalExport')"
+                v-if="$hasPermissions('B_tireSalesDealerReportExport')"
                 id="tireSalesDealerList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -164,8 +164,8 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '12%', align: 'center' },
-        { title: '区域', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },

+ 3 - 3
src/views/reportData/tireSalesReport/subareaList.vue

@@ -45,7 +45,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_salesOrderTotalExport')"
+                v-if="$hasPermissions('B_tireSalesAreaReportExport')"
                 id="salesOrderTotalList-export">导出</a-button>
             </a-col>
           </a-row>
@@ -136,8 +136,8 @@ export default {
       totalData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '区域', dataIndex: 'subareaAreaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaAreaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '采购数量', dataIndex: 'buyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'storeAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },