From 162f01fdd6432b047fabf5e4185d077e23fa1332 Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Wed, 7 May 2025 17:53:04 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=8C=E6=AC=A1=E9=94=80?=
=?UTF-8?q?=E5=94=AE=E8=BD=A6=E8=BE=86=E4=B8=8D=E8=BF=BD=E5=81=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api/returntostorage/returntostorage.js | 7 +++++
.../secondarysalesnotrecovery.js | 7 +++++
.../views/returntostorage/returntostorage.vue | 27 +++++++++++++++++++
.../secondarysalesnotrecovery.vue | 27 +++++++++++++++++++
4 files changed, 68 insertions(+)
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) {