xiaodai2022 %!s(int64=2) %!d(string=hai) anos
pai
achega
ba46093330
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      src/views/purchaseIn/workbench/components/baseForm.vue

+ 7 - 7
src/views/purchaseIn/workbench/components/baseForm.vue

@@ -873,12 +873,12 @@ export default {
         // this.is_noble = this.askItem.is_metal;
         this.brand_name = brand_name || "";
         this.unit_name = unit || "";
+        const catId = String(cat_id ?? "");
         this.ruleForm = {
-          infoNo: this.id || "",
-          bidNo: bidNo || "",
-          infoNo: this.id || "",
-          cat_id: cat_id ? [cat_id] : [],
-          supplierNo: supplierNo ? [supplierNo] : [],
+          infoNo: String(this.id ?? ""),
+          bidNo: String(bidNo ?? ""),
+          cat_id: catId ? [catId] : [],
+          supplierNo: String(supplierNo ?? "") ? [supplierNo] : [],
           pname: good_name || "",
           expire_day: expire_day || "1", //有效期
           delivery_day: delivery_day || "0", //物流时间
@@ -1015,10 +1015,10 @@ export default {
           const { can_id_arr, is_gold_price } = this.askItem;
           can_id_arr.forEach((e, index) => {
             if (index == 0) {
-              this.pid = e;
+              this.pid = String(e ?? "");
             }
           });
-          if (this.pid === "6" && is_gold_price === "1") {
+          if (this.pid === "6" && String(is_gold_price) === "1") {
             this.is_noble = true;
           }
           this.cat_id_name = this.type === "add" ? this.askItem.can_name : "";