From ece2dfeb926d728b10db38038e4d12e9e9851c24 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期五, 06 六月 2025 17:38:10 +0800 Subject: [PATCH] 分页修改 --- src/views/procurementManagement/paymentHistory/index.vue | 12 ++-- src/views/procurementManagement/procurementInvoiceLedger/index.vue | 14 ++-- src/views/procurementManagement/procurementLedger/index.vue | 12 ++-- src/api/procurementManagement/procurementInvoiceLedger.js | 11 +++ src/api/procurementManagement/procurementLedger.js | 10 +++ src/views/procurementManagement/invoiceEntry/index.vue | 12 ++-- src/views/procurementManagement/paymentEntry/index.vue | 25 ++------ src/api/procurementManagement/paymentEntry.js | 9 +++ src/api/procurementManagement/invoiceEntry.js | 11 +++ src/views/procurementManagement/paymentLedger/index.vue | 6 +- 10 files changed, 72 insertions(+), 50 deletions(-) diff --git a/src/api/procurementManagement/invoiceEntry.js b/src/api/procurementManagement/invoiceEntry.js index 55d5bbf..055a7b3 100644 --- a/src/api/procurementManagement/invoiceEntry.js +++ b/src/api/procurementManagement/invoiceEntry.js @@ -57,4 +57,13 @@ method: 'delete', data: query }) -} \ No newline at end of file +} + +// 涓诲垪琛ㄦ煡璇� +export function gePurchaseListPage(query) { + return request({ + url: '/purchase/ledger/listPage', + method: 'get', + params: query + }) +} diff --git a/src/api/procurementManagement/paymentEntry.js b/src/api/procurementManagement/paymentEntry.js index 10ea685..7725779 100644 --- a/src/api/procurementManagement/paymentEntry.js +++ b/src/api/procurementManagement/paymentEntry.js @@ -70,3 +70,12 @@ params: query }) } + +// 鍒嗛〉鏌ヨ +export function paymentHistoryListPage(query) { + return request({ + url: '/purchase/paymentRegistration/paymentHistoryListPage', + method: 'get', + params: query + }) +} diff --git a/src/api/procurementManagement/procurementInvoiceLedger.js b/src/api/procurementManagement/procurementInvoiceLedger.js index c739a86..793c946 100644 --- a/src/api/procurementManagement/procurementInvoiceLedger.js +++ b/src/api/procurementManagement/procurementInvoiceLedger.js @@ -48,4 +48,13 @@ method: 'get', params: query }) -} \ No newline at end of file +} + +// 鏌ヨ鍒楄〃 +export function invoiceListPage(query) { + return request({ + url: '/purchase/registration/listPage', + method: 'get', + params: query + }) +} diff --git a/src/api/procurementManagement/procurementLedger.js b/src/api/procurementManagement/procurementLedger.js index 91886f4..5b2d9db 100644 --- a/src/api/procurementManagement/procurementLedger.js +++ b/src/api/procurementManagement/procurementLedger.js @@ -56,4 +56,12 @@ method: 'get', params: query }) -} \ No newline at end of file +} + +export function purchaseListPage(query) { + return request({ + url: '/purchase/ledger/listPage', + method: 'get', + params: query + }) +} diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue index cce56ca..73a5cbe 100644 --- a/src/views/procurementManagement/invoiceEntry/index.vue +++ b/src/views/procurementManagement/invoiceEntry/index.vue @@ -172,7 +172,7 @@ import { addOrUpdateRegistration, delRegistration, - gePurchaseList, + gePurchaseListPage, getInfo, getProduct, getPurchaseNoById, @@ -213,16 +213,16 @@ page.current = 1 getList() } -const paginationChange = ({ current, limit }) => { - page.current = current; - page.size = limit; +const paginationChange = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { tableLoading.value = true - gePurchaseList({ ...searchForm.value, ...page }).then(res => { + gePurchaseListPage({ ...searchForm.value, ...page }).then(res => { tableLoading.value = false - tableData.value = res.rows + tableData.value = res.records; tableData.value.map(item => { item.children = [] }) diff --git a/src/views/procurementManagement/paymentEntry/index.vue b/src/views/procurementManagement/paymentEntry/index.vue index a995d6b..c3b22e3 100644 --- a/src/views/procurementManagement/paymentEntry/index.vue +++ b/src/views/procurementManagement/paymentEntry/index.vue @@ -101,27 +101,15 @@ import { ref } from 'vue' import { Search } from "@element-plus/icons-vue"; import { ElMessageBox } from "element-plus"; -import { getInfo } from "@/api/login.js"; import useUserStore from "@/store/modules/user.js"; import { byPurchaseId, - getPurchaseNo, paymentRegistrationAdd, paymentRegistrationDel, paymentRegistrationEdit, - registrationInfo, - registrationList, getTicketNo } from "@/api/procurementManagement/paymentEntry.js"; -import { invoiceList } from "@/api/procurementManagement/procurementInvoiceLedger.js" +import {invoiceListPage} from "@/api/procurementManagement/procurementInvoiceLedger.js" const { proxy } = getCurrentInstance() -const taxRateSelection = [ - { value: '0', label: '0%' }, - { value: '3', label: '3%' }, - { value: '6', label: '6%' }, - { value: '9', label: '9%' }, - { value: '13', label: '13%' }, - { value: '17', label: '17%' }, -] const tableColumn = ref([ { label: '閲囪喘鍚堝悓鍙�', @@ -164,7 +152,6 @@ const tableData = ref([]) const selectedRows = ref([]) const tableLoading = ref(false) -const purchaseLedgerList = ref([]) const invoiceNumberList = ref([]) const userStore = useUserStore() const page = reactive({ @@ -218,16 +205,16 @@ page.current = 1 getList() } -const pagination = ({ current, limit }) => { - page.current = current; - page.size = limit; +const pagination = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { tableLoading.value = true - invoiceList({ ...searchForm.value, ...page }).then(res => { + invoiceListPage({ ...searchForm.value, ...page }).then(res => { tableLoading.value = false - tableData.value = res.rows + tableData.value = res.records total.value = res.total }) } diff --git a/src/views/procurementManagement/paymentHistory/index.vue b/src/views/procurementManagement/paymentHistory/index.vue index 842cace..134b011 100644 --- a/src/views/procurementManagement/paymentHistory/index.vue +++ b/src/views/procurementManagement/paymentHistory/index.vue @@ -22,7 +22,7 @@ import { ref } from 'vue' import { Search } from "@element-plus/icons-vue"; import { - paymentHistoryList + paymentHistoryListPage } from "@/api/procurementManagement/paymentEntry.js"; const { proxy } = getCurrentInstance() const isShowSummarySon = ref(true); @@ -76,16 +76,16 @@ page.current = 1 getList() } -const pagination = ({ current, limit }) => { - page.current = current; - page.size = limit; +const pagination = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { tableLoading.value = true - paymentHistoryList({ ...searchForm.value, ...page }).then(res => { + paymentHistoryListPage({ ...searchForm.value, ...page }).then(res => { tableLoading.value = false - tableData.value = res.rows + tableData.value = res.records total.value = res.total }) } diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue index 67ebcd0..24d019e 100644 --- a/src/views/procurementManagement/paymentLedger/index.vue +++ b/src/views/procurementManagement/paymentLedger/index.vue @@ -198,9 +198,9 @@ page.current = 1; getList(); }; -const paginationSearch = ({ current, limit }) => { - page.current = current; - page.size = limit; +const paginationSearch = ( obj) => { + page.current = obj.page; + page.size = obj.limit; getList(); }; const getList = () => { diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue index dca8d7b..6edbab3 100644 --- a/src/views/procurementManagement/procurementInvoiceLedger/index.vue +++ b/src/views/procurementManagement/procurementInvoiceLedger/index.vue @@ -81,7 +81,7 @@ import {ElMessageBox } from "element-plus"; import {productRecordList} from "@/api/procurementManagement/procurementInvoiceLedger.js"; import { - invoiceList + invoiceListPage } from "@/api/procurementManagement/procurementInvoiceLedger.js"; const { proxy } = getCurrentInstance() const tableData = ref([]) @@ -117,16 +117,16 @@ page.current = 1 getList() } -const paginationChange = ({ current, limit }) => { - page.current = current; - page.size = limit; +const paginationChange = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { tableLoading.value = true - invoiceList({ ...searchForm.value, ...page }).then(res => { + invoiceListPage({ ...searchForm.value, ...page }).then(res => { tableLoading.value = false - tableData.value = res.rows + tableData.value = res.records tableData.value.map(item => { item.children = [] }) @@ -193,4 +193,4 @@ getList() </script> -<style scoped lang="scss"></style> \ No newline at end of file +<style scoped lang="scss"></style> diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue index 3431afd..51110b0 100644 --- a/src/views/procurementManagement/procurementLedger/index.vue +++ b/src/views/procurementManagement/procurementLedger/index.vue @@ -280,7 +280,7 @@ addOrEditPurchase, delPurchase, getSalesNo, - purchaseList, + purchaseListPage, productList, getPurchaseById, getOptions } from "@/api/procurementManagement/procurementLedger.js"; const { proxy } = getCurrentInstance() @@ -384,16 +384,16 @@ futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁� }); }; -const paginationChange = ({ current, limit }) => { - page.current = current; - page.size = limit; +const paginationChange = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { tableLoading.value = true - purchaseList({...searchForm.value, ...page}).then(res => { + purchaseListPage({...searchForm.value, ...page}).then(res => { tableLoading.value = false - tableData.value = res.rows + tableData.value = res.records tableData.value.map(item => { item.children = [] }) -- Gitblit v1.9.3