| 
					
				 | 
			
			
				@@ -188,7 +188,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-input placeholder="请输入" v-model="scope.row.lotNum"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-input placeholder="请输入" v-model="scope.row.lotNum" @change="handleEDIT(scope.row,scope.$index)"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-table-column> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -213,6 +213,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   type="date" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请选择生产日期" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   value-format="yyyy-MM-dd" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  @change="handleEDIT(scope.row,scope.$index)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -238,6 +239,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   type="date" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请选择有效期" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   value-format="yyyy-MM-dd" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  @change="handleEDIT(scope.row,scope.$index)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -260,7 +262,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       ]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      <el-input-number v-model="scope.row.delvCnt" controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <el-input-number v-model="scope.row.delvCnt"  controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-table-column> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -434,6 +436,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       title="UDI码填写" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :visible.sync="udidialog" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       width="70%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :close-on-click-modal="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :before-close="handleClose" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <el-form :model="udiData" ref="udiForm"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <el-table 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1035,6 +1039,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.shanchu3(row); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.numOrPriceChange(index, row); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.tableData[index].udiList=[]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     numOrPriceChange(index, row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$set( 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1147,6 +1152,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         manuDate: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         prodExpy: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dyntFileId: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        isFas:row.isFas, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // udiList:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.tableData.splice(index + 1, 0, list); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1155,6 +1161,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // const aa = this.tableData.findIndex((item) => item.id === row.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // this.number.splice(aa+1,0,this.number[aa]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleEDIT(row,index){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.tableData[index].udiList=[]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 筛选合并项 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     computeCell(tableData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.cellList = []; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1335,7 +1344,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleudi(row,index){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(row.lotNum && row.manuDate && row.prodExpy && row.delvCnt){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.rowIndex = index; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(!this.tableData[index].udiList || this.tableData[index].udiList.length==0 || this.tableData[index].udiList.length!==row.delvCnt){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(!this.tableData[index].udiList || this.tableData[index].udiList.length==0 || this.tableData[index].udiList.length!==row.delvCnt || this.tableData[index].lotNum!==this.tableData[index].udiList[0].lotNum){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let udiObj={ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ...row, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         udi:"", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1354,15 +1363,45 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 去冲 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleClose(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.udiData.forEach((v)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(v.udi){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          let udicf = this.udif(this.udiData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (udicf == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                message: "同一产品的udi码不能重复", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type: "error", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              throw new Error("同一产品的udi码不能重复"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.udidialog = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.udidialog = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 确定UDI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     clickUdi(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.udiForm.validate((valid) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          let udicf = this.udif(this.udiData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (udicf == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                message: "同一产品的udi码不能重复", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type: "info", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              throw new Error("同一产品的udi码不能重复"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$confirm("确认提交udi码", "提示", { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             confirmButtonText: "确定", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             cancelButtonText: "取消", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             type: "warning", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.tableData[this.rowIndex].udiList = this.udiData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.udidialog = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1393,6 +1432,24 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    udif(arr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      for (let i = 0; i < arr.length - 1; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (let j = i + 1; j < arr.length; j++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(arr[i].prodCode, arr[j].prodCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (arr[i].prodCode == arr[j].prodCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var set = new Set(); //创建个集合Set对象(用object对象也可以) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return arr.some(function (v, i) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              //遍历 arr数组,当返回值为true时提前退出遍历。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              var f = set.has(v.udi); //判断每个对象里number属性的值是否在集合Set 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              set.add(v.udi); //将number属性的值添加到集合Set中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              return f; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            console.log("else"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 选择同行单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleTong(e, row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.tongIndex = e; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1414,6 +1471,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 出库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleDelivery() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let lotnum = this.pf(this.tableData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (lotnum == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          message: "同一产品的批号不能重复", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          type: "info", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        throw new Error("同一产品的批号不能重复"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.tableData.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (item.delvCnt=='0') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$message({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1434,15 +1499,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$message.warning("请填写udi再提交") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           throw new Error("请填写udi再提交"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.udiList.forEach((v,index)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(v.udi==""||v.udi==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$message.warning("请填写udi再提交") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Error("请填写udi再提交"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let lotnum = this.pf(this.tableData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (lotnum == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          message: "同一产品的批号不能重复", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          type: "info", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        throw new Error("同一产品的批号不能重复"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.tabledata.validate((valid) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$confirm("确认出库", "提示", { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1474,21 +1538,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         cancelButtonText: "取消", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: "warning", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // let data = this.tableData.map((i) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //   return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     materialId: i.prodCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     memo:i.memo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     delvCnt: i.delvCnt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     hiCode:i.hiCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     delvPric:i.purcPric, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     lotNum: i.lotNum, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     manuDate: i.manuDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     prodExpy: i.prodExpy, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     invoFileId: i.invoFileId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     dyntFileId: i.dyntFileId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //     noRow:i.index 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //   }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let data2 = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           delvOrdId: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           purcOrdId: this.$route.query.id, 
			 |