fix: 修改获取订单状态接口,修改数据统计充值统计增加充值退款金额
This commit is contained in:
parent
4a4a9b7ed6
commit
35cfc10e81
|
|
@ -59,6 +59,14 @@ const Api = {
|
|||
data
|
||||
});
|
||||
},
|
||||
//查询订单状态
|
||||
queryOrderStatus(params: any) {
|
||||
return request<any>({
|
||||
url: `${baseURL}/queryOrderStatus`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@
|
|||
:style="{
|
||||
width: `${
|
||||
trade.saleAmount
|
||||
? (trade.saleAmount / (trade.saleAmount * 1 + trade.refundAmount)) * 100
|
||||
? (trade.saleAmount / (trade.saleAmount * 1 + trade.refundAmount * 1)) *
|
||||
100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -153,7 +154,8 @@
|
|||
:style="{
|
||||
width: `${
|
||||
trade.refundAmount
|
||||
? (trade.refundAmount / (trade.saleAmount * 1 + trade.refundAmount)) * 100
|
||||
? (trade.refundAmount / (trade.saleAmount * 1 + trade.refundAmount * 1)) *
|
||||
100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -178,7 +180,9 @@
|
|||
:style="{
|
||||
width: `${
|
||||
trade.rechargeAmount
|
||||
? (trade.rechargeAmount / trade.memberPayAmount) * 100
|
||||
? (trade.rechargeAmount /
|
||||
(trade.memberPayAmount + trade.rechargeRefundAmount * 1)) *
|
||||
100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -187,8 +191,10 @@
|
|||
class="gropress r"
|
||||
:style="{
|
||||
width: `${
|
||||
trade.rechargeAmount
|
||||
? (trade.rechargeAmount / trade.memberPayAmount) * 100
|
||||
trade.rechargeRefundAmount
|
||||
? (trade.rechargeRefundAmount /
|
||||
(trade.memberPayAmount + trade.rechargeRefundAmount * 1)) *
|
||||
100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -198,7 +204,9 @@
|
|||
<el-icon class="icon el-icon-caret-right" />
|
||||
<div class="info">
|
||||
<span class="l_t">收:{{ formatDecimal(trade.rechargeAmount || 0) }}</span>
|
||||
<span class="l_r">退:{{ formatDecimal(0) }}</span>
|
||||
<span class="l_r">
|
||||
退:{{ formatDecimal(trade.rechargeRefundAmount || 0) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,24 @@
|
|||
<div class="app-container">
|
||||
<!-- 列表 -->
|
||||
<!-- 搜索 -->
|
||||
<page-search ref="searchRef" :search-config="searchConfig" @query-click="handleQueryClick"
|
||||
@reset-click="handleResetClick" />
|
||||
<page-search
|
||||
ref="searchRef"
|
||||
:search-config="searchConfig"
|
||||
@query-click="handleQueryClick"
|
||||
@reset-click="handleResetClick"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
|
||||
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
|
||||
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
|
||||
<page-content
|
||||
ref="contentRef"
|
||||
:content-config="contentConfig"
|
||||
@add-click="handleAddClick"
|
||||
@edit-click="handleEditClick"
|
||||
@export-click="handleExportClick"
|
||||
@search-click="handleSearchClick"
|
||||
@toolbar-click="handleToolbarClick"
|
||||
@operat-click="handleOperatClick"
|
||||
@filter-change="handleFilterChange"
|
||||
>
|
||||
<template #originAmount="scope">
|
||||
{{ returnOriginAmount(scope.row) }}
|
||||
</template>
|
||||
|
|
@ -52,13 +64,21 @@
|
|||
</template>
|
||||
<template #mobile="scope">
|
||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||
<copy-button
|
||||
v-if="scope.row[scope.prop]"
|
||||
:text="scope.row[scope.prop]"
|
||||
style="margin-left: 2px"
|
||||
/>
|
||||
</template>
|
||||
<template #operate="scope">
|
||||
<div>
|
||||
<el-button @click="showdetail(scope.row)" link>详情</el-button>
|
||||
<el-button link v-if="scope.row.status == 'done'">开票</el-button>
|
||||
<el-button v-if="scope.row.status == 'unpaid'" @click="toPayOrder(scope.row)" type="primary">
|
||||
<el-button
|
||||
v-if="scope.row.status == 'unpaid'"
|
||||
@click="toPayOrder(scope.row)"
|
||||
type="primary"
|
||||
>
|
||||
结账
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -74,7 +94,11 @@
|
|||
</page-modal>
|
||||
|
||||
<!-- 编辑 -->
|
||||
<page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick">
|
||||
<page-modal
|
||||
ref="editModalRef"
|
||||
:modal-config="editModalConfig"
|
||||
@submit-click="handleSubmitClick"
|
||||
>
|
||||
<template #url="scope">
|
||||
<FileUpload v-model="scope.formData[scope.prop]" :limit="1" v-bind="scope.attrs" />
|
||||
<!-- <Dict v-model="scope.formData[scope.prop]" code="gender" v-bind="scope.attrs" /> -->
|
||||
|
|
@ -129,9 +153,9 @@ function returnOriginAmount(order: OrderInfoVo) {
|
|||
}
|
||||
const routeto = useRoute();
|
||||
onMounted(() => {
|
||||
handleQueryClick({ orderNo: routeto.query.orderNo })
|
||||
searchRef.value?.setQueryParams({ orderNo: routeto.query.orderNo })
|
||||
})
|
||||
handleQueryClick({ orderNo: routeto.query.orderNo });
|
||||
searchRef.value?.setQueryParams({ orderNo: routeto.query.orderNo });
|
||||
});
|
||||
|
||||
// 新增
|
||||
async function handleAddClick() {
|
||||
|
|
@ -190,6 +214,7 @@ function toPayOrder(order: getListResponse) {
|
|||
path: "/tool/index",
|
||||
query: {
|
||||
id: order.id,
|
||||
key: "isPayOrder",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -330,7 +355,7 @@ function showdetail(row: OrderInfoVo) {
|
|||
left: 36%;
|
||||
padding: 18px;
|
||||
|
||||
>div:first-child {
|
||||
> div:first-child {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
|
@ -341,7 +366,7 @@ function showdetail(row: OrderInfoVo) {
|
|||
transform: translateX(-80px);
|
||||
}
|
||||
|
||||
>div:last-child {
|
||||
> div:last-child {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,11 +135,11 @@ export default {
|
|||
clearInterval(this.timer);
|
||||
},
|
||||
async getOrderDetail() {
|
||||
const res = await orderApi.getHistoryList({
|
||||
const res = await payApi.queryOrderStatus({
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
orderId: this.order.id,
|
||||
});
|
||||
if (res.status == "done") {
|
||||
if (res != "unpaid") {
|
||||
this.clear();
|
||||
this.$emit("paySuccess");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue