| 
					
				 | 
			
			
				@@ -136,18 +136,23 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button type="primary" @click="dataFormSubmit()">确定</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 新增物品 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <Add v-show="addMaterialVisible" ref="comAddMaterial" @addItem="addMaterialCallback"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <Add v-show="addMaterialVisible" ref="comAddMaterial" :options-type="optionsType" @addItem="addMaterialCallback"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import Add from './add-material' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  import { getDictList } from '@/api/dict' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { getPurchaseDetail } from '@/api/sale' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { dealStepData, dealStepLogs } from '@/api/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import UserComponent from '../common/user-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'purchase-add-or-update', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      optionsType: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: Array, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        default: () => [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     components: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       UserComponent, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       Add 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -158,7 +163,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        optionsType: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // optionsType: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         materialDetails: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         addMaterialVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataRule: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -173,14 +178,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       onChose () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$emit('onChose') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // 获取采购类别字典 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      getTypeList () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        getDictList({type: 'purchase_type'}).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.optionsType = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       async init (id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.materialDetails = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm = { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -247,13 +244,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addMaterial () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.addMaterialVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$refs.comAddMaterial.init(null, null, null, this.optionsType) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.comAddMaterial.init(null, null, null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addMaterialHandle (row, disable) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.addMaterialVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$refs.comAddMaterial.init(row.detailId, disable, row, this.optionsType) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.comAddMaterial.init(row.detailId, disable, row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       deleteMaterialHandle (detailId) { 
			 |