Procházet zdrojové kódy

添加按钮权限

695593266@qq.com před 7 měsíci
rodič
revize
c7644f5284

+ 61 - 15
src/views/productionPlan/index.vue

@@ -82,14 +82,21 @@
         <el-button
           type="success"
           size="mini"
-          v-if="timeDimensionPlanType == 3"
+          v-if="
+            timeDimensionPlanType == 3 &&
+            $hasPermission('aps:productionplan:add')
+          "
           @click="factAdd(3)"
           >新增</el-button
         >
         <!-- <el-button type="success" size="mini" @click="homogeneityInspect"
           >齐套性检查</el-button
         > -->
-        <el-dropdown trigger="click" @command="homogeneityInspect">
+        <el-dropdown
+          trigger="click"
+          @command="homogeneityInspect"
+          v-if="$hasPermission('aps:productionpaln:homogeneityInspect')"
+        >
           <el-button size="mini" type="success">齐套性检查</el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item command="1"> 自制件 </el-dropdown-item>
@@ -100,24 +107,55 @@
         <el-button
           type="primary"
           size="mini"
-          v-if="isshow"
+          v-if="
+            isshow && $hasPermission('aps:productionplan:plandecomposition')
+          "
           @click="disassemblePlan"
           >计划分解</el-button
         >
-        <el-button type="primary" size="mini">补单计划</el-button>
-        <el-button type="info" size="mini">计划行事历</el-button>
-        <el-button type="warning" size="mini">预警设置</el-button>
-        <el-button type="primary" size="mini" v-if="isshow" @click="handleMerge"
+        <el-button
+          type="primary"
+          size="mini"
+          v-if="$hasPermission('aps:productionplan:orderplan')"
+          >补单计划</el-button
+        >
+        <el-button
+          type="info"
+          size="mini"
+          v-if="$hasPermission('aps:productionplan:plannedcalendar')"
+          >计划行事历</el-button
+        >
+        <el-button
+          type="warning"
+          size="mini"
+          v-if="$hasPermission('aps:productionplan:alertsettings')"
+          >预警设置</el-button
+        >
+        <el-button
+          type="primary"
+          size="mini"
+          v-if="isshow && $hasPermission('aps:productionplan:batchmerging')"
+          @click="handleMerge"
           >合批</el-button
         >
-        <el-button type="danger" size="mini">延期申请</el-button>
-        <el-button type="danger" size="mini">变更申请</el-button>
+        <el-button
+          type="danger"
+          size="mini"
+          v-if="$hasPermission('aps:productionplan:extensionapplication')"
+          >延期申请</el-button
+        >
+        <el-button
+          type="danger"
+          size="mini"
+          v-if="$hasPermission('aps:productionplan:changerequest')"
+          >变更申请</el-button
+        >
         <el-button
           type="info"
           icon="el-icon-upload2"
           size="mini"
           @click="$refs.importDialogRef.open()"
-          v-if="isImport"
+          v-if="isImport && $hasPermission('aps:productionplan:upload')"
           >导入</el-button
         >
       </div>
@@ -248,7 +286,8 @@
               row.status == 2 &&
               row.splitBatch != 1 &&
               row.approvalStatus != 1 &&
-              row.approvalStatus != 2
+              row.approvalStatus != 2 &&
+              $hasPermission('aps:productionplan:info')
             "
             @click="handleOrderPublish(1, row)"
           >
@@ -256,7 +295,7 @@
           </el-link>
           <el-link
             type="primary"
-            v-if="row.status == 3"
+            v-if="row.status == 3 && $hasPermission('aps:productionplan:info')"
             :underline="false"
             @click="handleOrderPublish(2, row)"
           >
@@ -268,7 +307,8 @@
               row.splitBatch != 2 &&
               row.splitBatch != 1 &&
               !row.joinPlanCode &&
-              activeName == 'first'
+              activeName == 'first' &&
+              $hasPermission('aps:productionplan:update')
             "
             type="primary"
             :underline="false"
@@ -278,7 +318,12 @@
           </el-link>
 
           <el-link
-            v-if="row.joinPlanCode && activeName == 'first' && row.status != 4"
+            v-if="
+              row.joinPlanCode &&
+              activeName == 'first' &&
+              row.status != 4 &&
+              $hasPermission('aps:productionplan:delete')
+            "
             type="danger"
             :underline="false"
             @click="handleDel(row)"
@@ -291,7 +336,8 @@
               !row.childList.length &&
               activeName == 'first' &&
               isLineNumbre &&
-              row.status != 4
+              row.status != 4 &&
+              $hasPermission('aps:productionplan:delete')
             "
             type="danger"
             :underline="false"

+ 4 - 1
src/views/saleOrder/components/order-search.vue

@@ -429,7 +429,10 @@
               type="danger"
               size="mini"
               @click="batchDelete"
-              v-if="activeName == 'first'"
+              v-if="
+                activeName == 'first' &&
+                $hasPermission('aps:salesorder:batchDelete')
+              "
               >批量删除</el-button
             >
 

+ 5 - 1
src/views/saleOrder/index.vue

@@ -94,7 +94,11 @@
             </el-link>
 
             <el-popconfirm
-              v-if="row.orderSource != 1 && activeName == 'first'"
+              v-if="
+                row.orderSource != 1 &&
+                activeName == 'first' &&
+                $hasPermission('aps:salesorder:delete')
+              "
               class="ele-action"
               title="确定要删除此销售订单吗?"
               @confirm="remove(row)"

+ 10 - 3
src/views/workOrder/index.vue

@@ -120,7 +120,10 @@
         </template>
         <template v-slot:action="{ row }">
           <el-link
-            v-if="dispatchPermission(row)"
+            v-if="
+              dispatchPermission(row) &&
+              $hasPermission('aps:workorder:dispatch')
+            "
             :underline="false"
             icon="el-icon-truck"
             type="primary"
@@ -129,7 +132,11 @@
             首工序派单
           </el-link>
           <el-link
-            v-if="unpackShow(row) && row.splitResidue !== 0"
+            v-if="
+              unpackShow(row) &&
+              row.splitResidue !== 0 &&
+              $hasPermission('aps:workorder:ordersplitting ')
+            "
             :underline="false"
             type="primary"
             @click="toUnpack(row)"
@@ -140,7 +147,7 @@
             class="ele-action"
             title="确定要删除此子单吗?"
             @confirm="remove(row)"
-            v-if="removeShow(row)"
+            v-if="removeShow(row) && $hasPermission('aps:workorder:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">