Explorar el Código

达沃特政策10.12

caojunjie hace 1 año
padre
commit
5f73bb38c4
Se han modificado 1 ficheros con 25 adiciones y 11 borrados
  1. 25 11
      src/views/businessManagement/salesOrder/detailsPageEdit.vue

+ 25 - 11
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2844,28 +2844,42 @@ export default {
               // for (let i = 0; i < this.$refs.crudContact.list.length; i++) {
               //   this.$refs.crudContact.list[i].purchaseRebatePrice = rest.data.data[0].purchaseRebatePrice;
               // }
-              // this.$refs.crudContact.rowCellAdd(list[item]);
+                this.$nextTick(()=>{
+                    this.$refs.crudContact.rowCellAdd(list[item]);
+                    this.quantityChange(list[item])
+                })
+                if (listLength != 0) {
+                    this.$refs.crudContact.rowCellAdd(buyFree[item]);
+                    this.quantityChange(buyFree[item])
+                }
             } else {
               console.log('rest>>>2', rest);
               this.$set(this.$refs.crudContact.list[this.$refs.crudContact.list.length - 1], 'purchaseRebatePrice', 0)
               // this.$refs.crudContact.list[item].purchaseRebatePrice = 0
-              // this.$refs.crudContact.rowCellAdd(list[item]);
+              this.$refs.crudContact.rowCellAdd(list[item]);
+                if (listLength != 0) {
+                    this.$refs.crudContact.rowCellAdd(buyFree[item]);
+                    this.quantityChange(buyFree[item])
+                }
             }
           }).catch(err=>{
             this.$refs.crudContact.rowCellAdd(list[item]);
+              if (listLength != 0) {
+                  this.$refs.crudContact.rowCellAdd(buyFree[item]);
+                  this.quantityChange(buyFree[item])
+              }
           })
+
             // this.$refs.crudContact.rowCellAdd(list[item]);
             console.log('rest>>>', this.$refs.crudContact);
             console.log(this.$refs.crudContact,'this.$refs.crudContact')
-          this.$nextTick(() => {
-              // 先让赠送的添加进去 延迟添加数据
-              this.$refs.crudContact.rowCellAdd(list[item]);
-            this.quantityChange(list[item])
-          })
-          if (listLength != 0) {
-            this.$refs.crudContact.rowCellAdd(buyFree[item]);
-            this.quantityChange(buyFree[item])
-          }
+          // this.$nextTick(() => {
+          //     // 先让赠送的添加进去 延迟添加数据
+          //     // this.$refs.crudContact.rowCellAdd(list[item]);
+          //   this.quantityChange(list[item])
+          // })
+
+
         })
       }
       this.policyDialog = false