| 
					
				 | 
			
			
				@@ -20,7 +20,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <!-- 查询配件列表 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :newLoading="isInster" @add="insterProduct"></queryPart> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <queryPart ref="partQuery" :newLoading="isInster" @add="insterProduct"></queryPart> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-card size="small" :bordered="false" class="salesEdit-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div slot="title"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -117,7 +117,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </a-alert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <!-- 已选促销品列表 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <queryPromotable ref="promotable" :salesBillSn="$route.params.sn" :delLoading="delLoading" @onCellBlur="onCellBlur" @del="handleDel"></queryPromotable> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <queryPromotable ref="promotable" :delLoading="delLoading" @onCellBlur="onCellBlur" @del="handleDel"></queryPromotable> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </a-spin> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="affix-cont"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -133,8 +133,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 添加产品 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <ChooseActive 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ref="activeProduct" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      :buyerSn="detailData&&detailData.buyerSn" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      :nowData="nowData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :openModal="newActive" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @ok="addNewActive" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :newLoading="isInster" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -192,6 +190,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.disabled = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.dataSource = data.list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.promotable.getData(this.salesBillSn) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -224,11 +223,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     resetSearchForm (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.table.refresh(!!flag) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.getPromoacActiveList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 重置列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    resetForm () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$refs.table.refresh() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getOrderDetail(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleBack () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -321,12 +316,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  销售单详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getOrderDetail () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getOrderDetail (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log('getOrderDetail') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.detailData = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          console.log(this.detailData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -358,9 +354,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 选择促销品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleSelCx (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.nowData = row 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // this.nowData = row 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.newActive = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.$refs.activeProduct.getData(row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.activeProduct.getData(row, this.detailData && this.detailData.buyerSn || '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 批量添加促销品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     addNewActive (list) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -377,8 +373,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addPromoGoods(temp).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$refs.promotable.getData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.promotable.getData(this.salesBillSn) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.getOrderDetail(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.newActive = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.isInster == false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.spinning = false 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -392,10 +388,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.newActive = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$refs.partQuery.resetSearchForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$refs.promotable.getData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$refs.table.refresh(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!this.disabled) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getOrderDetail(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.table.refresh(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mounted () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -406,9 +402,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       vm.salesBillSn = vm.$route.params.sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 获取促销活动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       vm.getPromoacActiveList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (!vm.disabled) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        vm.pageInit() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      vm.pageInit() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |