chenrui 3 năm trước cách đây
mục cha
commit
c7c9d5faf4

+ 3 - 3
src/api/productUniversalCode.js

@@ -2,7 +2,7 @@ import { axios } from '@/utils/request'
 
 //  通用产品 列表  有分页
 export const productUniversalCodeList = (params) => {
-  const url = `/productUniversalCode/query/${params.pageNo}/${params.pageSize}`
+  const url = `/productUniversalCode/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -29,7 +29,7 @@ export const productUniversalCodeSave = (params) => {
 }
 //  通用产品 详情
 export const productUniversalCodeDetail = (params) => {
-  const url = `/productUniversalCode/${params.id}`
+  const url = `/productUniversalCode/findById/${params.id}`
   return axios({
     url: url,
     method: 'get'
@@ -37,7 +37,7 @@ export const productUniversalCodeDetail = (params) => {
 }
 //  产品编码模糊搜索  有分页  产品编码
 export const productCodeQueryList = (params) => {
-  const url = `/productUniversalCode/productList/${params.pageNo}/${params.pageSize}`
+  const url = `/productUniversalCode/productListPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({

+ 19 - 4
src/views/dealerManagement/dealerAccountManagement/list.vue

@@ -29,7 +29,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="dealerAccountList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="dealerAccountList-add" type="primary" v-if="$hasPermissions('B_dealerAccount_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -45,22 +45,37 @@
         <template slot="loginFlag" slot-scope="text, record">
           <a-switch
             id="dealerAccountList-enable"
+            v-if="$hasPermissions('B_dealerAccount_enable')"
             checkedChildren="启用"
             unCheckedChildren="禁用"
             @change="changeStatus(record)"
             :checked="record.loginFlag == 1 ? true : false" />
-          <!-- <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
+          <span v-else :style="{color:(record.loginFlag==1?'#00aa00':'#999')}"> {{ record.loginFlag==1? '已启用': '已禁用' }} </span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="dealerAccountList-edit-btn">编辑</a-button>
-          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="dealerAccountList-detail-btn">详情</a-button>
           <a-button
             size="small"
             type="link"
+            v-if="$hasPermissions('B_dealerAccount_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="dealerAccountList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_dealerAccount_detail')"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="dealerAccountList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_dealerAccount_reset')"
             class="button-warning"
             @click="handleReset(record)"
             id="dealerAccountList-reset-btn">重置密码</a-button>
+          <span v-if="!$hasPermissions('B_dealerAccount_edit') && !$hasPermissions('B_dealerAccount_detail') && !$hasPermissions('B_dealerAccount_reset')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 4 - 0
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -44,22 +44,26 @@
           <template slot="action" slot-scope="text, record">
             <a-button
               type="link"
+              v-if="$hasPermissions('B_dealerRelationshipBinding_unrelation')"
               class="button-error"
               size="small"
               icon="close"
               :id="'relationshipBindingList-delSubItem'+record.id"
               @click.stop="handleDisassociate(record)">取消关联</a-button>
+            <span v-else>--</span>
           </template>
         </a-table>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             type="link"
+            v-if="$hasPermissions('B_dealerRelationshipBinding_relation')"
             class="button-info"
             size="small"
             icon="plus"
             :id="'relationshipBindingList-addSubItem'+record.id"
             @click.stop="handleAssociate(record)">关联下级</a-button>
+          <span v-else>--</span>
         </template>
       </a-table>
     </a-spin>

+ 16 - 3
src/views/dealerManagement/marketingDivisionSet/list.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="marketingDivisionSetList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="marketingDivisionSetList-add" type="primary" v-if="$hasPermissions('B_marketingDivisionSet_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -28,8 +28,21 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="marketingDivisionSetList-edit-btn">编辑</a-button>
-          <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="marketingDivisionSetList-del-btn">删除</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_marketingDivisionSet_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="marketingDivisionSetList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_marketingDivisionSet_del')"
+            class="button-error"
+            @click="handleDel(record)"
+            id="marketingDivisionSetList-del-btn">删除</a-button>
+          <span v-if="!$hasPermissions('B_marketingDivisionSet_edit') && !$hasPermissions('B_marketingDivisionSet_del')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 10 - 7
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -38,6 +38,7 @@
               <a-button
                 style="margin-left: 5px"
                 type="primary"
+                v-if="$hasPermissions('B_merchantInfo_export')"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
@@ -53,7 +54,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="merchantInfoManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+        <a-button id="merchantInfoManagementList-add" type="primary" v-if="$hasPermissions('B_merchantInfo_add')" class="button-error" @click="handleAdd">新增</a-button>
       </div>
       <!-- 总计 -->
       <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -71,7 +72,8 @@
         bordered>
         <!-- 经销商 -->
         <template slot="dealerName" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dealerName }}</span>
+          <span v-if="$hasPermissions('B_merchantInfo_detail')" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dealerName }}</span>
+          <span v-else>{{ record.dealerName }}</span>
         </template>
         <!-- 区域 -->
         <template slot="area" slot-scope="text, record">
@@ -82,11 +84,12 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-warning" v-if="record.auditState == 'WAIT'" @click="handleAudit(record)" >审核</a-button>
-          <a-button size="small" type="link" class="button-success" @click="handleCooperation(record)" >合作设置</a-button>
-          <a-button size="small" type="link" class="button-error" v-if="record.auditState != 'WAIT'" @click="handleDistribution(record)">经销权</a-button>
-          <a-button size="small" type="link" class="button-primary" @click="handleLevel(record)">级别设置</a-button>
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
+          <a-button size="small" type="link" class="button-warning" v-if="record.auditState == 'WAIT' && $hasPermissions('B_merchantInfo_audit')" @click="handleAudit(record)" >审核</a-button>
+          <a-button size="small" type="link" class="button-success" v-if="$hasPermissions('B_merchantInfo_cooperation')" @click="handleCooperation(record)" >合作设置</a-button>
+          <a-button size="small" type="link" class="button-error" v-if="record.auditState != 'WAIT' && $hasPermissions('B_merchantInfo_distribution')" @click="handleDistribution(record)">经销权</a-button>
+          <a-button size="small" type="link" class="button-primary" v-if="$hasPermissions('B_merchantInfo_level')" @click="handleLevel(record)">级别设置</a-button>
+          <a-button size="small" type="link" class="button-info" v-if="$hasPermissions('B_merchantInfo_edit')" @click="handleEdit(record)">编辑</a-button>
+          <span v-if="!(record.auditState == 'WAIT' && $hasPermissions('B_merchantInfo_audit')) && !$hasPermissions('B_merchantInfo_cooperation') && !(record.auditState != 'WAIT' && $hasPermissions('B_merchantInfo_distribution')) && !$hasPermissions('B_merchantInfo_level') && !$hasPermissions('B_merchantInfo_edit')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 8 - 1
src/views/dealerManagement/rebateSettings/list.vue

@@ -28,7 +28,14 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="rebateSettingsList-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="$hasPermissions('B_rebateSettings_edit')"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="rebateSettingsList-edit-btn">编辑</a-button>
+        <span v-else>--</span>
       </template>
       <!-- 经销商名称 -->
       <template slot="jxs" slot-scope="text, record">

+ 1 - 1
src/views/dealerManagement/rebateSettings/queryChild.vue

@@ -45,7 +45,7 @@ export default {
       const fetchId = this.lastFetchId
       this.data = []
       this.fetching = true
-      dealerRelationList({ 'dealerName': dealerName, 'dealerLevelList': this.dealerLevelList, pageNo: 1, pageSize: 1000 }).then(res => {
+      dealerRelationList({ 'dealerName': dealerName, 'dealerLevelList': this.dealerLevelList, pageNo: 1, pageSize: 20 }).then(res => {
         if (fetchId !== this.lastFetchId) {
           return
         }

+ 1 - 0
src/views/productManagement/priceChangeRecord/list.vue

@@ -56,6 +56,7 @@
               <a-button
                 style="margin: 0 0 18px 8px"
                 type="primary"
+                v-if="$hasPermissions('B_priceChangeRecord_export')"
                 class="button-warning"
                 @click="handleExport"
                 :loading="exportLoading"

+ 17 - 3
src/views/productManagement/productBrand/list.vue

@@ -31,7 +31,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="productBrandList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="productBrandList-add" type="primary" v-if="$hasPermissions('B_productBrand_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -49,14 +49,28 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
-          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productBrandList-detail-btn">详情</a-button>
           <a-button
             size="small"
             type="link"
+            v-if="$hasPermissions('B_productBrand_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productBrandList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productBrand_detail')"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="productBrandList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productBrand_del')"
             class="button-error"
             @click="handleDel(record)"
             id="productBrandList-del-btn">删除</a-button>
+          <span v-if="!$hasPermissions('B_productBrand_edit') && !$hasPermissions('B_productBrand_detail') && !$hasPermissions('B_productBrand_del')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 5 - 4
src/views/productManagement/productCategory/list.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
       <div class="table-operator-nobor">
-        <a-button id="productCategoryList-add" type="primary" class="button-error" @click="handleAdd()">新增一级分类</a-button>
+        <a-button id="productCategoryList-add" type="primary" v-if="$hasPermissions('B_productCategory_add')" class="button-error" @click="handleAdd()">新增一级分类</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -20,7 +20,7 @@
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
-            v-if="record.productTypeLevel<3"
+            v-if="record.productTypeLevel<3 && $hasPermissions('B_productCategory_add')"
             type="link"
             class="button-success"
             size="small"
@@ -28,7 +28,7 @@
             id="productCategory-addSubItem"
             @click="handleAdd(record)">新增子级</a-button>
           <a-button
-            v-if="record.pid != 0"
+            v-if="record.pid != 0 && $hasPermissions('B_productCategory_edit')"
             type="link"
             class="button-info"
             size="small"
@@ -36,13 +36,14 @@
             id="productCategory-edit"
             @click="handleEdit(record)">编辑</a-button>
           <a-button
-            v-if="record.pid != 0"
+            v-if="record.pid != 0 && $hasPermissions('B_productCategory_del')"
             type="link"
             class="button-error"
             size="small"
             icon="delete"
             id="productCategory-del"
             @click="handleDel(record)">删除</a-button>
+          <span v-if="!(record.productTypeLevel<3 && $hasPermissions('B_productCategory_add')) && !(record.pid != 0 && $hasPermissions('B_productCategory_edit')) && !(record.pid != 0 && $hasPermissions('B_productCategory_del'))">--</span>
         </template>
       </s-table>
     </a-spin>

+ 25 - 9
src/views/productManagement/productInfo/list.vue

@@ -59,6 +59,7 @@
               <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
               <a-button style="margin: 0 0 18px 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
               <a-button
+                v-if="$hasPermissions('B_productInfo_export')"
                 style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
@@ -76,10 +77,11 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="productInfoList-add" type="primary" v-if="$hasPermissions('B_productInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
         <a-button
           id="productInfoList-batchAudit"
           type="primary"
+          v-if="$hasPermissions('B_productInfo_batchAudit')"
           class="button-warning"
           :loading="loadingAudit"
           @click="handleBatchAudit"
@@ -87,6 +89,7 @@
         <a-button
           id="productInfoList-batchLaunch"
           type="primary"
+          v-if="$hasPermissions('B_productInfo_batchLaunch')"
           class="button-primary"
           :loading="loadingLaunch"
           @click="handleBatchLaunch"
@@ -94,15 +97,15 @@
         <a-button
           id="productInfoList-batchDownline"
           type="primary"
+          v-if="$hasPermissions('B_productInfo_batchDownline')"
           class="button-grey"
           :loading="loadingDownline"
           @click="handleBatchDownline"
           style="margin: 0 15px;">批量下线</a-button>
-        <span style="margin-left: 8px">
+        <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
           <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
-      <!-- 列表 -->
       <s-table
         class="sTable"
         ref="table"
@@ -140,33 +143,46 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='WAIT'"
+            v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_audit')"
             class="button-warning"
             @click="handleAudit(record)"
             id="productInfoList-audit-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='WAIT_ONLINE'||record.state=='OFFLINE'"
+            v-if="(record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')"
             class="button-primary"
             @click="handleLaunch(record)"
             id="productInfoList-launch-btn">上线</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='ONLINE'"
+            v-if="record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')"
             class="button-grey"
             @click="handleDownline(record)"
             id="productInfoList-downline-btn">下线</a-button>
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productInfoList-edit-btn">编辑</a-button>
-          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productInfoList-detail-btn">详情</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='WAIT'"
+            v-if="$hasPermissions('B_productInfo_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productInfoList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productInfo_detail')"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="productInfoList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_del')"
             class="button-error"
             @click="handleDel(record)"
             id="productInfoList-del-btn">删除</a-button>
+          <span v-if="!(record.state=='WAIT' && $hasPermissions('B_productInfo_audit')) && !((record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')) && !(record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')) && !$hasPermissions('B_productInfo_edit') && !$hasPermissions('B_productInfo_detail') && !(record.state=='WAIT' && $hasPermissions('B_productInfo_del'))">--</span>
         </template>
       </s-table>
     </a-spin>

+ 3 - 3
src/views/productManagement/productLaunchAudit/list.vue

@@ -35,8 +35,8 @@
       </div>
       <!-- 列表 -->
       <div style="margin-bottom: 15px">
-        <a-button type="primary" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-        <span style="margin-left: 8px">
+        <a-button type="primary" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+        <span style="margin-left: 8px" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')">
           <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
@@ -60,7 +60,7 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='WAIT_ONLINE_AUDIT'"
+            v-if="record.state=='WAIT_ONLINE_AUDIT' && $hasPermissions('B_productLaunchAudit_audit')"
             class="button-warning"
             @click="handleAudit(record)"
             id="productLaunchAuditList-audit-btn">审核</a-button>

+ 8 - 1
src/views/productManagement/productLevel/list.vue

@@ -82,7 +82,14 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productLevelList-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="$hasPermissions('B_productLevel_edit')"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="productLevelList-edit-btn">编辑</a-button>
+        <span v-else>--</span>
       </template>
     </s-table>
     <!-- 编辑价格 -->

+ 3 - 3
src/views/productManagement/productOfflineAudit/list.vue

@@ -80,8 +80,8 @@
       </div>
       <!-- 列表 -->
       <div style="margin-bottom: 15px">
-        <a-button type="primary" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-        <span style="margin-left: 8px">
+        <a-button type="primary" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+        <span style="margin-left: 8px" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')">
           <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
@@ -105,7 +105,7 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state=='WAIT_OFFLINE_AUDIT'"
+            v-if="record.state=='WAIT_OFFLINE_AUDIT' && $hasPermissions('B_productOfflineAudit_audit')"
             class="button-warning"
             @click="handleAudit(record)"
             id="productOfflineAuditList-audit-btn">审核</a-button>

+ 3 - 2
src/views/productManagement/productPricing/list.vue

@@ -98,11 +98,12 @@
         <a-button
           size="small"
           type="link"
-          v-if="record.pricingState=='WAIT_PRICING_AUDIT'"
+          v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
           class="button-warning"
           @click="handleAudit(record)"
           id="productPricingList-audit-btn">审核</a-button>
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productPricingList-edit-btn">编辑</a-button>
+        <a-button size="small" type="link" v-if="$hasPermissions('B_productPricing_edit')" class="button-info" @click="handleEdit(record)" id="productPricingList-edit-btn">编辑</a-button>
+        <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
       </template>
     </s-table>
     <!-- 编辑价格 -->

+ 16 - 3
src/views/productManagement/productUniversal/list.vue

@@ -45,7 +45,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="productUniversalList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="productUniversalList-add" type="primary" v-if="$hasPermissions('B_productUniversal_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -64,8 +64,21 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productUniversalList-edit-btn">编辑</a-button>
-          <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="productUniversalList-del-btn">删除</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productUniversal_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productUniversalList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_productUniversal_del')"
+            class="button-error"
+            @click="handleDel(record)"
+            id="productUniversalList-del-btn">删除</a-button>
+          <span v-if="!$hasPermissions('B_productUniversal_edit') && !$hasPermissions('B_productUniversal_del')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 7 - 4
src/views/promotionRulesManagement/promotionRules/list.vue

@@ -29,7 +29,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="promotionRulesList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+        <a-button id="promotionRulesList-add" type="primary" v-if="$hasPermissions('B_promotionRules_add')" class="button-error" @click="openModal=true">新增</a-button>
       </div>
       <!-- 总计 -->
       <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -56,35 +56,38 @@
         <!-- 状态 -->
         <template slot="enabledFlag" slot-scope="text, record">
           <a-switch
+            v-if="$hasPermissions('B_promotionRules_enable')"
             id="promotionRulesList-enable"
             checkedChildren="启用"
             unCheckedChildren="禁用"
             @change="changeStatus(record)"
             :checked="record.enabledFlag == 1 ? true : false" />
-          <!-- <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span> -->
+          <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            v-if="record.enabledFlag != 1"
+            v-if="record.enabledFlag != 1 && $hasPermissions('B_promotionRules_ruleSet')"
             class="button-primary"
             @click="handleRule(record)"
             id="promotionRulesList-rule-btn">规则设置</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.enabledFlag != 1"
+            v-if="record.enabledFlag != 1 && $hasPermissions('B_promotionRules_edit')"
             class="button-info"
             @click="handleEdit(record)"
             id="promotionRulesList-edit-btn">编辑</a-button>
           <a-button
             size="small"
             type="link"
+            v-if="$hasPermissions('B_promotionRules_detail')"
             class="button-success"
             @click="handleDetail(record)"
             id="promotionRulesList-detail-btn">详情</a-button>
+          <span v-if="!(record.enabledFlag != 1 && $hasPermissions('B_promotionRules_ruleSet')) && !(record.enabledFlag != 1 && $hasPermissions('B_promotionRules_edit')) && !$hasPermissions('B_promotionRules_detail')">--</span>
         </template>
       </s-table>
     </a-spin>

+ 18 - 4
src/views/supplierManagement/supplierInfo/list.vue

@@ -19,7 +19,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="supplierInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="supplierInfoList-add" type="primary" v-if="$hasPermissions('B_supplierInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 总计 -->
       <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -36,12 +36,26 @@
         bordered>
         <!-- 状态 -->
         <template slot="enabledFlag" slot-scope="text, record">
-          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enableFlag" @change="changeFlagHandle(text, record)"/>
+          <a-switch v-if="$hasPermissions('B_supplierInfo_enabled')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enableFlag" @change="changeFlagHandle(text, record)"/>
+          <span v-else :style="{color:(record.enableFlag==1?'#00aa00':'#999')}"> {{ record.enableFlag==1? '已启用': '已禁用' }} </span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-warning" @click="handleRelated(record)" id="supplierInfoList-related-btn">关联产品</a-button>
-          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="supplierInfoList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_supplierInfo_relation')"
+            class="button-warning"
+            @click="handleRelated(record)"
+            id="supplierInfoList-related-btn">关联产品</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_supplierInfo_edit')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="supplierInfoList-edit-btn">编辑</a-button>
+          <span v-if="!$hasPermissions('B_supplierInfo_relation') && !$hasPermissions('B_supplierInfo_edit')">--</span>
         </template>
       </s-table>
     </a-spin>