feat: 积分订单列表接口对接

This commit is contained in:
lzhizhao 2025-08-17 23:42:08 +08:00
parent 535cbc02e7
commit 7bb3eb514e
2 changed files with 155 additions and 138 deletions

View File

@ -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
});
}
};

View File

@ -10,8 +10,10 @@
<el-select
class="filter-item"
style="width: 200px"
v-model="formInline.shopId"
v-model="formInline.shopIdList"
placeholder="请选择摊铺"
multiple
collapse-tags
>
<el-option
v-for="item in storeList"
@ -30,15 +32,16 @@
</el-form-item>
<el-form-item label="订单状态">
<el-select
v-model="formInline.orderStatus"
v-model="formInline.group"
placeholder="请选择订单状态"
clearable
style="width: 150px"
>
<el-option label="待备货" value="1"></el-option>
<el-option label="待取货" value="2"></el-option>
<el-option label="待收货" value="3"></el-option>
<el-option label="已完成" value="4"></el-option>
<el-option label="全部订单" :value="0"></el-option>
<el-option label="待备货" :value="1"></el-option>
<el-option label="待取货" :value="2"></el-option>
<el-option label="待收货" :value="3"></el-option>
<el-option label="已完成" :value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item>
@ -54,143 +57,134 @@
:name="item.value"
></el-tab-pane>
</el-tabs> -->
<el-table :data="tableData" height="70vh" border style="width: 100%">
<el-table-column
label="商品单号"
prop="productOrderNo"
width="150"
align="center"
/>
<!-- 一级表格结算单位订单 -->
<el-table
:data="tableData"
border
:expand-row-keys="expandedRows"
row-key="unitOrderNo"
@expand-change="handleUnitOrderExpand"
>
<el-table-column type="expand">
<template slot-scope="props">
<!-- 二级表格摊位订单 -->
<el-table
:data="props.row.shopOrderList || []"
border
style="margin: 10px 0;"
>
<el-table-column type="expand">
<template slot-scope="shopProps">
<!-- 三级表格商品订单 -->
<el-table
:data="shopProps.row.productOrderList || []"
border
style="margin: 10px 0; background-color: #f9f9f9;"
>
<el-table-column
label="商品订单号"
prop="productOrderNo"
align="center"
/>
<el-table-column
label="商品名称"
prop="productName"
align="center"
/>
<el-table-column
label="商品原价"
prop="productOriginPrice"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.productOriginPrice || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="商品数量"
prop="exchangeQuantity"
align="center"
/>
<el-table-column
label="消耗积分"
prop="usedPoints"
align="center"
/>
<el-table-column
label="顾客支付"
prop="productFinalPrice"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.productFinalPrice || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="积分类型"
prop="exchangePointsType"
align="center"
>
<template slot-scope="scope">
<el-tag
:type="
scope.row.exchangePointsType === 1
? 'success'
: 'warning'
"
>
{{
scope.row.exchangePointsType === 1
? "积分换购"
: "积分优惠购"
}}
</el-tag>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column
label="店铺订单号"
prop="shopOrderNo"
align="center"
/>
<el-table-column label="摊位" prop="shopName" align="center" />
</el-table>
</template>
</el-table-column>
<el-table-column
label="结算单位订单号"
prop="unitOrderNo"
width="150"
align="center"
/>
<el-table-column
label="总订单号"
prop="totalOrderNo"
width="120"
align="center"
/>
<el-table-column
label="总商品数量"
prop="productCount"
width="100"
align="center"
/>
<el-table-column
label="商品原价"
prop="originPrice"
width="100"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.originPrice || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="商品终价"
prop="finalPrice"
width="100"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.finalPrice || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="商品数量"
prop="productQuantity"
width="100"
align="center"
/>
<el-table-column
label="消耗积分"
prop="pointsUsed"
width="100"
align="center"
/>
<el-table-column
label="订单状态"
prop="orderStatus"
width="100"
align="center"
>
<el-table-column label="订单状态" prop="orderStatus" align="center">
<template slot-scope="scope">
<el-tag :type="getStatusTagType(scope.row.orderStatus)">
{{ getStatusText(scope.row.orderStatus) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="顾客实际支付"
prop="totalPayMoney"
width="120"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.totalPayMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="商品总价"
prop="productMoney"
width="100"
align="center"
>
<template slot-scope="scope">
¥{{ scope.row.productMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="配送费"
prop="deliveryMoney"
width="80"
align="center"
>
<el-table-column label="配送费" prop="deliveryMoney" align="center">
<template slot-scope="scope">
¥{{ scope.row.deliveryMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="优惠券减免"
prop="couponMoney"
width="100"
align="center"
>
<el-table-column label="打包费" prop="packageMoney" align="center">
<template slot-scope="scope">
¥{{ scope.row.couponMoney || "0.00" }}
¥{{ scope.row.packageMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column
label="支付时间"
prop="payTime"
width="150"
align="center"
/>
<el-table-column
label="预计收入"
prop="predictIncome"
width="100"
align="center"
>
<el-table-column label="调度费" prop="dispatchMoney" align="center">
<template slot-scope="scope">
¥{{ scope.row.predictIncome || "0.00" }}
¥{{ scope.row.dispatchMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column label="关联总订单链接" width="120" align="center">
<el-table-column label="总费用" prop="totalMoney" align="center">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="viewTotalOrder(scope.row)"
>
查看总订单
</el-button>
¥{{ scope.row.totalMoney || "0.00" }}
</template>
</el-table-column>
<el-table-column label="支付时间" prop="payTime" align="center" />
</el-table>
<!-- 分页 -->
<div class="pagination-container">
@ -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();
},