更新
This commit is contained in:
parent
7c0d09c627
commit
fdb9cad723
|
@ -67,7 +67,7 @@ export default {
|
|||
watch: {
|
||||
value: {
|
||||
handler(nv, ov) {
|
||||
if (isEmpty(ov) && this.loadApi) {
|
||||
if (isEmpty(ov) && !isEmpty(nv) && this.loadApi) {
|
||||
this.loadData(nv);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -129,7 +129,7 @@ export function toDescriptionFromSecond(seconds) {
|
|||
positive: positive,
|
||||
}
|
||||
|
||||
desc.text = `${positive ? '' : '-'} `;
|
||||
desc.text = `${positive ? '' : '-'}`;
|
||||
if (desc.day > 0) {
|
||||
desc.text += desc.day + ' 天 ';
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ export const OrderStatus = {
|
|||
},
|
||||
// 可以退款的订单状态
|
||||
canRefund() {
|
||||
return [this.FINISHED, this.REFUNDED];
|
||||
return [this.FINISHED, this.REFUNDED, this.REJECTED, this.WAIT_VERIFY];
|
||||
},
|
||||
// 未支付的订单状态
|
||||
unPayList() {
|
||||
|
|
|
@ -9,12 +9,15 @@
|
|||
{{ item.point | fix2 | dv }} %
|
||||
</template>
|
||||
</line-field>
|
||||
<div v-if="isEmpty(bonusList)" style="text-align: center;font-size: 14px;color: #666;">暂无分成信息</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { previewBonus } from '@/api/bst/bonus'
|
||||
import LineField from '@/components/LineField/index.vue';
|
||||
import { isEmpty } from '@/utils';
|
||||
|
||||
export default {
|
||||
name: "DeviceBonusPreview",
|
||||
dicts: ['bonus_arrival_type'],
|
||||
|
@ -37,6 +40,7 @@ export default {
|
|||
this.getBonusList()
|
||||
},
|
||||
methods: {
|
||||
isEmpty,
|
||||
getBonusList() {
|
||||
this.loading = true
|
||||
previewBonus(this.deviceId).then(res => {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="title-1">
|
||||
<i class="el-icon-s-data"></i>
|
||||
运营统计
|
||||
<el-select v-model="areaId" @change="onChangeArea" placeholder="请选择运营区">
|
||||
<el-select v-model="areaId" @change="onChangeArea" placeholder="请选择运营区" clearable>
|
||||
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleSubmit">确认退款</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确认退款</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -37,10 +37,10 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
showRefundDialog: false,
|
||||
detail: {},
|
||||
form: {},
|
||||
loading: false,
|
||||
submitLoading: false,
|
||||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: '请输入退款金额', trigger: 'blur' },
|
||||
|
@ -89,7 +89,7 @@ export default {
|
|||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate().then(() => {
|
||||
this.loading = true;
|
||||
this.submitLoading = true;
|
||||
refundOrder(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$message.success('退款成功');
|
||||
|
@ -97,7 +97,7 @@ export default {
|
|||
this.$emit('success');
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
this.submitLoading = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="审核"
|
||||
title="还车审核"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
append-to-body
|
||||
@open="handleOpen"
|
||||
center
|
||||
>
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="5em" v-loading="loading" size="small">
|
||||
<el-form-item label="车损费" prop="deductionFee">
|
||||
|
@ -24,8 +23,8 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="success" plain @click="handleSubmit(true)" icon="el-icon-check">通过</el-button>
|
||||
<el-button type="danger" plain @click="handleSubmit(false)" icon="el-icon-close">驳回</el-button>
|
||||
<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>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -49,6 +48,7 @@ export default {
|
|||
detail: {},
|
||||
form: {},
|
||||
loading: false,
|
||||
submitLoading: false,
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ export default {
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.form.pass = pass;
|
||||
this.loading = true;
|
||||
this.submitLoading = true;
|
||||
verifyOrder(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$message.success('操作成功');
|
||||
|
@ -108,7 +108,7 @@ export default {
|
|||
this.$emit('success');
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
this.submitLoading = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -159,8 +159,9 @@
|
|||
<template v-else-if="column.key === 'totalFee'">
|
||||
<div>
|
||||
<el-row :gutter="8">
|
||||
<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">总额:{{d.row.totalFee | fix2 | dv}} 元</el-col>
|
||||
<el-col :span="12" v-if="d.row.payedAmount" style="color: green;font-weight: bold;">实收:{{d.row.payedAmount - d.row.payRefunded - d.row.payRefunding | 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">结算:{{d.row.totalFee | 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.dispatchFee">调度:{{d.row.dispatchFee | fix2 | dv}} 元</el-col>
|
||||
<el-col :span="12" v-if="d.row.manageFee">管理:{{d.row.manageFee | fix2 | dv}} 元</el-col>
|
||||
|
@ -169,13 +170,12 @@
|
|||
退款:{{d.row.payRefunded | fix2 | dv}} 元
|
||||
<template v-if="d.row.payRefunding">(退款中:{{d.row.payRefunding | fix2 | dv}} 元)</template>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="d.row.payedAmount" style="color: green;font-weight: bold;">实收:{{d.row.payedAmount - d.row.payRefunded - d.row.payRefunding | fix2 | dv}} 元</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'useInfo'">
|
||||
<div v-if="d.row.duration != null">时长:{{d.row.duration | dv}} 秒</div>
|
||||
<div v-if="d.row.distance != null">距离:{{d.row.distance | fix2 | dv}} 米</div>
|
||||
<div v-if="d.row.duration != null">时长:{{toDescriptionFromSecond(d.row.duration).text | dv}}</div>
|
||||
<div v-if="d.row.distance != null">距离:{{d.row.distance / 1000 | fix2 | dv}} 公里</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'time'">
|
||||
<div v-if="d.row.createTime != null">创建:{{d.row.createTime | dv}}</div>
|
||||
|
@ -268,6 +268,7 @@ import FormCol from "@/components/FormCol/index.vue";
|
|||
import { OrderStatus } from "@/utils/enums";
|
||||
import OrderRefundDialog from "@/views/bst/order/components/OrderRefundDialog.vue";
|
||||
import OrderVerifyDialog from "@/views/bst/order/components/OrderVerifyDialog.vue";
|
||||
import { toDescriptionFromSecond } from '@/utils/date';
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -359,6 +360,7 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
toDescriptionFromSecond,
|
||||
handleVerify(row) {
|
||||
this.row = row;
|
||||
this.showVerifyDialog = true;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@click="handleEnd(detail)"
|
||||
v-has-permi="['bst:order:end']"
|
||||
v-show="OrderStatus.canEnd().includes(detail.status)"
|
||||
>结束</el-button>
|
||||
>结束订单</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
plain
|
||||
|
@ -43,24 +43,27 @@
|
|||
<el-descriptions-item label="开始时间">{{ detail.startTime | dv}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{ detail.endTime | dv}}</el-descriptions-item>
|
||||
<el-descriptions-item label="到期时间">{{ detail.maxTime | dv}}</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行时长">{{ detail.duration | dv}} 秒</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行距离">{{ detail.distance | fix2 | dv}} 米</el-descriptions-item>
|
||||
<el-descriptions-item label="终止原因" :span="2">{{ detail.endReason || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消备注" :span="3">{{ detail.cancelRemark || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行时长">{{ toDescriptionFromSecond(detail.duration).text | dv}}</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行距离">{{ detail.distance / 1000 | fix2 | dv}} 公里</el-descriptions-item>
|
||||
<el-descriptions-item label="结束原因">{{ detail.endReason | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消备注">{{ detail.cancelRemark | dv }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
<collapse-panel :value="true" title="费用信息">
|
||||
<el-descriptions :column="4" >
|
||||
<el-descriptions-item label="支付金额">{{ detail.payAmount | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="预存金额">{{ detail.depositFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="总费用">{{ detail.totalFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="调度费">{{ detail.dispatchFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="管理费">{{ detail.manageFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行费">{{ detail.ridingFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="车损费">{{ detail.deductionFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="已退款">{{ detail.payRefunded | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="退款中">{{ detail.payRefunding | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="预存">{{ detail.depositFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="结算金额" v-if="detail.totalFee != null">{{ detail.totalFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="骑行费" v-if="detail.ridingFee != null">{{ detail.ridingFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="调度费" v-if="detail.dispatchFee">{{ detail.dispatchFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="管理费" v-if="detail.manageFee">{{ detail.manageFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="车损费" v-if="detail.deductionFee">{{ detail.deductionFee | fix2 | dv }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="退款">
|
||||
{{ detail.payRefunded | fix2 | dv }} 元
|
||||
<template v-if="detail.payRefunding">
|
||||
<span style="color: red;">(退款中:{{ detail.payRefunding | fix2 | dv }} 元)</span>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实收">{{ detail.payedAmount - detail.payRefunded - detail.payRefunding | fix2 | dv }} 元</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
@ -76,12 +79,32 @@
|
|||
{{ detail.suitFreeRideTime | dv }}
|
||||
<dict-tag :options="dict.type.suit_rental_unit" :value="detail.suitRentalUnit"/>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="起步规则" :span="3" v-if="SuitRidingRule.START === detail.suitRidingRule">{{ formattedStartRule }}</el-descriptions-item>
|
||||
<el-descriptions-item label="区间规则" :span="3" v-if="SuitRidingRule.INTERVAL === detail.suitRidingRule">{{ formattedIntervalRule }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="起步规则" :span="3" v-if="SuitRidingRule.START === detail.suitRidingRule">
|
||||
在{{detail.suitStartRule.startingTime}}{{unitLabel(detail.suitRentalUnit)}}以内,起步价{{detail.suitStartRule.startingPrice}}元;
|
||||
超出起步时间后,超出的时间每{{detail.suitStartRule.timeoutTime}}{{unitLabel(detail.suitRentalUnit)}}收费{{detail.suitStartRule.timeoutPrice}}元,
|
||||
不满{{detail.suitStartRule.timeoutTime}}{{unitLabel(detail.suitRentalUnit)}},按{{detail.suitStartRule.timeoutTime}}{{unitLabel(detail.suitRentalUnit)}}计算。
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="区间规则" :span="3" v-if="SuitRidingRule.INTERVAL === detail.suitRidingRule">
|
||||
<template v-if="detail.suitIntervalRule && detail.suitIntervalRule.length > 0">
|
||||
<div v-for="(rule, index) in detail.suitIntervalRule" :key="index">
|
||||
<template v-if="index === detail.suitIntervalRule.length - 1">
|
||||
在{{rule.start}}{{unitLabel(detail.suitRentalUnit)}}之后,
|
||||
每{{rule.eachUnit}}{{unitLabel(detail.suitRentalUnit)}}收费{{rule.fee}}元;
|
||||
</template>
|
||||
<template v-else>
|
||||
在{{rule.start}}~{{rule.end}}{{unitLabel(detail.suitRentalUnit)}}之间,
|
||||
每{{rule.eachUnit}}{{unitLabel(detail.suitRentalUnit)}}收费{{rule.fee}}元;
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
暂无区间规则
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
<collapse-panel :value="true" title="归还信息">
|
||||
<!-- <collapse-panel :value="true" title="归还信息">
|
||||
<el-descriptions :column="4" >
|
||||
<el-descriptions-item label="定位方式">
|
||||
<dict-tag :options="dict.type.order_return_mode" :value="detail.returnMode" size="small"/>
|
||||
|
@ -94,7 +117,7 @@
|
|||
<el-descriptions-item label="起始站点">{{ detail.startAreaSubName | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="归还站点">{{ detail.endAreaSubName | dv }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
</collapse-panel> -->
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -109,8 +132,8 @@
|
|||
|
||||
<collapse-panel :value="true" title="用户信息">
|
||||
<el-descriptions :column="1" >
|
||||
<el-descriptions-item label="用户姓名">{{ detail.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号码">{{ detail.userPhone }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户">{{ detail.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机">{{ detail.userPhone }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
|
@ -119,7 +142,6 @@
|
|||
<el-descriptions-item label="支付单号">{{ detail.payNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="支付渠道">{{ detail.payChannelName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="支付时间">{{ detail.payTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="支付超时时间">{{ detail.payExpireTime | dv}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
</el-card>
|
||||
|
@ -151,7 +173,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrder } from '@/api/bst/order'
|
||||
import { getOrder, endOrder } from '@/api/bst/order'
|
||||
import CollapsePanel from '@/components/CollapsePanel/index.vue'
|
||||
import {SuitRidingRule, PayBstType, BonusBstType, OrderStatus} from '@/utils/enums'
|
||||
import OrderDevice from '@/views/bst/orderDevice/index.vue'
|
||||
|
@ -160,6 +182,7 @@ import Bonus from '@/views/bst/bonus/index.vue'
|
|||
import DeviceLocation from '@/views/bst/device/view/components/DeviceLocation.vue'
|
||||
import OrderRefundDialog from '@/views/bst/order/components/OrderRefundDialog.vue'
|
||||
import OrderVerifyDialog from '@/views/bst/order/components/OrderVerifyDialog.vue'
|
||||
import { toDescriptionFromSecond } from '@/utils/date'
|
||||
|
||||
export default {
|
||||
name: 'OrderView',
|
||||
|
@ -191,6 +214,7 @@ export default {
|
|||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
toDescriptionFromSecond,
|
||||
getDetail() {
|
||||
this.loading = true
|
||||
getOrder(this.id).then(res => {
|
||||
|
@ -211,12 +235,18 @@ export default {
|
|||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
endOrder(row.id).then(response => {
|
||||
this.$message.success("结束成功");
|
||||
this.getList();
|
||||
this.getDetail();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
unitLabel(value) {
|
||||
return this.dict.type.suit_rental_unit.find(item => item.value === value)?.label || value;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user