Bläddra i källkod

删除按钮权限修改

gks 1 år sedan
förälder
incheckning
3d0600a154
1 ändrade filer med 77 tillägg och 16 borttagningar
  1. 77 16
      src/views/norm/quotaBonded.vue

+ 77 - 16
src/views/norm/quotaBonded.vue

@@ -193,7 +193,13 @@
             >修改</el-button
           >
           <el-button
-            v-if="checkPermi(['business:QUOTABONDED:remove'])"
+            v-if="
+              (scope.row.auditStatus == 0 || scope.row.auditStatus == null) &&
+              (scope.row.approvalStatus == 0 ||
+                scope.row.approvalStatus == null ||
+                scope.row.approvalStatus == 3) &&
+              checkPermi(['business:QUOTABONDED:remove'])
+            "
             size="mini"
             type="text"
             icon="el-icon-delete"
@@ -274,9 +280,13 @@
           <div slot="header" style="margin-left: 30px; font-size: 15px">
             <span>指标:{{ dict.quotaName }}</span>
           </div>
-<!--          目前详情还没有返回,先在新增显示-->
-          <div slot="header" style="margin-left: 30px; font-size: 15px" v-show="title == '辅助指标录入新增' ">
-          <span>指标内容:{{ dict.content }}</span>
+          <!--          目前详情还没有返回,先在新增显示-->
+          <div
+            slot="header"
+            style="margin-left: 30px; font-size: 15px"
+            v-show="title == '辅助指标录入新增'"
+          >
+            <span>指标内容:{{ dict.content }}</span>
           </div>
           <el-form-item
             v-if="dict.confirmWay == '附件'"
@@ -297,9 +307,6 @@
               :on-change="handleChange"
               :multiple="true"
             >
-              <div v-if="isAppoval" slot="tip" class="el-upload__tip">
-                审核无法修改
-              </div>
               <el-button
                 :disabled="isAppoval"
                 slot="trigger"
@@ -345,8 +352,45 @@
       </el-form>
 
       <template v-if="form.taskVoList">
-        <p style="padding-right: 12px; margin-top: 30px; font-weight:600;font-size: 14px;
-    color: #606266; width: 100px; text-align: right;">审核记录</p>
+        <div
+          style="
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          "
+        >
+          <p
+            style="
+              padding-right: 12px;
+              margin: 0px;
+              font-weight: 600;
+              font-size: 14px;
+              color: #606266;
+              width: 100px;
+              text-align: right;
+            "
+          >
+            审核记录
+          </p>
+          <p
+            style="
+              color: #8cc8ff;
+              border: 1px solid #3794eb;
+              padding: 4px;
+              border-radius: 4px;
+            "
+          >
+            {{
+              form.approvalStatus == 0 || form.approvalStatus == null
+                ? "未审核"
+                : form.approvalStatus == 1
+                ? "审核中"
+                : form.approvalStatus == 2
+                ? "审核通过"
+                : "审核拒绝"
+            }}
+          </p>
+        </div>
         <el-timeline>
           <el-timeline-item
             v-for="(item, index) in form.taskVoList"
@@ -355,17 +399,19 @@
             :key="index + 'taskHisAction'"
           >
             <el-card>
-              <p>{{ item.execName }}{{ item.createTime }}  <p v-if="item.comments !=null">{{ item.comments }}</p>
+              <p>{{ item.execName }}{{ item.createTime }}</p>
+              <p v-if="item.comments != null">{{ item.comments }}</p>
             </el-card>
           </el-timeline-item>
         </el-timeline>
       </template>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" v-if="!isAppoval" @click="submitForm">确 定</el-button>
-        <el-button  @click="cancel">取 消</el-button>
+        <el-button type="primary" v-if="!isAppoval" @click="submitForm"
+          >确 定</el-button
+        >
+        <el-button @click="cancel">取 消</el-button>
       </div>
-    
     </el-dialog>
   </div>
 </template>
@@ -394,7 +440,7 @@ export default {
   name: "QUOTABONDED",
   data() {
     return {
-      user:null,
+      user: null,
       // 查看修改
       check: false,
 
@@ -469,7 +515,6 @@ export default {
     // });
     this.getList();
     this.getDeptList();
-
   },
   methods: {
     checkPermi,
@@ -572,9 +617,25 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
+      console.log(selection);
       this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
       this.multiple = !selection.length;
+
+      if (selection.length == 0) {
+        return;
+      } else {
+        if (
+          selection.length < 2 &&
+          (selection[0].auditStatus == 0 || selection[0].auditStatus == null) &&
+          (selection[0].approvalStatus == 0 ||
+            selection[0].approvalStatus == null ||
+            selection[0].approvalStatus == 3)
+        ){
+          this.single = false;
+        }else{
+           this.single = true;
+        }
+      }
     },
     /** 新增按钮操作 */
     handleAdd() {