Commit 3cf931f4 by YG8999

bug修复

parent 97554818
......@@ -172,36 +172,36 @@
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单流水号" align="center" prop="orderNo" />
<el-table-column label="订单流水号" align="center" prop="orderNo" width="150"/>
<el-table-column label="订单类型" align="center" prop="orderType">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="会员昵称" align="center" prop="consumerName" />
<el-table-column label="手机号" align="center" prop="consumerPhone" />
<el-table-column label="门店名称" align="center" prop="storeId" >
<el-table-column label="手机号" align="center" prop="consumerPhone" width="110"/>
<el-table-column label="门店名称" align="center" prop="storeId" width="120">
<template slot-scope="scope">
<span v-for="item in options" v-if="scope.row.storeId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="房间名称" align="center" prop="roomId" >
<el-table-column label="房间名称" align="center" prop="roomId" width="120">
<template slot-scope="scope">
<span v-for="item in roomList" v-if="scope.row.roomId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="套餐名称" align="center" prop="packId" >
<el-table-column label="套餐名称" align="center" prop="packId" width="120">
<template slot-scope="scope">
<span v-for="item in packList" v-if="scope.row.packId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="套餐金额" align="center" prop="packPrice" />
<el-table-column label="优惠券名称" align="center" prop="couponId" >
<el-table-column label="套餐金额" align="center" prop="packPrice" width="100"/>
<el-table-column label="优惠券名称" align="center" prop="couponId" width="100">
<template slot-scope="scope">
<span v-for="item in couponList" v-if="scope.row.couponId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="优惠券金额" align="center" prop="couponPrice" >
<el-table-column label="优惠券金额" align="center" prop="couponPrice" width="100" >
<!--先判断couponPrice是否为空,为空,遍历couponList,获取值-->
<template slot-scope="scope">
<span v-if="scope.row.couponPrice === null">
......@@ -212,32 +212,32 @@
</el-table-column>
<el-table-column label="预约开始时间" align="center" prop="preStartDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.preStartDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.preStartDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="预约结束时间" align="center" prop="preEndDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.preEndDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.preEndDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="startDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="endDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单总价" align="center" prop="totalPrice" />
<el-table-column label="实际支付金额" align="center" prop="payPrice" />
<el-table-column label="支付时间" align="center" prop="payTime" width="150" >
<el-table-column label="实际支付金额" align="center" prop="payPrice" width="100"/>
<el-table-column label="支付时间" align="center" prop="payTime" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单时长(H)" align="center" prop="timeLong"/>
<el-table-column label="订单时长(H)" align="center" prop="timeLong" width="90"/>
<el-table-column label="支付类型" align="center" prop="payType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.store_pay_ways" :value="scope.row.payType"/>
......@@ -253,7 +253,7 @@
<dict-tag :options="dict.type.order_status_admin" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="下单时间" align="center" prop="createTime" width="150">
<el-table-column label="下单时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
......@@ -532,6 +532,9 @@ export default {
if (this.dateValue && this.dateValue.length > 0) {
this.queryParams.startDate = this.dateValue[0];
this.queryParams.endDate = this.dateValue[1];
} else {
this.queryParams.startDate = null;
this.queryParams.endDate = null;
}
this.loading = true;
listOrder(this.queryParams).then(response => {
......
......@@ -11,22 +11,46 @@
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="订单流水号" prop="serialNumber">-->
<!-- <el-input-->
<!-- v-model="queryParams.serialNumber"-->
<!-- placeholder="请输入订单流水号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="用户名称" prop="consumerName">-->
<!-- <el-input-->
<!-- v-model="queryParams.consumerName"-->
<!-- placeholder="请输入用户名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<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="consumerName">
<el-input
v-model="queryParams.consumerName"
placeholder="请输入用户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="退款状态" prop="refundStatus">
<el-select v-model="queryParams.refundStatus" placeholder="请选择退款状态" clearable>
<el-option
v-for="dict in dict.type.order_refund_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
:disabled="dict.value == 0"
/>
</el-select>
</el-form-item>
<el-form-item label="退款时间" prop="dateValue">
<el-date-picker
v-model="dateValue"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00', '23:59:59']">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="消费描述" prop="description">-->
<!-- <el-input-->
<!-- v-model="queryParams.description"-->
......@@ -141,8 +165,8 @@
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="订单编号" align="center" prop="orderNo" />
<el-table-column label="商户订单号" align="center" prop="outTradeNo" />
<el-table-column label="订单编号" align="center" prop="orderNo" width="150"/>
<el-table-column label="商户订单号" align="center" prop="outTradeNo" width="150"/>
<el-table-column label="订单类型" align="center" prop="orderType">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
......@@ -158,22 +182,32 @@
<dict-tag :options="dict.type.order_pay_status" :value="scope.row.payStatus"/>
</template>
</el-table-column>
<el-table-column label="门店ID" align="center" prop="storeId" />
<el-table-column label="房间ID" align="center" prop="roomId" />
<!-- <el-table-column label="门店ID" align="center" prop="storeId" />-->
<!-- <el-table-column label="房间ID" align="center" prop="roomId" />-->
<el-table-column label="门店名称" align="center" prop="storeId" width="120">
<template slot-scope="scope">
<span v-for="item in options" v-if="scope.row.storeId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="房间名称" align="center" prop="roomId" width="120">
<template slot-scope="scope">
<span v-for="item in roomList" v-if="scope.row.roomId === item.id">{{item.name}}</span>
</template>
</el-table-column>
<el-table-column label="会员昵称" align="center" prop="consumerName" />
<el-table-column label="手机号" align="center" prop="consumerPhone" />
<el-table-column label="手机号" align="center" prop="consumerPhone" width="120"/>
<el-table-column label="套餐金额" align="center" prop="packPrice" />
<el-table-column label="优惠券金额" align="center" prop="couponPrice" />
<el-table-column label="优惠券金额" align="center" prop="couponPrice" width="100"/>
<el-table-column label="订单总价" align="center" prop="totalPrice" />
<el-table-column label="实际支付金额" align="center" prop="payPrice" />
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
<el-table-column label="实际支付金额" align="center" prop="payPrice" width="110"/>
<el-table-column label="支付时间" align="center" prop="payTime" width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单时长" align="center" prop="timeLong" />
<el-table-column label="退款说明" align="center" prop="refundReason" />
<el-table-column label="退款时间" align="center" prop="refundReasonTime" width="180">
<el-table-column label="退款时间" align="center" prop="refundReasonTime" width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.refundReasonTime, '{y}-{m}-{d}') }}</span>
</template>
......@@ -390,6 +424,7 @@
<script>
import {listOrder, getOrder, delOrder, addOrder, updateOrder, queryOrder} from "@/api/system/order";
import {allList} from "@/api/system/store";
import {queryRoom} from "@/api/system/room";
export default {
name: "Order",
......@@ -422,6 +457,9 @@ export default {
// 是否显示弹出层
open: false,
audioShow: false,
options: [],
roomList: [],
dateValue: null,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -444,17 +482,29 @@ export default {
preStartDate: null,
payType: null,
payStatus: null,
preEndDate: null
preEndDate: null,
refundStatus: null
},
// 表单参数
form: {}
};
},
created() {
this.onGetAllStoreList();
this.onGetRoomList();
this.getList();
},
methods: {
onGetAllStoreList(){
allList().then(res => {
this.options = res.data
})
},
onGetRoomList(){
queryRoom().then(res => {
this.roomList = res.data
})
},
onAudio(row) {
if(row.refundStatus!=1){
this.$modal.msgWarning("审批状态未是审批中")
......@@ -498,6 +548,13 @@ export default {
},
/** 查询订单列表 */
getList() {
if (this.dateValue && this.dateValue.length > 0) {
this.queryParams.startDate = this.dateValue[0];
this.queryParams.endDate = this.dateValue[1];
} else {
this.queryParams.startDate = null;
this.queryParams.endDate = null;
}
this.loading = true;
queryOrder(this.queryParams).then(response => {
this.orderList = response.rows;
......@@ -515,7 +572,7 @@ export default {
this.form = {
id: null,
orderType: null,
serialNumber: null,
orderNo: null,
consumerId: null,
consumerName: null,
description: null,
......@@ -547,6 +604,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.dateValue = null;
this.handleQuery();
},
// 多选框选中数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment