| 
					
				 | 
			
			
				@@ -81,7 +81,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <a-col :md="12" :sm="24" style="text-align:left;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-dropdown> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-menu slot="overlay" @click="handleMenuClick"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <a-menu-item key="0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-menu-item key="0" :disabled="disablePromo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 仓库设置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-menu-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a-menu-item key="1"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -102,6 +102,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             class="button-info" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :disabled="disablePromo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              @click="showSearchBox=!showSearchBox" ><a-icon type="search"/> 筛选</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-dropdown> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-menu slot="overlay" @click="handleImportClick"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,11 +119,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               class="button-info" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :disabled="disablePromo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             > 导入产品 <a-icon type="down" /> </a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-dropdown> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             class="button-info" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :disabled="disablePromo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             @click="openCpModal"><a-icon type="plus" /> 添加产品</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-row> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -142,10 +145,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       bordered> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <!-- 产品编码 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template slot="productCode" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div style="padding-right: 15px;">{{ text }}</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </a-badge> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <span style="padding-right: 15px;">{{ text }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-badge count="正" v-if="record.promotionFlag=='REGULAR'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <!-- 产品名称 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template slot="productName" slot-scope="text, record"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -341,6 +345,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         openUpActiveModal: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         descDetail: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         promoProductClz: null, // 活动产品分类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        disablePromo: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     computed: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -401,6 +406,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.queryParam.productTypeSn2 = val[1] ? val[1] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.queryParam.productTypeSn3 = val[2] ? val[2] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 禁用活动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      disableActive(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.resetSearchForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.disablePromo = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       //  重置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       resetSearchForm (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.queryParam.productCode = '' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -573,7 +583,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 添加产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       insterProduct (row, promotionFlag, promoProductClz) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(row, promotionFlag) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(row, promotionFlag, promoProductClz) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 防止多次添加产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (this.isInster) { return } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const _this = this 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -585,12 +595,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.isInster = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         salesDetailInsert({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesPromoDetailDTO:{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            salesPromoSn: this.promo.salesPromoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            promoRuleSn: this.promo.promoRuleSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            promoSn: this.promo.promoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            promoProductClz: promoProductClz 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesPromoSn: this.promo.salesPromoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          promoRuleSn: this.promo.promoRuleSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          promoSn: this.promo.promoSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          promoProductClz: promoProductClz, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           packQty: row.productPackQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productSn: row.productSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           showCost: row.lastStockCost, 
			 |