|  |  |  | @ -36,6 +36,7 @@ let createData = { | 
			
		
	
		
			
				
					|  |  |  |  |   type: deviceChangeType.CHANGE.key, | 
			
		
	
		
			
				
					|  |  |  |  |   toDeptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |   deptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |   destroyType: null, | 
			
		
	
		
			
				
					|  |  |  |  |   name: null, | 
			
		
	
		
			
				
					|  |  |  |  |   remark: null, | 
			
		
	
		
			
				
					|  |  |  |  |   items: [] | 
			
		
	
	
		
			
				
					|  |  |  | @ -148,7 +149,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     } else if (this.type == deviceChangeType.CHANGE) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.createTitle = "设备变更"; | 
			
		
	
		
			
				
					|  |  |  |  |     } else if (this.type == deviceChangeType.DESTROY) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.createTitle = "设备报废"; | 
			
		
	
		
			
				
					|  |  |  |  |       this.createTitle = "设备移除"; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     this.getList() | 
			
		
	
	
		
			
				
					|  |  |  | @ -183,31 +184,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     saveCache() { | 
			
		
	
		
			
				
					|  |  |  |  |       // let data = window.localStorage.getItem(this.cacheKey)
 | 
			
		
	
		
			
				
					|  |  |  |  |       // if (data == null) {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   data = {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     createActive: this.createActive,
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     createData: this.createData,
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     itemList: this.itemList
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   }
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   this.showCreateDialog = false
 | 
			
		
	
		
			
				
					|  |  |  |  |       // } else {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   this.$confirm("检测到已经挂起了一单,如继续挂起将会覆盖之前的单,是否继续", "提示", {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     confirmButtonText: "继续",
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     cancelButtonText: "取消",
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     type: "warning",
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   }).then(() => {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     data = {
 | 
			
		
	
		
			
				
					|  |  |  |  |       //       createActive: this.createActive,
 | 
			
		
	
		
			
				
					|  |  |  |  |       //       createData: this.createData,
 | 
			
		
	
		
			
				
					|  |  |  |  |       //       itemList: this.itemList
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     }
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
 | 
			
		
	
		
			
				
					|  |  |  |  |       //     this.showCreateDialog = false
 | 
			
		
	
		
			
				
					|  |  |  |  |       //   })
 | 
			
		
	
		
			
				
					|  |  |  |  |       // }
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       this.createData.items = this.itemList | 
			
		
	
		
			
				
					|  |  |  |  |       let loading = this.$loading({ | 
			
		
	
	
		
			
				
					|  |  |  | @ -248,7 +224,20 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |  |           return | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |  |       } else if (this.createData.type == deviceChangeType.CHANGE.key){ | 
			
		
	
		
			
				
					|  |  |  |  |         let index = this.itemList.findIndex(i => !i.deviceCode && !i.productId); | 
			
		
	
		
			
				
					|  |  |  |  |         if (index != -1) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.$confirm(`请先移除空行,第${index + 1}行`, "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |             confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |  |             type: "error", | 
			
		
	
		
			
				
					|  |  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |  |           return | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       }else if (this.createData.type == deviceChangeType.DESTROY.key){ | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.createData.destroyType == null){ | 
			
		
	
		
			
				
					|  |  |  |  |           this.$message.warning("请选择移除类型后在立即提交") | 
			
		
	
		
			
				
					|  |  |  |  |           return | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         let index = this.itemList.findIndex(i => !i.deviceCode && !i.productId); | 
			
		
	
		
			
				
					|  |  |  |  |         if (index != -1) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.$confirm(`请先移除空行,第${index + 1}行`, "提示", { | 
			
		
	
	
		
			
				
					|  |  |  | 
 |