| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |