Commit d18e25ac by 吕明尚

修改订单统计

parent 84faef18
......@@ -199,7 +199,7 @@
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="适用套餐" align="center" prop="packageId">
<el-table-column label="适用套餐" align="center" prop="packageId" width="250px">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
......
......@@ -134,7 +134,7 @@
</template>
---------------
</el-table-column>
<el-table-column label="适用套餐" align="center" prop="packIds">
<el-table-column label="适用套餐" align="center" prop="packIds" width="250px">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
......
......@@ -127,7 +127,7 @@
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="适用套餐" align="center" prop="packIds">
<el-table-column label="适用套餐" align="center" prop="packIds" width="250px">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
......
......@@ -127,7 +127,7 @@
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="适用套餐" align="center" prop="packIds">
<el-table-column label="适用套餐" align="center" prop="packIds" width="250px">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
......
......@@ -198,6 +198,11 @@
<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>实际总支付金额: {{ payPrice }}</span></el-button>
<el-button type="primary" size="mini" disabled><span>已使用总金额: {{ usedAmount }}</span></el-button>
<el-button type="primary" size="mini" disabled><span>已使用实付金额: {{ usedPayAmount }}</span></el-button>
<el-button type="primary" size="mini" disabled><span>以退款总金额: {{ refundAmount }}</span></el-button>
<el-button type="primary" size="mini" disabled><span>以退款实付金额: {{ refundPayAmount }}</span></el-button>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -528,6 +533,10 @@ export default {
totalPrice: 0,
//实际支付金额
payPrice: 0,
usedAmount: 0,
usedPayAmount: 0,
refundAmount: 0,
refundPayAmount: 0,
// 订单表格数据
orderList: [],
// 弹出层标题
......@@ -651,9 +660,13 @@ export default {
this.orderList = response.rows;
this.total = response.total;
//计算订单总价
this.totalPrice = response.rows.reduce((total, item) => total + item.totalPrice, 0);
this.totalPrice = response.totalAmount.toFixed(2);
//计算实际支付金额,取3位小数
this.payPrice = response.rows.reduce((total, item) => total + item.payPrice, 0).toFixed(3);
this.payPrice = response.amount.toFixed(2);
this.usedAmount = response.usedAmount.toFixed(2);
this.usedPayAmount = response.usedPayAmount.toFixed(2);
this.refundAmount = response.refundAmount.toFixed(2);
this.refundPayAmount = response.refundPayAmount.toFixed(2);
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