| 
					
				 | 
			
			
				@@ -1,9 +1,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <div class="table-page-search-wrapper" v-show="showDescBox&&descDetail"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <a-descriptions :column="4"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="table-page-search-wrapper" v-show="showDescBox"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-descriptions :column="4" v-if="descDetail"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-descriptions-item label="促销类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            {{ descDetail.promotionRuleTypeDictValue }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            {{ descDetail.promotionRuleTypeDictValue||'--' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-descriptions-item label="促销门槛" span="3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div v-if="descDetail.gateFlag === '1'"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -270,6 +270,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: Object, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         default: function(){return null} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      promo: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: Object, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        default: function(){return null} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       id: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: String, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         default: '' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -290,7 +294,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         loadData: parameter => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.disabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.queryParam.salesBillSn = this.salesBillSn || '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          return salesDetailList(Object.assign(parameter, this.queryParam, {showStock: true})).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return salesDetailList(Object.assign(parameter, this.queryParam, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            showStock: true,  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            promoRuleSn: this.promo.promoRuleSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            promoSn: this.promo.promoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            salesPromoSn: this.promo.salesPromoSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          })).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               data = res.data 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -411,7 +420,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            deleteAll({ salesBillSn: _this.salesBillSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            deleteAll({ salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _this.$message.success(res.message) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -440,6 +449,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             salesDetailBatchDel({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               salesBillSn: _this.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              salesPromoSn: _this.promo.salesPromoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               salesBillDetailSnList: obj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (res.status == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -457,7 +467,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const ajax_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           warehouseSn: row.warehouseSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           salesBillDetailSnList: snArr, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesBillSn: this.salesBillSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesBillSn: this.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesPromoSn: this.promo.salesPromoSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.setWarehouseInfo(ajax_data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -470,7 +481,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const ajax_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           warehouseSn: sn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           salesBillDetailSnList: snArr, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesBillSn: _this.salesBillSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesBillSn: _this.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesPromoSn: _this.promo.salesPromoSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.setWarehouseInfo(ajax_data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -517,7 +529,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           salesDetailUpdateQty({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             salesBillDetailSn: record.salesBillDetailSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             qty: record.qty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            salesBillSn: _this.salesBillSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            salesBillSn: _this.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            salesPromoSn: _this.promo.salesPromoSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.status == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -541,7 +554,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.delLoading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 _this.$message.success(res.message) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -566,6 +579,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.isInster = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         salesDetailInsert({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesPromoDetailDTO:{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            salesPromoSn: this.promo.salesPromoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            promoRuleSn: this.promo.promoRuleSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            promoSn: this.promo.promoSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           packQty: row.productPackQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productSn: row.productSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           showCost: row.lastStockCost, 
			 |