Commit 480fa6aa by 吕明尚

更改订单管理页面

parent 350c911d
......@@ -56,3 +56,10 @@ export function oauthToken(code) {
method: 'get'
})
}
export function queryCouponList() {
return request({
url: '/system/consumerCoupon/query',
method: 'get'
})
}
......@@ -67,3 +67,10 @@ export function deleteRoomDevice(data) {
data: data
})
}
export function queryRoom() {
return request({
url: '/system/room/query',
method: 'get'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
<el-form-item label="所属门店" prop="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择所属门店">
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
<el-option
......@@ -11,9 +21,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="订单流水号" prop="serialNumber">
<el-form-item label="订单流水号" prop="orderNo">
<el-input
v-model="queryParams.serialNumber"
v-model="queryParams.orderNo"
placeholder="请输入订单流水号"
clearable
@keyup.enter.native="handleQuery"
......@@ -27,32 +37,26 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="消费描述" prop="description">
<el-input
v-model="queryParams.description"
placeholder="请输入消费描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付方式" prop="payWays">
<el-input
v-model="queryParams.payWays"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="优惠券类型" prop="couponType">
<el-select v-model="queryParams.couponType" placeholder="请选择优惠券类型" clearable>
<el-form-item label="支付方式" prop="payType">
<el-select v-model="queryParams.payType" placeholder="请选择订单类型" clearable>
<el-option
v-for="dict in dict.type.store_coupon_type"
v-for="dict in dict.type.store_pay_ways"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="优惠券类型" prop="couponType">-->
<!-- <el-select v-model="queryParams.couponType" placeholder="请选择优惠券类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.store_coupon_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="优惠券名称" prop="couponName">
<el-input
v-model="queryParams.couponName"
......@@ -94,27 +98,27 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:order:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:order:edit']"
>修改</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:order:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:order:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
......@@ -149,56 +153,93 @@
</el-table-column>
<el-table-column label="会员昵称" align="center" prop="consumerName" />
<el-table-column label="手机号" align="center" prop="consumerPhone" />
<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="packId" />
<el-table-column label="门店名称" align="center" prop="storeId" >
<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" >
<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" >
<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="优惠券id" align="center" prop="couponId" />
<el-table-column label="优惠券金额" align="center" prop="couponPrice" />
<el-table-column label="预约开始时间" align="center" prop="preStartDate" width="180">
<el-table-column label="优惠券名称" align="center" prop="couponId" >
<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" >
<!--先判断couponPrice是否为空,为空,遍历couponList,获取值-->
<template slot-scope="scope">
<span v-if="scope.row.couponPrice === null">
<span v-for="item in couponList" v-if="scope.row.couponId === item.id">{{item.subPrice}}</span>
</span>
<span v-else>{{scope.row.couponPrice}}</span>
</template>
</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>
</template>
</el-table-column>
<el-table-column label="预约结束时间" align="center" prop="preEndDate" width="180">
<el-table-column label="预约结束时间" align="center" prop="preEndDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.preEndDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="startDate" width="180">
<el-table-column label="开始时间" align="center" prop="startDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="endDate" width="180">
<el-table-column label="结束时间" align="center" prop="endDate" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</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" />
<el-table-column label="订单时长(H)" align="center" prop="timeLong" >
<el-table-column label="支付时间" align="center" prop="payTime" width="150" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.timeLong, '{y}-{m}-{d}') }}</span>
<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="支付类型" align="center" prop="payType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.store_pay_ways" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="支付状态" align="center" prop="payStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.order_pay_status" :value="scope.row.payStatus"/>
</template>
</el-table-column>
<el-table-column label="支付类型" align="center" prop="payType" />
<el-table-column label="支付状态" align="center" prop="payStatus" />
<el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_order_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="下单时间" align="center" prop="createTime" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:order:edit']"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:order:edit']"-->
<!-- >修改</el-button>-->
<el-button
size="mini"
type="text"
......@@ -332,16 +373,24 @@
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/system/order";
import {allList} from "@/api/system/store";
import {queryRoom} from "@/api/system/room";
import {query} from "@/api/system/pack";
import {queryCouponList} from "@/api/system/consumerCoupon";
export default {
name: "Order",
dicts: ['store_order_type', 'store_coupon_type', 'store_is_use_coupon', 'store_order_status'],
dicts: ['store_order_type', 'store_coupon_type', 'store_is_use_coupon', 'store_order_status','store_pay_ways','order_pay_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
options: [],
roomList: [],
packList: [],
couponList: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -376,7 +425,9 @@ export default {
startDate: null,
endDate: null,
preStartDate: null,
preEndDate: null
preEndDate: null,
orderNo: null,
storeId: null
},
// 表单参数
form: {},
......@@ -407,9 +458,33 @@ export default {
};
},
created() {
this.onGetRoomList();
this.getList();
this.onGetAllStoreList();
this.onGetPackList();
this.onGetCouponList();
},
methods: {
onGetAllStoreList(){
allList().then(res => {
this.options = res.data
})
},
onGetCouponList(){
queryCouponList().then(res => {
this.couponList = res.data
})
},
onGetRoomList(){
queryRoom().then(res => {
this.roomList = res.data
})
},
onGetPackList(){
query().then(res => {
this.packList = res.data
})
},
/** 查询订单列表 */
getList() {
this.loading = true;
......
......@@ -108,8 +108,7 @@
<el-table-column label="套餐结束时段" align="center" prop="packaEndPeriod" />
<el-table-column label="是否首次下单可用" align="center" prop="firstOrderAvailable" >
<template slot-scope="scope">
<span v-if="scope.row.firstOrderAvailable==1"></span>
<span v-else></span>
<dict-tag :options="dict.type.store_is_use_coupon" :value="scope.row.firstOrderAvailable"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
......@@ -160,10 +159,13 @@
<el-input v-model="form.packaEndPeriod" placeholder="请输入套餐结束时段" />
</el-form-item>
<el-form-item label="是否首次下单可用" prop="firstOrderAvailable">
<el-select v-model="form.firstOrderAvailable" placeholder="请选择是否首次下单可用" clearable>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
<el-radio-group v-model="form.firstOrderAvailable">
<el-radio
v-for="dict in dict.type.store_is_use_coupon"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
......@@ -184,6 +186,7 @@ import {getRoom, getRoomPack} from "@/api/system/room";
let roomPackList = [];
export default {
name: "Pack",
dicts: [ 'store_is_use_coupon'],
data() {
return {
// 遮罩层
......
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