| 
					
				 | 
			
			
				@@ -13,19 +13,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-col :span="12"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-form-item label="模板" prop="templateId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-model="dataForm.templateId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              remote 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              filterable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              :remote-method="remoteTemplate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              placeholder="请选择"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                v-for="item in optionsTemplate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :key="item.code" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :label="item.value" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :value="item.code"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template-out-component v-model="dataForm.templateId" :template-id="dataForm.templateId"></template-out-component> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-row> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -43,14 +31,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  import {getTemplateList} from '@/api/warehouse' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import TemplateOutComponent from '../common/template-out-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'template-outbound', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    components: {TemplateOutComponent}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         visible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: { }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        optionsTemplate: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataRule: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           recordNumber: [{ required: true, message: '产品编号不能为空', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           templateId: [{ required: true, message: '模板不能为空', trigger: 'change' }] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,24 +82,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       validateField (type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$refs.dataForm.validateField(type) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // 远程方法:获取模板 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      async remoteTemplate (query) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!query) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          templateName: query.trimStart() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        await getTemplateList(params).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.optionsTemplate = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            data.data.records.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.optionsTemplate.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                code: item.templateId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                value: item.templateName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |