chenrui hai 1 ano
pai
achega
e5ff8dec3b

+ 5 - 5
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -38,7 +38,7 @@
         </a-descriptions>
       </a-card>
       <a-card size="small" title="规则设置" :bordered="false" class="pages-wrap">
-        <div class="btnGroup" v-if="$route.query.type=='rule'">
+        <div class="btnGroup" v-if="$hasPermissions('B_rulesAddEdit')&&$route.query.type=='rule'">
           <a-button type="primary" class="button-warning" @click="openBtnModal('SendProducts')" :disabled="disabled">买产品送产品</a-button>
           <a-button style="margin:0 10px" type="primary" class="button-warn" @click="openBtnModal('SendAmount')" :disabled="disabled">买产品送采购额</a-button>
           <a-button type="primary" @click="openBtnModal('SpecialOffer')" :disabled="disabled">特价产品</a-button>
@@ -82,21 +82,21 @@
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
-              v-if="$route.query.type=='rule'"
+              v-if="$hasPermissions('B_rulesAddEdit')&&$route.query.type=='rule'"
               size="small"
               type="link"
               @click="handleEdit(record)"
               class="button-info"
               id="promotionList-edit-btn">编辑</a-button>
             <a-button
-              v-if="$route.query.type=='rule'"
+              v-if="$hasPermissions('B_rulesDel')&&$route.query.type=='rule'"
               size="small"
               type="link"
               @click="handleDel(record)"
               class="button-error"
               id="promotionList-del-btn">删除</a-button>
             <a-button
-              v-if="!$route.query.type"
+              v-if="$hasPermissions('B_dealerPromotionDetail')&&!$route.query.type"
               size="small"
               type="link"
               @click="handleDetail(record)"
@@ -111,7 +111,7 @@
             style="padding:0 30px;"
             @click="handleSubmit"
             :disabled="disabled"
-            v-if="mainContentList&&mainContentList.length>0">提交</a-button>
+            v-if="$hasPermissions('B_rulesSubmit')&&(mainContentList&&mainContentList.length>0)">提交</a-button>
         </div>
       </a-card>
     </a-spin>

+ 7 - 5
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -88,10 +88,12 @@
         <!-- 发布状态 -->
         <template slot="releaseStatus" slot-scope="text, record">
           <a-switch
+            v-if="$hasPermissions('B_dealerPromotionStatus')"
             id="promotionList-enable"
             @change="changeStatus(record)"
             :disabled="record.state!='NOT_START' && record.state!='RUNNING'"
             :checked="record.enabledFlag == 1 ? true : false"></a-switch>
+          <span v-else>--</span>
         </template>
         <!-- 操作 -->
         <!--  state 待提交:WAIT_SUBMIT 待审核:WAIT_AUDIT 未开始:NOT_START 进行中:RUNNING 审核不通过:AUDIT_REJECT 已结束:IS_OVER -->
@@ -101,7 +103,7 @@
             type="link"
             class="button-warning"
             @click="handleSetRules(record)"
-            v-if="record.state =='WAIT_SUBMIT'||record.state == 'AUDIT_REJECT'"
+            v-if="$hasPermissions('B_dealerPromotionRules')&&(record.state =='WAIT_SUBMIT'||record.state == 'AUDIT_REJECT')"
             id="allocateBillList-examine-btn">规则设置</a-button>
           <a-button
             size="small"
@@ -113,28 +115,28 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'"
+            v-if="$hasPermissions('B_dealerPromotionAudit')&&record.state == 'WAIT_AUDIT'"
             @click="handleCheck(record)"
             class="button-info"
             id="promotionList-edit-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'NOT_START' || record.state=='RUNNING'"
+            v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING')"
             @click="handleTime(record)"
             class="button-info"
             id="promotionList-edit-btn">促销时间变更</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'NO_START' || record.state=='RUNNING'"
+            v-if="$hasPermissions('B_overActive')&&(record.state == 'NO_START' || record.state=='RUNNING')"
             @click="handleEnd(record)"
             class="button-info"
             id="promotionList-edit-btn">终止</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_SUBMIT'||record.state == 'AUDIT_REJECT'"
+            v-if="$hasPermissions('B_dealerPromotionDel')&&(record.state == 'WAIT_SUBMIT'||record.state == 'AUDIT_REJECT')"
             @click="handleDel(record)"
             class="button-error"
             id="promotionList-del-btn">删除</a-button>