|
|
|
@ -9,8 +9,9 @@
|
|
|
|
|
>
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
|
|
|
|
|
<div style="display: flex;" v-if="editType==2">
|
|
|
|
|
<div style="display: flex;">
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="editType==2"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="search"
|
|
|
|
@ -19,6 +20,7 @@
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="editType==2"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="search"
|
|
|
|
@ -26,6 +28,14 @@
|
|
|
|
|
>审核拒绝
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="editType==1"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="search"
|
|
|
|
|
@click="printSupCertAll"
|
|
|
|
|
>打印
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 20px">
|
|
|
|
|
<el-col :span="10" class="el-col">
|
|
|
|
@ -190,7 +200,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<el-table v-loading="certLoading"
|
|
|
|
|
:data="certList"
|
|
|
|
|
ref="certTable"
|
|
|
|
|
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 label="证书名称" prop="name"></el-table-column>
|
|
|
|
|
<el-table-column label="证书编号" prop="code"></el-table-column>
|
|
|
|
@ -198,8 +210,8 @@
|
|
|
|
|
<el-table-column label="失效期" prop="expireDate"></el-table-column>
|
|
|
|
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
|
<el-table-column label="证书状态" prop="status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ supStatus[scope.row.status] }}
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ supStatus[scope.row.status] }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="审核状态" prop="auditStatus" width="120">
|
|
|
|
@ -227,6 +239,14 @@
|
|
|
|
|
>审核
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="editType==1"
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native="printSupCert(scope.row)"
|
|
|
|
|
>打印
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -280,7 +300,11 @@ import {filterCompanyCert, deleteCompanyCert, auditSupCert} from "../../api/purc
|
|
|
|
|
import companyAddCert from "./supCertAddDialog";
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
|
|
|
|
import {getSupComapnys, modifyCompany} from "@/api/purchase/supCompany";
|
|
|
|
|
import {
|
|
|
|
|
getSupComapnys,
|
|
|
|
|
printSupCertProduction,
|
|
|
|
|
verifyTemplateFile
|
|
|
|
|
} from "@/api/purchase/supCompany";
|
|
|
|
|
import {getUUID} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -427,9 +451,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectedOptions = this.inputQuery.placeAreaCode.split(",");
|
|
|
|
|
if(this.inputQuery.productionAreaCode!=null){
|
|
|
|
|
this.selectedOptions2 = this.inputQuery.productionAreaCode.split(",");
|
|
|
|
|
}
|
|
|
|
|
if (this.inputQuery.productionAreaCode != null) {
|
|
|
|
|
this.selectedOptions2 = this.inputQuery.productionAreaCode.split(",");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getCompanyCertList();
|
|
|
|
|
this.findMethod();
|
|
|
|
@ -496,7 +520,7 @@ export default {
|
|
|
|
|
this.getCompanyCertList();
|
|
|
|
|
},
|
|
|
|
|
getCompanyCertList() {
|
|
|
|
|
if(this.editType!=2 && this.editType!=0){
|
|
|
|
|
if (this.editType != 2 && this.editType != 0) {
|
|
|
|
|
this.certQuery.auditStatus = 20;
|
|
|
|
|
}
|
|
|
|
|
this.certLoading = true;
|
|
|
|
@ -505,7 +529,7 @@ export default {
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.certLoading = false;
|
|
|
|
|
this.certList = response.data.list || [];
|
|
|
|
|
this.certTotal=response.data.total;
|
|
|
|
|
this.certTotal = response.data.total;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.certLoading = false;
|
|
|
|
@ -679,6 +703,72 @@ export default {
|
|
|
|
|
uploadHandleError() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
printSupCert(row) {
|
|
|
|
|
var selectIds=[row.id];
|
|
|
|
|
let query = {moduleId: 9};
|
|
|
|
|
this.loading = true;
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
let printParams = {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
ids: selectIds,
|
|
|
|
|
customerId: row.customerId
|
|
|
|
|
};
|
|
|
|
|
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);
|
|
|
|
|
})
|
|
|
|
|
let query = {moduleId: 9};
|
|
|
|
|
this.loading = true;
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
let printParams = {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
ids: selectIds,
|
|
|
|
|
customerId: this.inputQuery.customerId
|
|
|
|
|
};
|
|
|
|
|
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: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
|