yusheng 11 bulan lalu
induk
melakukan
eda5c1dcd9

+ 7 - 4
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -11,7 +11,6 @@
     :maxable="true"
     :resizable="true"
     append-to-body
-
   >
     <el-form
       ref="form"
@@ -454,7 +453,6 @@
       :close-on-click-modal="false"
       width="600px"
       append-to-body
-
     >
       <el-select style="width: 100%" v-model="supplierId" placeholder="请选择">
         <el-option
@@ -466,7 +464,12 @@
         </el-option>
       </el-select>
       <div slot="footer" class="footer">
-        <el-button type="primary" @click="changeParent({ id:supplierId });supplierListShow=false"
+        <el-button
+          type="primary"
+          @click="
+            changeParent({ id: supplierId });
+            supplierListShow = false;
+          "
           >确认</el-button
         >
         <el-button @click="supplierListShow = false">返回</el-button>
@@ -852,7 +855,7 @@
               supplierName: item.supplierName
             };
           });
-        if (supplierList) {
+        if (supplierList?.length > 0) {
           this.supplierList = Array.from(
             new Set(supplierList.map((obj) => JSON.stringify(obj)))
           ).map((str) => JSON.parse(str));