gaoluyang
2 天以前 092f67b26c5ab06a479341f5af80ea8e1642d43e
src/views/reportAnalysis/taxComparison/index.vue
@@ -4,7 +4,7 @@
      <el-form-item label="日期">
        <el-date-picker
          style="width: 240px"
          v-model="filters.dateRange"
          v-model="filters.month"
          value-format="YYYY-MM"
          format="YYYY-MM"
          type="month"
@@ -16,6 +16,7 @@
      <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">
@@ -28,7 +29,7 @@
          size: pagination.pageSize,
          total: pagination.total,
        }"
        @pagination="onCurrentChange"
        @pagination="changePage"
      />
    </div>
  </div>
@@ -36,8 +37,11 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
import { onMounted } from "vue";
import { onMounted, getCurrentInstance } from "vue";
import { getTaxList } from "@/api/procurementManagement/taxComparison";
import { ElMessageBox } from "element-plus";
const { proxy } = getCurrentInstance();
defineOptions({
  name: "增值税比对",
@@ -55,7 +59,7 @@
} = usePaginationApi(
  getTaxList,
  {
    dateRange: [], // 来票日期
    month: [], // 来票日期
  },
  [
    {
@@ -82,6 +86,26 @@
  {}
);
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();
});