Selaa lähdekoodia

wdly产品维护bug

lxf 1 vuosi sitten
vanhempi
commit
e5d9f5f10c
1 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 12 10
      src/views/WDLY/basic/product/index.vue

+ 12 - 10
src/views/WDLY/basic/product/index.vue

@@ -53,7 +53,7 @@
     <el-dialog
       :title="modalType == 'add' ? '添加' : '编辑'"
       v-model="dialogVisible"
-      width="500"
+      width="800"
       v-loading="loadingOne"
       destroy-on-close
     >
@@ -83,7 +83,7 @@
           </template>
 
           <template #combination>
-            <div>
+            <div style="width: 100%;">
               <div
                 style="
                   font-size: 14px;
@@ -1002,14 +1002,16 @@ const changeDay = (type) => {
 };
 
 const handleSelect = (row) => {
-  const flag = formData.data.productCombinationList.some(
-    (x) => x.linkProductId === row.id
-  );
-  if (flag)
-    return ElMessage({
-      message: "该产品已选择",
-      type: "info",
-    });
+  if (formData.data.productCombinationList && formData.data.productCombinationList.length > 0) {
+    const flag = formData.data.productCombinationList.some(
+      (x) => x.linkProductId === row.id
+    );
+    if (flag)
+      return ElMessage({
+        message: "该产品已选择",
+        type: "info",
+      });
+  }
   const product = {
     linkProductId: row.id,
     linkQuantity: "",