1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <template>
| <div class="app-container">
| <el-form :model="filters" :inline="true">
| <el-form-item label="日期">
| <el-date-picker
| style="width: 240px"
| v-model="filters.month"
| value-format="YYYY-MM"
| format="YYYY-MM"
| type="month"
| placeholder="选择月份"
| clearable
| @change="getTableData"
| />
| </el-form-item>
| <el-form-item>
| <el-button type="primary" @click="getTableData"> 搜索 </el-button>
| <el-button @click="resetFilters"> 重置 </el-button>
| <el-button @click="handleOut"> 导出 </el-button>
| </el-form-item>
| </el-form>
| <div class="table_list">
| <PIMTable
| rowKey="id"
| :column="columns"
| :tableData="dataList"
| :page="{
| current: pagination.currentPage,
| size: pagination.pageSize,
| total: pagination.total,
| }"
| @pagination="changePage"
| />
| </div>
| </div>
| </template>
|
| <script setup>
| import { usePaginationApi } from "@/hooks/usePaginationApi";
| import { onMounted, getCurrentInstance } from "vue";
| import { getTaxList } from "@/api/procurementManagement/taxComparison";
| import { ElMessageBox } from "element-plus";
|
| const { proxy } = getCurrentInstance();
|
| defineOptions({
| name: "增值税比对",
| });
|
| const {
| loading,
| filters,
| columns,
| dataList,
| pagination,
| getTableData,
| resetFilters,
| onCurrentChange,
| } = usePaginationApi(
| getTaxList,
| {
| month: [], // 来票日期
| },
| [
| {
| label: "月份",
| prop: "month",
| align: "center",
| },
| {
| label: "销项税额",
| prop: "jtaxAmount",
| align: "center",
| },
| {
| label: "进项税额",
| prop: "xtaxAmount",
| align: "center",
| },
| {
| label: "销-进",
| prop: "taxAmount",
| align: "center",
| },
| ],
| {}
| );
|
| const changePage = ({ page }) => {
| pagination.currentPage = page;
| onCurrentChange(page);
| };
|
| // 导出
| const handleOut = () => {
| ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
| confirmButtonText: "确认",
| cancelButtonText: "取消",
| type: "warning",
| })
| .then(() => {
| proxy.download("/purchase/report/exportTwo", {}, "增值税比对.xlsx");
| })
| .catch(() => {
| proxy.$modal.msg("已取消");
| });
| };
|
| onMounted(() => {
| getTableData();
| });
| </script>
|
| <style lang="scss" scoped>
| .table_list {
| margin-top: unset;
| }
| </style>
|
|