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(); },