临时提交
This commit is contained in:
parent
e3f3a1f9a9
commit
b4c71ab31c
|
@ -180,7 +180,7 @@ export const OrderStatus = {
|
|||
},
|
||||
// 可以退款的订单状态
|
||||
canRefund() {
|
||||
return [this.FINISHED, this.REFUNDED, this.REJECTED, this.WAIT_VERIFY];
|
||||
return [this.FINISHED, this.REFUNDED];
|
||||
},
|
||||
// 未支付的订单状态
|
||||
unPayList() {
|
||||
|
@ -194,9 +194,9 @@ export const OrderStatus = {
|
|||
canVerify() {
|
||||
return [this.WAIT_VERIFY];
|
||||
},
|
||||
// 有效的订单状态:已支付的订单
|
||||
// 有效的订单状态
|
||||
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() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="还车审核"
|
||||
title="押金抵扣"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
append-to-body
|
||||
|
@ -92,9 +92,10 @@ export default {
|
|||
this.submitLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="退款"
|
||||
title="押金退款"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
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-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 label="退款原因" prop="reason">
|
||||
<el-input v-model="form.reason" type="textarea" placeholder="请输入退款原因" show-word-limit maxlength="200" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确认退款</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" icon="el-icon-wallet">确认退款</el-button>
|
||||
<el-button @click="dialogVisible = false" icon="el-icon-close">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -59,7 +60,10 @@ export default {
|
|||
},
|
||||
// 可退款金额
|
||||
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: {
|
||||
|
@ -78,7 +82,7 @@ export default {
|
|||
reset() {
|
||||
this.form = {
|
||||
orderId: this.id,
|
||||
amount: 0,
|
||||
amount: null,
|
||||
reason: null,
|
||||
};
|
||||
this.resetForm('form');
|
||||
|
|
|
@ -14,23 +14,23 @@
|
|||
placeholder="请输入车损费"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
:max="detail.depositFee - detail.totalFee"
|
||||
:max="detail.depositDeductRemain"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
<div>当前最多可收取:{{detail.depositDeductRemain | fix2 | dv}} 元</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入审核意见" show-word-limit maxlength="200" />
|
||||
<el-form-item label="审核备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入审核备注" show-word-limit maxlength="200" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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="danger" plain @click="handleSubmit(false)" icon="el-icon-close" :loading="submitLoading">驳回</el-button>
|
||||
<el-button type="success" plain @click="handleSubmit()" icon="el-icon-s-check" :loading="submitLoading">确认审核</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getOrder, verifyOrder} from '@/api/bst/order'
|
||||
import { getOrder, verifyOrder } from '@/api/bst/order';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -92,14 +92,13 @@ export default {
|
|||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
handleSubmit(pass) {
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate().then(() => {
|
||||
this.$confirm(`确定${pass ? '通过' : '驳回'}吗?`, '提示', {
|
||||
this.$confirm(`是否确认审核?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.form.pass = pass;
|
||||
this.submitLoading = true;
|
||||
verifyOrder(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
<div>
|
||||
<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.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-popover
|
||||
placement="bottom"
|
||||
|
@ -181,7 +181,22 @@
|
|||
</el-popover>
|
||||
</el-col>
|
||||
<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 :span="24" v-if="d.row.payRefunded || d.row.payRefunding" style="color: red;">
|
||||
退款:{{d.row.payRefunded | fix2 | dv}} 元
|
||||
|
@ -263,11 +278,11 @@
|
|||
@click="handleRefund(scope.row)"
|
||||
v-has-permi="['bst:order:refund']"
|
||||
v-show="OrderStatus.canRefund().includes(scope.row.status)"
|
||||
>退款</el-button>
|
||||
>押金退款</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-wallet"
|
||||
icon="el-icon-s-check"
|
||||
@click="handleVerify(scope.row)"
|
||||
v-has-permi="['bst:order:verify']"
|
||||
v-show="OrderStatus.canVerify().includes(scope.row.status)"
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
@click="handleRefund(detail)"
|
||||
v-has-permi="['bst:order:refund']"
|
||||
v-show="OrderStatus.canRefund().includes(detail.status)"
|
||||
>退款</el-button>
|
||||
>押金退款</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
plain
|
||||
|
|
Loading…
Reference in New Issue
Block a user