Commit 23faf233 authored by ytbdmhy's avatar ytbdmhy

新增导出待审核的PDF及展示办理人和所属

parent e157cb1e
......@@ -397,13 +397,20 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = archive.number + "-" + archive.title + ".rar";
a.click();
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = archive.number + "-" + archive.title + ".rar";
a.click();
}
this.loading = false;
})
.catch(err => {
......
......@@ -86,15 +86,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险补缴申请表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险补缴申请表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -104,13 +104,20 @@ export default {
responseType:'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data],{
type:'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险参保登记表.pdf";
a.click();
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险参保登记表.pdf";
a.click();
}
this.loading = false;
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
......@@ -149,13 +156,20 @@ export default {
responseType:'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data],{
type:'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "居民养老保险表.xlsx";
a.click();
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "居民养老保险表.xlsx";
a.click();
}
this.loading = false;
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
......
......@@ -96,15 +96,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险终止注销登记表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险终止注销登记表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -76,15 +76,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -121,15 +128,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "缴费档次变更表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "缴费档次变更表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -71,15 +71,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险待遇领取审核表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险待遇领取审核表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
})
.catch(err => {
console.log(err);
......
......@@ -79,15 +79,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险特殊人群待遇审核表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险特殊人群待遇审核表" + Date.now() + ".pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -97,15 +97,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -142,15 +149,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "人员信息修改表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "人员信息修改表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -76,15 +76,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险信息变更登记表.pdf";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -121,15 +128,22 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "银行卡变更表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "银行卡变更表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -12,7 +12,7 @@
<el-button
type="primary"
size="mini"
style="background:#148A9B;margin-left:10px"
style="margin-left:10px"
icon="el-icon-search"
@click="paramSearch">搜索
</el-button>
......@@ -39,7 +39,7 @@
<el-form-item
label="当前档案案卷号"
label-width="110px"
style="width: 10%;float: left">
style="width: 11%;float: left">
<div class="masks"></div>
<el-input
size="small"
......
......@@ -34,16 +34,24 @@
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
label="姓名">
</el-table-column>
<el-table-column
prop="recordtype"
label="业务类型">
</el-table-column>
<el-table-column
prop="transactor"
label="办理人">
</el-table-column>
<el-table-column
prop="transactorDivision"
label="办理人所属">
</el-table-column>
<el-table-column
prop="createtime"
label="创建时间">
label="创建时间"
width="180">
</el-table-column>
<el-table-column
prop="townname"
......@@ -59,7 +67,7 @@
</el-table-column>
<el-table-column
width="180"
width="240"
label="操作">
<template slot-scope="scope">
<el-button
......@@ -93,6 +101,11 @@
type="success"
>流程</el-button>
</el-popover>
<el-button
v-if="scope.row.recordtype !== '升档改办' && scope.row.recordtype !== '关系转移'"
@click="exportPdf(scope.$index, scope.row)"
size="mini"
type="primary">导出</el-button>
</template>
</el-table-column>
</el-table>
......@@ -153,7 +166,10 @@
import { Loading } from 'element-ui';
import Candode from "../Core/candode"
import KtButton from "@/views/Core/KtButton"
// import baseUrl from "../../globe/globeUrl"
import {baseUrl} from "../../utils/global"
import axios from "axios"
import Cookies from "js-cookie";
// import baseUrl from "../../globe/globeUrl"
export default {
components:{
KtButton,
......@@ -437,7 +453,48 @@
padding: CryptoJS.pad.Pkcs7
});
return decrypted.toString(CryptoJS.enc.Utf8);
},
exportPdf(index, row) {
if (row.recordtype === "关系转移" || row.recordtype === "升档改办") {
this.$message({
type: 'warning',
message: "[关系转移]或[升档改办]无法导出"
});
return;
}
this.loading = true;
axios.get(baseUrl + '/exportPdf/unaudited', {
headers: {
"token": Cookies.get("token")
},
params: {
"recordDataId": row.id,
"recordType": row.recordtype
},
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "未审核" + row.recordtype + "表" + Date.now() + ".pdf";
a.click();
}
this.loading = false;
})
.catch(err => {
console.log(err);
this.loading = false;
});
}
},
created(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment