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