Commit 23faf233 authored by ytbdmhy's avatar ytbdmhy

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

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