|  | @@ -572,6 +572,7 @@
 | 
	
		
			
				|  |  |                  :option="customerBuyFree"
 | 
	
		
			
				|  |  |                  :data="contactsDataBuyFree"
 | 
	
		
			
				|  |  |                  @selection-change="selectionChangePolicyTwo"
 | 
	
		
			
				|  |  | +                :table-loading="loadingPolicy"
 | 
	
		
			
				|  |  |                  ref="crudContactE">
 | 
	
		
			
				|  |  |              </avue-crud>
 | 
	
		
			
				|  |  |            </basic-container>
 | 
	
	
		
			
				|  | @@ -1979,7 +1980,8 @@ export default {
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.$set(item, 'price', '0')
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
 | 
	
		
			
				|  |  | +          this.priceChange(item)
 | 
	
		
			
				|  |  | +          // this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          getPurchasePrice({code: item.code}).then(response => {
 | 
	
		
			
				|  |  |            if (response.data.data.length > 0) {
 | 
	
	
		
			
				|  | @@ -2408,7 +2410,7 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
 | 
	
		
			
				|  |  |            this.$set(this.goodsListSave[item], 'shopQuality', 0)
 | 
	
		
			
				|  |  |            this.$set(this.goodsListSave[item], 'inputMold', 0) // 判断是商品还是政策 商品 0 特价 1 买赠2
 | 
	
		
			
				|  |  | -          this.$set(this.goodsListSave[item], 'priceType', this.goodsListSave[item].policyName)
 | 
	
		
			
				|  |  | +          // this.$set(this.goodsListSave[item], 'priceType', this.goodsListSave[item].policyName)
 | 
	
		
			
				|  |  |            this.goodsListSave[item].amount = 0
 | 
	
		
			
				|  |  |            if (this.goodsActives == "goods") {
 | 
	
		
			
				|  |  |              this.$set(this.goodsListSave[item], 'goodType', 0)
 | 
	
	
		
			
				|  | @@ -2475,7 +2477,7 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(this.tableData[item], 'shopQuality', 0);
 | 
	
		
			
				|  |  |            this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight);
 | 
	
		
			
				|  |  |            this.$set(this.tableData[item], 'inputMold', 0);
 | 
	
		
			
				|  |  | -          this.$set(this.tableData[item], 'priceType', this.tableData[item].policyName);
 | 
	
		
			
				|  |  | +          // this.$set(this.tableData[item], 'priceType', this.tableData[item].policyName);
 | 
	
		
			
				|  |  |            this.tableData[item].amount = 0;
 | 
	
		
			
				|  |  |            if (this.goodsActives == "goods") {
 | 
	
		
			
				|  |  |              this.$set(this.tableData[item], 'goodType', 0)
 | 
	
	
		
			
				|  | @@ -2603,9 +2605,11 @@ export default {
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  |                  this.$set(list[item], 'price', '0')
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  | +              this.priceChange(list[item])
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.$set(list[item], 'price', list[item].specialOffer)
 | 
	
		
			
				|  |  | +            this.priceChange(list[item])
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            this.$set(list[item], 'inputMold', 1)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'goodType', 0)
 | 
	
	
		
			
				|  | @@ -2617,9 +2621,11 @@ export default {
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  |                  this.$set(list[item], 'price', '0')
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  | +              this.priceChange(list[item])
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              this.$set(list[item], 'price', list[item].salePrice)
 | 
	
		
			
				|  |  | +            this.priceChange(list[item])
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            this.$set(list[item], 'inputMold', 2)
 | 
	
		
			
				|  |  |            this.$set(buyFree[item], 'inputMold', 2)
 | 
	
	
		
			
				|  | @@ -2640,7 +2646,7 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(list[item], 'itemType',  list[item].typeno)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'actualQuantity', 0)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'orderQuantity', list[item].orderQuantity? list[item].orderQuantity: 0)
 | 
	
		
			
				|  |  | -          this.$set(list[item], 'amount', 0)
 | 
	
		
			
				|  |  | +          // this.$set(list[item], 'amount', 0)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'priceCategory', list[item].productCategory)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'priceType', this.policyForm.cname)
 | 
	
		
			
				|  |  |            this.$set(list[item], 'cname', list[item].productCategory)
 | 
	
	
		
			
				|  | @@ -2654,7 +2660,7 @@ export default {
 | 
	
		
			
				|  |  |            if (listLength != 0) {
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'actualQuantity', 0)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'orderQuantity', 0)
 | 
	
		
			
				|  |  | -            this.$set(buyFree[item], 'amount', 0)
 | 
	
		
			
				|  |  | +            // this.$set(buyFree[item], 'amount', 0)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'priceType', this.policyForm.cname)
 | 
	
		
			
				|  |  |              this.$set(buyFree[item], 'cname', list[item].productCategory)
 | 
	
	
		
			
				|  | @@ -2684,11 +2690,13 @@ export default {
 | 
	
		
			
				|  |  |            delete list[item].updateUserName
 | 
	
		
			
				|  |  |            this.maxGoodsNum++
 | 
	
		
			
				|  |  |            this.$refs.crudContact.rowCellAdd(list[item]);
 | 
	
		
			
				|  |  | -          // this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
 | 
	
		
			
				|  |  | +          this.$nextTick(() => {
 | 
	
		
			
				|  |  | +            this.quantityChange(list[item])
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  |            if (listLength != 0) {
 | 
	
		
			
				|  |  |              this.$refs.crudContact.rowCellAdd(buyFree[item]);
 | 
	
		
			
				|  |  | +            this.quantityChange(buyFree[item])
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          // this.$refs.crudContact.rowCell(buyFree[item], this.contactsData.length - 1)
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.policyDialog = false
 | 
	
	
		
			
				|  | @@ -2771,7 +2779,7 @@ export default {
 | 
	
		
			
				|  |  |        done(row);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      policyOnLoad(params = {}) {
 | 
	
		
			
				|  |  | -      // this.policyLoading = true;
 | 
	
		
			
				|  |  | +      this.loadingPolicy = true;
 | 
	
		
			
				|  |  |        this.policyForm = {};
 | 
	
		
			
				|  |  |        detailList(this.treePolicyId).then(res => {
 | 
	
		
			
				|  |  |          this.policyForm = res.data.data;
 | 
	
	
		
			
				|  | @@ -2787,6 +2795,8 @@ export default {
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            this.contactsDataBuyFree = []
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +      }).finally(() => {
 | 
	
		
			
				|  |  | +        this.loadingPolicy = false;
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //
 |