刘洋 7 tháng trước cách đây
mục cha
commit
79c5edb209
1 tập tin đã thay đổi với 14 bổ sung11 xóa
  1. 14 11
      src/render/views/BaseDataConfig/ScanParams.vue

+ 14 - 11
src/render/views/BaseDataConfig/ScanParams.vue

@@ -290,20 +290,23 @@ const addTag = () => {
 };
 const delTag = (index: number, i: number) => {
   params.paperTypeBarcodeContent[index].paperTypeBarcodeContent.splice(i, 1);
+  if (!params.paperTypeBarcodeContent[index].paperTypeBarcodeContent?.length) {
+    params.paperTypeBarcodeContent.splice(index, 1);
+  }
 };
 
 const rules = {
-  paperTypeBarcodeContentItem: [
-    {
-      validator: async () => {
-        if (!params.paperTypeBarcodeContent.length) {
-          return Promise.reject("卷型条码内容至少一条");
-        } else {
-          return Promise.resolve();
-        }
-      },
-    },
-  ],
+  // paperTypeBarcodeContentItem: [
+  //   {
+  //     validator: async () => {
+  //       if (!params.paperTypeBarcodeContent.length) {
+  //         return Promise.reject("卷型条码内容至少一条");
+  //       } else {
+  //         return Promise.resolve();
+  //       }
+  //     },
+  //   },
+  // ],
   imageCheckRatio: [
     { required: true, message: "请输入抽查比例" },
     {