diff --git a/src/views/layout/components/main/order/index.vue b/src/views/layout/components/main/order/index.vue index 85f8459..7deb4c7 100644 --- a/src/views/layout/components/main/order/index.vue +++ b/src/views/layout/components/main/order/index.vue @@ -24,27 +24,30 @@ - - + - + - + - + - + @@ -103,14 +106,23 @@ export default { async getOrderList (orderSerch) { const res = await getOrderList(orderSerch) this.orderList = res.data.orderList - console.log(res.data.orderList) }, /** * @description: 表单提交 加入防抖 */ debouncedGetOrderList: debounce(function (val) { this.getOrderList(val) - }, 500) + }, 500), + /** + * @description: 表格求和 + */ + getSummaries () { + const sum = this.orderList.reduce((acc, order) => { + return acc + (order.total_price - order.refund_price) + }, 0) + const total = this.orderList.length + return ['合计', '', '', '', '', `共 ${total}单 ${sum}元`] + } }, watch: { shop_id (val) {