diff --git a/anrui-riskcenter-ui/src/api/returntostorage/returntostorage.js b/anrui-riskcenter-ui/src/api/returntostorage/returntostorage.js
index ada094603c..5a71a3da45 100644
--- a/anrui-riskcenter-ui/src/api/returntostorage/returntostorage.js
+++ b/anrui-riskcenter-ui/src/api/returntostorage/returntostorage.js
@@ -41,6 +41,13 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
+ createPdf: function(data) {
+ return request({
+ url: '/riskcenter/v1/LoanReturnInboundApply/createPdf',
+ method: 'post',
+ params: data
+ })
+ },
// 提交流程
submit: function(params) {
return request({
diff --git a/anrui-riskcenter-ui/src/api/secondarysalesnotrecovery/secondarysalesnotrecovery.js b/anrui-riskcenter-ui/src/api/secondarysalesnotrecovery/secondarysalesnotrecovery.js
index b2ca367fc9..b7f750b0ed 100644
--- a/anrui-riskcenter-ui/src/api/secondarysalesnotrecovery/secondarysalesnotrecovery.js
+++ b/anrui-riskcenter-ui/src/api/secondarysalesnotrecovery/secondarysalesnotrecovery.js
@@ -40,6 +40,13 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
+ createPdf: function(data) {
+ return request({
+ url: '/riskcenter/v1/loansecondarysalesnotapply/createPdf',
+ method: 'post',
+ params: data
+ })
+ },
// 提交流程
submit: function(params) {
return request({
diff --git a/anrui-riskcenter-ui/src/views/returntostorage/returntostorage.vue b/anrui-riskcenter-ui/src/views/returntostorage/returntostorage.vue
index 4421841cd8..c918cfe43e 100644
--- a/anrui-riskcenter-ui/src/views/returntostorage/returntostorage.vue
+++ b/anrui-riskcenter-ui/src/views/returntostorage/returntostorage.vue
@@ -74,6 +74,7 @@
办理
+ 下载
查看
@@ -458,6 +459,32 @@ export default {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
+ toDownload(row) {
+ req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((res) => {
+ if (res.success) {
+ var xhr = new XMLHttpRequest()
+ xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '交回车辆入库申请单', true)
+ xhr.setRequestHeader('token', getStorage())
+ xhr.responseType = 'blob'
+ xhr.onload = function(e) {
+ // 如果请求执行成功
+ var blob = this.response
+ var filename = '交回车辆入库申请单.pdf'
+ var a = document.createElement('a')
+ // blob.type="application/octet-stream";
+ // 创键临时url对象
+ var url = URL.createObjectURL(blob)
+ a.href = url
+ a.download = filename
+ a.click()
+ // 释放之前创建的URL对象
+ window.URL.revokeObjectURL(url)
+ }
+ // 发送请求
+ xhr.send()
+ }
+ }).catch(() => {})
+ },
// 删除
doDel() {
if (this.sids.length === 0) {
diff --git a/anrui-riskcenter-ui/src/views/secondarysalesnotrecovery/secondarysalesnotrecovery.vue b/anrui-riskcenter-ui/src/views/secondarysalesnotrecovery/secondarysalesnotrecovery.vue
index 44880873d7..ce880a18ab 100644
--- a/anrui-riskcenter-ui/src/views/secondarysalesnotrecovery/secondarysalesnotrecovery.vue
+++ b/anrui-riskcenter-ui/src/views/secondarysalesnotrecovery/secondarysalesnotrecovery.vue
@@ -66,6 +66,7 @@
办理
+ 下载
查看
@@ -323,6 +324,32 @@ export default {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
+ toDownload(row) {
+ req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((res) => {
+ if (res.success) {
+ var xhr = new XMLHttpRequest()
+ xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '二次销售车辆不追偿申请单', true)
+ xhr.setRequestHeader('token', getStorage())
+ xhr.responseType = 'blob'
+ xhr.onload = function(e) {
+ // 如果请求执行成功
+ var blob = this.response
+ var filename = '二次销售车辆不追偿申请单.pdf'
+ var a = document.createElement('a')
+ // blob.type="application/octet-stream";
+ // 创键临时url对象
+ var url = URL.createObjectURL(blob)
+ a.href = url
+ a.download = filename
+ a.click()
+ // 释放之前创建的URL对象
+ window.URL.revokeObjectURL(url)
+ }
+ // 发送请求
+ xhr.send()
+ }
+ }).catch(() => {})
+ },
// 删除
doDel() {
if (this.sids.length === 0) {