Selaa lähdekoodia

更改人员请假权限问题

sunyanqiang 2 vuotta sitten
vanhempi
commit
f0e399d3bb

+ 17 - 0
src/api/peopleChuRu/bdglLeave.js

@@ -17,6 +17,23 @@ export function getBdglLeave(id) {
   })
 }
 
+// 审批
+export function updateBdglLeaveShen(data) {
+  return request({
+    url: '/peopleChuRu/bdglLeave/shenpi',
+    method: 'put',
+    data: data
+  })
+}
+
+// 特殊审批
+export function updateBdglLeaveTe(data) {
+  return request({
+    url: '/peopleChuRu/bdglLeave/teshu',
+    method: 'put',
+    data: data
+  })
+}
 // 新增人员请假
 export function addBdglLeave(data) {
   return request({

+ 37 - 14
src/views/peopleChuRu/bdglLeave/index.vue

@@ -342,20 +342,20 @@
             >查看</el-button
           >
           <el-button
-            v-if="scope.row.common == '1'"
+            :class="[scope.row.common == '1' ? '' : 'active']"
             size="btc"
             type="text"
             @click="handleUpdates(scope.row)"
-            v-hasPermi="['peopleChuRu:bdglLeave:edit']"
+            v-hasPermi="['peopleChuRu:bdglLeave:shenpi']"
             >审批</el-button
           >
 
           <el-button
-            v-else-if="scope.row.common == '2'"
+            :class="[scope.row.common == '2' ? '' : 'active']"
             size="mini"
             type="text"
             @click="handleUpdatess(scope.row)"
-            v-hasPermi="['peopleChuRu:bdglLeave:edit']"
+            v-hasPermi="['peopleChuRu:bdglLeave:teshu']"
             >特殊审批</el-button
           >
           <el-button
@@ -373,7 +373,7 @@
             >删除</el-button
           >
           <el-button
-            v-if="scope.row.common == '3'"
+          :class="[scope.row.common == '3' ? '' : 'active']"
             size="btc"
             type="text"
             @click="handleGuiDui(scope.row)"
@@ -571,6 +571,7 @@
             ref="headerSearchSelect"
             multiple
             class="ren_yuan"
+            filterable
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -818,9 +819,9 @@
       :close-on-click-modal="false"
     >
       <el-form
-        ref="form"
+        ref="form1"
         :model="form"
-        :rules="rules"
+        :rules="rulesF"
         label-width="80px"
         inline
       >
@@ -1502,7 +1503,9 @@ import {
   getBdglList,
   getAllDept,
   getAll,
-  guidui
+  guidui,
+  updateBdglLeaveShen,
+  updateBdglLeaveTe,
 } from "@/api/peopleChuRu/bdglLeave";
 
 import {
@@ -1523,6 +1526,7 @@ export default {
   dicts: ["Leave_type", "sys_is", "people_state"],
   data() {
     return {
+      isActive: false,
       // 审批按钮状态 审批按钮状态1 修改为0,超级审批状态2
       statussp: "1",
       // 遮罩层
@@ -1584,6 +1588,19 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        unitId: [{ required: true, message: "单位不能为空", trigger: "blur" }],
+        peopleId: [
+          { required: true, message: "人员不能为空", trigger: "blur" },
+        ],
+        // reasons: [
+        //   { required: true, message: "请填写驳回原因", trigger: "blur" },
+        // ],
+        leaveType: [
+          { required: true, message: "请假类型不能为空", trigger: "blur" },
+        ],
+      },
+      // 审批验证
+       rulesF: {
         unitId: [{ required: true, message: "单位不能为空", trigger: "blur" }],
         peopleId: [
           { required: true, message: "人员不能为空", trigger: "blur" },
@@ -1897,7 +1914,7 @@ export default {
         this.form.contents = "四级审批通过";
       }
       this.form.peopleId = this.form.peopleId.join(",");
-      updateBdglLeave(this.form).then((response) => {
+      updateBdglLeaveShen(this.form).then((response) => {
         this.$modal.msgSuccess("审批成功");
         this.open2 = false;
         this.getList();
@@ -1905,7 +1922,7 @@ export default {
     },
     // 审批驳回按钮
     boHui() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form1"].validate((valid) => {
         if (valid) {
           if (this.shenPis.shenPiJiBie == "一级") {
             this.form.status1 = 2;
@@ -1921,7 +1938,7 @@ export default {
             this.form.contents = "四级审批驳回";
           }
           this.form.peopleId = this.form.peopleId.join(",");
-          updateBdglLeave(this.form).then((response) => {
+          updateBdglLeaveShen(this.form).then((response) => {
             this.$modal.msgSuccess("审批成功");
             this.open2 = false;
             this.getList();
@@ -1952,7 +1969,7 @@ export default {
           }
           if (this.form.id != null) {
             this.form.peopleId = this.form.peopleId.join(",");
-            updateBdglLeave(this.form).then((response) => {
+            updateBdglLeaveTe(this.form).then((response) => {
               this.$modal.msgSuccess("审批成功");
               this.opens = false;
               this.getList();
@@ -1984,7 +2001,7 @@ export default {
           }
           if (this.form.id != null) {
             this.form.peopleId = this.form.peopleId.join(",");
-            updateBdglLeave(this.form).then((response) => {
+            updateBdglLeaveTe(this.form).then((response) => {
               this.$modal.msgSuccess("审批成功");
               this.opens = false;
               this.getList();
@@ -2102,7 +2119,7 @@ export default {
             if (
               this.form.peopleId2 ||
               this.form.peopleId1 ||
-              this.form.peopleId3 
+              this.form.peopleId3
             ) {
               if (this.form.peopleId.length > 0) {
                 this.form.peopleId = this.form.peopleId.join(",");
@@ -2344,4 +2361,10 @@ export default {
   background-color: transparent;
   color: #fff;
 }
+.active {
+  display: none;
+}
+::v-deep .el-select__input{
+  color:#fff
+}
 </style>

+ 0 - 1
src/views/system/user/index.vue

@@ -461,7 +461,6 @@
                 placeholder="请选择权限"
                 clearable
                 multiple
-                @change="quanxian()"
               >
                 <el-option
                   v-for="dict in permissionslist"