|  |  | @ -5,9 +5,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         <el-col :span="20"> |  |  |  |         <el-col :span="20"> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <el-form-item label="UDI码:" prop="code"> |  |  |  |           <el-form-item label="UDI码:" prop="code"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-input |  |  |  |             <el-input | 
			
		
	
		
		
			
				
					
					|  |  |  |               v-model="editData.code" |  |  |  |                 v-model="editData.code" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               clearable |  |  |  |                 clearable | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               disabled |  |  |  |                 disabled | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             ></el-input> |  |  |  |             ></el-input> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </el-form-item> |  |  |  |           </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </el-col> |  |  |  |         </el-col> | 
			
		
	
	
		
		
			
				
					|  |  | @ -72,6 +72,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <script> |  |  |  | <script> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import { |  |  |  | import { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   checkTempCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |   findByCode, |  |  |  |   findByCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |   saveCode, tabCode |  |  |  |   saveCode, tabCode | 
			
		
	
		
		
			
				
					
					|  |  |  | } from "@/api/inout/code"; |  |  |  | } from "@/api/inout/code"; | 
			
		
	
	
		
		
			
				
					|  |  | @ -113,7 +114,20 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |   methods: { |  |  |  |   methods: { | 
			
		
	
		
		
			
				
					
					|  |  |  |     saveCode() { |  |  |  |     saveCode() { | 
			
		
	
		
		
			
				
					
					|  |  |  |       if (this.editType == 1) { |  |  |  |       if (this.editType == 1) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.repeatAddCode(this.editData); |  |  |  |         //校验该单有没有存在同序列号的码 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (!isBlank(this.editData.serialNo)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           checkTempCode(this.editData).then((response) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if (response.code === 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               this.repeatAddCode(this.editData); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               this.$message.error(response.message); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }else{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.repeatAddCode(this.editData); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // tabCode(this.editData) |  |  |  |         // tabCode(this.editData) | 
			
		
	
		
		
			
				
					
					|  |  |  |         //   .then((response) => { |  |  |  |         //   .then((response) => { | 
			
		
	
	
		
		
			
				
					|  |  | @ -128,17 +142,17 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       } else { |  |  |  |       } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |         saveCode(this.editData) |  |  |  |         saveCode(this.editData) | 
			
		
	
		
		
			
				
					
					|  |  |  |           .then((response) => { |  |  |  |             .then((response) => { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             console.log(response) |  |  |  |               console.log(response) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (response.code === 20000) { |  |  |  |               if (response.code === 20000) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.$message.success("提交成功"); |  |  |  |                 this.$message.success("提交成功"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.codeDetail = this.editData; |  |  |  |                 this.codeDetail = this.editData; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.closeCodeDialog(); |  |  |  |                 this.closeCodeDialog(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |               } else { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.$message.error(response.message); |  |  |  |                 this.$message.error(response.message); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |               } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             this.loading = false; |  |  |  |               this.loading = false; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           }); |  |  |  |             }); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | @ -150,18 +164,18 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     findByCode() { |  |  |  |     findByCode() { | 
			
		
	
		
		
			
				
					
					|  |  |  |       let query = {udiCode: this.editData.code}; |  |  |  |       let query = {udiCode: this.editData.code}; | 
			
		
	
		
		
			
				
					
					|  |  |  |       findByCode(query) |  |  |  |       findByCode(query) | 
			
		
	
		
		
			
				
					
					|  |  |  |         .then((response) => { |  |  |  |           .then((response) => { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           if (response.code === 20000) { |  |  |  |             if (response.code === 20000) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (response.data.scbssfbhxlh == "否") { |  |  |  |               if (response.data.scbssfbhxlh == "否") { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.xlhEnable = true; |  |  |  |                 this.xlhEnable = true; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |               } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (response.data.zxxsbzbhsydysl > 1) { |  |  |  |               if (response.data.zxxsbzbhsydysl > 1) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               this.isUseDyCheck = true; |  |  |  |                 this.isUseDyCheck = true; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |           } else { |  |  |  |             this.loading = false; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |           }); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           this.loading = false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         }); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
	
		
		
			
				
					|  |  | @ -171,17 +185,17 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.editData = JSON.parse(JSON.stringify(this.codeDetail)); |  |  |  |     this.editData = JSON.parse(JSON.stringify(this.codeDetail)); | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.findByCode(); |  |  |  |     this.findByCode(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     //判断三区有数据的不允许修改 |  |  |  |     //判断三区有数据的不允许修改 | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(isBlank(this.editData.produceDate)){ |  |  |  |     if (isBlank(this.editData.produceDate)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.isProduceDate=true |  |  |  |       this.isProduceDate = true | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(isBlank(this.editData.expireDate)){ |  |  |  |     if (isBlank(this.editData.expireDate)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.isExpireDate=true |  |  |  |       this.isExpireDate = true | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(isBlank(this.editData.batchNo)){ |  |  |  |     if (isBlank(this.editData.batchNo)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.isBatchNo=true |  |  |  |       this.isBatchNo = true | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(isBlank(this.editData.serialNo)){ |  |  |  |     if (isBlank(this.editData.serialNo)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       this.isSerialNo=true |  |  |  |       this.isSerialNo = true | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |