|  |  | @ -361,6 +361,7 @@ import {getInvListByUser} from "@/api/system/invWarehouse"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import invCountCodes from "@/views/inventory/count/InvCountCodes.vue"; |  |  |  | import invCountCodes from "@/views/inventory/count/InvCountCodes.vue"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import {updateBizProduct} from "@/api/inout/orderDetailCode"; |  |  |  | import {updateBizProduct} from "@/api/inout/orderDetailCode"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | export default { |  |  |  | export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |   props: { |  |  |  |   props: { | 
			
		
	
		
		
			
				
					
					|  |  |  |     countOrder: { |  |  |  |     countOrder: { | 
			
		
	
	
		
		
			
				
					|  |  | @ -381,6 +382,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   data() { |  |  |  |   data() { | 
			
		
	
		
		
			
				
					
					|  |  |  |     return { |  |  |  |     return { | 
			
		
	
		
		
			
				
					
					|  |  |  |       formData: { |  |  |  |       formData: { | 
			
		
	
	
		
		
			
				
					|  |  | @ -679,20 +681,23 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.$message.warning("请选择产品"); |  |  |  |         this.$message.warning("请选择产品"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return; |  |  |  |         return; | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |       let existsMsg = "" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       //添加第一个产品,先保存单据,再添加单据详情 |  |  |  |       let exists = this.multiProduct.some(product => { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.multiProduct.forEach(product => { |  |  |  |         if (this.countProductList.total != 0) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |            return this.countProductList.some(item => { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if (this.countProductList.length != 0) { |  |  |  |              existsMsg = product.nameCode | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             this.countProductList.some(item => { |  |  |  |             return item && item.productId == product.relIdFk && item.batchNo == product.batchNo; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               if (item.product && item.product.relIdFk == product.relIdFk && |  |  |  |           }); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 item.product.batchNo == product.batchNo ){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 this.$message.error("当前产品【"+ product.nameCode + "】不能重复选入!"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return; |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |       }); |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (exists){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.$message.error("当前产品【"+ existsMsg + "】不能重复选入!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return; | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //添加第一个产品,先保存单据,再添加单据详情 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.multiProduct.forEach(product => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           let detailData = { |  |  |  |           let detailData = { | 
			
		
	
		
		
			
				
					
					|  |  |  |             orderIdFk: this.formData.orderId, |  |  |  |             orderIdFk: this.formData.orderId, | 
			
		
	
		
		
			
				
					
					|  |  |  |             productId: product.relIdFk, |  |  |  |             productId: product.relIdFk, | 
			
		
	
	
		
		
			
				
					|  |  | @ -707,6 +712,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |           }; |  |  |  |           }; | 
			
		
	
		
		
			
				
					
					|  |  |  |           this.countProductList.push(detailData); |  |  |  |           this.countProductList.push(detailData); | 
			
		
	
		
		
			
				
					
					|  |  |  |       }); |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.saveOrder(1); |  |  |  |         this.saveOrder(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.selectInvProductVisible = false; |  |  |  |         this.selectInvProductVisible = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
	
		
		
			
				
					|  |  | 
 |