guoyujia hai 1 ano
pai
achega
edc33848af
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      src/views/business/daywork/index.vue

+ 9 - 1
src/views/business/daywork/index.vue

@@ -91,7 +91,8 @@
                 </el-button>
                 <el-button v-show="scope.row.deptProcessStatus &&
         (scope.row.status == 2 || scope.row.status == 3) &&
-        scope.row.id == latestProcessId&& scope.row.deptId == latestDeptId &&!(lastStatus == 4 || lastStatus == 5 ||lastStatus ==7)
+        scope.row.id == latestProcessId&& scope.row.deptId == latestDeptId &&!(lastStatus == 4 || lastStatus == 5 ||lastStatus ==7) &&
+        (scope.row.processStepNumber != lastProcessStepNumber)
         " v-hasPermi="['business:daywork:remove']" link type="danger" icon="Delete"
                   @click="handleDeletedItem(scope.row.id)">删除
                 </el-button>
@@ -142,6 +143,7 @@ const itemTotal = ref(0);
 const lastStatus = ref(null)
 const latestProcessId = ref(null);
 const latestDeptId = ref(null)
+const lastProcessStepNumber = ref(null)
 const deptProcessList = ref([]);
 /**工序 */
 const processList = ref([]);
@@ -397,6 +399,11 @@ function getDayworkItems() {
       latestDeptId.value = res.others.lastItem.deptId
       lastStatus.value = res.others.lastItem.status
     }
+    //该工艺的最后一个工序步骤编码
+    if (res.others != null && res.others.lastProcessStepNumber != null) {
+      lastProcessStepNumber.value = res.others.lastProcessStepNumber
+      console.log(lastProcessStepNumber.value)
+    }
     for (var i = 0; i < res.rows.length; i++) {
       let timeStamp = res.rows[i].workingHours;
       let seconds = Math.floor((timeStamp / 1000) % 60);
@@ -414,6 +421,7 @@ function getDayworkItems() {
       console.log(res.rows[i].deptProcessStatus)
     }
     dayworkItemList.value = res.rows;
+    console.log( dayworkItemList.value)
     getProcess();
     itemTotal.value = res.total;
     dayworkItemLoading.value = false;