|
|
@ -54,7 +54,7 @@ |
|
|
|
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="操作" align="center" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini">下载合同</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="toDownLoad(scope.row)">下载合同</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="lookSale(scope.row)">查看订单</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -133,6 +133,7 @@ import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import salesOrder from '@/components/publicPage/salesOrder' |
|
|
|
import {getStorage} from "@/utils/auth"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'TheHomeVisitIsReady', |
|
|
@ -265,6 +266,28 @@ export default { |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
toDownLoad(row) { |
|
|
|
var xhr = new XMLHttpRequest() |
|
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + row.downUrl + '&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() |
|
|
|
}, |
|
|
|
lookSale(row) { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divSale'].showInfo(row.saleOrderSid) |
|
|
|