|
@@ -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
|