Browse Source

Merge branch 'v3.0' into company

xiaodai2022 1 year ago
parent
commit
bca3125fe5
2 changed files with 13 additions and 8 deletions
  1. 0 0
      dist/static/js/0.js
  2. 13 8
      src/views/sellOut/salesOrder/components/addForm.vue

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 13 - 8
src/views/sellOut/salesOrder/components/addForm.vue

@@ -142,7 +142,7 @@
                   </template>
                   <template slot="is_stock">
                     <el-tag :size="'mini'">{{
-                      goods_sitem.is_stock + '' === "1" ? "是" : "否"
+                      goods_sitem.is_stock + "" === "1" ? "是" : "否"
                     }}</el-tag>
                   </template>
                   <template slot="weight">
@@ -157,9 +157,9 @@
                       }}g--{{ goods_sitem.metal_name }}---{{
                         goods_sitem.gold_price ? goods_sitem.gold_price : "0"
                       }}元/g--{{
-                        goods_sitem.is_gold_price + '' === "0" ? "不" : ""
+                        goods_sitem.is_gold_price + "" === "0" ? "不" : ""
                       }}启用实时金价--{{
-                        goods_sitem.is_diff + '' === "1" ? "有" : "无"
+                        goods_sitem.is_diff + "" === "1" ? "有" : "无"
                       }}工差--{{ goods_sitem.config }}---{{
                         goods_sitem.other_config
                       }}</span
@@ -1141,12 +1141,15 @@ export default {
       if (key === "new_good_price") {
         console.log(key + "----" + this.ruleForm.new_good_price);
       }
-
-      this.$refs.ruleForm.validateField(key);
-      if (key === "good_num") {
+      const { good_num } = this.ruleForm;
+      //key === "good_num"
+      if (Number(good_num ?? "0") !== 0) {
         await this.get_new_price();
         await this.get_goods_active();
       }
+      if (this.$refs.ruleForm) {
+        this.$refs.ruleForm.validateField(key);
+      }
     },
     async get_new_price() {
       console.log(
@@ -1378,8 +1381,10 @@ export default {
           model.goodtype = key_0 === "is_activity_1" ? "1" : key_1;
           model.act_code = key_0 === "is_activity_1" ? key_1 : "";
 
-          Object.keys(model).forEach(key => {
-            if(typeof model[key] === 'string'){ model[key] = replaceTextWrapAndSpace(model[key])}
+          Object.keys(model).forEach((key) => {
+            if (typeof model[key] === "string") {
+              model[key] = replaceTextWrapAndSpace(model[key]);
+            }
           });
 
           let res = await asyncRequest.add(model);

Some files were not shown because too many files changed in this diff