This commit is contained in:
cun-nan 2024-10-23 15:43:06 +08:00
parent 198c25ea5b
commit 5dec74f184
7 changed files with 407 additions and 302 deletions

View File

@ -61,3 +61,13 @@ export function exportExcelHangBillApi(data) {
data: data // 通过 data 参数传递需要的数据
});
}
// 导出积分商城订单
export function exportExcelPointsApi(data) {
return request({
url: 'business/integral/integralOrders/exportExcel',
method: 'post',
responseType: 'blob', // 表明响应类型为二进制流
data: data // 通过 data 参数传递需要的数据
});
}

View File

@ -1,21 +1,19 @@
<template>
<div class="app-container">
<div class="card-change" >
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<div class="card-change">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="giftName">
<el-input
v-model="queryParams.orderNumber"
placeholder="请输入订单号"
clearable
style="width: 220px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择订单类型" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
<el-option label="收银台兑换" value="1"></el-option>
<el-option label="商城兑换" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="giftName">
@ -23,39 +21,40 @@
v-model="queryParams.mobile"
placeholder="请输入用户手机"
clearable
style="width: 160px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="giftName">
<el-input
v-model="queryParams.mobile"
v-model="queryParams.giftName"
placeholder="请输入商品名称"
clearable
style="width: 160px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择支付方式" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
<el-select v-model="queryParams.paymentType" placeholder="请选择支付方式" clearable>
<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-select v-model="queryParams.status" style="width: 150px" placeholder="请选择订单状态" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
<el-select v-model="queryParams.status" placeholder="请选择订单状态" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择员工" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
<el-select v-model="queryParams.staffId" placeholder="请选择员工" clearable>
<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="">
@ -75,51 +74,75 @@
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelVip">导出</el-button>
</el-form-item>
</el-form>
<el-table ref="tables"
v-loading="loading"
:data="dataList"
border
:default-sort="defaultSort"
>
<el-table-column type="index" width="50" align="center" label="序号"/>
<div style="height: 70vh;overflow: auto">
<el-table-column label="订单号" align="center" prop="orderNumber"/>
<el-table-column label="用户手机号" align="center" prop="mobile"/>
<!-- <el-table-column label="简述" align="center" prop="categoryName" />-->
<el-table-column label="商品名称" align="center" prop="giftName" />
<el-table-column label="订单数量" align="center" prop="exchangeQuantity" />
<el-table-column label="订单金额" align="center" prop="amount" width="">
<el-table ref="tables"
v-loading="loading"
:data="dataList"
border
:default-sort="defaultSort"
>
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="订单号" align="center" prop="orderNumber"/>
<el-table-column label="订单类型" align="center" prop="orderType">
<template slot-scope="scope">
{{ scope.row.amount?scope.row.amount:"--" }}
<div v-if="scope.row.orderType==1">收银台兑换</div>
<div v-if="scope.row.orderType==0">商城兑换</div>
</template>
</el-table-column>
<el-table-column label="用户手机号" align="center" prop="mobile"/>
<el-table-column label="商品名称" align="center" prop="giftName"/>
<el-table-column label="兑换数量" align="center" prop="exchangeQuantity"/>
<el-table-column label="订单金额" align="center" prop="amount" width="">
<template slot-scope="scope">
{{ scope.row.integral || 0 }} 积分 + {{ scope.row.amount ? scope.row.amount : "0" }}
</template>
</el-table-column>
<el-table-column label="消耗积分" align="center" prop="integral" width="">
<template slot-scope="scope">
{{ scope.row.integral || 0 }} 积分
</template>
</el-table-column>
<el-table-column label="实付金额" align="center" prop="amount" width="">
<template slot-scope="scope">
{{ scope.row.amount ? scope.row.amount : "--" }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" prop="paymentType" width="">
<template slot-scope="scope">
<span>{{ getType(payList, scope.row.paymentType) }}</span>
</template>
</el-table-column>
<el-table-column label="订单状态" align="center" prop="status" width="">
<template slot-scope="scope">
<div v-if="scope.row.status =='unpaid'" style="color: #F44522"> 待支付</div>
<div v-else-if="scope.row.status =='paid'" style="color: #0DC291">支付成功</div>
<div v-else style="color: #F44522">支付失败</div>
</template>
</el-table-column>
<el-table-column label="积分" align="center" prop="integral" width=""/>
<el-table-column label="订单状态" align="center" prop="status" width="">
<template slot-scope="scope">
<el-tag effect="plain" v-if="scope.row.status =='unpaid'"> 待支付</el-tag>
<el-tag type="success" effect="plain" v-else-if="scope.row.status =='paid'">支付成功</el-tag>
<el-tag type="warning" effect="plain" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column label="关联员工" align="center" prop="realName" width=""/>
<el-table-column label="订单创建时间" align="center" prop="createTime" width=""/>
<el-table-column label="订单完成时间" align="center" prop="createTime" width=""/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="handleDetail(scope.row)"-->
<!-- >订单详情-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<el-table-column label="创建时间" align="center" prop="createTime" width=""/>
<el-table-column label="订单完成时间" align="center" prop="createTime" width=""/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleDetail(scope.row)"
>订单详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
@ -129,50 +152,54 @@
/>
</div>
<el-dialog title="订单详情" :visible.sync="openDetail" width="500px" append-to-body :close-on-click-modal="false">
<detail :dataForm = "dataForm"></detail>
<detail :dataForm="dataForm"></detail>
</el-dialog>
</div>
</template>
<script>
import {getOrderApi,getStatisticsApi } from "@/api/integral/order";
import Detail from '@/views/integral/order/detail'
import {getOrderApi, getStatisticsApi} from "@/api/integral/order";
import Detail from '@/views/integral/order/detail'
import {exportExcelPointsApi} from "@/api/order/exportExcel";
import {getDicts} from "@/api/order/data";
import {queryStaffs} from "@/api/order/staff";
export default {
name: "pointsCashier",
components: { Detail },
components: {Detail},
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
dicts: ['zhzt', 'lplx', 'redemptionMethod', 'expressShippingCosts', 'shippingMethod'],
data() {
return {
openDetail:false,
dataForm:{},
dataList:[],
openDetail: false,
dataForm: {},
dataList: [],
queryParams: {
orderType:1,
giftName: '',
status: '',
mobile: '',
orderNumber: '',
page:1,
pageSize:10
page: 1,
pageSize: 10
},
loading: false,
dateRange: [],
beginTime:new Date(),
endTime:new Date(),
beginTime: new Date(),
endTime: new Date(),
defaultSort: {prop: 'createTime', order: 'descending'},
total: 0,
//
payList: [],
staffList: [],
statisticsForm: {
num:0,
exchangeQuantity:0,
integral:0,
amount:0
num: 0,
exchangeQuantity: 0,
integral: 0,
amount: 0
}
}
},
@ -181,23 +208,41 @@ export default {
this.$forceUpdate();
this.getStatistics();
this.getPayList()
},
methods: {
async getList(){
getType(list, val) {
let name = "";
list.forEach(item => {
if (item.dictValue == val) {
name = item.dictLabel
}
})
return name;
},
getPayList() {
getDicts("payment_type").then(response => {
this.payList = response.data;
})
queryStaffs().then(response => {
this.staffList = response.data;
})
},
async getList() {
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.dataList = res.data.records
this.total = res.data.total
console.log("this.dataList ",this.dataList )
console.log("this.dataList ", this.dataList)
})
this.$forceUpdate()
},
getStatistics() {
this.dateRange = []
@ -205,25 +250,26 @@ export default {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.statisticsForm = res.data
})
},
handleUpdate(){},
handleQuery(){
handleUpdate() {
},
handleQuery() {
this.getList();
this.getStatistics();
},
resetQuery(){
resetQuery() {
this.queryParams = {
giftName: '',
status: '',
mobile: '',
orderNumber: '',
page:1,
pageSize:10
page: 1,
pageSize: 10
},
this.dateRange = []
this.beginTime = ""
@ -232,7 +278,26 @@ export default {
this.getStatistics();
},
handleDetail(data){
exportExcelVip() {
this.$confirm('是否导出列表中的数据!', '提示', {
confirmButtonText: '导出',
cancelButtonText: '取消'
}).then(() => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelPointsApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob, '积分商城订单.xLsx')
})
}).catch(() => {
});
},
handleDetail(data) {
this.openDetail = true
this.dataForm = data;
},
@ -247,19 +312,21 @@ export default {
background: #f6f8f9;
}
.icon-img{
.icon-img {
//margin-left: 110px;
width: 100%;
height: 20px;
margin-right: 5px;
img{
img {
float: right;
//width: 100%;
width: 20px;
height: 100%;
}
}
.box{
.box {
//box-sizing: border-box;
padding: 5px;
//background: #f9f9f9;
@ -268,14 +335,16 @@ export default {
width: 211px;
height: 60px;
background: rgba(64,158,255,0.05);
background: rgba(64, 158, 255, 0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #fe8c4a;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui{
.size-hui {
display: flex;
align-items: center;
//width: 200px;
@ -287,11 +356,13 @@ export default {
text-align: left;
font-style: normal;
text-transform: none;
.nei {
width: 150px;
}
}
.size-bole{
.size-bole {
//font-weight: bold;
//width: 53px;
@ -308,14 +379,15 @@ export default {
.font-chinese {
font-size: 15px;
font-family:Microsoft YaHei;
font-family: Microsoft YaHei;
font-weight: bold;
line-height:1.5
line-height: 1.5
}
.font-number {
font-size: 20px;
font-family: PingFang SC,sans-serif;
font-family: PingFang SC, sans-serif;
font-weight: bold;
line-height:1.3
line-height: 1.3
}
</style>

View File

@ -2,24 +2,27 @@
<template>
<div class="app-container"> <!-- 条件查询-->
<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="">
<el-input v-model="queryParams.paymentNo" placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="" prop="payChannel">
<el-select
v-model="queryParams.payChannel"
clearable
placeholder="请选择订单类型"
>
<el-option label="收银台" value="cashier"></el-option>
<el-option label="小程序" value="applet"></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.mtStaffId"
clearable
placeholder="交易员工"
placeholder="请选择员工"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
@ -31,7 +34,7 @@
<el-select
v-model="queryParams.paymentType"
clearable
placeholder="支付类型"
placeholder="请选择支付方式"
>
<el-option v-for="item in payList"
:key="item.id"
@ -41,37 +44,24 @@
</el-select>
</el-form-item>
<el-form-item label="">
<el-input v-model="queryParams.mobile" placeholder="手机号"></el-input>
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 400px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="datetimerange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right;margin-right: 0px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" @click="exportExcelVip()">导出订单</el-button>
<el-button type="primary" icon="el-icon-plus" @click="exportExcelVip()">导出</el-button>
</el-form-item>
</el-form>
@ -81,32 +71,38 @@
border
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="paymentNo" label="订单号" align="center"> </el-table-column>
<el-table-column prop="name" label="会员名称" align="center"> </el-table-column>
<el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column>
<!-- <el-table-column prop="bidBalance" label="到账金额" align="center"> </el-table-column>-->
<el-table-column prop="rechargeBalance" label="充值金额" align="center"> </el-table-column>
<el-table-column prop="giftBalance" label="赠送金额" align="center"></el-table-column>
<el-table-column prop="paymentNo" label="订单号" align="center"></el-table-column>
<el-table-column prop="payChannel" label="订单类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.payChannel=='cashier'">收银台</span>
<span v-else>小程序</span>
</template>
</el-table-column>
<el-table-column prop="name" label="会员名称" align="center"></el-table-column>
<el-table-column prop="mobile" label="手机号" align="center"></el-table-column>
<el-table-column prop="rechargeBalance" label="充值金额(元)" align="center"></el-table-column>
<el-table-column prop="giftBalance" label="赠送金额(元)" align="center"></el-table-column>
<el-table-column prop="giftBalance" label="会员总余额(元)" align="center"></el-table-column>
<el-table-column prop="paymentType" label="支付方式" align="center">
<template slot-scope="scope">
<span>{{getType(payList,scope.row.paymentType)}}</span>
<span>{{ getType(payList, scope.row.paymentType) }}</span>
</template>
</el-table-column>
<el-table-column prop="payStatus" label="订单状态" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.payStatus == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.payStatus == 'paid'">已支付</el-tag>
<el-tag type="danger" v-else>支付失败</el-tag>
<div v-if="scope.row.payStatus == 'unpaid'" style="color: #F44522">未支付</div>
<div v-else-if="scope.row.payStatus == 'paid'" style="color: #0DC291">支付成功</div>
<div v-else style="color: #F44522">支付失败</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="充值备注" align="center">
<el-table-column prop="remark" label="备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.remark ? scope.row.remark:"--" }}</span>
<span>{{ scope.row.remark ? scope.row.remark : "--" }}</span>
</template>
</el-table-column>
<el-table-column prop="realName" label="关联员工" align="center">
<template slot-scope="scope">
<span>{{scope.row.realName || getStaffName(staffList,scope.row.mtStaffId)}}</span>
<span>{{ scope.row.realName || getStaffName(staffList, scope.row.mtStaffId) }}</span>
</template>
</el-table-column>
<el-table-column label="订单完成时间" align="center" width="150" prop="payTime">
@ -114,22 +110,6 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="fringeBenefit" label="储值优惠" width="180" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span>充值满{{ scope.row.rechargeBalance }}元赠送{{ scope.row.giftBalance }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>&ndash;&gt;-->
<!-- <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>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
@ -169,7 +149,8 @@
<div>
<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
<span
style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogRefund = false"> </el-button>
@ -180,29 +161,29 @@
<!-- 支付成功后小票打印内容-->
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="oilOrder.paymentType == 'CASH'">现金</div>
<div v-else-if="oilOrder.paymentType == 'WECHAT'">微信</div>
<div v-else-if="oilOrder.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="oilOrder.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>储值卡面值</div>
<div>{{ oilOrder.bidBalance }}</div>
</div>
<div class="input-box">
<div>赠送金额</div>
<div>{{ oilOrder.giftBalance }}</div>
</div>
<div class="input-box">
<div>实付金额</div>
<div>{{ oilOrder.rechargeBalance }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="oilOrder.paymentType == 'CASH'">现金</div>
<div v-else-if="oilOrder.paymentType == 'WECHAT'">微信</div>
<div v-else-if="oilOrder.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="oilOrder.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>储值卡面值</div>
<div>{{ oilOrder.bidBalance }}</div>
</div>
<div class="input-box">
<div>赠送金额</div>
<div>{{ oilOrder.giftBalance }}</div>
</div>
<div class="input-box">
<div>实付金额</div>
<div>{{ oilOrder.rechargeBalance }}</div>
</div>
</div>
</div>
</template>
<script>
@ -214,36 +195,36 @@ import {
} from "@/api/order/cardvaluerecord";
import {getDicts} from "@/api/order/data";
import {queryStaffs} from "@/api/order/staff";
import { exportExcelVipApi } from "@/api/order/exportExcel";
import {exportExcelVipApi} from "@/api/order/exportExcel";
import {refundApi} from "@/api/order/refund";
export default {
name: "order_Cashier",
data(){
return{
data() {
return {
//
staffList:[],
staffList: [],
//
dateRange: [],
beginTime:"",
endTime:"",
oilOrder:{},
beginTime: "",
endTime: "",
oilOrder: {},
// 退
password:"",
radio1:"充值类型选错",
dialogRefund:false,
password: "",
radio1: "充值类型选错",
dialogRefund: false,
//
payList:[],
payList: [],
//
queryParams: {
pageNo: 1,
pageSize: 10,
},
//
list:[],
list: [],
//
total:0,
total: 0,
labelPosition: 'right',
formLabelAlign: {
@ -251,16 +232,16 @@ export default {
},
orderStatistics: {
numberOfTopUps:'',
theTotalAmountOfTopUp:'',
theTotalAmountOfTheCredit:'',
totalAmountReceived:'',
wechat:'',
alipay:'',
cash:'',
numberOfTopUps: '',
theTotalAmountOfTopUp: '',
theTotalAmountOfTheCredit: '',
totalAmountReceived: '',
wechat: '',
alipay: '',
cash: '',
},
//
isSysDate:false,
isSysDate: false,
}
},
created() {
@ -269,7 +250,7 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.dateRange = [start,new Date()];
this.dateRange = [start, new Date()];
this.beginTime = start
this.endTime = new Date()
this.isSysDate = true
@ -277,13 +258,13 @@ export default {
this.getPayList();
this.getOrderStatistics()
},
methods:{
methods: {
//
getStaffName(list,id){
getStaffName(list, id) {
let name = "--"
if (id){
if (id) {
list.forEach(item => {
if (item.id == id){
if (item.id == id) {
name = item.realName
}
})
@ -291,41 +272,49 @@ export default {
return name;
},
exportExcelVip() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelVipApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'会员充值订单统计.xLsx')
})
this.$confirm('是否导出列表中的数据!', '提示', {
confirmButtonText: '导出',
cancelButtonText: '取消'
}).then(() => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelVipApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob, '会员充值订单统计.xLsx')
})
}).catch(() => {
});
},
getOrderStatistics () {
getOrderStatistics() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
this.orderStatistics = res.data
})
},
//
patchwork(data){
patchwork(data) {
const orderNo = data.name
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function() {
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function () {
// return delUser(row.id);
}).then(() => {
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
}).catch(() => {});
}).catch(() => {
});
},
// 退
handleRefund(id){
handleRefund(id) {
this.dialogRefund = true;
cardValueRecordInfo(id).then( response => {
cardValueRecordInfo(id).then(response => {
this.oilOrder = response.data
})
},
@ -334,32 +323,32 @@ export default {
this.dialogRefund = false;
// 退
// cashierOrder
console.log("oilOrder",this.oilOrder)
let map={
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=>{
refundApi(map).then(res => {
})
},
getType(list,val){
getType(list, val) {
let name = "";
list.forEach(item => {
if (item.dictValue == val){
if (item.dictValue == val) {
name = item.dictLabel
}
})
return name;
},
//
getPayList(){
getDicts("payment_type").then( response => {
getPayList() {
getDicts("payment_type").then(response => {
this.payList = response.data;
})
queryStaffs().then( response => {
queryStaffs().then(response => {
this.staffList = response.data;
})
},
@ -382,8 +371,8 @@ export default {
this.handleQuery();
},
//
getList(val){
if (val!=undefined){
getList(val) {
if (val != undefined) {
this.queryParams.pageNo = val
}
@ -401,7 +390,7 @@ export default {
dateRange.push(this.endTime.toLocaleDateString())
}
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then( response => {
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.list = response.data.records;
this.total = response.data.total;
this.isSysDate = false
@ -413,32 +402,37 @@ export default {
<style scoped lang="scss">
.app-container{
width: 100%;
height: 100%;
background: #f6f8f9;
}
.app-top{
width: 100%;
.app-container {
width: 100%;
height: 100%;
background: #f6f8f9;
}
height: 60px;
box-sizing: border-box;
padding: 10px;
}
.clearfix{
width: 100%;
.app-top {
width: 100%;
}
.box-card{
width: 100%;
margin-bottom: 15px;
}
.box-gang{
width: 100%;
display: flex;
align-items: center;
}
.box{
height: 60px;
box-sizing: border-box;
padding: 10px;
}
.clearfix {
width: 100%;
}
.box-card {
width: 100%;
margin-bottom: 15px;
}
.box-gang {
width: 100%;
display: flex;
align-items: center;
}
.box {
padding: 5px;
margin-right: 20px;
padding-left: 20px;
@ -446,14 +440,16 @@ export default {
width: 211px;
height: 60px;
background: rgba(64,158,255,0.05);
background: rgba(64, 158, 255, 0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #fe8c4a;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui{
.size-hui {
display: flex;
align-items: center;
font-family: Source Han Sans CN, Source Han Sans CN;
@ -463,12 +459,14 @@ export default {
text-align: left;
font-style: normal;
text-transform: none;
.nei {
width: 150px;
}
}
.size-bole{
height:31px;
.size-bole {
height: 31px;
font-family: YouSheBiaoTiHei;
font-weight: 400;
font-size: 24px;
@ -477,46 +475,55 @@ export default {
font-style: normal;
text-transform: none;
}
.wgang{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.table-box{
width: 100%;
}
.pagination-box{
width: 100%;
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
}
.top-app-sou{
width: 20%;
}
.tk{
text-align: center;
color: grey;
margin: 10px 0;
}
.wgang {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
.icon-img{
}
.table-box {
width: 100%;
height: 72vh;
overflow: auto;
}
.pagination-box {
width: 100%;
margin: 10px auto;
display: flex;
align-items: end;
justify-content: end;
}
.top-app-sou {
width: 20%;
}
.tk {
text-align: center;
color: grey;
margin: 10px 0;
}
.icon-img {
width: 100%;
height: 20px;
margin-right: 5px;
img{
img {
float: right;
//width: 100%;
width: 20px;
height: 100%;
}
}
.box1{
.box1 {
//box-sizing: border-box;
padding: 5px;
//background: #f9f9f9;
@ -526,7 +533,7 @@ export default {
width: 211px;
height: 60px;
background: rgba(255,150,85,0.05);
background: rgba(255, 150, 85, 0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #FF9655;
}

View File

@ -99,6 +99,7 @@
io.actual_payment,
io.make_change,
io.payment_type,
io.staff_id,
mu.mobile,
mu.user_no,
mu.name,
@ -106,17 +107,25 @@
ig.cover_image,
ea.name addrName,
ea.mobile addrMobile,
ea.address
ea.address,
ms.real_name
from integral_orders io
left join mt_user mu ON io.user_id = mu.id
left join integral_gift ig ON io.gift_id = ig.id
left join mt_user_express_address ea ON io.address_id = ea.id
left join mt_staff ms on io.staff_id = ms.id
<where>
io.store_id = #{integralOrders.storeId}
<if test="integralOrders.giftName != null">
and ig.gift_name like CONCAT ('%',#{integralOrders.giftName},'%')
</if>
<if test="integralOrders.staffId != null">
and io.staff_id = #{integralOrders.staffId}
</if>
<if test="integralOrders.paymentType != null">
and io.payment_type = #{integralOrders.paymentType}
</if>
<if test="integralOrders.mobile != null">
and mu.mobile like CONCAT ('%',#{integralOrders.mobile},'%')
</if>

View File

@ -30,6 +30,5 @@ public class IntegralOrdersVO extends IntegralOrders {
private String integralBy;
// private String integrals;
// private String amount;
private String realName;
}

View File

@ -299,6 +299,12 @@
<if test="cardValueRecord.paymentType != null and cardValueRecord.paymentType != ''">
and payment_type = #{cardValueRecord.paymentType}
</if>
<if test="cardValueRecord.payChannel != null and cardValueRecord.payChannel != ''">
and pay_channel = #{cardValueRecord.payChannel}
</if>
<if test="cardValueRecord.paymentNo != null and cardValueRecord.paymentNo != ''">
and payment_no like concat('%', #{cardValueRecord.paymentNo}, '%')
</if>
<if test="cardValueRecord.cardValueId != null and cardValueRecord.cardValueId != ''">
and card_value_id = #{cardValueRecord.cardValueId}
</if>

View File

@ -506,6 +506,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardValueRecordDTO.setChainStoreId(nowAccountInfo.getChainStoreId());
cardValueRecordDTO.setRemark(selectCard.getDesc());
cardValueRecordDTO.setPayChannel(selectCard.getPayChannel());
cardValueRecordDTO.setPaymentType(selectCard.getPaymentType());
//储值卡面额
cardValueRecordDTO.setBidBalance(selectCard.getRechargeBalance().doubleValue());
//充值金额
@ -560,6 +561,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardFuelRecordDTO.setPayChannel(selectCard.getPayChannel());
cardFuelRecordDTO.setOilType(fuelDiesel.getOilType());
cardFuelRecordDTO.setOilNumberId(fuelDiesel.getOilNumberId());
cardFuelRecordDTO.setPaymentType(selectCard.getPaymentType());
//锁定单价
cardFuelRecordDTO.setLockupPrice(fuelDiesel.getLockPrice());
//所得升数