Commit 776a4b77b2b47743349d5de59cd39074ea8b612d
1 parent
73d372b3
Exists in
master
收支明细导出
Showing
5 changed files
with
149 additions
and
70 deletions
Show diff stats
frontend/front/src/api/service/current.js
1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
2 | 2 | ||
3 | -export function exportYchzb(date) { | 3 | +export function accountBalanceExport(date) { |
4 | return request({ | 4 | return request({ |
5 | - url: `${context.portal}/wCurrent/v1/exportYchzb?date=${date}`, | 5 | + url: `${context.portal}/wCurrent/v1/accountBalanceExport?date=${date}`, |
6 | method: 'get', | 6 | method: 'get', |
7 | responseType: 'arraybuffer', | 7 | responseType: 'arraybuffer', |
8 | }) | 8 | }) |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +import request from '@/utils/request' | ||
2 | + | ||
3 | + | ||
4 | +export function transactionDetailsExport(date) { | ||
5 | + return request({ | ||
6 | + url: `${context.portal}/wFinance/v1/transactionDetailsExport?date=${date}`, | ||
7 | + method: 'get', | ||
8 | + responseType: 'arraybuffer', | ||
9 | + }) | ||
10 | +} | ||
11 | + |
frontend/front/src/components/tableSlot/current/accountBalanceDl.vue
0 → 100644
@@ -0,0 +1,68 @@ | @@ -0,0 +1,68 @@ | ||
1 | +<template> | ||
2 | + <div> | ||
3 | + <el-button @click="onClick">正常账户可用余额导出</el-button> | ||
4 | + <el-dialog title="正常账户可用余额导出" :visible.sync="dialogVisible" width="30%"> | ||
5 | + <el-form> | ||
6 | + <el-form-item label="日期"> | ||
7 | + <el-date-picker v-model="date" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | ||
8 | + style="width: calc(100% - 80px);"></el-date-picker> | ||
9 | + </el-form-item> | ||
10 | + </el-form> | ||
11 | + <span slot="footer"> | ||
12 | + <el-button @click="dialogVisible = false">取 消</el-button> | ||
13 | + <el-button type="primary" @click="onSubmit">导 出</el-button> | ||
14 | + </span> | ||
15 | + </el-dialog> | ||
16 | + </div> | ||
17 | +</template> | ||
18 | +<script> | ||
19 | + | ||
20 | +import { accountBalanceExport } from '@/api/service/current' | ||
21 | + | ||
22 | +export default { | ||
23 | + data() { | ||
24 | + return { | ||
25 | + dialogVisible: false, | ||
26 | + date: null | ||
27 | + }; | ||
28 | + }, | ||
29 | + created() { | ||
30 | + let today = new Date(); | ||
31 | + today.setDate(today.getDate() - 1); | ||
32 | + let year = today.getFullYear(); | ||
33 | + let month = ("0" + (today.getMonth() + 1)).slice(-2); | ||
34 | + let day = ("0" + today.getDate()).slice(-2); | ||
35 | + this.date = year + '-' + month + '-' + day; | ||
36 | + }, | ||
37 | + methods: { | ||
38 | + onClick() { | ||
39 | + this.dialogVisible = true; | ||
40 | + }, | ||
41 | + onSubmit() { | ||
42 | + if (!this.date) {this.$message.error('请选择日期!');return false;} | ||
43 | + accountBalanceExport(this.date).then(_ref => { | ||
44 | + let {data, headers} = _ref; | ||
45 | + // 附件下载 | ||
46 | + const blob = new Blob([data]); | ||
47 | + // 附件下载 | ||
48 | + const fileName = decodeURIComponent(headers['content-disposition'].split(';')[1].split('filename=')[1]); | ||
49 | + saveAs(blob, fileName); | ||
50 | + }).catch(err => { | ||
51 | + this.$message.error(`模板下载失败:${err}`); | ||
52 | + }); | ||
53 | + } | ||
54 | + } | ||
55 | +} | ||
56 | +</script> | ||
57 | + | ||
58 | +<style scoped lang='scss'> | ||
59 | +::v-deep { | ||
60 | + .el-dialog__footer { | ||
61 | + text-align: center !important; | ||
62 | + | ||
63 | + .el-button { | ||
64 | + margin-left: 20px; | ||
65 | + } | ||
66 | + } | ||
67 | +} | ||
68 | +</style> |
frontend/front/src/components/tableSlot/finance/transactionDetailsDl.vue
0 → 100644
@@ -0,0 +1,68 @@ | @@ -0,0 +1,68 @@ | ||
1 | +<template> | ||
2 | + <div> | ||
3 | + <el-button @click="onClick">公司收支明细导出</el-button> | ||
4 | + <el-dialog title="正常账户可用余额导出" :visible.sync="dialogVisible" width="30%"> | ||
5 | + <el-form> | ||
6 | + <el-form-item label="日期"> | ||
7 | + <el-date-picker v-model="date" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | ||
8 | + style="width: calc(100% - 80px);"></el-date-picker> | ||
9 | + </el-form-item> | ||
10 | + </el-form> | ||
11 | + <span slot="footer"> | ||
12 | + <el-button @click="dialogVisible = false">取 消</el-button> | ||
13 | + <el-button type="primary" @click="onSubmit">导 出</el-button> | ||
14 | + </span> | ||
15 | + </el-dialog> | ||
16 | + </div> | ||
17 | +</template> | ||
18 | +<script> | ||
19 | + | ||
20 | +import { transactionDetailsExport } from '@/api/service/finance' | ||
21 | + | ||
22 | +export default { | ||
23 | + data() { | ||
24 | + return { | ||
25 | + dialogVisible: false, | ||
26 | + date: null | ||
27 | + }; | ||
28 | + }, | ||
29 | + created() { | ||
30 | + let today = new Date(); | ||
31 | + today.setDate(today.getDate() - 1); | ||
32 | + let year = today.getFullYear(); | ||
33 | + let month = ("0" + (today.getMonth() + 1)).slice(-2); | ||
34 | + let day = ("0" + today.getDate()).slice(-2); | ||
35 | + this.date = year + '-' + month + '-' + day; | ||
36 | + }, | ||
37 | + methods: { | ||
38 | + onClick() { | ||
39 | + this.dialogVisible = true; | ||
40 | + }, | ||
41 | + onSubmit() { | ||
42 | + if (!this.date) {this.$message.error('请选择日期!');return false;} | ||
43 | + transactionDetailsExport(this.date).then(_ref => { | ||
44 | + let {data, headers} = _ref; | ||
45 | + // 附件下载 | ||
46 | + const blob = new Blob([data]); | ||
47 | + // 附件下载 | ||
48 | + const fileName = decodeURIComponent(headers['content-disposition'].split(';')[1].split('filename=')[1]); | ||
49 | + saveAs(blob, fileName); | ||
50 | + }).catch(err => { | ||
51 | + this.$message.error(`模板下载失败:${err}`); | ||
52 | + }); | ||
53 | + } | ||
54 | + } | ||
55 | +} | ||
56 | +</script> | ||
57 | + | ||
58 | +<style scoped lang='scss'> | ||
59 | +::v-deep { | ||
60 | + .el-dialog__footer { | ||
61 | + text-align: center !important; | ||
62 | + | ||
63 | + .el-button { | ||
64 | + margin-left: 20px; | ||
65 | + } | ||
66 | + } | ||
67 | +} | ||
68 | +</style> |
frontend/front/src/components/tableSlot/zczhkyeqExport/index.vue
@@ -1,68 +0,0 @@ | @@ -1,68 +0,0 @@ | ||
1 | -<template> | ||
2 | - <div> | ||
3 | - <el-button @click="onClick">正常账户可用余额导出</el-button> | ||
4 | - <el-dialog title="正常账户可用余额导出" :visible.sync="dialogVisible" width="30%"> | ||
5 | - <el-form> | ||
6 | - <el-form-item label="日期"> | ||
7 | - <el-date-picker v-model="date" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | ||
8 | - style="width: calc(100% - 80px);"></el-date-picker> | ||
9 | - </el-form-item> | ||
10 | - </el-form> | ||
11 | - <span slot="footer"> | ||
12 | - <el-button @click="dialogVisible = false">取 消</el-button> | ||
13 | - <el-button type="primary" @click="onSubmit">导 出</el-button> | ||
14 | - </span> | ||
15 | - </el-dialog> | ||
16 | - </div> | ||
17 | -</template> | ||
18 | -<script> | ||
19 | - | ||
20 | -import { exportYchzb } from '@/api/service/current' | ||
21 | - | ||
22 | -export default { | ||
23 | - data() { | ||
24 | - return { | ||
25 | - dialogVisible: false, | ||
26 | - date: null | ||
27 | - }; | ||
28 | - }, | ||
29 | - created() { | ||
30 | - let today = new Date(); | ||
31 | - today.setDate(today.getDate() - 1); | ||
32 | - let year = today.getFullYear(); | ||
33 | - let month = ("0" + (today.getMonth() + 1)).slice(-2); | ||
34 | - let day = ("0" + today.getDate()).slice(-2); | ||
35 | - this.date = year + '-' + month + '-' + day; | ||
36 | - }, | ||
37 | - methods: { | ||
38 | - onClick() { | ||
39 | - this.dialogVisible = true; | ||
40 | - }, | ||
41 | - onSubmit() { | ||
42 | - if (!this.date) {this.$message.error('请选择日期!');return false;} | ||
43 | - exportYchzb(this.date).then(_ref => { | ||
44 | - let {data, headers} = _ref; | ||
45 | - // 附件下载 | ||
46 | - const blob = new Blob([data]); | ||
47 | - // 附件下载 | ||
48 | - const fileName = decodeURIComponent(headers['content-disposition'].split(';')[1].split('filename=')[1]); | ||
49 | - saveAs(blob, fileName); | ||
50 | - }).catch(err => { | ||
51 | - this.$message.error(`模板下载失败:${err}`); | ||
52 | - }); | ||
53 | - } | ||
54 | - } | ||
55 | -} | ||
56 | -</script> | ||
57 | - | ||
58 | -<style scoped lang='scss'> | ||
59 | -::v-deep { | ||
60 | - .el-dialog__footer { | ||
61 | - text-align: center !important; | ||
62 | - | ||
63 | - .el-button { | ||
64 | - margin-left: 20px; | ||
65 | - } | ||
66 | - } | ||
67 | -} | ||
68 | -</style> |