|  |  | @ -10,8 +10,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-card class="el-card"> |  |  |  |             <el-card class="el-card"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <div style="display: flex;" v-if="editType==2"> |  |  |  |                 <div style="display: flex;"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     <el-button |  |  |  |                     <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         v-if="editType==2" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         type="primary" |  |  |  |                         type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         size="mini" |  |  |  |                         size="mini" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         icon="search" |  |  |  |                         icon="search" | 
			
		
	
	
		
		
			
				
					|  |  | @ -20,6 +21,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </el-button |  |  |  |                     </el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |                     > |  |  |  |                     > | 
			
		
	
		
		
			
				
					
					|  |  |  |                     <el-button |  |  |  |                     <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         v-if="editType==2" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         type="primary" |  |  |  |                         type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         size="mini" |  |  |  |                         size="mini" | 
			
		
	
		
		
			
				
					
					|  |  |  |                         icon="search" |  |  |  |                         icon="search" | 
			
		
	
	
		
		
			
				
					|  |  | @ -27,6 +29,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                     >审核拒绝 |  |  |  |                     >审核拒绝 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </el-button |  |  |  |                     </el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |                     > |  |  |  |                     > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         v-if="editType==1" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         size="mini" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         icon="search" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         @click="printSupCertAll" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     >打印 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 </div> |  |  |  |                 </div> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <el-row :gutter="20" class="el-row" type="flex" style="margin-top: 20px"> |  |  |  |                 <el-row :gutter="20" class="el-row" type="flex" style="margin-top: 20px"> | 
			
		
	
	
		
		
			
				
					|  |  | @ -204,7 +214,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         <el-card class="el-card"> |  |  |  |         <el-card class="el-card"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-table v-loading="certLoading" |  |  |  |             <el-table v-loading="certLoading" | 
			
		
	
		
		
			
				
					
					|  |  |  |                       :data="certList" |  |  |  |                       :data="certList" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       ref="certTable" | 
			
		
	
		
		
			
				
					
					|  |  |  |                       style="width: 100%"> |  |  |  |                       style="width: 100%"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-table-column type="selection" width="55"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <el-table-column type="index" label="序号" width="50"></el-table-column> |  |  |  |                 <el-table-column type="index" label="序号" width="50"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <el-table-column label="证书名称" prop="name"></el-table-column> |  |  |  |                 <el-table-column label="证书名称" prop="name"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <el-table-column label="证书编号" prop="code"></el-table-column> |  |  |  |                 <el-table-column label="证书编号" prop="code"></el-table-column> | 
			
		
	
	
		
		
			
				
					|  |  | @ -234,6 +246,14 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                         >预览 |  |  |  |                         >预览 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         </el-button |  |  |  |                         </el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |                         > |  |  |  |                         > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             v-if="editType==1" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             type="text" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             size="small" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             @click.native="printSupCert(scope.row)" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         >打印 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         </el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         > | 
			
		
	
		
		
			
				
					
					|  |  |  |                         <el-button |  |  |  |                         <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |                             type="text" |  |  |  |                             type="text" | 
			
		
	
		
		
			
				
					
					|  |  |  |                             size="small" |  |  |  |                             size="small" | 
			
		
	
	
		
		
			
				
					|  |  | @ -296,7 +316,11 @@ import { | 
			
		
	
		
		
			
				
					
					|  |  |  |     TextToCode, |  |  |  |     TextToCode, | 
			
		
	
		
		
			
				
					
					|  |  |  | } from "element-china-area-data"; |  |  |  | } from "element-china-area-data"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import draggable from "vuedraggable"; |  |  |  | import draggable from "vuedraggable"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import {getSupComapnys} from "@/api/purchase/supCompany"; |  |  |  | import { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getSupComapnys, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     printSupCertProduction, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     verifyTemplateFile | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } from "@/api/purchase/supCompany"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import {addOrModifyCompany, getCompanyList} from "@/api/purchase/supManufacturer"; |  |  |  | import {addOrModifyCompany, getCompanyList} from "@/api/purchase/supManufacturer"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import {auditSupCert, deleteCompanyCert, filterCompanyCert} from "@/api/purchase/companyCert"; |  |  |  | import {auditSupCert, deleteCompanyCert, filterCompanyCert} from "@/api/purchase/companyCert"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import companyAddCert from "@/views/purchase/supCertAddDialog"; |  |  |  | import companyAddCert from "@/views/purchase/supCertAddDialog"; | 
			
		
	
	
		
		
			
				
					|  |  | @ -638,6 +662,76 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             }); |  |  |  |             }); | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         printSupCert(row) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             var selectIds=[row.id]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             let query = {moduleId: 10}; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.loading = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             verifyTemplateFile(query).then((res) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (res.code === 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     let printParams = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         templateId: res.data, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         ids: selectIds, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         id: this.inputQuery.id | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     printSupCertProduction(printParams).then((response) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         //将pdf文件转换为url。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         const binaryData = []; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         binaryData.push(response); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         //获取blob链接。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         let url = window.URL.createObjectURL( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             new Blob(binaryData, {type: "application/pdf"}) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         window.open(url);//打开新标签页,预览pdf。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     this.$message.error(res.message); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }).catch((error) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 this.$message.error(error.message); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         printSupCertAll() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             var certLists=this.$refs.certTable.selection; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             var  selectIds=[]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             certLists.forEach(item => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 selectIds.push(item.id); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if(selectIds.length==0){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 this.$message.error("请先选择打印的证书!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             let query = {moduleId: 10}; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.loading = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             verifyTemplateFile(query).then((res) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (res.code === 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     let printParams = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         templateId: res.data, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         ids: selectIds, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         id: this.inputQuery.id | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     printSupCertProduction(printParams).then((response) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         //将pdf文件转换为url。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         const binaryData = []; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         binaryData.push(response); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         //获取blob链接。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         let url = window.URL.createObjectURL( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             new Blob(binaryData, {type: "application/pdf"}) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         window.open(url);//打开新标签页,预览pdf。 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     this.$message.error(res.message); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }).catch((error) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 this.loading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 this.$message.error(error.message); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     filters: { |  |  |  |     filters: { | 
			
		
	
		
		
			
				
					
					|  |  |  |         statusFilterType(status) { |  |  |  |         statusFilterType(status) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |