1.优化会员扫码充值订单状态查询

This commit is contained in:
gyq
2025-03-14 17:27:00 +08:00
parent 745b8675ea
commit d08a629b0a
15 changed files with 254 additions and 257 deletions

View File

@@ -17,7 +17,7 @@
<div class="table_wrap">
<div class="table">
<el-table :data="tableData.list" v-loading="tableData.loading" border strip height="100%">
<el-table-column label="台桌" prop="tableName" width="80" align="center">
<el-table-column label="台桌" prop="tableName" align="center">
<template v-slot="scope">
<span v-if="scope.row.tableName">{{ scope.row.tableName }}</span>
<span v-else></span>
@@ -76,11 +76,31 @@
<div class="column">
<div class="row">
<el-button type="warning" :disabled="scope.row.status != 'unpaid'" :loading="scope.row.payLoading"
@click="orderDoneHandle(scope.row)">结算订单</el-button>
@click="orderDoneHandle(scope.row)">
<template v-if="scope.row.status == 'unpaid'">
结算订单
</template>
<template v-else>
订单完成
</template>
</el-button>
</div>
<div class="row">
<el-button type="primary" :disabled="refundState(scope.row.status)"
@click="RefundDrawerRef.show(scope.row)">订单退款</el-button>
<el-button type="primary" :disabled="refundState(scope.row)" @click="RefundDrawerRef.show(scope.row)">
<template v-if="scope.row.status == 'done'">
订单退款
</template>
<template
v-else-if="scope.row.status == 'part_refund' || (scope.row.status == 'refund' && scope.row.refundAmount < scope.row.payAmount)">
部分退单
</template>
<template v-else-if="scope.row.status == 'refund'">
已退订单
</template>
<template v-else>
不可退单
</template>
</el-button>
</div>
<div class="row">
<el-button type="success" @click="PrintDrawerRef.show(scope.row)">
@@ -173,8 +193,8 @@ function filterLable(key, type) {
}
// 过滤退款条件
function refundState(state) {
switch (state) {
function refundState(row) {
switch (row.status) {
case 'unpaid':
return true;
case 'in-production':
@@ -186,7 +206,11 @@ function refundState(state) {
case 'refunding':
return false;
case 'refund':
return true;
if (row.refundAmount < row.payAmount) {
return false
} else {
return true;
}
case 'part-refund':
return false;
case 'cancelled':