From 7bb3eb514e1cf9ab1f0f105afa2627178c2aa003 Mon Sep 17 00:00:00 2001 From: lzhizhao <790086754@qq.com> Date: Sun, 17 Aug 2025 23:42:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=AF=E5=88=86=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/marketing.js | 10 + .../modules/marketing/points-order/index.vue | 283 +++++++++--------- 2 files changed, 155 insertions(+), 138 deletions(-) diff --git a/src/api/modules/marketing.js b/src/api/modules/marketing.js index 152224c..266d166 100644 --- a/src/api/modules/marketing.js +++ b/src/api/modules/marketing.js @@ -264,5 +264,15 @@ export const marketing = { method: "post", data }); + }, + + // 积分订单分页查询 + membershipPointsProductExchangePage: (data, params) => { + return $http.request({ + url: `/merchant-api/membershipPointsProductExchange/page`, + method: "post", + data, + params + }); } }; diff --git a/src/views/modules/marketing/points-order/index.vue b/src/views/modules/marketing/points-order/index.vue index 7ec5917..cb87c98 100644 --- a/src/views/modules/marketing/points-order/index.vue +++ b/src/views/modules/marketing/points-order/index.vue @@ -10,8 +10,10 @@ - - - - + + + + + @@ -54,143 +57,134 @@ :name="item.value" > --> - - + + + + + - - - - - - - - - - - - + - - - - - - - + - + - - + - + +
@@ -219,12 +213,11 @@ export default { return { valueOne: [], formInline: { - group: "", - shopId: "", + group: 0, + shopIdList: [], pageNumber: 1, pageSize: 10, productName: "", - orderStatus: "", startTime: "", endTime: "" }, @@ -251,16 +244,16 @@ export default { } ], tableData: [], - total: 0 + total: 0, + expandedRows: [] // 展开的行 }; }, created() { this.formInline = { - group: "0", + group: 0, // marketId: this.marketId, - shopId: this.shopId, + shopIdList: this.shopId ? [this.shopId] : [], productName: "", - orderStatus: "", startTime: "", endTime: "" }; @@ -279,24 +272,34 @@ export default { } }, getList() { - //根据店铺查询 - this.$api.mer_admin - .shopOrderPage({ - ...this.formInline, - orderCategory: 2 - }) + // 使用新的积分订单接口 + const { pageNumber, pageSize, ...bodyParams } = this.formInline; + const queryParams = { + pageNumber: pageNumber, + pageSize: pageSize + }; + + console.log("请求参数 - Body:", bodyParams); + console.log("请求参数 - Query:", queryParams); + + this.$api.marketing + .membershipPointsProductExchangePage(bodyParams, queryParams) .then(res => { - console.log(res); - this.tableData = res.data.data.data; - this.total = Number(res.data.data.total); + console.log("API响应:", res); + this.tableData = res.data.data.data || []; + this.total = Number(res.data.data.total || 0); + }) + .catch(err => { + console.error("获取积分订单列表失败:", err); + this.tableData = []; + this.total = 0; }); }, Reset() { this.formInline = { - group: "0", - shopId: this.shopId, + group: 0, + shopIdList: this.shopId ? [this.shopId] : [], productName: "", - orderStatus: "", startTime: "", endTime: "" }; @@ -307,6 +310,10 @@ export default { this.advanceSellStatus = e.name; this.getList(); }, + // 处理一级表格展开 + handleUnitOrderExpand(row, expandedRows) { + console.log("展开行:", row, expandedRows); + }, view(row) { this.$refs.viewDetails.toggle(row).update(); },