2025-03-24 18:05:17 +08:00
|
|
|
|
<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="no">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.no"
|
|
|
|
|
placeholder="请输入订单号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="SN" prop="deviceSn">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.deviceSn"
|
|
|
|
|
placeholder="请输入设备SN"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="MAC" prop="deviceMac">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.deviceMac"
|
|
|
|
|
placeholder="请输入设备MAC"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="车牌号" prop="deviceVehicleNum">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.deviceVehicleNum"
|
|
|
|
|
placeholder="请输入设备车牌号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2025-03-25 18:04:07 +08:00
|
|
|
|
<el-form-item label="套餐类型" prop="suitType">
|
|
|
|
|
<el-select v-model="queryParams.suitType" placeholder="请选择套餐类型" clearable @change="handleQuery">
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<el-option
|
2025-03-25 18:04:07 +08:00
|
|
|
|
v-for="dict in dict.type.suit_type"
|
2025-03-24 18:05:17 +08:00
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="运营区" prop="areaName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.areaName"
|
|
|
|
|
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="payNo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.payNo"
|
|
|
|
|
placeholder="请输入支付单号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
|
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @change="handleQuery">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.order_status"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="还车类型" prop="returnType">
|
|
|
|
|
<el-select v-model="queryParams.returnType" placeholder="请选择还车类型" clearable @change="handleQuery">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.order_return_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="套餐名称" prop="suitName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.suitName"
|
|
|
|
|
placeholder="请输入套餐名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="还车定位方式" prop="returnMode" label-width="7em">
|
|
|
|
|
<el-select v-model="queryParams.returnMode" placeholder="请选择还车定位方式" clearable @change="handleQuery">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.order_return_mode"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</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:order:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
2025-03-25 18:04:07 +08:00
|
|
|
|
<el-table size="mini" v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<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 === 'suitName'">
|
|
|
|
|
{{d.row.suitName | dv}}<br/>
|
2025-03-25 18:04:07 +08:00
|
|
|
|
<dict-tag :options="dict.type.suit_type" :value="d.row.suitType" size="mini"/>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<dict-tag :options="dict.type.order_status" :value="d.row.status" size="mini" style="margin-left: 4px;"/>
|
|
|
|
|
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.suitRidingRule" size="mini" style="margin-left: 4px;"/>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="column.key === 'returnType'">
|
2025-03-25 18:04:07 +08:00
|
|
|
|
<dict-tag :options="dict.type.order_return_type" :value="d.row.returnType" size="mini"/>
|
|
|
|
|
<dict-tag :options="dict.type.order_return_mode" :value="d.row.returnMode" size="mini"/>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="column.key === 'suitRentalUnit'">
|
|
|
|
|
<dict-tag :options="dict.type.suit_rental_unit" :value="d.row[column.key]" size="mini"/>
|
|
|
|
|
</template>
|
|
|
|
|
<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>
|
2025-03-26 18:06:14 +08:00
|
|
|
|
<el-col :span="12" v-if="d.row.totalFee != null">总额:{{d.row.totalFee | fix2 | dv}} 元</el-col>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<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>
|
|
|
|
|
<el-col :span="12" v-if="d.row.deductionFee">车损:{{d.row.deductionFee | fix2 | dv}} 元</el-col>
|
|
|
|
|
<el-col :span="24" v-if="d.row.payRefunded || d.row.payRefunding" style="color: red;">
|
|
|
|
|
退款:{{d.row.payRefunded | fix2 | dv}} 元
|
|
|
|
|
<template v-if="d.row.payRefunding">(退款中:{{d.row.payRefunding | fix2 | dv}} 元)</template>
|
|
|
|
|
</el-col>
|
2025-04-14 18:07:43 +08:00
|
|
|
|
<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>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="column.key === 'useInfo'">
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<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>
|
2025-03-25 18:04:07 +08:00
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="column.key === 'time'">
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<div v-if="d.row.createTime != null">创建:{{d.row.createTime | dv}}</div>
|
|
|
|
|
<div v-if="d.row.startTime != null">开始:{{d.row.startTime | dv}}</div>
|
|
|
|
|
<div v-if="d.row.endTime != null">结束:{{d.row.endTime | dv}}</div>
|
|
|
|
|
<div v-if="d.row.maxTime != null">超时:{{d.row.maxTime | dv}}</div>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
</template>
|
2025-03-25 18:04:07 +08:00
|
|
|
|
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<template v-else-if="column.key === 'device'">
|
|
|
|
|
<div v-if="d.row.deviceSn != null">SN:{{d.row.deviceSn | dv}}</div>
|
|
|
|
|
<div v-if="d.row.deviceMac != null">MAC:{{d.row.deviceMac | dv}}</div>
|
|
|
|
|
<div v-if="d.row.deviceVehicleNum != null">车牌:{{d.row.deviceVehicleNum | dv}}</div>
|
|
|
|
|
</template>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<template v-else-if="column.key === 'payNo'">
|
|
|
|
|
<div v-if="d.row.payNo != null">单号:{{d.row.payNo | dv}}</div>
|
|
|
|
|
<div v-if="d.row.payTime != null">时间:{{d.row.payTime | dv}}</div>
|
|
|
|
|
<div v-if="d.row.payChannelName != null">渠道:{{d.row.payChannelName | dv}}</div>
|
|
|
|
|
</template>
|
2025-04-14 18:07:43 +08:00
|
|
|
|
<template v-else-if="column.key === 'use'">
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<div v-if="d.row.startAreaSubName != null">借车:{{d.row.startAreaSubName | dv}}</div>
|
|
|
|
|
<div v-if="d.row.endAreaSubName != null">还车:{{d.row.endAreaSubName | dv}}</div>
|
|
|
|
|
<div v-if="d.row.endReason != null">还车原因:{{d.row.endReason | dv}}</div>
|
|
|
|
|
</template>
|
2025-04-14 18:07:43 +08:00
|
|
|
|
<template v-else-if="column.key === 'userName'">
|
|
|
|
|
<div v-if="d.row.userName != null">用户:{{d.row.userName | dv}}</div>
|
|
|
|
|
<div v-if="d.row.userPhone != null">手机:{{d.row.userPhone | dv}}</div>
|
|
|
|
|
<div v-if="d.row.areaName != null">运营区:{{d.row.areaName | dv}}</div>
|
|
|
|
|
</template>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<template v-else>
|
|
|
|
|
{{d.row[column.key]}}
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
2025-03-24 18:05:17 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
@click="handleView(scope.row)"
|
|
|
|
|
v-has-permi="['bst:order:query']"
|
|
|
|
|
>详情</el-button>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-close"
|
|
|
|
|
@click="handleEnd(scope.row)"
|
|
|
|
|
v-has-permi="['bst:order:end']"
|
|
|
|
|
v-show="OrderStatus.canEnd().includes(scope.row.status)"
|
|
|
|
|
>结束</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-wallet"
|
|
|
|
|
@click="handleRefund(scope.row)"
|
|
|
|
|
v-has-permi="['bst:order:refund']"
|
|
|
|
|
v-show="OrderStatus.canRefund().includes(scope.row.status)"
|
|
|
|
|
>退款</el-button>
|
2025-04-04 18:13:14 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-wallet"
|
|
|
|
|
@click="handleVerify(scope.row)"
|
|
|
|
|
v-has-permi="['bst:order:verify']"
|
|
|
|
|
v-show="OrderStatus.canVerify().includes(scope.row.status)"
|
|
|
|
|
>审核</el-button>
|
2025-03-24 18:05:17 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
|
|
|
|
|
<order-refund-dialog :id="row.id" :visible.sync="showRefundDialog" @success="getList" />
|
2025-04-04 18:13:14 +08:00
|
|
|
|
|
|
|
|
|
<order-verify-dialog :id="row.id" :visible.sync="showVerifyDialog" @success="getList" />
|
2025-03-24 18:05:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-03-29 18:07:17 +08:00
|
|
|
|
import { listOrder, endOrder } from "@/api/bst/order";
|
2025-03-24 18:05:17 +08:00
|
|
|
|
import { $showColumns } from '@/utils/mixins';
|
|
|
|
|
import FormCol from "@/components/FormCol/index.vue";
|
2025-03-29 18:07:17 +08:00
|
|
|
|
import { OrderStatus } from "@/utils/enums";
|
2025-04-04 18:13:14 +08:00
|
|
|
|
import OrderRefundDialog from "@/views/bst/order/components/OrderRefundDialog.vue";
|
|
|
|
|
import OrderVerifyDialog from "@/views/bst/order/components/OrderVerifyDialog.vue";
|
2025-03-24 18:05:17 +08:00
|
|
|
|
|
2025-03-29 18:07:17 +08:00
|
|
|
|
// 默认排序字段
|
2025-03-24 18:05:17 +08:00
|
|
|
|
const defaultSort = {
|
|
|
|
|
prop: "createTime",
|
|
|
|
|
order: "descending"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Order",
|
|
|
|
|
mixins: [$showColumns],
|
2025-03-25 18:04:07 +08:00
|
|
|
|
dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'],
|
2025-04-04 18:13:14 +08:00
|
|
|
|
components: {FormCol, OrderRefundDialog, OrderVerifyDialog},
|
2025-04-10 14:07:21 +08:00
|
|
|
|
props: {
|
|
|
|
|
query: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-03-24 18:05:17 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
span: 24,
|
2025-03-29 18:07:17 +08:00
|
|
|
|
OrderStatus,
|
2025-03-24 18:05:17 +08:00
|
|
|
|
// 字段列表
|
|
|
|
|
columns: [
|
|
|
|
|
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
|
|
|
|
{key: 'no', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
|
|
|
|
{key: 'suitName', visible: true, label: '套餐', minWidth: "200", sortable: true, overflow: false, align: 'left', width: null},
|
2025-04-14 18:07:43 +08:00
|
|
|
|
{key: 'userName', visible: true, label: '用户', minWidth: "150", sortable: true, overflow: false, align: 'left', width: null},
|
2025-04-04 18:13:14 +08:00
|
|
|
|
{key: 'device', visible: true, label: '当前设备', minWidth: "150", sortable: false, overflow: false, align: 'left', width: null},
|
2025-03-29 18:07:17 +08:00
|
|
|
|
{key: 'totalFee', visible: true, label: '费用', minWidth: "230", sortable: false, overflow: false, align: 'left', width: null},
|
|
|
|
|
{key: 'useInfo', visible: true, label: '使用', minWidth: "130", sortable: false, overflow: false, align: 'left', width: null},
|
2025-03-25 18:04:07 +08:00
|
|
|
|
{key: 'time', visible: true, label: '时间', minWidth: "180", sortable: false, overflow: false, align: 'left', width: null},
|
2025-03-29 18:07:17 +08:00
|
|
|
|
{key: 'payNo', visible: true, label: '支付', minWidth: "180", sortable: false, overflow: false, align: 'left', width: null},
|
2025-04-14 18:07:43 +08:00
|
|
|
|
{key: 'use', visible: true, label: '使用', minWidth: "180", sortable: false, overflow: false, align: 'left', width: null},
|
2025-03-25 18:04:07 +08:00
|
|
|
|
{key: 'returnType', visible: true, label: '还车', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
2025-03-24 18:05:17 +08:00
|
|
|
|
{key: 'mark', visible: false, 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,
|
|
|
|
|
// 订单表格数据
|
|
|
|
|
orderList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
defaultSort,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
orderByColumn: defaultSort.prop,
|
|
|
|
|
isAsc: defaultSort.order,
|
|
|
|
|
id: null,
|
|
|
|
|
no: null,
|
|
|
|
|
type: null,
|
|
|
|
|
areaId: null,
|
|
|
|
|
userId: null,
|
|
|
|
|
deviceId: null,
|
|
|
|
|
deviceMac: null,
|
|
|
|
|
deviceSn: null,
|
|
|
|
|
payId: null,
|
|
|
|
|
mark: null,
|
|
|
|
|
status: null,
|
|
|
|
|
returnType: null,
|
|
|
|
|
suitId: null,
|
|
|
|
|
suitRentalUnit: null,
|
|
|
|
|
suitRidingRule: null,
|
|
|
|
|
returnMode: null,
|
|
|
|
|
},
|
2025-03-29 18:07:17 +08:00
|
|
|
|
row: {},
|
|
|
|
|
showRefundDialog: false,
|
2025-04-04 18:13:14 +08:00
|
|
|
|
showVerifyDialog: false,
|
2025-03-24 18:05:17 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2025-04-14 18:07:43 +08:00
|
|
|
|
Object.assign(this.queryParams, this.query, this.$route.query);
|
2025-03-24 18:05:17 +08:00
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2025-04-04 18:13:14 +08:00
|
|
|
|
handleVerify(row) {
|
2025-04-11 15:35:32 +08:00
|
|
|
|
this.row = row;
|
2025-04-04 18:13:14 +08:00
|
|
|
|
this.showVerifyDialog = true;
|
|
|
|
|
},
|
2025-03-24 18:05:17 +08:00
|
|
|
|
handleView(row) {
|
2025-03-29 18:07:17 +08:00
|
|
|
|
this.$router.push(`/view/order/${row.id}`)
|
|
|
|
|
},
|
|
|
|
|
handleEnd(row) {
|
|
|
|
|
this.$confirm(`确定结束订单${row.no}吗?`, '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
endOrder(row.id).then(response => {
|
|
|
|
|
this.$message.success("结束成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleRefund(row) {
|
|
|
|
|
this.row = row;
|
|
|
|
|
this.showRefundDialog = true;
|
2025-03-24 18:05:17 +08:00
|
|
|
|
},
|
|
|
|
|
/** 当排序按钮被点击时触发 **/
|
|
|
|
|
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;
|
|
|
|
|
listOrder(this.queryParams).then(response => {
|
|
|
|
|
this.orderList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
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
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('bst/order/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `order_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|