소스 검색

售后需求增加按钮权限

jingshuyong 11 달 전
부모
커밋
490c84faef

+ 7 - 2
src/views/salesServiceManagement/accessory/index.vue

@@ -13,6 +13,7 @@
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
           <el-button
+            v-if="$hasPermission('eom:sparepartsapply:save')"
             size="small"
             type="primary"
             icon="el-icon-plus"
@@ -32,7 +33,9 @@
         <template v-slot:action="{ row }">
           <el-link
             type="primary"
-            v-if="row.source == 0"
+            v-if="
+              row.source == 0 && $hasPermission('eom:sparepartsapply:update')
+            "
             :underline="false"
             @click="openEdit(row, 'edit')"
             >修改</el-link
@@ -45,7 +48,9 @@
             >发起流程</el-link
           > -->
           <el-popconfirm
-            v-if="row.source == 0"
+            v-if="
+              row.source == 0 && $hasPermission('eom:sparepartsapply:delete')
+            "
             class="ele-action"
             title="确定要删除此配件记录吗?"
             @confirm="handleRemove(row)"

+ 7 - 6
src/views/salesServiceManagement/demandList/index.vue

@@ -22,6 +22,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('', 'add')"
+            v-if="$hasPermission('eom:aftersalesdemand:save')"
             >新建</el-button
           >
         </template>
@@ -33,18 +34,18 @@
             @click="openEdit(row, 'view')"
             >{{ row.code }}</el-link
           >
-        </template>
+        </template> 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
             type="primary"
             :underline="false"
             @click="openEdit(row, 'edit')"
-            v-if="btnShow(row)"
+            v-if="btnShow(row) && $hasPermission('eom:aftersalesdemand:update')"
             >修改</el-link
           >
           <el-popconfirm
-            v-if="btnShow(row)"
+            v-if="btnShow(row) && $hasPermission('eom:aftersalesdemand:delete')"
             class="ele-action"
             title="确定要删除此售后需求吗?"
             @confirm="handleRemove(row)"
@@ -59,7 +60,7 @@
             type="primary"
             :underline="false"
             @click="handleCommand('handleAudit', row)"
-            v-if="btnShow(row)"
+            v-if="btnShow(row) && $hasPermission('eom:aftersalesdemand:submit')"
             >提交</el-link
           >
           <!-- <el-popconfirm
@@ -76,8 +77,8 @@
               >
             </template>
           </el-popconfirm> -->
-          <el-popconfirm
-            v-if="btnShow(row)"
+          <el-popconfirm 
+            v-if="btnShow(row) && $hasPermission('eom:aftersalesdemand:close')"
             class="ele-action"
             title="确定要关闭此售后需求吗?"
             @confirm="closeRevoke(row)"

+ 2 - 1
src/views/salesServiceManagement/knowledge/index.vue

@@ -13,6 +13,7 @@
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
           <el-button
+            v-if="$hasPermission('eom:aftersalesfaultknowledgebase:save')"
             size="small"
             type="primary"
             icon="el-icon-plus"
@@ -36,7 +37,7 @@
         <template v-slot:action="{ row }">
           <!-- v-if="!row.workId" -->
           <el-link
-            v-if="!row.workId"
+            v-if="!row.workId && $hasPermission('eom:aftersalesfaultknowledgebase:update')"
             type="primary"
             :underline="false"
             @click="openEdit(row, 'edit')"

+ 3 - 2
src/views/salesServiceManagement/recycle/index.vue

@@ -18,6 +18,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="openEdit('', 'add')"
+            v-if="$hasPermission('eom:aftersalesaccessoryapply:save')"
             >新建</el-button
           >
         </template>
@@ -31,7 +32,7 @@
         </template>
         <template v-slot:action="{ row }">
           <el-link
-            v-if="row.source == 0"
+            v-if="row.source == 0 && $hasPermission('eom:aftersalesaccessoryapply:update')"
             type="primary"
             :underline="false"
             @click="openEdit(row, 'edit')"
@@ -44,7 +45,7 @@
           >
             <template v-slot:reference>
               <el-link
-                v-if="row.source == 0"
+                v-if="row.source == 0 && $hasPermission('eom:aftersalesaccessoryapply:delete')"
                 type="danger"
                 icon="el-icon-delete"
                 :underline="false"

+ 6 - 6
src/views/salesServiceManagement/toDoList/index.vue

@@ -39,15 +39,15 @@
           <el-link
             type="primary"
             :underline="false"
-            @click="handleUpdate(row, 'edit')"
-            v-if="[0, 4, 5].includes(row.planStatus)"
+            @click="handleUpdate(row, 'edit')" 
+            v-if="[0, 4, 5].includes(row.planStatus) && $hasPermission('eom:aftersalesplan:update')"
             >修改</el-link
           >
           <el-popconfirm
             class="ele-action"
             title="确认删除这条记录吗?"
             @confirm="cancel(row)"
-            v-if="[0, 4, 5].includes(row.planStatus)"
+            v-if="[0, 4, 5].includes(row.planStatus) && $hasPermission('eom:aftersalesplan:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete"
@@ -59,14 +59,14 @@
             type="primary"
             :underline="false"
             @click="handleCommand('handleRevocation', row)"
-            v-if="row.planStatus == 1"
+            v-if="row.planStatus == 1 && $hasPermission('eom:aftersalesplan:revocation')"
             >撤回</el-link
           >
           <el-link
             type="primary"
             :underline="false"
             @click="handleCommand('handleDispatchOrders', row)"
-            v-if="[0, 4, 5].includes(row.planStatus)"
+            v-if="[0, 4, 5].includes(row.planStatus) && $hasPermission('eom:aftersalesplan:sendOrder')"
             >派单</el-link
           >
         </template>
@@ -101,7 +101,7 @@
     planRevocation,
     checkByPlanId
   } from '@/api/salesServiceManagement/index';
-  import { getToken } from '@/utils/token-util';
+  // import { getToken } from '@/utils/token-util';
   import dictMixins from '@/mixins/dictMixins';
 
   export default {

+ 8 - 8
src/views/salesServiceManagement/workOrder/index.vue

@@ -38,40 +38,40 @@
             type="primary"
             :underline="false"
             @click="declarationForm(row, 'edit')"
-            v-if="row.orderStatus == 1 || row.orderStatus == 6"
+            v-if="(row.orderStatus == 1 || row.orderStatus == 6) && $hasPermission('eom:aftersalesworkorder:update')"
             >修改</el-link
-          >
+          > 
           <el-link
             type="primary"
             :underline="false"
             @click="declarationForm(row, 'report')"
-            v-if="row.orderStatus == 1 || row.orderStatus == 6"
+            v-if="(row.orderStatus == 1 || row.orderStatus == 6) && $hasPermission('eom:aftersalesworkorder:reportWorking')"
             >报工</el-link
           >
           <el-link
             type="primary"
-            v-if="row.orderStatus == 0"
+            v-if="row.orderStatus == 0 && $hasPermission('eom:aftersalesworkorder:receive')"
             :underline="false"
             @click="handleCommand('handleReceive', row)"
             >接收</el-link
           >
           <el-link
             type="primary"
-            v-if="row.orderStatus == 0 || row.orderStatus == 1"
+            v-if="(row.orderStatus == 0 || row.orderStatus == 1) && $hasPermission('eom:aftersalesworkorder:reassignment')"
             :underline="false"
             @click="handleCommand('toRedeploy', row)"
             >转派</el-link
           >
           <el-link
             type="primary"
-            v-if="row.orderStatus == 1 || row.orderStatus == 2"
+            v-if="(row.orderStatus == 1 || row.orderStatus == 2) && $hasPermission('eom:sparepartsapply:save')"
             :underline="false"
             @click="handleCommand('addSpareItems', row)"
             >申请配件</el-link
           >
           <el-link
             type="primary"
-            v-if="acceptShow(row)"
+            v-if="acceptShow(row) && $hasPermission('eom:aftersalesworkorder:checkAndAccept')"
             :underline="false"
             @click="handleCommand('checkAndAccept', row)"
             >验收</el-link
@@ -79,7 +79,7 @@
           <!--    v-if="row.orderStatus == 4" -->
           <el-link
             type="primary"
-            v-if="evaluateShow(row)"
+            v-if="evaluateShow(row) && $hasPermission('eom:aftersalesworkorder:comment')"
             :underline="false"
             @click="handleCommand('evaluate', row)"
             >评价</el-link