退款以及订单统计
This commit is contained in:
parent
0cf119bfab
commit
5c65399290
@ -16,3 +16,11 @@ export function cardValueRecordInfo(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 查询会员充值统计
|
||||
export function orderStatisticsApi(cardValueRecord) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValueRecord/orderStatistics',
|
||||
method: 'get',
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ export function cashierOrder(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据订单号查询油品订单信息
|
||||
export function orderStatisticsApi(query) {
|
||||
return request({
|
||||
@ -24,5 +25,3 @@ export function orderStatisticsApi(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,3 +26,12 @@ export function getGoodsOrder(data) {
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
// 查询商品订单统计
|
||||
export function orderStatisticsApi(query) {
|
||||
return request({
|
||||
url: '/business/order/orderStatistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -43,3 +43,13 @@ export function getOilNameList() {
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询所有油号
|
||||
export function oilNumbers() {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilNumber/getOilNumber',
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
@ -69,3 +69,14 @@ export function getOilOrderAllAmount(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 订单统计
|
||||
export function orderStatisticsApi(query) {
|
||||
return request({
|
||||
url: '/business/oilOrder/orderStatistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
17
fuintAdmin/src/api/order/refund.js
Normal file
17
fuintAdmin/src/api/order/refund.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 退款
|
||||
export function refundApi(data) {
|
||||
return request({
|
||||
url: '/business/allOrderInfo/refund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getOrderInfoApi(data) {
|
||||
return request({
|
||||
url: '/business/allOrderInfo/getOrderInfo',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
@ -76,3 +76,12 @@ export function exportUsers() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//下载示例文件
|
||||
export function queryUsers() {
|
||||
return request({
|
||||
url: '/business/userManager/user/userList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -456,6 +456,8 @@ export default {
|
||||
// 折合单价
|
||||
this.orderForm.discountedPrice = new BigNumber(this.orderForm.totalAmount).dividedBy(this.orderForm.purchaseVolume).toFixed(2);
|
||||
|
||||
this.orderForm.totalAmount = Number(this.orderForm.totalAmount);
|
||||
|
||||
// 复制id
|
||||
this.orderForm.purchaseId = this.purchaseId
|
||||
|
||||
|
@ -1,19 +1,7 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
@ -28,7 +16,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
@ -53,9 +41,29 @@
|
||||
<span>收银台订单统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokes?orderStatistics.numberOfStrokes:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">订单总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder?orderStatistics.theTotalAmountOfTheOrder:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实付总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid?orderStatistics.theTotalAmountPaid:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品优惠</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts?orderStatistics.oilDiscounts:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil?orderStatistics.theTotalAmountOfOil:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -63,10 +71,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>收银台订单列表</div>
|
||||
<div style="display: flex ">
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
|
||||
</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -84,34 +91,28 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="180"> </el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"> </el-table-column>
|
||||
<el-table-column
|
||||
prop="payAmount"
|
||||
label="实付金额">
|
||||
</el-table-column>
|
||||
<el-table-column prop="payAmount" label="实付金额"> </el-table-column>
|
||||
<el-table-column label="订单金额组成">
|
||||
<el-table-column
|
||||
prop="oilOrderAmount"
|
||||
label="油品金额">
|
||||
<el-table-column prop="oilOrderAmount" label="油品金额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.oilOrderAmount ? scope.row.oilOrderAmount : '0'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsOrderAmount"
|
||||
label="商品金额">
|
||||
<el-table-column prop="goodsOrderAmount" label="商品金额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.goodsOrderAmount ? scope.row.goodsOrderAmount : '0'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="payUser"
|
||||
label="付款用户">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="状态">
|
||||
<el-table-column prop="payUser" label="付款用户"> </el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status === 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">已退款</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -129,6 +130,7 @@
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status !== 'refund'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
@ -150,7 +152,7 @@
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 订单详情-->
|
||||
<!-- 订单详情-->
|
||||
<el-dialog
|
||||
title="订单详情"
|
||||
:visible.sync="dialogVisible">
|
||||
@ -188,7 +190,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="油号油枪" align="center" prop="terminal">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}号枪</span>
|
||||
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加油升数" align="center" prop="oilNum" >
|
||||
@ -226,13 +228,13 @@
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 订单退款-->
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.amount }}</span>
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -245,13 +247,13 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
|
||||
<br/>
|
||||
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回、优惠券、储值卡等原路退回处理</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -264,13 +266,15 @@ import {oilOrderList, oilOrders} from "@/api/order/oilorder";
|
||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
import {getOrderGoods} from "@/api/order/goodsorder";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
import {refundApi} from "@/api/order/refund";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
|
||||
data(){
|
||||
return{
|
||||
// 退款密码
|
||||
password:"",
|
||||
// 退款备注
|
||||
refundRemark:"",
|
||||
radio1:"油号选错",
|
||||
// 油号列表
|
||||
oilNameList:[],
|
||||
@ -293,21 +297,37 @@ import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
orderStatistics:{
|
||||
numberOfStrokes:'0',
|
||||
theTotalAmountOfTheOrder:'0',
|
||||
theTotalAmountPaid:'0',
|
||||
oilDiscounts:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheItem:'0',
|
||||
},
|
||||
total:0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
},
|
||||
methods:{
|
||||
|
||||
exportExcelCashier() {
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'收银台订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
},
|
||||
// 获取订单统计信息
|
||||
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
getRealName(list,val){
|
||||
let name = "";
|
||||
@ -339,9 +359,49 @@ import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
},
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
cashierOrder(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
//退款确定
|
||||
this.$confirm('是否将该收银台下的订单全部退款, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogRefund = true;
|
||||
cashierOrder(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
if (response.data.status === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
storeId: this.cashierOrder.storeId,
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
})
|
||||
},
|
||||
// 获取油号名称
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!--商品交易列表-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
@ -63,28 +63,41 @@
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>商品交易统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品笔数</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfProducts}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmount}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品总数量</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalNumberOfUnits}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">优惠金额</div>
|
||||
<div class="size-bole">{{orderStatistics.discountAmount}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
<div class="size-bole">{{orderStatistics.wechat}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">支付宝</div>
|
||||
<div class="size-bole">{{orderStatistics.alipay}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">现金</div>
|
||||
<div class="size-bole">{{orderStatistics.cash}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@ -92,7 +105,7 @@
|
||||
<div class="wgang">
|
||||
<div>商品交易列表</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelGoodsOrder()">导出订单</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelGoodsOrder()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
@ -111,9 +124,9 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单ID" prop="id" width="80"/>
|
||||
<!-- <el-table-column label="订单ID" prop="id" width="80"/>-->
|
||||
<el-table-column label="终端" align="center" prop="terminal"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="200"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="discount"/>
|
||||
<el-table-column label="商品数量" align="center" prop="goodsNum">
|
||||
@ -127,6 +140,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">已退款</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -141,17 +155,14 @@
|
||||
<span>{{ parseTime(scope.row.payTime) }}</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"-->
|
||||
<!-- >更多操作</el-button>-->
|
||||
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status !== 'refund'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
@ -167,6 +178,34 @@
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ goods.payAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ goods.orderNo }}</div>
|
||||
<div style="margin: 10px 0">
|
||||
退款原因<br/>
|
||||
<el-radio-group v-model="radio1" style="margin: 10px 0">
|
||||
<el-radio-button label="油号选错"></el-radio-button>
|
||||
<el-radio-button label="金额错误"></el-radio-button>
|
||||
<el-radio-button label="其他原因"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
|
||||
<br/>
|
||||
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回、优惠券、储值卡等原路退回处理</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 商品购买详情 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
@ -184,10 +223,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderGoods, listOrder} from "@/api/order/goodsorder";
|
||||
import {getGoodsOrder, getOrderGoods, listOrder,orderStatisticsApi} from "@/api/order/goodsorder";
|
||||
import { queryStaffs } from "@/api/order/staff";
|
||||
import { getDicts } from "@/api/order/data";
|
||||
import { exportExcelGoodsOrderApi } from "@/api/order/exportExcel";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/order/refund";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -221,24 +261,109 @@ export default {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
orderGoods:'',
|
||||
// 支付列表
|
||||
payList:[],
|
||||
dialogRefund: false,
|
||||
radio1:"油号选错",
|
||||
goods:{},
|
||||
refundRemark:"",
|
||||
|
||||
orderStatistics: {
|
||||
numberOfProducts:'0',
|
||||
theTotalAmount:'0',
|
||||
theTotalNumberOfUnits:'0',
|
||||
discountAmount:'0',
|
||||
wechat:'0',
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
this.getPayList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelGoodsOrder() {
|
||||
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'商品订单统计.xLsx')
|
||||
})
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'商品订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics (){
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data;
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 退款
|
||||
async handleRefund(id){
|
||||
|
||||
await getGoodsOrder({"id":id}).then( response => {
|
||||
this.goods = response.data
|
||||
if (response.data.status === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let title = '是否将该收银台下的订单全部退款'
|
||||
await getOrderInfoApi({orderNo: this.goods.orderNo,
|
||||
type: 'goods'}).then(res=>{
|
||||
if (res.code === 200) {
|
||||
if (res.data.type === "1") {
|
||||
title = '该订单下有其它商品订单,是否一并退款'
|
||||
this.goods.payAmount = res.data.money
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.$confirm(title+', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogRefund = true;
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
});
|
||||
|
||||
},
|
||||
// 退款接口
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
console.log("cashierOrder",this.goods)
|
||||
let map={
|
||||
orderNo: this.goods.orderNo,
|
||||
storeId: this.goods.storeId,
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
if (res.code === 200){
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.created()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
let name = "";
|
||||
@ -271,7 +396,7 @@ export default {
|
||||
getGoods(id){
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
getOrderGoods(id).then( response => {
|
||||
getOrderGoods({orderId:id}).then( response => {
|
||||
this.goodsList = response.data
|
||||
})
|
||||
},
|
||||
@ -322,6 +447,7 @@ export default {
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
|
@ -1,113 +1,141 @@
|
||||
<!--油品订单-->
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.staffId"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端" prop="terminal">
|
||||
<el-select
|
||||
v-model="queryParams.terminal"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in terminalList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payType">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in payList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="油枪号" prop="oilGunNum">
|
||||
<el-select
|
||||
v-model="queryParams.oilGunNum"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in oilNumList"
|
||||
:key="item.id"
|
||||
:label="item.oilGunNum"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.staffId"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端" prop="terminal">
|
||||
<el-select
|
||||
v-model="queryParams.terminal"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in terminalList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payType">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in payList"
|
||||
:key="item.id"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="油枪号" prop="oilGunNum">
|
||||
<el-select
|
||||
v-model="queryParams.oilGunNum"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in oilGunList"
|
||||
:key="item.id"
|
||||
:label="item.gunName"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ item.oilName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>油品订单统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品笔数</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfOilPens}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">优惠总额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">交易数量</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实收总额</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
<div class="size-bole">{{orderStatistics.wechat}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">支付宝</div>
|
||||
<div class="size-bole">{{orderStatistics.alipay}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">现金</div>
|
||||
<div class="size-bole">{{orderStatistics.cash}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>油品订单列表</div>
|
||||
<div style="display: flex ">
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -117,7 +145,7 @@
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="用户信息">
|
||||
<span>{{ props.row.userId ? queryUser(props.row.userId):"--" }}</span>
|
||||
<span>{{ props.row.userId ? queryUser(userList,props.row.userId):"--" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ queryStaf(staffList,props.row.staffId) }}</span>
|
||||
@ -137,74 +165,50 @@
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单号"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column label="订单信息" align="center">
|
||||
<el-table-column
|
||||
prop="oilGunNum"
|
||||
label="油品/油枪" align="center"
|
||||
width="120">
|
||||
<el-table-column prop="oilGunNum" label="油品/油枪" align="center" width="120">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}</span>
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderAmount"
|
||||
label="订单金额" align="center"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="discountAmount"
|
||||
label="优惠金额" align="center"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderAmount" label="订单金额" align="center" width="120"> </el-table-column>
|
||||
<el-table-column prop="discountAmount" label="优惠金额" align="center" width="120"> </el-table-column>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="付款信息" align="center">
|
||||
<el-table-column
|
||||
prop="payAmount"
|
||||
label="实付金额" align="center"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payUser"
|
||||
label="付款用户" align="center"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderStatus"
|
||||
label="付款状态" align="center"
|
||||
width="120">
|
||||
<el-table-column prop="payAmount" label="实付金额" align="center" width="120"> </el-table-column>
|
||||
<el-table-column prop="payUser" label="付款用户" align="center" > </el-table-column>
|
||||
<el-table-column prop="payType" label="付款方式" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.orderStatus == 'paid'">已支付</el-tag>
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus === 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.orderStatus === 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.orderStatus === 'refund'">已退款</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="invoicing"
|
||||
label="开票标识" align="center"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
|
||||
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime):"--" }}</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" >更多操作</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
v-if = "scope.row.status !== 'refund'"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -223,7 +227,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
@ -242,13 +246,13 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
|
||||
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
|
||||
<br/>
|
||||
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回、优惠券、储值卡等原路退回处理</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -257,18 +261,21 @@
|
||||
<script>
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {getOilNameList, getOilNumGun } from "@/api/order/oilnumgun";
|
||||
import {listOilOrder, oilOrderInfo} from "@/api/order/oilorder";
|
||||
import {getUser} from "@/api/order/user";
|
||||
import {getOilNameList, getOilNumGun, oilNumbers} from "@/api/order/oilnumgun";
|
||||
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/order/oilorder";
|
||||
import {getUser, queryUsers} from "@/api/order/user";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
|
||||
|
||||
export default {
|
||||
name: "order_Oil",
|
||||
data(){
|
||||
return{
|
||||
// 会员信息
|
||||
userName:"",
|
||||
oilOrder:{},
|
||||
// 退款密码
|
||||
password:"",
|
||||
refundRemark:"",
|
||||
radio1:"油号选错",
|
||||
dialogRefund:false,
|
||||
// 员工列表
|
||||
@ -285,19 +292,37 @@
|
||||
dateRange: [],
|
||||
// 油品订单列表
|
||||
oilOrderList:[],
|
||||
payTypeList:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total:0,
|
||||
// 油枪列表
|
||||
oilGunList:[],
|
||||
// 用户列表
|
||||
userList:[],
|
||||
|
||||
|
||||
orderStatistics: {
|
||||
numberOfOilPens:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheOffer:'0',
|
||||
numberOfTransactions:'0',
|
||||
totalAmountReceived:'0',
|
||||
wechat:'0',
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getStaffList();
|
||||
this.getOrderStatistics();
|
||||
this.getList();
|
||||
this.getPayType();
|
||||
this.getOilGunList();
|
||||
this.getUserList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelOilOrder() {
|
||||
@ -305,7 +330,39 @@
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'油品订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
getUserList(){
|
||||
queryUsers().then(res => {
|
||||
this.userList = res.data
|
||||
})
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
getOilNumberGun().then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (item.oilGunList.length>0){
|
||||
item.oilGunList.forEach(i => {
|
||||
i.oilName = item.oilName
|
||||
this.oilGunList.push(i)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getPayType(){
|
||||
getDicts("payment_type").then(res => {
|
||||
this.payTypeList = res.data
|
||||
})
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi().then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.orderNo
|
||||
@ -316,11 +373,56 @@
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
oilOrderInfo(id).then( response => {
|
||||
async handleRefund(id){
|
||||
await oilOrderInfo(id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
|
||||
let title = '是否将该收银台下的订单全部退款'
|
||||
await getOrderInfoApi({orderNo: this.oilOrder.orderNo,
|
||||
type: 'oil'}).then(res=>{
|
||||
if (res.code === 200) {
|
||||
if (res.data.type === "1") {
|
||||
title = '该订单下有其它商品订单,是否一并退款'
|
||||
this.oilOrder.payAmount = res.data.money
|
||||
}
|
||||
}
|
||||
});
|
||||
//退款确定
|
||||
this.$confirm(title+', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogRefund = true;
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消退款'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
let map={
|
||||
orderNo: this.oilOrder.orderNo,
|
||||
storeId: this.oilOrder.storeId,
|
||||
refundRemark:this.radio1 +"-"+ this.refundRemark,
|
||||
type: "canRefund"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.created()
|
||||
})
|
||||
},
|
||||
// 根据员工id查询员工信息
|
||||
queryStaf(list,id){
|
||||
@ -332,14 +434,23 @@
|
||||
})
|
||||
return name;
|
||||
},
|
||||
getType(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.dictValue == val){
|
||||
name = item.dictLabel
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 根据id查询会员信息
|
||||
async queryUser(id){
|
||||
let result = "";
|
||||
if (id!=null && id!=""){
|
||||
let data = await getUser(id);
|
||||
result = data.data.name + "|" + data.data.mobile
|
||||
}
|
||||
return result.toString();
|
||||
queryUser(list,id){
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
this.userName = item.name + "|" + item.mobile
|
||||
}
|
||||
})
|
||||
return this.userName;
|
||||
},
|
||||
getVal(list,val){
|
||||
let name = "";
|
||||
@ -364,6 +475,7 @@
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
@ -389,8 +501,8 @@
|
||||
getOilNameList().then( response => {
|
||||
this.oilNameList = response.data;
|
||||
})
|
||||
getOilNumGun({oilNum : "全部"}).then( response => {
|
||||
this.oilNumList = response.data
|
||||
oilNumbers().then(response => {
|
||||
this.oilNumList = response.data;
|
||||
})
|
||||
},
|
||||
// 获取油号名称
|
||||
@ -407,6 +519,19 @@
|
||||
}
|
||||
return name;
|
||||
},
|
||||
// 获取油枪名称
|
||||
getName1(oilNameList,id){
|
||||
let name = ""
|
||||
let _this = this;
|
||||
if(oilNameList!=null && oilNameList!=""){
|
||||
oilNameList.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.gunName;
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!--普通收款订单-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
@ -36,15 +36,35 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- 统计-->
|
||||
<!-- 统计-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>小程序订单统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokes }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">订单总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实付总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品优惠</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -52,9 +72,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>小程序订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelApplet()">导出订单</el-button>
|
||||
</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelApplet()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -75,7 +95,7 @@
|
||||
<el-table-column
|
||||
prop="terminal"
|
||||
label="终端"
|
||||
width="180">
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{getType(terminalList,scope.row.terminal)}}</span>
|
||||
</template>
|
||||
@ -83,7 +103,7 @@
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单号"
|
||||
width="180">
|
||||
width="220">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
@ -125,15 +145,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="getOrdersInfo(scope.row.id)"-->
|
||||
<!-- type="success" plain round>详情</el-button>-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="getOrdersInfo(scope.row.id)"-->
|
||||
<!-- type="success" plain round>详情</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -149,12 +169,22 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
|
||||
<!-- <pagination-->
|
||||
<!-- background-->
|
||||
<!-- v-show="total>0"-->
|
||||
<!-- layout="prev, pager, next"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :page.sync="queryParams.page"-->
|
||||
<!-- :limit.sync="queryParams.pageSize"-->
|
||||
<!-- @pagination="getList"-->
|
||||
<!-- />-->
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
@ -186,7 +216,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cashierOrder, listCashierOrder} from "@/api/order/cashierorder";
|
||||
import {cashierOrder, listCashierOrder,orderStatisticsApi} from "@/api/order/cashierorder";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
@ -222,68 +252,34 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
},
|
||||
// tableData: [{
|
||||
// date: '2016-05-03',
|
||||
// name: '王小狼',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }]
|
||||
orderStatistics:{
|
||||
numberOfStrokes:'0',
|
||||
theTotalAmountOfTheOrder:'0',
|
||||
theTotalAmountPaid:'0',
|
||||
oilDiscounts:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheItem:'0',
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
|
||||
this.getTerList();
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
exportExcelApplet() {
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'小程序订单统计.xLsx')
|
||||
})
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'小程序订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 获取订单统计信息
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
getRealName(list,val){
|
||||
@ -340,7 +336,11 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(){
|
||||
getList(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
console.log("123123123",this.queryParams)
|
||||
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
@ -350,6 +350,7 @@ import { exportExcelCashierApi } from "@/api/order/exportExcel";
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
|
@ -1,19 +1,19 @@
|
||||
<!--未支付订单-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
@ -27,21 +27,21 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="支付类型" prop="payType">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.payType"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in payList"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.dictLabel"-->
|
||||
<!-- :value="item.dictValue">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="支付类型" prop="payType">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.payType"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in payList"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.dictLabel"-->
|
||||
<!-- :value="item.dictValue">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input>
|
||||
<el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="油枪号" prop="oilGunNum">
|
||||
<el-select
|
||||
@ -50,30 +50,30 @@
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in oilNumList"
|
||||
<el-option v-for="item in oilGunList"
|
||||
:key="item.id"
|
||||
:label="item.oilGunNum"
|
||||
:label="item.gunName"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</span>
|
||||
<span style="float: left">{{ item.oilName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}号枪</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -85,19 +85,48 @@
|
||||
<span>未支付订单统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品笔数</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfOilPens}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">优惠总额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">交易数量</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实收总额</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
<div class="size-bole">{{orderStatistics.wechat}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">支付宝</div>
|
||||
<div class="size-bole">{{orderStatistics.alipay}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">现金</div>
|
||||
<div class="size-bole">{{orderStatistics.cash}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>未支付订单列表</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -118,7 +147,7 @@
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="oils" label="油品/油枪" align="center">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}号枪</span>
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单信息" align="center">
|
||||
@ -137,23 +166,23 @@
|
||||
|
||||
<el-table-column prop="createTime" label="交易时间" align="center"></el-table-column>
|
||||
|
||||
<el-table-column prop="orderStatus" align="center" label="支付状态">
|
||||
<el-table-column prop="orderStatus" label="支付状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="info" v-else>支付失败</el-tag>
|
||||
</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"-->
|
||||
<!-- >更多操作</el-button>-->
|
||||
<!-- <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"-->
|
||||
<!-- >更多操作</el-button>-->
|
||||
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
@ -175,7 +204,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listOilOrder} from "@/api/order/oilorder";
|
||||
import {listOilOrder,orderStatisticsApi} from "@/api/order/oilorder";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {getOilNameList, getOilNumGun} from "@/api/order/oilnumgun";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
@ -211,61 +240,24 @@
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
},
|
||||
// tableData: [{
|
||||
// date: '2016-05-03',
|
||||
// name: '王小狼',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }]
|
||||
orderStatistics: {
|
||||
numberOfOilPens:'0',
|
||||
theTotalAmountOfOil:'0',
|
||||
theTotalAmountOfTheOffer:'0',
|
||||
numberOfTransactions:'0',
|
||||
totalAmountReceived:'0',
|
||||
wechat:'0',
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
},
|
||||
oilGunList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getPayList();
|
||||
this.getOilGunList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelOilOrder() {
|
||||
@ -275,6 +267,40 @@
|
||||
this.$download.saveAs(blob,'未支付订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
getOilNumberGun().then(res => {
|
||||
console.log(res)
|
||||
res.data.forEach(item => {
|
||||
if (item.oilGunList.length>0){
|
||||
item.oilGunList.forEach(i => {
|
||||
i.oilName = item.oilName
|
||||
this.oilGunList.push(i)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取油枪名称
|
||||
getName1(oilNameList,id){
|
||||
let name = ""
|
||||
let _this = this;
|
||||
if(oilNameList!=null && oilNameList!=""){
|
||||
oilNameList.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.gunName;
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
},
|
||||
// 获取订单统计信息
|
||||
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
getRealName(list,val){
|
||||
let name = "";
|
||||
|
@ -1,20 +1,20 @@
|
||||
<!--会员充值订单-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 条件查询-->
|
||||
<div>
|
||||
<!-- 条件查询-->
|
||||
<el-card class="box-card">
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
@ -44,45 +44,69 @@
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- 统计-->
|
||||
<!-- 统计-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>会员充值统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
||||
<div class="size-hui">订单总数</div>
|
||||
<div class="size-bole">55</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="size-hui">充值笔数</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTopUps?orderStatistics.numberOfTopUps:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTopUp?orderStatistics.theTotalAmountOfTopUp:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">赠送总额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheCredit?orderStatistics.theTotalAmountOfTheCredit:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实收总额</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived?orderStatistics.totalAmountReceived:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
<div class="size-bole">{{orderStatistics.wechat?orderStatistics.wechat:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">支付宝</div>
|
||||
<div class="size-bole">{{orderStatistics.alipay?orderStatistics.alipay:0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">现金</div>
|
||||
<div class="size-bole">{{orderStatistics.cash}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 表格-->
|
||||
<!-- 表格-->
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>会员充值列表</div>
|
||||
<div style="display: flex ">
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelVip()">导出订单</el-button>
|
||||
</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelVip()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -138,13 +162,13 @@
|
||||
</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">更多操作</el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -165,7 +189,7 @@
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 订单退款-->
|
||||
<!-- 订单退款-->
|
||||
<el-dialog
|
||||
title="订单退款"
|
||||
width="25%"
|
||||
@ -190,17 +214,18 @@
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cardValueRecordInfo, listCardValueRecord} from "@/api/order/cardvaluerecord";
|
||||
import {cardValueRecordInfo, listCardValueRecord,orderStatisticsApi} from "@/api/order/cardvaluerecord";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import { exportExcelVipApi } from "@/api/order/exportExcel";
|
||||
import {refundApi} from "@/api/order/refund";
|
||||
|
||||
|
||||
export default {
|
||||
@ -232,69 +257,37 @@ export default {
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
},
|
||||
// tableData: [{
|
||||
// date: '2016-05-03',
|
||||
// name: '王小狼',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }]
|
||||
|
||||
orderStatistics: {
|
||||
numberOfTopUps:'',
|
||||
theTotalAmountOfTopUp:'',
|
||||
theTotalAmountOfTheCredit:'',
|
||||
totalAmountReceived:'',
|
||||
wechat:'',
|
||||
alipay:'',
|
||||
cash:'',
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
methods:{
|
||||
exportExcelVip() {
|
||||
exportExcelVipApi(this.queryParams).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'商品订单统计.xLsx')
|
||||
})
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'会员充值订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
getOrderStatistics () {
|
||||
orderStatisticsApi().then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.name
|
||||
@ -311,6 +304,22 @@ export default {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
},
|
||||
|
||||
refundConfirmed() {
|
||||
this.dialogRefund = false;
|
||||
// 退款确定
|
||||
// cashierOrder
|
||||
console.log("oilOrder",this.oilOrder)
|
||||
let map={
|
||||
orderNo: this.oilOrder.paymentNo,
|
||||
// refundAmt: this.oilOrder.paymentNo,
|
||||
storeId: this.oilOrder.storeId,
|
||||
type: "oilOrder"
|
||||
}
|
||||
refundApi(map).then(res=>{
|
||||
|
||||
})
|
||||
},
|
||||
getType(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
@ -333,6 +342,7 @@ export default {
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
|
@ -55,6 +55,6 @@ public interface StockStatisticService extends IService<StockStatistic> {
|
||||
public void deleteStock(Integer goodsId);
|
||||
|
||||
public int editStock(StockStatistic stock);
|
||||
|
||||
int editStockCostAmount(StockStatistic stock);
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -240,12 +241,12 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
// 添加统计信息
|
||||
public boolean addStockStatistic(LJGoodsDto goods) {
|
||||
StockStatistic stock = new StockStatistic();
|
||||
stock.setId(goods.getId());
|
||||
stock.setGoodsId(goods.getId());
|
||||
BigDecimal Price = new BigDecimal(goods.getBuyingPrice());
|
||||
BigDecimal Stock = new BigDecimal(goods.getStock());
|
||||
BigDecimal multiply = Price.multiply(Stock);
|
||||
stock.setCostAmount(multiply.doubleValue());
|
||||
int i = stockService.editStock(stock);
|
||||
int i = stockService.editStockCostAmount(stock);
|
||||
|
||||
return i>0;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -98,4 +99,13 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int editStockCostAmount(StockStatistic stock) {
|
||||
LambdaUpdateWrapper<StockStatistic> lambdaUpdateWrapper = new LambdaUpdateWrapper();
|
||||
lambdaUpdateWrapper.set(StockStatistic::getCostAmount,stock.getCostAmount());
|
||||
lambdaUpdateWrapper.eq(StockStatistic::getGoodsId,stock.getGoodsId());
|
||||
return baseMapper.update(stock,lambdaUpdateWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -95,12 +95,19 @@
|
||||
bid_balance bidBalance,
|
||||
recharge_balance rechargeBalance,
|
||||
gift_balance giftBalance,
|
||||
payment_type paymentType,
|
||||
CASE
|
||||
WHEN payment_type = 'WECHAT' THEN '微信支付'
|
||||
WHEN payment_type = 'ALIPAY' THEN '支付宝支付'
|
||||
WHEN payment_type = 'CASH' THEN '现金支付'
|
||||
ELSE '其他'
|
||||
END AS paymentType,
|
||||
|
||||
CASE
|
||||
WHEN pay_status = 'paid' THEN '已支付'
|
||||
WHEN pay_status = 'payFail' THEN '支付失败'
|
||||
WHEN pay_status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
WHEN pay_status = 'refund' THEN '已退款'
|
||||
ELSE '未知'
|
||||
END AS payStatus,
|
||||
remark remark,
|
||||
fringe_benefit fringeBenefit,
|
||||
@ -124,6 +131,8 @@
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by create_time desc
|
||||
|
||||
</select>
|
||||
<select id="cardStream" resultType="java.util.Map">
|
||||
SELECT
|
||||
|
@ -563,7 +563,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
if (ObjectUtil.isEmpty(ljUserVos.getGrowthValue())) ljUserVos.setGrowthValue(0);
|
||||
|
||||
// 计算之后修改对应余额
|
||||
BigDecimal bigBidBalance = new BigDecimal(cardValueRecordDTO.getBidBalance());
|
||||
BigDecimal bigBidBalance = new BigDecimal(cardValueRecordDTO.getRechargeBalance());
|
||||
|
||||
BigDecimal addCardValance = bigBidBalance.add(new BigDecimal(ljUserVos.getCardBalance())); //
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
WHEN co.status = 'paid' THEN '已支付'
|
||||
WHEN co.status = 'payFail' THEN '支付失败'
|
||||
WHEN co.status = 'unpaid' THEN '未支付'
|
||||
WHEN co.status = 'refund' THEN '已退款'
|
||||
ELSE '未知'
|
||||
END AS status,
|
||||
co.pay_time payTime
|
||||
@ -72,6 +73,7 @@
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by co.create_time Desc
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
@ -66,12 +66,18 @@
|
||||
oo.goods_num goodsNum,
|
||||
oo.pay_amount payAmount,
|
||||
oo.pay_user payUser,
|
||||
oo.pay_type payType,
|
||||
CASE
|
||||
WHEN oo.pay_type = 'WECHAT' THEN '微信支付'
|
||||
WHEN oo.pay_type = 'ALIPAY' THEN '支付宝支付'
|
||||
WHEN oo.pay_type = 'CASH' THEN '现金支付'
|
||||
ELSE '其他'
|
||||
END AS payType,
|
||||
oo.pay_time payTime,
|
||||
CASE
|
||||
WHEN oo.status = 'paid' THEN '已支付'
|
||||
WHEN oo.status = 'payFail' THEN '支付失败'
|
||||
WHEN oo.status = 'unpaid' THEN '未支付'
|
||||
WHEN oo.status = 'refund' THEN '已退款'
|
||||
ELSE '未知'
|
||||
END AS status
|
||||
from mt_order oo
|
||||
@ -97,6 +103,7 @@
|
||||
and date_format(oo.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by oo.create_time desc
|
||||
</select>
|
||||
<select id="goodsStream" resultType="java.util.Map">
|
||||
SELECT
|
||||
|
@ -116,7 +116,7 @@
|
||||
co.terminal terminal,
|
||||
onu.oil_name oilName,
|
||||
co.order_no orderNo,
|
||||
CONCAT(onu.oil_name ,'/', co.oil_gun_num) oilGunNum,
|
||||
CONCAT(onu.oil_name ,'/', og.gun_name) oilGunNum,
|
||||
co.order_amount orderAmount,
|
||||
co.discount_amount discountAmount,
|
||||
co.pay_amount payAmount,
|
||||
@ -125,12 +125,14 @@
|
||||
WHEN co.order_status = 'paid' THEN '已支付'
|
||||
WHEN co.order_status = 'payFail' THEN '支付失败'
|
||||
WHEN co.order_status = 'unpaid' THEN '未支付'
|
||||
ELSE '未知'
|
||||
WHEN co.order_status = 'refund' THEN '已退款'
|
||||
ELSE '未知'
|
||||
END AS orderStatus,
|
||||
co.invoicing invoicing,
|
||||
co.pay_time payTime
|
||||
from oil_order co
|
||||
left join oil_name onu on co.oils = onu.id
|
||||
left join oil_gun og on co.oil_gun_num = og.id
|
||||
left join mt_staff st on co.staff_id = st.id
|
||||
<where>
|
||||
co.store_id = #{order.storeId}
|
||||
@ -165,6 +167,7 @@
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by co.create_time desc
|
||||
</select>
|
||||
<select id="oilStream" resultType="java.util.Map">
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.order.mapper.OrderGoodsMapper">
|
||||
<sql id="selectOrderGoods">
|
||||
select mog.id,mog.order_id,mog.goods_id,mg.name,mg.retail_price,mg.member_price,mog.num
|
||||
select mog.id,mog.order_id,mog.goods_id as goods_id,mg.id as goodsId,mg.name,mg.retail_price,mg.member_price,mog.num
|
||||
from mt_order_goods mog inner join mt_goods mg on mog.goods_id = mg.id
|
||||
</sql>
|
||||
|
||||
|
@ -60,7 +60,7 @@ public interface AllOrderInfoService {
|
||||
public int getOrderNum(Integer StoreId);
|
||||
|
||||
|
||||
Integer getOrderInfo(String orderNo, String type);
|
||||
Map<String,String> getOrderInfo(String orderNo, String type);
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -127,7 +128,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
LJOrderService ljOrderService;
|
||||
@Resource
|
||||
StockTrackService service;
|
||||
|
||||
@Resource
|
||||
OrderGoodsService orderGoodsService;
|
||||
@Resource
|
||||
OilTankService oilTankService;
|
||||
@ -151,14 +152,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
// 判断是否有退款金额 && ObjectUtil.isNotEmpty(map.get("refundAmt") // 目前全退
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfo.getPayMoney())) {
|
||||
Integer money = (int)(allOrderInfo.getPayMoney() * 100);
|
||||
|
||||
// 总金额(金钱的传值需要×100)
|
||||
BigDecimal payMoneyBig = new BigDecimal(allOrderInfo.getPayMoney().toString());
|
||||
BigDecimal payMoneyBefBig = payMoneyBig.multiply(new BigDecimal("100"));
|
||||
// BigDecimal payMoneyBig = new BigDecimal(allOrderInfo.getPayMoney().toString());
|
||||
// BigDecimal payMoneyBefBig = payMoneyBig.multiply(new BigDecimal("100")).stripTrailingZeros();
|
||||
// 退款金额(暂不支持部分退款)
|
||||
// BigDecimal refundAmtBig = new BigDecimal(map.get("refundAmt"));
|
||||
// BigDecimal refundAmtBefBig = refundAmtBig.multiply(new BigDecimal("100"));
|
||||
map.put("totalAmt",payMoneyBefBig.stripTrailingZeros().toString());
|
||||
map.put("refundAmt",payMoneyBefBig.stripTrailingZeros().toString());
|
||||
map.put("totalAmt",money.toString());
|
||||
map.put("refundAmt",money.toString());
|
||||
|
||||
map.put("orderNo",allOrderInfo.getOrderNo());
|
||||
map.put("payType",allOrderInfo.getPayType());
|
||||
@ -172,49 +175,59 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
} else {
|
||||
throw new RuntimeException("该订单类型不支持退款!");
|
||||
}
|
||||
|
||||
boolean flag = false;
|
||||
if (!"CASH".equals(allOrderInfo.getPayType())) {
|
||||
refund = fyPayService.refund(map);
|
||||
}else {
|
||||
// 现金退款处理
|
||||
refund.put("result_msg","SUCCESS");
|
||||
flag = true;
|
||||
}
|
||||
log.info("支付返回信息{}",refund.get("result_msg"));
|
||||
// 处理退款结果
|
||||
if ("SUCCESS".equals(refund.get("result_msg"))) {
|
||||
// 修改该总订单的数据
|
||||
allOrderInfo.setStatus("refund");
|
||||
allOrderInfo.setReasonRefund(map.get("refundRemark"));
|
||||
allOrderInfo.setRefOrderNo(map.get("refundOrderNo"));
|
||||
baseMapper.updateById(allOrderInfo);
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(map.get("orderNo"));
|
||||
// 处理商品订单
|
||||
LJOrder ljOrder = ljOrderService.selectGoodsOrder(map.get("orderNo"));
|
||||
// 处理收银台订单
|
||||
CashierOrder orderNo = cashierOrderService.selectCashierOrder(map.get("orderNo"));
|
||||
if (ObjectUtil.isNotEmpty(orderNo)) {
|
||||
orderNo.setStatus("refund");
|
||||
cashierOrderService.updateById(orderNo);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(oilOrder)) {
|
||||
disposeOil(oilOrder,map.get("refundOrderNo"));
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(ljOrder)) {
|
||||
disposeGoods(ljOrder,map.get("refundOrderNo"));
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
return 1;// 当前为现金支付
|
||||
}
|
||||
}else {
|
||||
throw new RuntimeException("退款失败");
|
||||
}
|
||||
|
||||
// 处理退款结果
|
||||
if (ObjectUtil.isNotEmpty(refund.get("result_msg"))) {
|
||||
if ("SUCCESS".equals(refund.get("result_msg"))) {
|
||||
// 修改该总订单的数据
|
||||
allOrderInfo.setStatus("refund");
|
||||
allOrderInfo.setReasonRefund(map.get("refundRemark"));
|
||||
allOrderInfo.setRefOrderNo(map.get("refundOrderNo"));
|
||||
baseMapper.updateById(allOrderInfo);
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(map.get("orderNo"));
|
||||
// 处理商品订单
|
||||
LJOrder ljOrder = ljOrderService.selectGoodsOrder(map.get("orderNo"));
|
||||
// 处理收银台订单
|
||||
CashierOrder orderNo = cashierOrderService.selectCashierOrder(map.get("orderNo"));
|
||||
if (ObjectUtil.isNotEmpty(orderNo)) {
|
||||
orderNo.setStatus("refund");
|
||||
cashierOrderService.updateById(orderNo);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(oilOrder)) {
|
||||
disposeOil(oilOrder,map.get("refundOrderNo"));
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(ljOrder)) {
|
||||
disposeGoods(ljOrder,map.get("refundOrderNo"));
|
||||
}
|
||||
}else {
|
||||
throw new RuntimeException("退款失败");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("退款失败");
|
||||
}
|
||||
|
||||
log.info("refund{}",refund);
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static String formatBigDecimal(BigDecimal value) {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("0.00");
|
||||
return decimalFormat.format(value);
|
||||
}
|
||||
// 处理商户号
|
||||
private Map<String, String> getMerchantConfig(AllOrderInfo allOrderInfo){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
@ -264,11 +277,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
ljOrder.setStatus("refund");
|
||||
ljOrderService.updateById(ljOrder);
|
||||
// 获取订单的商品数据
|
||||
|
||||
|
||||
|
||||
List<OrderGoodsVo> orderGoodsVos = orderGoodsService.selectOrderGoods(ljOrder.getId());
|
||||
// 处理库存
|
||||
for (OrderGoodsVo orderGoodsVo : orderGoodsVos) {
|
||||
LJGoodsDto goods = new LJGoodsDto();
|
||||
goods.setId(orderGoodsVo.getOrderId());
|
||||
goods.setId(orderGoodsVo.getGoodsId());
|
||||
goods.setNumberOfChanges(ljOrder.getGoodsNum());
|
||||
goods.setDocument("商品退款");
|
||||
goods.setOddNumber(refundOrderNo);
|
||||
@ -281,22 +297,27 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
/**
|
||||
* 查询退款提醒
|
||||
*/
|
||||
public Integer getOrderInfo(String orderNo, String type) {
|
||||
public Map<String,String> getOrderInfo(String orderNo, String type) {
|
||||
Map<String,String> res = new HashMap<>();
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(orderNo);
|
||||
// 处理商品订单
|
||||
LJOrder ljOrder = ljOrderService.selectGoodsOrder(orderNo);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
res.put("type","0");
|
||||
|
||||
if ("oil".equals(type)) {
|
||||
if (ObjectUtil.isNotEmpty(ljOrder)) {
|
||||
return 1;
|
||||
res.put("money",cashierOrder.getPayAmount().toString());
|
||||
res.put("type","1");
|
||||
}
|
||||
}else if ("goods".equals(type)) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrder)) {
|
||||
return 1;
|
||||
res.put("money",cashierOrder.getPayAmount().toString());
|
||||
res.put("type","1");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -155,12 +155,12 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
}
|
||||
|
||||
LJStaff ljStaff = iljStaffService.selectStaffById(nowAccountInfo.getStaffId());
|
||||
String handover = iSysDictDataService.selectDictLabel("handover", ljStaff.getHandoverMode());
|
||||
String handoverType = "未知";
|
||||
// String handover = iSysDictDataService.selectDictLabel("handover", ljStaff.getHandoverMode());
|
||||
String handoverType = "暂无";
|
||||
|
||||
if (!ObjectUtil.isEmpty(handover)) {
|
||||
handoverType = handover;
|
||||
}
|
||||
// if (!ObjectUtil.isEmpty(handover)) {
|
||||
// handoverType = handover;
|
||||
// }
|
||||
// 填充 baseInfo
|
||||
Map<String, Object> baseInfo = new HashMap<>();
|
||||
baseInfo.put("storeName", mtStore.getName());
|
||||
@ -168,8 +168,8 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
baseInfo.put("handoverType", handoverType);
|
||||
baseInfo.put("startTime", startTime);
|
||||
baseInfo.put("endTime", formattedEndTime);
|
||||
baseInfo.put("handoverPrem", ljStaff.getHandoverPrem()); // 交班权限
|
||||
baseInfo.put("handoverOut", ljStaff.getHandoverOut()); // 交班是否退出
|
||||
// baseInfo.put("handoverPrem", ljStaff.getHandoverPrem()); // 交班权限
|
||||
// baseInfo.put("handoverOut", ljStaff.getHandoverOut()); // 交班是否退出
|
||||
handoverMap.put("baseInfo",baseInfo);
|
||||
// 获取订单汇总
|
||||
Map<String, Object> orderSummaryMap = orderSummary(startTime, formattedEndTime);
|
||||
|
@ -7,6 +7,7 @@ public class OrderGoodsVo {
|
||||
private Integer id;
|
||||
private Integer orderId;
|
||||
private Integer goods_id;
|
||||
private Integer goodsId;
|
||||
private String name;
|
||||
private String retailPrice;
|
||||
private String memberPrice;
|
||||
|
@ -73,7 +73,10 @@ public class OilPurchase extends BaseEntity {
|
||||
*/
|
||||
private Integer storeId;
|
||||
|
||||
private Integer theDocumentAmount;
|
||||
/**
|
||||
* 总计
|
||||
*/
|
||||
private Double theDocumentAmount;
|
||||
|
||||
|
||||
|
||||
|
@ -303,11 +303,26 @@ export default {
|
||||
|
||||
// 退款
|
||||
async handleRefund(id){
|
||||
|
||||
await getGoodsOrder({"id":id}).then( response => {
|
||||
this.goods = response.data
|
||||
if (response.data.status === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let title = '是否将该收银台下的订单全部退款'
|
||||
await getOrderInfoApi().then(res=>{
|
||||
await getOrderInfoApi({orderNo: this.goods.orderNo,
|
||||
type: 'goods'}).then(res=>{
|
||||
if (res.code === 200) {
|
||||
if (res.data === 1) {
|
||||
title = '该订单下有其它油品订单,是否一并退款'
|
||||
if (res.data.type === "1") {
|
||||
title = '该订单下有其它商品订单,是否一并退款'
|
||||
this.goods.payAmount = res.data.money
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -318,20 +333,10 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogRefund = true;
|
||||
getGoodsOrder({"id":id}).then( response => {
|
||||
this.goods = response.data
|
||||
if (response.data.status === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
message: '已取消退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
});
|
||||
|
@ -133,10 +133,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>油品订单列表</div>
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -269,6 +268,7 @@
|
||||
import {getOilGuns, getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -328,6 +328,15 @@
|
||||
this.getUserList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelOilOrder() {
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'油品订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
getUserList(){
|
||||
queryUsers().then(res => {
|
||||
this.userList = res.data
|
||||
@ -368,11 +377,17 @@
|
||||
},
|
||||
// 退款
|
||||
async handleRefund(id){
|
||||
await oilOrderInfo(id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
|
||||
let title = '是否将该收银台下的订单全部退款'
|
||||
await getOrderInfoApi().then(res=>{
|
||||
await getOrderInfoApi({orderNo: this.oilOrder.orderNo,
|
||||
type: 'oil'}).then(res=>{
|
||||
if (res.code === 200) {
|
||||
if (res.data === 1) {
|
||||
if (res.data.type === "1") {
|
||||
title = '该订单下有其它商品订单,是否一并退款'
|
||||
this.oilOrder.payAmount = res.data.money
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -383,13 +398,11 @@
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogRefund = true;
|
||||
oilOrderInfo(id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
message: '已取消退款'
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -72,10 +72,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>小程序订单列表</div>
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelApplet()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -220,6 +219,7 @@
|
||||
import {cashierOrder, listCashierOrder, orderStatisticsApi} from "@/api/cashier/cashierorder";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -269,6 +269,12 @@ import {queryStaffs} from "@/api/cashier/staff";
|
||||
this.getTerList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelApplet() {
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'小程序订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 获取订单统计信息
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
|
@ -124,10 +124,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>未支付订单列表</div>
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelOilOrder()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -210,6 +209,7 @@
|
||||
import {getOilNameList, getOilNumGun} from "@/api/cashier/oilnumgun";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -261,6 +261,13 @@
|
||||
this.getOilGunList();
|
||||
},
|
||||
methods:{
|
||||
exportExcelOilOrder() {
|
||||
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'未支付订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
getOilNumberGun().then(res => {
|
||||
|
@ -104,10 +104,9 @@
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>会员充值列表</div>
|
||||
<!-- <div style="display: flex ">-->
|
||||
|
||||
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||
<!-- </div>-->
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="exportExcelVip()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
@ -226,6 +225,7 @@ import {cardValueRecordInfo, listCardValueRecord, orderStatisticsApi} from "@/ap
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelVipApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -274,6 +274,12 @@ export default {
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
methods:{
|
||||
exportExcelVip() {
|
||||
exportExcelVipApi(this.queryParams).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'会员充值订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
getOrderStatistics () {
|
||||
orderStatisticsApi().then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
|
Loading…
Reference in New Issue
Block a user