Browse Source

完善专项返利预提

zhanglei
yunuo970428 4 months ago
parent
commit
bb4ea0ddc5
  1. 7
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
  2. 29
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue
  3. 29
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue

7
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js

@ -51,6 +51,13 @@ export default {
method: 'get'
})
},
createPdf: function(data) {
return request({
url: '/scm/v1/scmspecialrebatewithapply/createPdf',
method: 'post',
params: data
})
},
// 提交流程
submitVehicleApply: function(params) {
return request({

29
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue

@ -8,7 +8,7 @@
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small">下载</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
@ -78,6 +78,7 @@
<script>
import req from '@/api/specialrebate/specialrebatewithholding'
import zhuanxiangfanliInfo from './relation/zhuanxiangfanliInfo'
import { getStorage } from '@/utils/auth'
export default {
name: 'ZhuanXiangFanLiYuTiInfo',
@ -190,6 +191,32 @@ export default {
})
return sums
},
download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.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()
}
})
},
// ===
handleReturn() {
//

29
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue

@ -7,6 +7,8 @@
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
@ -76,6 +78,7 @@
<script>
import req from '@/api/specialrebate/specialrebatewithholding'
import zhuanxiangfanliyutiInfo from './relation/zhuanxiangfanliyutiInfo'
import { getStorage } from '@/utils/auth'
export default {
name: 'ZhuanXiangFanLiYuTiYiBanInfo',
@ -223,6 +226,32 @@ export default {
})
return sums
},
download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.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()
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {

Loading…
Cancel
Save