Просмотр исходного кода

修复 线上商品 赠品 样品下单

xiaodai2022 2 лет назад
Родитель
Сommit
7c6756590d

+ 2 - 2
src/components/globalComponents/digital-input/main.vue

@@ -62,7 +62,7 @@ export default {
       let a = this.accMul(val, "1");
       let b = this.accMul(this.num, "1");
       console.log(a, b);
-      if (a > b) {
+      if (a >= b) {
         this.num = a + "";
         this.$emit("reschange", this.num);
       }
@@ -71,7 +71,7 @@ export default {
       let a = this.accMul(val, "1");
       let b = this.accMul(this.num, "1");
       console.log(a, b);
-      if (a < b) {
+      if (a <= b) {
         this.num = a + "";
         this.$emit("reschange", this.num);
       }

+ 9 - 6
src/views/sellOut/salesOrder/components/addForm.vue

@@ -1137,8 +1137,10 @@ export default {
     },
     async number_change(e, key) {
       this.ruleForm[key] = e + "" || "0";
-      console.log(key);
-      console.log(this.ruleForm.new_good_price);
+      if (key === "new_good_price") {
+        console.log(key + "----" + this.ruleForm.new_good_price);
+      }
+
       this.$refs.ruleForm.validateField(key);
       if (key === "good_num") {
         await this.get_new_price();
@@ -1328,10 +1330,11 @@ export default {
           let model = JSON.parse(JSON.stringify(this.ruleForm));
           model.addrlist = [];
           model.customer_code = model.customer_code.toString();
-          const {good_price,new_good_price}=model
-          let a=this.accMul(good_price, '1'),b=this.accMul(new_good_price, '1')
-          if(a!==b){
-            model.good_price
+          const { good_price, new_good_price } = model;
+          let a = this.accMul(good_price, "1"),
+            b = this.accMul(new_good_price, "1");
+          if (a !== b) {
+            model.good_price;
           }
           // if (model.new_good_price == model.good_price) {
           // model.good_price = model.new_good_price;F