|  |  |  | @ -79,6 +79,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item class="query-form-item" label="货位名称:"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-select v-model="productQuery.invSpaceCode" placeholder="请选择货位" | 
			
		
	
		
			
				
					|  |  |  |  |                          @change="invSpaceChange" | 
			
		
	
		
			
				
					|  |  |  |  |                          clearable | 
			
		
	
		
			
				
					|  |  |  |  |                          style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |               > | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-option | 
			
		
	
	
		
			
				
					|  |  |  | @ -177,12 +178,11 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       invList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       spaceList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       productList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       combineProductList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       formLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       productVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |       loading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       productQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |         invCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         invCode: this.$store.getters.locInvCode, | 
			
		
	
		
			
				
					|  |  |  |  |         invSpaceCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         cpmctymc: null, | 
			
		
	
		
			
				
					|  |  |  |  |         nameCode: null, | 
			
		
	
	
		
			
				
					|  |  |  | @ -199,12 +199,12 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       this.showSearch = !this.showSearch; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     invChange() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.combineProductList = []; | 
			
		
	
		
			
				
					|  |  |  |  |       this.multipleSelection = []; | 
			
		
	
		
			
				
					|  |  |  |  |       this.spaceList = []; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.invSpaceCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.relId = null; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.ggxh = null; | 
			
		
	
		
			
				
					|  |  |  |  |       this.getProductList(); | 
			
		
	
		
			
				
					|  |  |  |  |       this.getInvProductList(); | 
			
		
	
		
			
				
					|  |  |  |  |       this.getSpaceList(); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     getInvList() { | 
			
		
	
	
		
			
				
					|  |  |  | @ -224,7 +224,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     invSpaceChange() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.combineProductList = []; | 
			
		
	
		
			
				
					|  |  |  |  |       this.multipleSelection = []; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     formSubmit() { | 
			
		
	
		
			
				
					|  |  |  |  |       let message = this.verifyFormData(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -233,15 +233,24 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         return; | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       let relIdList = []; | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.combineProductList.length > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |         this.combineProductList.forEach((item) => { | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.multipleSelection.length > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |         this.multipleSelection.forEach((item) => { | 
			
		
	
		
			
				
					|  |  |  |  |           relIdList.push(item.relIdFk); | 
			
		
	
		
			
				
					|  |  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |  |         this.$message.error("请选择需要预警的产品"); | 
			
		
	
		
			
				
					|  |  |  |  |         return; | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       //添加预警设置 | 
			
		
	
		
			
				
					|  |  |  |  |       let params = { | 
			
		
	
		
			
				
					|  |  |  |  |         lowStock: this.formData.lowStock, | 
			
		
	
		
			
				
					|  |  |  |  |         lackStock: this.formData.lackStock, | 
			
		
	
		
			
				
					|  |  |  |  |         overStock: this.formData.overStock, | 
			
		
	
		
			
				
					|  |  |  |  |         expireDate: this.formData.expireDate, | 
			
		
	
		
			
				
					|  |  |  |  |         recentDate: this.formData.recentDate, | 
			
		
	
		
			
				
					|  |  |  |  |         deptCode: this.formData.deptCode, | 
			
		
	
		
			
				
					|  |  |  |  |         invCode: this.formData.invCode, | 
			
		
	
		
			
				
					|  |  |  |  |         invSpaceCode: this.formData.invSpaceCode, | 
			
		
	
	
		
			
				
					|  |  |  | @ -280,8 +289,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       this.productTotal = 0; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     getInvProductList() { | 
			
		
	
		
			
				
					|  |  |  |  |       debugger | 
			
		
	
		
			
				
					|  |  |  |  |       console.log(this.productQuery.invCode+"---------"); | 
			
		
	
		
			
				
					|  |  |  |  |       getInvProduct(this.productQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |         if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.productList = res.data.list || []; | 
			
		
	
	
		
			
				
					|  |  |  | @ -296,9 +303,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         this.productTotal = 0; | 
			
		
	
		
			
				
					|  |  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     removeProduct(index) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.combineProductList.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     onReset() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.productQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |         invCode: this.formData.invCode, | 
			
		
	
	
		
			
				
					|  |  |  | @ -318,16 +322,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     handleSelectionChange(val) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.multipleSelection = val; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     combine() { | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.multipleSelection.length === 0) { | 
			
		
	
		
			
				
					|  |  |  |  |         this.$message.warning("请选择需要添加预警的产品!"); | 
			
		
	
		
			
				
					|  |  |  |  |         return; | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       this.productVisible = false; | 
			
		
	
		
			
				
					|  |  |  |  |       this.multipleSelection.forEach((item) => { | 
			
		
	
		
			
				
					|  |  |  |  |         this.combineProductList.push(item); | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   created() { | 
			
		
	
		
			
				
					|  |  |  |  |     this.getInvList(); | 
			
		
	
	
		
			
				
					|  |  |  | 
 |