| 
					
				 | 
			
			
				@@ -125,7 +125,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import UserComponent from '../common/user-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import DictSelect from '../sys/dict-select' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  import { inboundBatch, getBoundDetails, infoByNameAndCode } from '@/api/warehouse' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { inboundBatch, updateBatch, getBoundDetails, infoByNameAndCode } from '@/api/warehouse' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import ConvertComponent from '../common/convert-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import MaterialComponent from '../common/material-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import MaterialTypeComponent from '../common/material-type-component' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -143,9 +143,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           userId: [{ required: true, message: '请选择入库申请人', trigger: 'blur' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         optionsSourceCategory: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // {code: '1', value: '采购入库'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          {code: '2', value: '生产入库'} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // {code: '3', value: '委外入库'} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '1', value: '采购入库'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '2', value: '生产入库'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '3', value: '委外入库'} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -153,20 +153,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       onChose () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$emit('onChose') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      async init (id, display, dataForm) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      async init (id, display, item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.display = display 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.id = id || 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.visible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (dataForm) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.addOne(dataForm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (!display) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.addOne() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           // 获取详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           await getBoundDetails(id).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // console.log(JSON.stringify(data)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (data.data[0]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.dataForm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   recordCode: data.data[0].recordCode, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -174,11 +171,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   orgName: data.data[0].orgName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.dataForm.recordType = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               data.data.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item.buttonType = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.addOne(item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.addOne(item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (!display) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.addOne() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addOne (item) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -222,8 +225,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 recordType: this.dataForm.recordType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 userId: this.$store.state.user.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            inboundBatch(postData).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            (!this.id ? inboundBatch(postData) : updateBatch(postData)).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   message: '操作成功', 
			 |