Commit 07f1c9a3 by 吕明尚

修改订单显示

parent 840af2da
...@@ -199,6 +199,8 @@ ...@@ -199,6 +199,8 @@
</el-table-column> </el-table-column>
<el-table-column label="时长" align="center" prop="duration"/> <el-table-column label="时长" align="center" prop="duration"/>
<el-table-column label="优惠金额" align="center" prop="subPrice"/> <el-table-column label="优惠金额" align="center" prop="subPrice"/>
<el-table-column align="center" label="优惠售卖金额" prop="couponPayPrice"/>
<el-table-column label="优惠券来源" align="center" prop="sourceType"> <el-table-column label="优惠券来源" align="center" prop="sourceType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.consumer_coupon_source_type" :value="scope.row.sourceType"/> <dict-tag :options="dict.type.consumer_coupon_source_type" :value="scope.row.sourceType"/>
......
...@@ -197,56 +197,45 @@ ...@@ -197,56 +197,45 @@
<div style="display: flex;flex-direction: row;"> <div style="display: flex;flex-direction: row;">
<el-button type="primary" size="mini" disabled><span>订单总数: {{ total }}</span></el-button> <el-button type="primary" size="mini" disabled><span>订单总数: {{ total }}</span></el-button>
<el-button type="primary" size="mini" disabled><span>订单总价: {{ totalPrice }}</span></el-button> <el-button type="primary" size="mini" disabled><span>订单总价: {{ totalPrice }}</span></el-button>
<el-button disabled size="mini" type="primary"><span>优惠卷售卖总金额: {{ couponAmount }}</span></el-button> <el-button disabled size="mini" type="primary"><span>优惠卷售卖总金额: {{ totalSalesAmount }}</span></el-button>
<el-button disabled size="mini" type="primary"><span>申请退款总金额: {{ refundAmount }}</span></el-button> <el-button disabled size="mini" type="primary"><span>申请退款总金额: {{ totalRefundAmount }}</span></el-button>
<el-button disabled size="mini" type="primary"><span>实际退款总金额: {{ realRefundAmount }}</span></el-button> <el-button disabled size="mini" type="primary"><span>实际退款总金额: {{ totalRealRefundAmount }}</span>
</el-button>
</div> </div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单流水号" align="center" prop="orderNo" width="150"/> <el-table-column align="center" label="订单编号" prop="orderNo" width="150"/>
<el-table-column label="订单类型" align="center" prop="orderType"> <el-table-column label="订单类型" align="center" prop="orderType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/> <dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="会员昵称" align="center" prop="consumerName" />
<el-table-column label="手机号" align="center" prop="consumerPhone" width="110"/>
<el-table-column label="门店名称" align="center" prop="storeName" width="120"/> <el-table-column label="门店名称" align="center" prop="storeName" width="120"/>
<!-- <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="roomName" width="120"/> <el-table-column label="房间名称" align="center" prop="roomName" width="120"/>
<!-- <el-table-column label="房间名称" align="center" prop="roomId" width="120">--> <el-table-column align="center" label="会员手机号" prop="consumerPhone" width="110"/>
<!-- <template slot-scope="scope">--> <el-table-column align="center" label="会员昵称" prop="consumerName"/>
<!-- <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="packName" width="120"/> <el-table-column label="套餐名称" align="center" prop="packName" width="120"/>
<!-- <el-table-column label="套餐名称" align="center" prop="packId" width="120">--> <el-table-column align="center" label="套餐价格" prop="packPrice" width="100"/>
<!-- <template slot-scope="scope">--> <el-table-column align="center" label="订单时长" prop="timeLong" width="110"/>
<!-- <span v-for="item in packList" v-if="scope.row.packId === item.id">{{item.name}}</span>--> <el-table-column align="center" label="优惠卷类型" prop="platformType">
<!-- </template>--> <template slot-scope="scope">
<!-- </el-table-column>--> <dict-tag :options="dict.type.store_platform_type" :value="scope.row.platformType"/>
<el-table-column label="套餐金额" align="center" prop="packPrice" width="100"/> </template>
</el-table-column>
<el-table-column align="center" label="优惠券id" prop="couponSkuId" width="100"/>
<el-table-column label="优惠券名称" align="center" prop="couponName" width="100"/> <el-table-column label="优惠券名称" align="center" prop="couponName" width="100"/>
<!-- <template slot-scope="scope">--> <el-table-column align="center" label="优惠券原价" prop="couponPrice" width="100"/>
<!-- <span v-for="item in couponList" v-if="scope.row.couponId === item.id">{{item.name}}</span>--> <el-table-column align="center" label="优惠券促销价" prop="couponPayPrice" width="100"/>
<!-- </template>--> <el-table-column align="center" label="订单总价" prop="totalPrice"/>
<!-- </el-table-column>--> <el-table-column align="center" label="实际支付金额" prop="payPrice" width="100"/>
<el-table-column label="优惠券金额" align="center" prop="couponPrice" width="100"/> <el-table-column align="center" label="支付时间" prop="payTime" width="100">
<!-- &lt;!&ndash;先判断couponPrice是否为空,为空,遍历couponList,获取值&ndash;&gt;--> <template slot-scope="scope">
<!-- <template slot-scope="scope">--> <span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<!-- <span v-if="scope.row.couponPrice === null">--> </template>
<!-- <span v-for="item in couponList" v-if="scope.row.couponId === item.id">{{item.subPrice}}</span>--> </el-table-column>
<!-- </span>-->
<!-- <span v-else>{{scope.row.couponPrice}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="预约开始时间" align="center" prop="preStartDate" width="100"> <el-table-column label="预约开始时间" align="center" prop="preStartDate" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.preStartDate, '{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ parseTime(scope.row.preStartDate, '{y}-{m}-{d} {h}:{i}') }}</span>
...@@ -257,11 +246,6 @@ ...@@ -257,11 +246,6 @@
<span>{{ parseTime(scope.row.preEndDate, '{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ parseTime(scope.row.preEndDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到店时间" align="center" prop="arrivalTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.arrivalTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="startDate" width="100"> <el-table-column label="开始时间" align="center" prop="startDate" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d} {h}:{i}') }}</span>
...@@ -272,22 +256,9 @@ ...@@ -272,22 +256,9 @@
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单总价" align="center" prop="totalPrice" /> <el-table-column align="center" label="到店时间" prop="arrivalTime" width="100">
<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" width="110"/>
<el-table-column label="支付类型" align="center" prop="payType" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.store_pay_ways" :value="scope.row.payType"/> <span>{{ parseTime(scope.row.arrivalTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</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> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单状态" align="center" prop="status"> <el-table-column label="订单状态" align="center" prop="status">
...@@ -301,6 +272,16 @@ ...@@ -301,6 +272,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark"/> <el-table-column label="备注" align="center" prop="remark"/>
<!-- <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" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.payStatus == 1 && scope.row.status != 3" <el-button v-if="scope.row.payStatus == 1 && scope.row.status != 3"
...@@ -594,7 +575,9 @@ import {queryCouponList} from "@/api/system/consumerCoupon"; ...@@ -594,7 +575,9 @@ import {queryCouponList} from "@/api/system/consumerCoupon";
export default { export default {
name: "Order", name: "Order",
dicts: ['sys_normal_disable','store_order_type', 'store_coupon_type', 'store_is_use_coupon', 'store_order_status','store_pay_ways','order_pay_status','order_status_admin'], dicts: ['sys_normal_disable', 'store_order_type', 'store_coupon_type',
'store_is_use_coupon', 'store_order_status', 'store_pay_ways',
'order_pay_status', 'order_status_admin', 'store_platform_type'],
data() { data() {
const equalToPayAmount = (rule, value, callback) => { const equalToPayAmount = (rule, value, callback) => {
if (this.refundForm.payAmount < value) { if (this.refundForm.payAmount < value) {
...@@ -646,9 +629,9 @@ export default { ...@@ -646,9 +629,9 @@ export default {
usedAmount: 0, usedAmount: 0,
usedPayAmount: 0, usedPayAmount: 0,
refundAmount: 0, refundAmount: 0,
couponAmount: 0, totalSalesAmount: 0,
realRefundAmount: 0, totalRefundAmount: 0,
refundPayAmount: 0, totalRealRefundAmount: 0,
// 订单表格数据 // 订单表格数据
orderList: [], orderList: [],
// 弹出层标题 // 弹出层标题
...@@ -793,9 +776,9 @@ export default { ...@@ -793,9 +776,9 @@ export default {
this.totalPrice = response.totalAmount.toFixed(2); this.totalPrice = response.totalAmount.toFixed(2);
//计算实际支付金额,取3位小数 //计算实际支付金额,取3位小数
this.payPrice = response.amount.toFixed(2); this.payPrice = response.amount.toFixed(2);
this.couponAmount = response.couponAmount.toFixed(2); this.totalSalesAmount = response.totalSalesAmount.toFixed(2);
this.refundAmount = response.refundAmount.toFixed(2); this.totalRefundAmount = response.totalRefundAmount.toFixed(2);
this.realRefundAmount = response.realRefundAmount.toFixed(2); this.totalRealRefundAmount = response.totalRealRefundAmount.toFixed(2);
this.loading = false; this.loading = false;
}); });
......
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