|
|
@ -48,11 +48,11 @@ |
|
|
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column width="50px" fixed type="selection" align="center"/> |
|
|
|
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="操作" fixed align="center" width="160px" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="{row}"><!-- v-show="row.showInspectedBtn" --> |
|
|
|
<el-button size="mini" type="primary" :disabled="row.nodeState == '待提交' ? false:row.nodeState == '调账申请'?false : true" @click="handleEdit(row)">办理 |
|
|
|
</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> |
|
|
|
<el-table-column label="操作" fixed align="center" width="180" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" type="primary" :disabled="scope.row.nodeState == '待提交' ? false: scope.row.nodeState == '调账申请' ? false : true" @click="handleEdit(scope.row)">办理</el-button> |
|
|
|
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleCheck(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="140px" prop="nodeState" label="状态" align="left" header-align="center"> |
|
|
@ -92,7 +92,7 @@ import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import tiaozhangshenqingguanliAdd from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd' |
|
|
|
import tiaozhangshenqingguanliInfo from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo' |
|
|
|
import { listPage, delBySids } from '@/api/supplychain/tiaozhangshenqing.js' |
|
|
|
import { listPage, delBySids, createPdf } from '@/api/supplychain/tiaozhangshenqing.js' |
|
|
|
import { getOrgSidByPath, getListOrg, typeValues, selectHaveMessage } from '@/api/cheliang/dictcommons' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
@ -260,6 +260,32 @@ export default { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showEdit(row) |
|
|
|
}, |
|
|
|
toDownload(row) { |
|
|
|
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(() => {}) |
|
|
|
}, |
|
|
|
handleCheck(row) { |
|
|
|
this.$refs['divinfo'].showInfo(row) |
|
|
|
console.log('详情回显', row) |
|
|
|