From b36944c0603361c270002edce4dd40220212a719 Mon Sep 17 00:00:00 2001 From: djz8236 Date: Tue, 27 Jun 2023 22:35:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=88=86=E9=A1=B5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=20=E6=B7=BB=E5=8A=A0=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/stockManagement/stockList.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/warehousing-system/project_web/src/components/stockManagement/stockList.vue b/warehousing-system/project_web/src/components/stockManagement/stockList.vue index 17caf389..075cac3b 100644 --- a/warehousing-system/project_web/src/components/stockManagement/stockList.vue +++ b/warehousing-system/project_web/src/components/stockManagement/stockList.vue @@ -8,7 +8,7 @@ - @@ -114,22 +114,21 @@ export default { this.queryInfo.size = val this.getStockList() }, - + indexMethod(index) { + var pagestart = (this.queryInfo.current - 1) * this.queryInfo.size + var pageindex = index + 1 + pagestart + return pageindex + }, handleCurrentChange (val) { this.queryInfo.current = val this.getStockList() }, - // 序号 - indexMethod(index) { - var pagestart = (this.queryInfo.pageNum - 1) * this.queryInfo.pageSize - var pageindex = index + 1 + pagestart - return pageindex - }, async getStockList () { const { data: result } = await this.$http.post('/stock/listPage', this.queryInfo ) if (result.code !== "200") return this.$message.error('获取列表失败') this.total = result.data.total this.stockList = result.data.records + console.log( this.stockList); } },