|
@ -155,7 +155,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { createPdf, listPage, ctskd } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
import { createPdf, createPdfRsk, listPage, ctskd } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
import Pagination from '@/components/pagination' |
|
|
import Pagination from '@/components/pagination' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
import ButtonBar from '@/components/ButtonBar' |
|
@ -179,6 +179,7 @@ export default { |
|
|
visibleDisabled: false, |
|
|
visibleDisabled: false, |
|
|
printSid: '', |
|
|
printSid: '', |
|
|
print: '', |
|
|
print: '', |
|
|
|
|
|
printSource: '', |
|
|
btndisabled: false, |
|
|
btndisabled: false, |
|
|
isSearchShow: false, |
|
|
isSearchShow: false, |
|
|
searchxianshitit: '隐藏查询条件', |
|
|
searchxianshitit: '隐藏查询条件', |
|
@ -356,43 +357,81 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleDownLoad(row) { |
|
|
handleDownLoad(row) { |
|
|
this.printSid = row.sid |
|
|
this.printSid = row.sid |
|
|
|
|
|
this.printSource = row.source |
|
|
this.print = '' |
|
|
this.print = '' |
|
|
this.dialogVisible = true |
|
|
this.dialogVisible = true |
|
|
}, |
|
|
}, |
|
|
handleConfirm() { |
|
|
handleConfirm() { |
|
|
this.visibleDisabled = true |
|
|
this.visibleDisabled = true |
|
|
createPdf({ skdSid: this.printSid, printerType: this.print }).then((resp) => { |
|
|
if (this.printSource === '01') { |
|
|
if (resp.success && resp.data.pdfPath !== '') { |
|
|
createPdf({ skdSid: this.printSid, printerType: this.print }).then((resp) => { |
|
|
var xhr = new XMLHttpRequest() |
|
|
if (resp.success && resp.data.pdfPath !== '') { |
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&outFileName=' + '收款单', true) |
|
|
var xhr = new XMLHttpRequest() |
|
|
xhr.setRequestHeader('token', getStorage()) |
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&outFileName=' + '收款单', true) |
|
|
xhr.responseType = 'blob' |
|
|
xhr.setRequestHeader('token', getStorage()) |
|
|
xhr.onload = function(e) { |
|
|
xhr.responseType = 'blob' |
|
|
// 如果请求执行成功 |
|
|
xhr.onload = function(e) { |
|
|
var blob = this.response |
|
|
// 如果请求执行成功 |
|
|
var filename = '收款单.pdf' |
|
|
var blob = this.response |
|
|
var a = document.createElement('a') |
|
|
var filename = '收款单.pdf' |
|
|
// blob.type="application/octet-stream"; |
|
|
var a = document.createElement('a') |
|
|
// 创键临时url对象 |
|
|
// blob.type="application/octet-stream"; |
|
|
var url = URL.createObjectURL(blob) |
|
|
// 创键临时url对象 |
|
|
a.href = url |
|
|
var url = URL.createObjectURL(blob) |
|
|
a.download = filename |
|
|
a.href = url |
|
|
a.click() |
|
|
a.download = filename |
|
|
// 释放之前创建的URL对象 |
|
|
a.click() |
|
|
window.URL.revokeObjectURL(url) |
|
|
// 释放之前创建的URL对象 |
|
|
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
|
|
} |
|
|
|
|
|
// 发送请求 |
|
|
|
|
|
xhr.send() |
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
this.printSid = '' |
|
|
|
|
|
this.printSource = '' |
|
|
|
|
|
this.visibleDisabled = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.visibleDisabled = false |
|
|
} |
|
|
} |
|
|
// 发送请求 |
|
|
}).catch(() => { |
|
|
xhr.send() |
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
this.printSid = '' |
|
|
|
|
|
this.visibleDisabled = false |
|
|
this.visibleDisabled = false |
|
|
this.getList() |
|
|
}) |
|
|
} else { |
|
|
} else if (this.printSource === '02') { |
|
|
|
|
|
createPdfRsk({ skdSid: this.printSid, printerType: this.print }).then((resp) => { |
|
|
|
|
|
if (resp.success && resp.data.pdfPath !== '') { |
|
|
|
|
|
var xhr = new XMLHttpRequest() |
|
|
|
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&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() |
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
this.printSid = '' |
|
|
|
|
|
this.printSource = '' |
|
|
|
|
|
this.visibleDisabled = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.visibleDisabled = false |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
this.visibleDisabled = false |
|
|
this.visibleDisabled = false |
|
|
} |
|
|
}) |
|
|
}).catch(() => { |
|
|
} |
|
|
this.visibleDisabled = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
handLook(row) { |
|
|
handLook(row) { |
|
|
if (row.loan) { |
|
|
if (row.loan) { |
|
|