|
|
@ -8,8 +8,9 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-card class="el-card" style="margin-top: -25px">
|
|
|
|
<el-card class="el-card" style="margin-top: -25px">
|
|
|
|
|
|
|
|
|
|
|
|
<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"
|
|
|
@ -18,6 +19,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"
|
|
|
@ -25,6 +27,13 @@
|
|
|
|
>审核拒绝
|
|
|
|
>审核拒绝
|
|
|
|
</el-button
|
|
|
|
</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
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">
|
|
|
|
<el-col :span="10" class="el-col">
|
|
|
|
<el-col :span="10" class="el-col">
|
|
|
@ -135,7 +144,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
@ -164,6 +176,13 @@
|
|
|
|
>预览
|
|
|
|
>预览
|
|
|
|
</el-button
|
|
|
|
</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
@click.native="printSupCert(scope.row)"
|
|
|
|
|
|
|
|
>打印
|
|
|
|
|
|
|
|
</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
@ -211,7 +230,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {modifyCompany, auditCompany} from "../../api/purchase/supCompany";
|
|
|
|
import {modifyCompany, auditCompany,printSupCert, verifyTemplateFile} from "../../api/purchase/supCompany";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
provinceAndCityData,
|
|
|
|
provinceAndCityData,
|
|
|
|
regionData,
|
|
|
|
regionData,
|
|
|
@ -519,7 +538,72 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
,
|
|
|
|
,
|
|
|
|
|
|
|
|
printSupCert(row) {
|
|
|
|
|
|
|
|
var selectIds=[row.id];
|
|
|
|
|
|
|
|
let query = {moduleId: 8};
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
|
|
|
let printParams = {
|
|
|
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
|
|
|
ids: selectIds,
|
|
|
|
|
|
|
|
customerId: row.customerId
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
printSupCert(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: 8};
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
|
|
|
let printParams = {
|
|
|
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
|
|
|
ids: selectIds,
|
|
|
|
|
|
|
|
customerId: this.inputQuery.customerId
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
printSupCert(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);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
deleteCompanyCert(row) {
|
|
|
|
deleteCompanyCert(row) {
|
|
|
|
this.$confirm("是否删除?", "提示", {
|
|
|
|
this.$confirm("是否删除?", "提示", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
confirmButtonText: "确定",
|
|
|
|