This commit is contained in:
磷叶 2025-05-22 17:46:05 +08:00
parent f433f5f423
commit 5ecf97ce38
11 changed files with 672 additions and 33 deletions

44
src/api/bst/feeLog.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询改价记录列表
export function listFeeLog(query) {
return request({
url: '/bst/feeLog/list',
method: 'get',
params: query
})
}
// 查询改价记录详细
export function getFeeLog(id) {
return request({
url: '/bst/feeLog/' + id,
method: 'get'
})
}
// 新增改价记录
export function addFeeLog(data) {
return request({
url: '/bst/feeLog',
method: 'post',
data: data
})
}
// 修改改价记录
export function updateFeeLog(data) {
return request({
url: '/bst/feeLog',
method: 'put',
data: data
})
}
// 删除改价记录
export function delFeeLog(id) {
return request({
url: '/bst/feeLog/' + id,
method: 'delete'
})
}

View File

@ -81,3 +81,12 @@ export function deductOrder(data) {
data: data
})
}
// 订单改价
export function updateOrderPrice(data) {
return request({
url: '/bst/order/updatePrice',
method: 'put',
data: data
})
}

View File

@ -158,9 +158,7 @@ export const OrderStatus = {
FINISHED: "FINISHED", // 已结束
CANCELED: "CANCELED", // 已取消
WAIT_VERIFY: "WAIT_VERIFY", // 待审核
REJECTED: "REJECTED", // 已驳回
REFUNDED: "REFUNDED", // 已退款
RIDE_WAIT_PAY: "RIDE_WAIT_PAY", // 骑行费待支付
RIDE_WAIT_PAY: "RIDE_WAIT_PAY", // 骑行费待支付
// 允许支付的订单状态
canPay() {
@ -180,7 +178,7 @@ export const OrderStatus = {
},
// 可以退款的订单状态
canRefund() {
return [this.FINISHED, this.REFUNDED];
return [this.FINISHED];
},
// 未支付的订单状态
unPayList() {
@ -194,22 +192,30 @@ export const OrderStatus = {
canVerify() {
return [this.WAIT_VERIFY];
},
// 有效的订单状态
// 有效的订单状态:已支付的订单
valid() {
return [this.PROCESSING, this.FINISHED, this.WAIT_VERIFY, this.REJECTED, this.RIDE_WAIT_PAY];
return [this.PROCESSING, this.FINISHED, this.WAIT_VERIFY, this.RIDE_WAIT_PAY];
},
// 已完成的订单状态
// 已完成的订单
finishedList() {
return [this.FINISHED, this.WAIT_VERIFY, this.REJECTED, this.REFUNDED];
return [this.FINISHED, this.WAIT_VERIFY, this.RIDE_WAIT_PAY];
},
// 允许押金抵扣的订单状态
canDeduct() {
return [this.RIDE_WAIT_PAY];
},
// 允许骑行支付成功的订单状态
// 允许骑行支付成功的订单状态
canRidePaySuccess() {
return [this.RIDE_WAIT_PAY];
},
// 允许调起支付骑行费的订单状态
canPayRideFee() {
return [this.RIDE_WAIT_PAY];
},
// 允许改价的订单状态
canUpdatePrice() {
return [this.RIDE_WAIT_PAY];
}
}
// 支付业务类型

View File

@ -13,7 +13,7 @@
</el-col>
<el-col :span="6">
<el-tabs>
<el-tab-pane label="操作日志">
<el-tab-pane label="操作日志" v-if="checkPermi(['monitor:operLog:list'])">
<device-oper-log-list
:query="operQuery"
:area="area"
@ -21,7 +21,7 @@
@view-location="handleViewOperLogLocation"
/>
</el-tab-pane>
<el-tab-pane label="定位日志">
<el-tab-pane label="定位日志" v-if="checkPermi(['bst:locationLog:list'])">
<device-location-log-list
:query="query"
:location-log-list.sync="locationLogList"

View File

@ -0,0 +1,340 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作人" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入操作人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="改价原因" prop="reason">
<el-input
v-model="queryParams.reason"
placeholder="请输入改价原因"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-has-permi="['bst:feeLog:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="feeLogList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<template v-for="column of showColumns">
<el-table-column
:key="column.key"
:label="column.label"
:prop="column.key"
:align="column.align"
:min-width="column.minWidth"
:sort-orders="orderSorts"
:sortable="column.sortable"
:show-overflow-tooltip="column.overflow"
:width="column.width"
>
<template slot-scope="d">
<template v-if="column.key === 'id'">
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'beforeFee'">
<template v-if="d.row.beforeFee && d.row.afterFee">
<div :class="{'text-danger': d.row.beforeFee.ridingFee !== d.row.afterFee.ridingFee}">
骑行费: {{ d.row.beforeFee.ridingFee | fix2 | dv}} <i class="el-icon-arrow-right" /> {{ d.row.afterFee.ridingFee | fix2 | dv}}
</div>
<div :class="{'text-danger': d.row.beforeFee.dispatchFee !== d.row.afterFee.dispatchFee}">
调度费: {{ d.row.beforeFee.dispatchFee | fix2 | dv}} <i class="el-icon-arrow-right" /> {{ d.row.afterFee.dispatchFee | fix2 | dv}}
</div>
<div :class="{'text-danger': d.row.beforeFee.manageFee !== d.row.afterFee.manageFee}">
管理费: {{ d.row.beforeFee.manageFee | fix2 | dv}} <i class="el-icon-arrow-right" /> {{ d.row.afterFee.manageFee | fix2 | dv}}
</div>
</template>
</template>
<template v-else-if="column.key === 'userName'">
<user-link :id="d.row.userId" :text="d.row.userName"/>
</template>
<template v-else-if="column.key === 'orderNo'">
<order-link :id="d.row.orderId" :text="d.row.orderNo"/>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改改价记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<form-col :span="span" label="订单ID" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入订单ID" />
</form-col>
<form-col :span="span" label="改动前价格json" prop="beforeFee">
<el-input v-model="form.beforeFee" placeholder="请输入改动前价格json" />
</form-col>
<form-col :span="span" label="改动后价格json" prop="afterFee">
<el-input v-model="form.afterFee" placeholder="请输入改动后价格json" />
</form-col>
<form-col :span="span" label="操作人ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入操作人ID" />
</form-col>
<form-col :span="span" label="改价原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入改价原因" />
</form-col>
<form-col :span="span" label="运营区ID" prop="areaId">
<el-input v-model="form.areaId" placeholder="请输入运营区ID" />
</form-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { addFeeLog, delFeeLog, getFeeLog, listFeeLog, updateFeeLog } from "@/api/bst/feeLog";
import OrderLink from '@/components/Business/Order/OrderLink.vue';
import UserLink from '@/components/Business/User/UserLink.vue';
import FormCol from "@/components/FormCol/index.vue";
import { $showColumns } from '@/utils/mixins';
//
const defaultSort = {
prop: "createTime",
order: "descending"
}
export default {
name: "FeeLog",
mixins: [$showColumns],
components: {FormCol, UserLink, OrderLink},
props: {
query: {
type: Object,
default: () => ({})
}
},
data() {
return {
span: 24,
//
columns: [
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'orderNo', visible: true, label: '订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'createTime', visible: true, label: '时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '操作人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'beforeFee', visible: true, label: '改动', minWidth: "200", sortable: false, overflow: false, align: 'center', width: null},
{key: 'reason', visible: true, label: '原因', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
feeLogList: [],
//
title: "",
//
open: false,
defaultSort,
//
queryParams: {
pageNum: 1,
pageSize: 20,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
id: null,
orderId: null,
userId: null,
reason: null,
areaId: null
},
//
form: {},
//
rules: {
orderId: [
{ required: true, message: "订单ID不能为空", trigger: "blur" }
],
afterFee: [
{ required: true, message: "改动后价格json不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "操作人ID不能为空", trigger: "blur" }
],
createTime: [
{ required: true, message: "创建时间不能为空", trigger: "blur" }
],
}
};
},
created() {
Object.assign(this.queryParams, this.query);
this.getList();
},
methods: {
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
this.queryParams.orderByColumn = defaultSort.prop;
this.queryParams.isAsc = defaultSort.order;
} else {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
}
this.getList();
},
/** 查询改价记录列表 */
getList() {
this.loading = true;
listFeeLog(this.queryParams).then(response => {
this.feeLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
orderId: null,
beforeFee: null,
afterFee: null,
userId: null,
createTime: null,
reason: null,
areaId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加改价记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getFeeLog(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改改价记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateFeeLog(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFeeLog(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除改价记录编号为"' + ids + '"的数据项?').then(function() {
return delFeeLog(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('bst/feeLog/export', {
...this.queryParams
}, `feeLog_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style scoped lang="scss">
.text-danger {
color: #f56c6c;
}
</style>

View File

@ -0,0 +1,149 @@
<template>
<el-dialog
title="订单改价"
:visible.sync="dialogVisible"
width="500px"
append-to-body
@open="handleOpen"
>
<el-form :model="form" :rules="rules" ref="form" label-width="5em" v-loading="loading" size="small">
<el-form-item label="骑行费" prop="ridingFee">
<el-row type="flex" align="middle">
<el-input-number :value="detail.ridingFee" disabled readonly controls-position="right" style="width: 100%;"/>
<i class="el-icon-arrow-right" />
<el-input-number
v-model="form.ridingFee"
:min="0"
:precision="2"
style="width: 100%;"
controls-position="right"
placeholder="请输入骑行费"
/>
</el-row>
</el-form-item>
<el-form-item label="调度费" prop="dispatchFee">
<el-row type="flex" align="middle">
<el-input-number :value="detail.dispatchFee" disabled readonly controls-position="right" style="width: 100%;"/>
<i class="el-icon-arrow-right" />
<el-input-number
v-model="form.dispatchFee"
:min="0"
:precision="2"
style="width: 100%;"
controls-position="right"
placeholder="请输入调度费"
/>
</el-row>
</el-form-item>
<el-form-item label="管理费" prop="manageFee">
<el-row type="flex" align="middle">
<el-input-number :value="detail.manageFee" disabled readonly controls-position="right" style="width: 100%;"/>
<i class="el-icon-arrow-right" />
<el-input-number
v-model="form.manageFee"
:min="0"
:precision="2"
style="width: 100%;"
controls-position="right"
placeholder="请输入管理费"
/>
</el-row>
</el-form-item>
<el-form-item label="改价原因" prop="reason">
<el-input v-model="form.reason" type="textarea" placeholder="请输入改价原因" show-word-limit maxlength="255" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" icon="el-icon-edit">确认改价</el-button>
<el-button @click="dialogVisible = false" icon="el-icon-close">取消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getOrder, updateOrderPrice } from '@/api/bst/order';
export default {
props: {
id: {
type: String,
default: ''
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
detail: {},
form: {},
loading: false,
submitLoading: false,
rules: {
ridingFee: [
{ required: true, message: '请输入骑行费', trigger: 'blur' },
],
dispatchFee: [
{ required: true, message: '请输入调度费', trigger: 'blur' },
],
manageFee: [
{ required: true, message: '请输入管理费', trigger: 'blur' },
],
reason: [
{ max: 255, message: '改价原因不能超过255个字符', trigger: 'blur' }
]
}
}
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit('update:visible', val);
}
}
},
methods: {
getDetail() {
this.loading = true;
getOrder(this.id).then(response => {
this.detail = response.data;
//
this.form = {
id: this.id,
ridingFee: this.detail.ridingFee,
dispatchFee: this.detail.dispatchFee,
manageFee: this.detail.manageFee,
reason: null
};
}).finally(() => {
this.loading = false;
});
},
handleOpen() {
this.getDetail();
},
handleSubmit() {
this.$refs.form.validate().then(() => {
this.submitLoading = true;
updateOrderPrice(this.form).then((response) => {
if (response.code == 200) {
this.$message.success('改价成功');
this.dialogVisible = false;
this.$emit('success');
}
}).finally(() => {
this.submitLoading = false;
});
});
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -10,6 +10,7 @@
<p>即将进行押金抵扣请确认</p>
<p>抵扣金额{{ detail.totalFee | fix2 | dv }} </p>
<p>剩余可抵扣押金{{ detail.depositDeductRemain | fix2 | dv }} </p>
<p>若押金不足则收取最大可抵扣金额</p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit()" icon="el-icon-wallet" :loading="submitLoading">确认抵扣</el-button>

View File

@ -10,7 +10,7 @@
<el-form-item label="退款类型" prop="refundType">
<el-radio-group v-model="form.refundType" placeholder="请选择退款类型" style="width: 100%;" @change="handleRefundTypeChange">
<el-radio-button :label="OrderRefundType.DEPOSIT">押金 ({{ detail.canDepositRefundAmount | fix2 | dv }} )</el-radio-button>
<el-radio-button :label="OrderRefundType.RIDE">骑行费 ({{ detail.canRideRefundAmount | fix2 | dv }} )</el-radio-button>
<el-radio-button :label="OrderRefundType.RIDE">订单费用 ({{ detail.canRideRefundAmount | fix2 | dv }} )</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="退款金额" prop="amount">

View File

@ -150,7 +150,7 @@
<br/>
<dict-tag :options="dict.type.suit_type" :value="d.row.suitType" size="mini"/>
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.suitRidingRule" size="mini" style="margin-left: 4px;"/>
<el-tag v-if="d.row.suitDepositDeduction" type="success" size="mini">自动抵扣</el-tag>
<el-tag v-if="d.row.suitDepositDeduction" type="success" size="mini" style="margin-left: 4px;">自动抵扣</el-tag>
</template>
<template v-else-if="column.key === 'returnType'">
<dict-tag :options="dict.type.order_return_type" :value="d.row.returnType" size="mini"/>
@ -177,7 +177,11 @@
<div>管理费{{d.row.manageFee | fix2 | dv}} </div>
<div>车损费{{d.row.deductionFee | fix2 | dv}} </div>
</div>
<div slot="reference">应收{{d.row.totalFee | fix2 | dv}} <i class="el-icon-info" /></div>
<div slot="reference">
应收{{d.row.totalFee | fix2 | dv}}
<el-tag v-if="d.row.priceChanged" type="danger" size="mini"></el-tag>
<i class="el-icon-info" v-else />
</div>
</el-popover>
</el-col>
<template v-if="OrderStatus.finishedList().includes(d.row.status)">
@ -289,6 +293,14 @@
v-has-permi="['bst:order:verify']"
v-show="OrderStatus.canVerify().includes(scope.row.status)"
>审核</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
@click="handleUpdatePrice(scope.row)"
v-has-permi="['bst:order:updatePrice']"
v-show="OrderStatus.canUpdatePrice().includes(scope.row.status)"
>改价</el-button>
<el-button
size="mini"
type="text"
@ -314,6 +326,8 @@
<order-verify-dialog :id="row.id" :visible.sync="showVerifyDialog" @success="getList" />
<order-deduct-dialog :id="row.id" :visible.sync="showDeductDialog" @success="getList" />
<order-change-price-dialog :id="row.id" :visible.sync="showUpdatePriceDialog" @success="getList" />
</div>
</template>
@ -329,6 +343,7 @@ import FormCol from "@/components/FormCol/index.vue";
import { toDescriptionFromSecond } from '@/utils/date';
import { OrderStatus } from "@/utils/enums";
import { $showColumns } from '@/utils/mixins';
import OrderChangePriceDialog from "@/views/bst/order/components/OrderChangePriceDialog.vue";
import OrderDeductDialog from "@/views/bst/order/components/OrderDeductDialog.vue";
import OrderRefundDialog from "@/views/bst/order/components/OrderRefundDialog.vue";
import OrderVerifyDialog from "@/views/bst/order/components/OrderVerifyDialog.vue";
@ -344,7 +359,18 @@ export default {
name: "Order",
mixins: [$showColumns],
dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule', 'device_status', 'order_pay_type'],
components: {FormCol, OrderRefundDialog, OrderVerifyDialog, OrderDeductDialog, UserLink, DeviceLink, OrderLink, AreaLink, AreaRemoteSelect},
components: {
FormCol,
OrderRefundDialog,
OrderVerifyDialog,
OrderDeductDialog,
UserLink,
DeviceLink,
OrderLink,
AreaLink,
AreaRemoteSelect,
OrderChangePriceDialog
},
props: {
query: {
type: Object,
@ -418,6 +444,7 @@ export default {
showRefundDialog: false,
showVerifyDialog: false,
showDeductDialog: false,
showUpdatePriceDialog: false,
};
},
created() {
@ -427,6 +454,10 @@ export default {
methods: {
getOrderDuration,
toDescriptionFromSecond,
handleUpdatePrice(row) {
this.row = row;
this.showUpdatePriceDialog = true;
},
handleDeduct(row) {
this.row = row;
this.showDeductDialog = true;

View File

@ -31,8 +31,9 @@
<i class="el-icon-wallet" style="color: #E6A23C"></i>
</template>
<template slot="title">
结算金额
<i class="el-icon-info" style="color: #909399; margin-left: 4px; cursor: pointer"></i>
应收
<el-tag size="mini" type="danger" v-if="detail.priceChanged"></el-tag>
<i class="el-icon-info" v-else style="color: #909399; margin-left: 4px; cursor: pointer"></i>
</template>
</el-statistic>
</el-popover>
@ -131,6 +132,24 @@
v-has-permi="['bst:order:verify']"
v-show="OrderStatus.canVerify().includes(detail.status)"
>审核</el-button>
<el-button
size="small"
plain
type="warning"
icon="el-icon-wallet"
@click="handleDeduct(detail)"
v-has-permi="['bst:order:deduct']"
v-show="OrderStatus.canDeduct().includes(detail.status)"
>押金抵扣</el-button>
<el-button
size="small"
plain
type="warning"
icon="el-icon-edit-outline"
@click="handleUpdatePrice(detail)"
v-has-permi="['bst:order:updatePrice']"
v-show="OrderStatus.canDeduct().includes(detail.status)"
>改价</el-button>
</el-row>
<collapse-panel :value="true" title="基础信息">
<el-descriptions :column="4" >
@ -161,6 +180,7 @@
{{ detail.suitName }}
<dict-tag :options="dict.type.suit_type" :value="detail.suitType" size="mini" style="margin-left: 4px;"/>
<dict-tag :options="dict.type.suit_riding_rule" :value="detail.suitRidingRule" size="mini" style="margin-left: 4px;"/>
<el-tag v-if="detail.suitDepositDeduction" type="success" size="mini" style="margin-left: 4px;">自动抵扣</el-tag>
</el-descriptions-item>
<el-descriptions-item label="免费骑行时间" :span="3">
{{ detail.suitFreeRideTime | dv }} 分钟
@ -220,9 +240,12 @@
<collapse-panel :value="true" title="支付信息">
<el-descriptions :column="1" >
<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="支付方式">
<dict-tag :options="dict.type.order_pay_type" :value="detail.payType" size="mini"/>
</el-descriptions-item>
<el-descriptions-item label="押金抵扣" v-if="detail.suitDepositDeduction">
{{ detail.suitDepositDeduction | fix2 | dv }}
</el-descriptions-item>
</el-descriptions>
</collapse-panel>
</el-card>
@ -230,30 +253,33 @@
</el-row>
<el-card class="box-card" v-if="detail.id" style="margin-top: 10px;">
<el-tabs lazy>
<el-tab-pane label="车辆轨迹" v-if="checkPermi(['bst:locationLog:list'])">
<el-tabs >
<el-tab-pane lazy label="车辆轨迹" v-if="checkPermi(['bst:locationLog:list'])">
<device-location
:query="{orderId: detail.id, timeRange: orderTimeRange}"
:operQuery="{bizId: detail.id, bizType: LogBizType.ORDER, operTimeRange: []}"
:area-id="detail.areaId"
/>
</el-tab-pane>
<el-tab-pane label="收益信息" v-if="checkPermi(['bst:bonus:list'])">
<el-tab-pane lazy label="收益信息" v-if="checkPermi(['bst:bonus:list'])">
<bonus :query="{bstId: detail.id, bstType: BonusBstType.ORDER}" />
</el-tab-pane>
<el-tab-pane label="订单车辆" v-if="checkPermi(['bst:orderDevice:list'])">
<el-tab-pane lazy label="订单车辆" v-if="checkPermi(['bst:orderDevice:list'])">
<order-device :query="{orderId: detail.id}" />
</el-tab-pane>
<el-tab-pane label="支付信息" v-if="checkPermi(['bst:pay:list'])">
<pay :query="{bstId: detail.id, bstTypes: [PayBstType.ORDER, PayBstType.ORDER_RIDE]}"/>
<el-tab-pane lazy label="支付信息" v-if="checkPermi(['bst:pay:list'])">
<pay :query="{bstId: detail.id, bstTypes: payBstTypes}"/>
</el-tab-pane>
<el-tab-pane label="退款信息" v-if="checkPermi(['bst:refund:list'])">
<refund :query="{payBstId: detail.id, payBstTypes: [PayBstType.ORDER, PayBstType.ORDER_RIDE]}"/>
<el-tab-pane lazy label="退款信息" v-if="checkPermi(['bst:refund:list'])">
<refund :query="{payBstId: detail.id, payBstTypes: payBstTypes}"/>
</el-tab-pane>
<el-tab-pane label="命令日志" v-if="checkPermi(['bst:commandLog:list'])">
<el-tab-pane lazy label="命令日志" v-if="checkPermi(['bst:commandLog:list'])">
<command-log :query="{orderId: detail.id}"/>
</el-tab-pane>
<el-tab-pane label="操作日志" v-if="checkPermi(['monitor:operlog:list'])">
<el-tab-pane lazy label="改价记录" v-if="checkPermi(['bst:feeLog:list'])">
<fee-log :query="{orderId: detail.id}"/>
</el-tab-pane>
<el-tab-pane lazy label="操作日志" v-if="checkPermi(['monitor:operlog:list'])">
<operlog :query="{bizId: detail.id, bizType: LogBizType.ORDER}"/>
</el-tab-pane>
</el-tabs>
@ -262,6 +288,10 @@
<order-refund-dialog :id="detail.id" :visible.sync="showRefundDialog" @success="getDetail" />
<order-verify-dialog :id="detail.id" :visible.sync="showVerifyDialog" @success="getDetail" />
<order-deduct-dialog :id="detail.id" :visible.sync="showDeductDialog" @success="getDetail" />
<order-change-price-dialog :id="detail.id" :visible.sync="showUpdatePriceDialog" @success="getDetail" />
</div>
</template>
@ -278,6 +308,9 @@ import { BonusBstType, LogBizType, OrderStatus, PayBstType, SuitRidingRule } fro
import Bonus from '@/views/bst/bonus/index.vue'
import CommandLog from '@/views/bst/commandLog/index.vue'
import DeviceLocation from '@/views/bst/device/view/components/DeviceLocation.vue'
import FeeLog from '@/views/bst/feeLog/index.vue'
import OrderChangePriceDialog from '@/views/bst/order/components/OrderChangePriceDialog.vue'
import OrderDeductDialog from '@/views/bst/order/components/OrderDeductDialog.vue'
import OrderRefundDialog from '@/views/bst/order/components/OrderRefundDialog.vue'
import OrderVerifyDialog from '@/views/bst/order/components/OrderVerifyDialog.vue'
import { getOrderDuration } from '@/views/bst/order/util'
@ -288,7 +321,16 @@ import Operlog from '@/views/monitor/operlog/index.vue'
export default {
name: 'OrderView',
dicts: ['order_status', 'device_lock_status', 'suit_type', 'suit_rental_unit', 'suit_riding_rule', 'order_return_mode', 'order_return_type'],
dicts: [
'order_status',
'device_lock_status',
'suit_type',
'suit_rental_unit',
'suit_riding_rule',
'order_return_mode',
'order_return_type',
'order_pay_type'
],
components: {
CollapsePanel,
OrderDevice,
@ -302,10 +344,14 @@ export default {
CommandLog,
DeviceLink,
UserLink,
AreaLink
AreaLink,
OrderDeductDialog,
FeeLog,
OrderChangePriceDialog
},
data() {
return {
payBstTypes: [PayBstType.ORDER, PayBstType.ORDER_RIDE],
OrderStatus,
id: null,
detail: {},
@ -316,6 +362,8 @@ export default {
LogBizType,
showRefundDialog: false,
showVerifyDialog: false,
showDeductDialog: false,
showUpdatePriceDialog: false,
}
},
computed: {
@ -352,6 +400,12 @@ export default {
handleVerify(row) {
this.showVerifyDialog = true;
},
handleDeduct(row) {
this.showDeductDialog = true;
},
handleUpdatePrice(row) {
this.showUpdatePriceDialog = true;
},
async handleEnd(row) {
const calcRes = await appCalcOrderFee({orderId: row.id, checkLocation: false})
let fee = {}

View File

@ -93,6 +93,9 @@
<el-tab-pane label="用户APP" lazy v-if="checkPermi(['bst:userApp:list'])">
<user-app :query="{userId: detail.userId}" />
</el-tab-pane>
<el-tab-pane label="改价记录" lazy v-if="checkPermi(['bst:feeLog:list'])">
<fee-log :query="{userId: detail.userId}" />
</el-tab-pane>
<el-tab-pane label="命令日志" lazy v-if="checkPermi(['bst:commandLog:list'])">
<command-log :query="{userId: detail.userId}"/>
</el-tab-pane>
@ -122,6 +125,7 @@ import BalanceLog from '@/views/bst/balanceLog/index.vue'
import Bonus from '@/views/bst/bonus/index.vue'
import CommandLog from '@/views/bst/commandLog/index.vue'
import Device from '@/views/bst/device/index.vue'
import FeeLog from '@/views/bst/feeLog/index.vue'
import OrderDailyStat from '@/views/bst/index/components/OrderDailyStat.vue'
import Model from '@/views/bst/model/index.vue'
import Order from '@/views/bst/order/index.vue'
@ -156,7 +160,8 @@ export default {
RealName,
AreaJoin,
OperLog,
CommandLog
CommandLog,
FeeLog
},
data() {
return {