Browse Source

完善价值客户备案

zhanglei
yunuo970428 2 months ago
parent
commit
04e1dfc784
  1. 8
      anrui-buscenter/anrui-buscenter-ui/src/api/valuablecustomer/valuablecustomer.js
  2. 34
      anrui-buscenter/anrui-buscenter-ui/src/views/valuablecustomer/valuablecustomer.vue

8
anrui-buscenter/anrui-buscenter-ui/src/api/valuablecustomer/valuablecustomer.js

@ -24,6 +24,14 @@ export function save(data) {
})
}
export function createPdf(data) {
return request({
url: '/buscenter/v1/busvalcustfiling/createPdf',
method: 'post',
params: data
})
}
// 根据Sid获取一条记录
export function fetchDetailsBySid(data) {
return request({

34
anrui-buscenter/anrui-buscenter-ui/src/views/valuablecustomer/valuablecustomer.vue

@ -38,9 +38,9 @@
<el-table-column fixed width="80px" label="编号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.nodeState == '发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理
</el-button>
<el-button type="primary" size="small" @click="toInfo(scope.row)">查看</el-button>
<el-button type="primary" size="mini" :disabled="scope.row.nodeState == '发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="150" header-align="center">
@ -85,7 +85,7 @@
</template>
<script>
import { listPage } from '@/api/valuablecustomer/valuablecustomer'
import { listPage, createPdf } from '@/api/valuablecustomer/valuablecustomer'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
@ -254,6 +254,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(() => {})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)

Loading…
Cancel
Save