曹睿
2 天以前 6e30fb16e72db22a119285cb5b757b7a5e1b2206
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
<template>
  <div class="app-container">
    <el-form :model="filters" :inline="true">
      <el-form-item label="日期">
        <el-date-picker
          style="width: 240px"
          v-model="filters.dateRange"
          value-format="YYYY-MM-DD"
          format="YYYY-MM-DD"
          type="daterange"
          start-placeholder="开始时间"
          end-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-form-item>
    </el-form>
    <div class="table_list">
      <PIMTable
        :column="columns"
        :tableData="dataList"
        :page="{
          current: pagination.currentPage,
          size: pagination.pageSize,
          total: pagination.total,
        }"
        @pagination="onCurrentChange"
      />
    </div>
  </div>
</template>
 
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
import { onMounted } from "vue";
 
defineOptions({
  name: "增值税比对",
});
 
const {
  loading,
  filters,
  columns,
  dataList,
  pagination,
  getTableData,
  resetFilters,
  onCurrentChange,
} = usePaginationApi(
  () => {},
  {
    dateRange: [], // 来票日期
  },
  [
    {
      label: "月份",
    },
    {
      label: "销项税额",
    },
    {
      label: "进项税额",
    },
    {
      label: "销-进",
    },
  ],
  {},
  {
    dateRange: (aim) => ({
      dateRangeStart: aim[0],
      dateRangeEnd: aim[1],
    }),
  }
);
 
onMounted(() => {
  getTableData();
});
</script>
 
<style lang="scss" scoped>
.table_list {
  margin-top: unset;
}
</style>