| 
					
				 | 
			
			
				@@ -60,13 +60,21 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <cus-component v-model="dataForm.source" :cus-id.sync="dataForm.source"></cus-component> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-col :span="16"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="产品图纸" prop="drawingIdList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <draw-components v-model="dataForm.drawingIdList" :draw-ids="dataForm.drawingIdList" @change='receiverChange'></draw-components> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-form-item label="所需文件资料" prop="docIdList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <doc-components v-model="dataForm.docIdList" :doc-ids="dataForm.docIdList" @change='docSelectChange'/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <upload-component :title="'产品技术文件(多选)'" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-row class="my-row" style="margin-top: 20px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-form-item label="备注" prop="notes"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-input type="textarea" v-model="dataForm.notes" :disabled="display"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -199,10 +207,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { dealStepData, dealStepLogs } from '@/api/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import CusComponent from '../common/cus-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import DrawComponents from '../common/draw-components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import DocComponents from '../common/doc-components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'product-add-or-update', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    components: {DrawComponents, CusComponent, UploadComponent, templateChose, templateChoseMaterial}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    components: {DocComponents, DrawComponents, CusComponent, UploadComponent, templateChose, templateChoseMaterial}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       orgId: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         get () { return this.$store.state.user.orgId } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -233,6 +242,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productSpec: [{ required: true, message: '产品规格不能为空', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productType: [{ required: true, message: '产品类别不能为空', trigger: 'change' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          docIdList: [{ required: true, message: '所需文件资料不能为空', trigger: 'change' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           source: [{ required: true, message: '产品来源不能为空', trigger: 'change' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           drawingIdList: [{ required: true, message: '产品图纸不能为空', trigger: 'blur' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -267,6 +277,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         await getProductDetail(this.id).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.dataForm = data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 附件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (data.data.attachList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              data.data.attachList.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.fileList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  name: item.fileName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  url: item.url, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  id: item.url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 流程图展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (data.data.workFlowBusinessExt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -395,6 +415,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 产品技术文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let fList = this.fileList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (fList.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.dataForm.attachList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              for (let i = 0; i < fList.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.dataForm.attachList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  fileName: fList[i].name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  url: fList[i].url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message.error('请上传文件') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.$http({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               url: this.$http.adornUrl(`/biz-service/product/save`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               method: 'post', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -419,6 +453,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       receiverChange (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm.drawingIdList = val 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      docSelectChange (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(val) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.dataForm.docIdList = val 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |