lxf 1 년 전
부모
커밋
025a2cffd6
1개의 변경된 파일5개의 추가작업 그리고 20개의 파일을 삭제
  1. 5 20
      src/views/production/operation/batching/index.vue

+ 5 - 20
src/views/production/operation/batching/index.vue

@@ -13,6 +13,7 @@
             highlight-current-row
             :table-events="{
               select: selectRow,
+              'select-all': selectRow,
             }"
             :action-list="[
               {
@@ -325,14 +326,14 @@ const getList = async (req) => {
   loading.value = true;
   proxy.post("/stockPreparation/uncompletedList", sourceList.value.pagination).then((res) => {
     if (res && res.length > 0) {
-      sourceList.value.data = res
-        .filter((item, index) => index < 10)
-        .map((item) => {
+      sourceList.value.data = Object.freeze(
+        res.map((item) => {
           return {
             ...item,
             isCheck: true,
           };
-        });
+        })
+      );
     } else {
       sourceList.value.data = res;
     }
@@ -410,26 +411,10 @@ const clickAccomplish = () => {
     return ElMessage("请选择操作的数据");
   }
 };
-watch(selectData, (newVal) => {
-  if (newVal.length === 0) {
-    sourceList.value.data.forEach((x) => {
-      x.isCheck = true;
-    });
-  } else {
-    sourceList.value.data.forEach((x) => {
-      if (x.orderId !== newVal[0].orderId) {
-        x.isCheck = false;
-      }
-    });
-  }
-});
 </script>
 
 <style lang="scss" scoped>
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
-:deep(.el-table__header-wrapper .el-checkbox) {
-  display: none;
-}
 </style>