guoyujia 3 tháng trước cách đây
mục cha
commit
d2d2a703d5

+ 8 - 17
src/views/business/noCurrentReject/DialogRejectInfo.vue

@@ -374,8 +374,8 @@
     <template #footer>
       <el-button
         v-if="
-          detailInfo.id == null ||
-          detailInfo.creatorId == useUserStore().user.userId
+          (detailInfo.id == null ||
+          detailInfo.creatorId == useUserStore().user.userId) && detailInfo.status ==0
         "
         type="primary"
         icon="Check"
@@ -383,14 +383,14 @@
         >保存</el-button
       >
       <el-button
-        v-if="detailInfo.id != null && isCurrentDept"
+        v-if="detailInfo.id != null && isCurrentDept && detailInfo.status ==0"
         type="success"
         icon="Check"
         @click="handleReview(1)"
         >通过</el-button
       >
       <el-button
-        v-if="detailInfo.id != null && isCurrentDept"
+        v-if="detailInfo.id != null && isCurrentDept  && detailInfo.status ==0"
         type="danger"
         icon="Close"
         @click="handleReview(2)"
@@ -464,18 +464,6 @@ const open = (row) => {
   reset();
   console.log("row", row);
   if (row.id) {
-    // getInfo(row.id).then((res) => {
-    //   if (res.code == 200) {
-    //     detailInfo.value = res.data;
-    //     getProcess(detailInfo.value.deptId)
-    //     getFindProcess(detailInfo.value.findDeptId)
-    //   }
-    // });
-    // //查工段
-    // getDeptInfo({ dayworkId: row.dayworkId }).then((res) => {
-    //   deptList.value = res.data;
-    //   console.log("deptList.value", deptList.value);
-    // });
     Promise.all([
       getInfo(row.id),
       getDeptInfo({ dayworkId: row.dayworkId }),
@@ -488,7 +476,7 @@ const open = (row) => {
         getDeptList().then((response) => {
           currentDeptList.value = response.data.rows;
             //判断是否显示审核按钮
-  hasCurrentDept();
+          hasCurrentDept();
         });
         getProcessList()
         
@@ -713,8 +701,11 @@ function reset() {
     deptId: null,
     fillDate: null,
     fillName: null,
+    userIds: [],
   };
   isCurrentDept.value = false;
+  deptList.value = []
+  processList.value = []
   proxy.resetForm("noCurrent");
 }
 

+ 4 - 1
src/views/business/noCurrentReject/index.vue

@@ -99,7 +99,7 @@
                 编辑
               </el-button>
 
-              <el-button v-if="scope.row.status ==0" link type="danger" icon="Delete" v-hasPermi="['business:noCurrentReject:remove']"
+              <el-button v-if="scope.row.status ==0 && scope.row.creatorId == useUserStore().user.userId" link type="danger" icon="Delete" v-hasPermi="['business:noCurrentReject:remove']"
                 @click="handleDelete(scope.row)">
                 删除
               </el-button>
@@ -134,6 +134,7 @@ import { listReject, delReject } from "@/api/business/noCurrentReject";
 
 import DialogRejectInfo from "./DialogRejectInfo";
 import DialogSelectLot from "./DialogSelectLot";
+import useUserStore from "@/store/modules/user";
 import { ref } from "vue";
 const { proxy } = getCurrentInstance();
 const dataList = ref([]);
@@ -171,6 +172,8 @@ function handleDelete(row) {
   console.log(selections.value)
 if(selections.value.some((item)=>item.status>0)){
   proxy.$modal.msgError("已审核数据不能删除!");
+}else if(selections.value.some((item)=>item.creatorId != useUserStore().user.userId)){
+  proxy.$modal.msgError("非本人创建不可删除!");
 }else{
   const _ids = row.id || ids.value;
   proxy.$modal