update 项目详情弹框-开票邮寄信息增加查看发票按钮
This commit is contained in:
@@ -319,6 +319,7 @@
|
||||
class="j-table-force-nowrap"
|
||||
>
|
||||
<span slot="action" class="action-span-cell" slot-scope="record">
|
||||
<a @click="lookInvoice(record)" v-if="record.invoiceFileId">查看发票</a>
|
||||
<a @click="lookLogistics(record)" v-if="record.postStatus === 1">查看物流</a>
|
||||
</span>
|
||||
<!-- <p slot="expandedRowRender" slot-scope="record" style="margin: 0">-->
|
||||
@@ -339,6 +340,10 @@ import { queryCommonProjectById, getStanderMemberLastProofInfo, getCertificateLa
|
||||
import JEllipsis from '@comp/jero/JEllipsis'
|
||||
import PreviewFile from './jero/PreviewFile'
|
||||
import { ProjectTypeEnums } from '@/enums/commonEnums'
|
||||
import Vue from 'vue'
|
||||
import {ACCESS_TOKEN} from '@/store/mutation-types'
|
||||
import {getFileInfo} from '@api/api'
|
||||
const Base64 = require('js-base64').Base64
|
||||
// import pick from 'lodash.pick'
|
||||
// import {getAction} from "@api/manage";
|
||||
const columns = [
|
||||
@@ -515,6 +520,31 @@ export default {
|
||||
}
|
||||
return `${ item.person }于${ item.time }开票,金额为:${ item.money }元,票号:${ item.piaoNo },项目:${ porjectItem }`
|
||||
},
|
||||
/**
|
||||
* 查看发票
|
||||
*/
|
||||
lookInvoice (record) {
|
||||
if (!record.invoiceFileId) {
|
||||
this.$message.warning('暂无发票')
|
||||
return
|
||||
}
|
||||
// 多个文件取第一个
|
||||
const id = record.invoiceFileId.split(',')[0]
|
||||
getFileInfo({ id }).then(res => {
|
||||
if (res.success) {
|
||||
// 预览文件
|
||||
this.handlePreview(res.result)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 预览
|
||||
handlePreview(file) {
|
||||
if (file && file.url) {
|
||||
var fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 查看物流
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user