临时提交

This commit is contained in:
磷叶 2025-05-20 17:17:21 +08:00
parent e3f3a1f9a9
commit b4c71ab31c
6 changed files with 46 additions and 27 deletions

View File

@ -180,7 +180,7 @@ export const OrderStatus = {
}, },
// 可以退款的订单状态 // 可以退款的订单状态
canRefund() { canRefund() {
return [this.FINISHED, this.REFUNDED, this.REJECTED, this.WAIT_VERIFY]; return [this.FINISHED, this.REFUNDED];
}, },
// 未支付的订单状态 // 未支付的订单状态
unPayList() { unPayList() {
@ -194,9 +194,9 @@ export const OrderStatus = {
canVerify() { canVerify() {
return [this.WAIT_VERIFY]; return [this.WAIT_VERIFY];
}, },
// 有效的订单状态:已支付的订单 // 有效的订单状态
valid() { valid() {
return [this.PROCESSING, this.FINISHED, this.WAIT_VERIFY, this.REJECTED]; return [this.PROCESSING, this.FINISHED, this.WAIT_VERIFY, this.REJECTED, this.RIDE_WAIT_PAY];
}, },
// 已完成的订单状态 // 已完成的订单状态
finishedList() { finishedList() {

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
title="还车审核" title="押金抵扣"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="500px" width="500px"
append-to-body append-to-body
@ -92,9 +92,10 @@ export default {
this.submitLoading = false; this.submitLoading = false;
}); });
}); });
},
handleCancel() {
this.dialogVisible = false;
} }
} }
} }
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
title="退款" title="押金退款"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="500px" width="500px"
append-to-body append-to-body
@ -8,15 +8,16 @@
> >
<el-form :model="form" :rules="rules" ref="form" label-width="6em" v-loading="loading" size="small"> <el-form :model="form" :rules="rules" ref="form" label-width="6em" v-loading="loading" size="small">
<el-form-item label="退款金额" prop="amount"> <el-form-item label="退款金额" prop="amount">
<el-input-number v-model="form.amount" :max="canRefundAmount" :min="0" placeholder="请输入退款金额" :precision="2" style="width: 100%;" /> <el-input-number v-model="form.amount" :max="canRefundAmount" :min="0" :placeholder="`请输入退款金额,最多可退款 ${canRefundAmount} 元`" :precision="2" style="width: 100%;" />
<div>当前最多可退款{{canRefundAmount | fix2 | dv}} </div>
</el-form-item> </el-form-item>
<el-form-item label="退款原因" prop="reason"> <el-form-item label="退款原因" prop="reason">
<el-input v-model="form.reason" type="textarea" placeholder="请输入退款原因" show-word-limit maxlength="200" /> <el-input v-model="form.reason" type="textarea" placeholder="请输入退款原因" show-word-limit maxlength="200" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确认退款</el-button> <el-button type="primary" @click="handleSubmit" :loading="submitLoading" icon="el-icon-wallet">确认退款</el-button>
<el-button @click="dialogVisible = false">取消</el-button> <el-button @click="dialogVisible = false" icon="el-icon-close">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -59,7 +60,10 @@ export default {
}, },
// 退 // 退
canRefundAmount() { canRefundAmount() {
return this.detail.actualAmount || 0; if (this.detail == null || this.detail.id == null) {
return 0;
}
return this.detail.payedAmount - this.detail.payRefunded - this.detail.payRefunding;
} }
}, },
methods: { methods: {
@ -78,7 +82,7 @@ export default {
reset() { reset() {
this.form = { this.form = {
orderId: this.id, orderId: this.id,
amount: 0, amount: null,
reason: null, reason: null,
}; };
this.resetForm('form'); this.resetForm('form');

View File

@ -14,23 +14,23 @@
placeholder="请输入车损费" placeholder="请输入车损费"
:min="0" :min="0"
controls-position="right" controls-position="right"
:max="detail.depositFee - detail.totalFee" :max="detail.depositDeductRemain"
style="width: 100%;" style="width: 100%;"
/> />
<div>当前最多可收取{{detail.depositDeductRemain | fix2 | dv}} </div>
</el-form-item> </el-form-item>
<el-form-item label="审核意见" prop="remark"> <el-form-item label="审核备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入审核意见" show-word-limit maxlength="200" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入审核备注" show-word-limit maxlength="200" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="success" plain @click="handleSubmit(true)" icon="el-icon-check" :loading="submitLoading">通过</el-button> <el-button type="success" plain @click="handleSubmit()" icon="el-icon-s-check" :loading="submitLoading">确认审核</el-button>
<el-button type="danger" plain @click="handleSubmit(false)" icon="el-icon-close" :loading="submitLoading">驳回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getOrder, verifyOrder} from '@/api/bst/order' import { getOrder, verifyOrder } from '@/api/bst/order';
export default { export default {
props: { props: {
@ -92,14 +92,13 @@ export default {
}; };
this.resetForm('form'); this.resetForm('form');
}, },
handleSubmit(pass) { handleSubmit() {
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
this.$confirm(`确定${pass ? '通过' : '驳回'}`, '提示', { this.$confirm(`是否确认审核`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.form.pass = pass;
this.submitLoading = true; this.submitLoading = true;
verifyOrder(this.form).then((response) => { verifyOrder(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {

View File

@ -164,7 +164,7 @@
<div> <div>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="12" v-if="d.row.ridingFee != null">骑行{{d.row.ridingFee | fix2 | dv}} </el-col> <el-col :span="12" v-if="d.row.ridingFee != null">骑行{{d.row.ridingFee | fix2 | dv}} </el-col>
<el-col :span="12" v-if="d.row.depositFee != null">预存{{d.row.depositFee | fix2 | dv}} </el-col> <el-col :span="12" v-if="d.row.depositFee != null">押金{{d.row.depositFee | fix2 | dv}} </el-col>
<el-col :span="12" v-if="d.row.totalFee != null"> <el-col :span="12" v-if="d.row.totalFee != null">
<el-popover <el-popover
placement="bottom" placement="bottom"
@ -180,8 +180,23 @@
<div slot="reference">结算{{d.row.totalFee | fix2 | dv}} <i class="el-icon-info" /></div> <div slot="reference">结算{{d.row.totalFee | fix2 | dv}} <i class="el-icon-info" /></div>
</el-popover> </el-popover>
</el-col> </el-col>
<el-col :span="12" v-if="d.row.actualAmount != null && OrderStatus.finishedList().includes(d.row.status)" style="color: green;font-weight: bold;"> <el-col :span="12" v-if="d.row.actualAmount != null && OrderStatus.finishedList().includes(d.row.status)" style="color: green;font-weight: bold;">
实收{{d.row.actualAmount | fix2 | dv}} <el-popover
placement="bottom"
width="200"
trigger="hover"
>
<div>
<div>骑行费{{d.row.actualRidingFee | fix2 | dv}} </div>
<div>调度费{{d.row.actualDispatchFee | fix2 | dv}} </div>
<div>管理费{{d.row.actualManageFee | fix2 | dv}} </div>
<div>车损费{{d.row.actualDeductionFee | fix2 | dv}} </div>
</div>
<div slot="reference">已付{{d.row.actualAmount | fix2 | dv}} <i class="el-icon-info" /></div>
</el-popover>
</el-col>
<el-col :span="12">
押金抵扣{{d.row.depositDeductionAmount | fix2 | dv}}
</el-col> </el-col>
<el-col :span="24" v-if="d.row.payRefunded || d.row.payRefunding" style="color: red;"> <el-col :span="24" v-if="d.row.payRefunded || d.row.payRefunding" style="color: red;">
退款{{d.row.payRefunded | fix2 | dv}} 退款{{d.row.payRefunded | fix2 | dv}}
@ -263,11 +278,11 @@
@click="handleRefund(scope.row)" @click="handleRefund(scope.row)"
v-has-permi="['bst:order:refund']" v-has-permi="['bst:order:refund']"
v-show="OrderStatus.canRefund().includes(scope.row.status)" v-show="OrderStatus.canRefund().includes(scope.row.status)"
>退款</el-button> >押金退款</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-wallet" icon="el-icon-s-check"
@click="handleVerify(scope.row)" @click="handleVerify(scope.row)"
v-has-permi="['bst:order:verify']" v-has-permi="['bst:order:verify']"
v-show="OrderStatus.canVerify().includes(scope.row.status)" v-show="OrderStatus.canVerify().includes(scope.row.status)"

View File

@ -110,7 +110,7 @@
@click="handleRefund(detail)" @click="handleRefund(detail)"
v-has-permi="['bst:order:refund']" v-has-permi="['bst:order:refund']"
v-show="OrderStatus.canRefund().includes(detail.status)" v-show="OrderStatus.canRefund().includes(detail.status)"
>退款</el-button> >押金退款</el-button>
<el-button <el-button
size="small" size="small"
plain plain