Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1c844fd619
@ -50,4 +50,13 @@ export function exportExcelAppletApi(data) {
|
||||
responseType: 'blob', // 表明响应类型为二进制流
|
||||
data: data // 通过 data 参数传递需要的数据
|
||||
});
|
||||
}
|
||||
}
|
||||
// 导出挂账订单
|
||||
export function exportExcelHangBillApi(data) {
|
||||
return request({
|
||||
url: 'business/hangBill/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明响应类型为二进制流
|
||||
data: data // 通过 data 参数传递需要的数据
|
||||
});
|
||||
}
|
||||
|
@ -9,6 +9,15 @@ export function listQRCode(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询二维码列表
|
||||
export function QRCodeByStoreId(query) {
|
||||
return request({
|
||||
url: '/business/storeInformation/qrCode/createStoreQrCode',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询二维码详细
|
||||
export function qrCodeInfo() {
|
||||
return request({
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<el-table style="margin-top: 20px" v-loading="loading" :data="list">
|
||||
<el-table-column type="index" width="80" align="center" label="序号"/>
|
||||
<el-table-column align="center" prop="userId" label="用户昵称"/>
|
||||
<!-- <el-table-column align="center" prop="userId" label="用户昵称"/>-->
|
||||
<el-table-column align="center" prop="userName" label="用户昵称"/>
|
||||
<el-table-column align="center" prop="userMobile" label="用户手机号"/>
|
||||
<el-table-column align="center" prop="content" label="反馈内容"/>
|
||||
|
@ -567,16 +567,16 @@ export default {
|
||||
this.getStatistic();
|
||||
this.getConfig();
|
||||
this.getUserList();
|
||||
this.queryUserList();
|
||||
// this.queryUserList();
|
||||
},
|
||||
methods: {
|
||||
// 定时器
|
||||
queryUserList(){
|
||||
let _this = this;
|
||||
setInterval(function (){
|
||||
_this.getList();
|
||||
_this.getStatistic();
|
||||
},5000)
|
||||
// let _this = this;
|
||||
// setInterval(function (){
|
||||
// _this.getList();
|
||||
// _this.getStatistic();
|
||||
// },5000)
|
||||
},
|
||||
// 跳转详情页
|
||||
goDedi(id){
|
||||
@ -609,8 +609,16 @@ export default {
|
||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.addNum = response.data.addNum;
|
||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||
this.balance = response.data.balance;
|
||||
this.point = response.data.point;
|
||||
if (!response.data.balance) {
|
||||
this.balance = 0
|
||||
}else {
|
||||
this.balance = response.data.balance;
|
||||
}
|
||||
if (!response.data.point) {
|
||||
this.point = 0
|
||||
}else {
|
||||
this.point = response.data.point;
|
||||
}
|
||||
});
|
||||
allUserGrade().then( response => {
|
||||
this.allUserGrade = response.data
|
||||
|
@ -10,8 +10,8 @@
|
||||
<!-- <el-table-column prop="date" label="变动账户"/> -->
|
||||
<el-table-column align="center" prop="changeType" label="类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
<el-tag v-if="scope.row.changeType == 0">消费</el-tag>
|
||||
<el-tag type="success" v-else>充值</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="详细信息">
|
||||
@ -50,8 +50,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType === '0'">减少</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">增加</el-tag>
|
||||
<el-tag v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">充值</el-tag>
|
||||
<el-tag type="success" v-else>--</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-table-column label="订单时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
<el-table-column label="商品数量" align="center" prop="goodsNum" />
|
||||
<!-- <el-table-column label="储值卡" align="center" prop="mobile"/> -->
|
||||
<el-table-column label="优惠金额" align="center" prop="discount" />
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
@ -21,7 +21,14 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<!-- <el-table-column label="订单类型" align="center" prop="point"/> -->
|
||||
<el-table-column label="付款状态" align="center" prop="orderStatus">
|
||||
<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>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
<el-table-column label="订单金额" align="center" prop="orderAmount"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="discountAmount"/>
|
||||
<el-table-column label="储值卡消费金额" align="center" prop="balanceAmount"/>
|
||||
<el-table-column label="囤油卡消费升数" align="center" prop="oilCardAmount"/>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
@ -25,12 +27,22 @@
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<div v-else-if="scope.row.payType == 'balance'">储值卡</div>
|
||||
<div v-else-if="scope.row.payType == 'oilCard'">囤油卡</div>
|
||||
<span v-else>小程序码</span>
|
||||
<!-- <dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
|
||||
<el-table-column label="订单类型" align="center" prop="orderType"/>
|
||||
<el-table-column label="付款状态" align="center" prop="orderStatus">
|
||||
<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>
|
||||
|
||||
<pagination
|
||||
|
@ -6,9 +6,9 @@
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">兑换</el-tag>
|
||||
<el-tag type="success" v-else>赠送</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动积分" align="center" prop="pointsChange" />
|
||||
|
@ -122,7 +122,7 @@
|
||||
<div>挂账订单列表</div>
|
||||
<div style="display: flex ">
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus">导出订单</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
@ -306,6 +306,7 @@ import {
|
||||
} from "@/api/order/hangbill";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {listReturnRecord} from "@/api/order/returnrecord";
|
||||
import {exportExcelHangBillApi} from "@/api/order/exportExcel";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -365,6 +366,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
exportExcelCashier() {
|
||||
// this.dateRange.push(this.beginTime)
|
||||
// this.dateRange.push(this.endTime)
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'挂账订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 归还记录详情弹框
|
||||
returnRecord(id){
|
||||
this.record = {}
|
||||
|
@ -115,19 +115,19 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil}}</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">优惠总额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer}}</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">交易数量</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions}}</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实收总额</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived}}</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
@ -299,6 +299,8 @@
|
||||
<div v-else-if="oilOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else-if="oilOrder.payType == 'balance'">储值卡</div>
|
||||
<div v-else-if="oilOrder.payType == 'oilCard'">囤油卡</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
@ -524,7 +526,12 @@
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi().then(res=>{
|
||||
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=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
|
@ -186,6 +186,13 @@ export default {
|
||||
this.getQRcode();
|
||||
})
|
||||
},
|
||||
// 获取二维码信息
|
||||
getQRCodeInfoByStoreId(){
|
||||
listQRCode().then(response => {
|
||||
this.qrcode = response.data.records;
|
||||
this.getQRcode();
|
||||
})
|
||||
},
|
||||
// 根据字符串获取二维码图片url地址
|
||||
getQRcode(){
|
||||
let opts = {
|
||||
|
@ -48,6 +48,16 @@ public class LJGoodsController extends BaseController {
|
||||
return getSuccessResult(goods);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可使用兑换券的商品
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryGoods")
|
||||
public ResponseObject queryGoods(){
|
||||
List<LJGoods> goods = goodsService.selectGoodsByCvsGoodsName();
|
||||
return getSuccessResult(goods);
|
||||
}
|
||||
|
||||
@GetMapping("/queryGoodsVoList")
|
||||
public ResponseObject queryGoodsVoList(LJGoods goods){
|
||||
List<LjGoodsVo> ljGoodsVos = goodsService.selectGoodsVoList(goods);
|
||||
|
@ -88,6 +88,12 @@ public interface LJGoodsService extends IService<LJGoods> {
|
||||
*/
|
||||
void batchGrounding(String ids,String status);
|
||||
|
||||
/**
|
||||
* 查询可兑换商品品类下的商品信息
|
||||
* @return
|
||||
*/
|
||||
List<LJGoods> selectGoodsByCvsGoodsName();
|
||||
|
||||
/**
|
||||
* 修改商品库存
|
||||
* @param goods
|
||||
|
@ -9,10 +9,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
||||
import com.fuint.business.convenienceSore.entity.CvsGoods;
|
||||
import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.entity.StockStatistic;
|
||||
import com.fuint.business.convenienceSore.entity.StockTrack;
|
||||
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
|
||||
import com.fuint.business.convenienceSore.service.CvsGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
@ -31,6 +33,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@ -224,6 +227,18 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LJGoods> selectGoodsByCvsGoodsName() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
|
||||
queryWrapper.eq("status","qy");
|
||||
queryWrapper.eq("is_recovery","0");
|
||||
queryWrapper.eq("if_delete","0");
|
||||
queryWrapper.eq("can_use_exchange","0");
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
|
@ -100,4 +100,11 @@ public interface ILJStaffService extends IService<LJStaff> {
|
||||
* @return
|
||||
*/
|
||||
public List<LJStaff> queryStaffs(int storeId);
|
||||
|
||||
/**
|
||||
* 根据店铺id查询最早的油站站长信息
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
LJStaff selectStaffByStoreId(int storeId);
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.fuint.business.member.utils.QrCodeUtils.createLogoCodePicture;
|
||||
|
||||
/**
|
||||
* 员工管理 业务层
|
||||
@ -44,6 +43,8 @@ import static com.fuint.business.member.utils.QrCodeUtils.createLogoCodePicture;
|
||||
public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> implements ILJStaffService {
|
||||
@Autowired
|
||||
private AccountService accountService;
|
||||
@Autowired
|
||||
private QrCodeUtils qrCodeUtils;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询员工信息
|
||||
@ -281,20 +282,22 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
|
||||
@Override
|
||||
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception {
|
||||
;;
|
||||
// 根据id查询员工信息和店铺信息
|
||||
LJStaff staff = this.selectStaffById(id);
|
||||
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
|
||||
//在图片上生成二维码
|
||||
String backgroundImage = "static/qrCodeImg/laigeyouhui_bg.jpg";
|
||||
String logoImage = "static/qrCodeImg/logo.png";
|
||||
// if (StringUtils.isNotEmpty(store.getLogo())){
|
||||
// logoImage = store.getLogo();
|
||||
// }
|
||||
String url = staff.getStaffCode();
|
||||
String area = store.getName();
|
||||
String finalPath="/temp/qrCode/" + area + ".jpg";
|
||||
InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
|
||||
InputStream logoStream = this.getClass().getClassLoader().getResourceAsStream(logoImage);
|
||||
//背景图片路径 loge图片 二维码 输出地址
|
||||
createLogoCodePicture(backgroundStream, logoStream, url, finalPath, area,store.getAddress());
|
||||
qrCodeUtils.createLogoCodePicture(backgroundStream, logoStream, url, finalPath, staff.getId(),store.getId());
|
||||
File file1 = new File("/temp/qrCode/");
|
||||
// 判断目录是否存在
|
||||
if (!file1.exists()) {
|
||||
@ -332,4 +335,20 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LJStaff selectStaffByStoreId(int storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("status","qy");
|
||||
queryWrapper.eq("if_delete","0");
|
||||
queryWrapper.eq("role_id","12");
|
||||
queryWrapper.orderByAsc("create_time");
|
||||
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
||||
LJStaff staff = null;
|
||||
if (list.size()>0){
|
||||
staff = list.get(0);
|
||||
}
|
||||
return staff;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,24 @@
|
||||
package com.fuint.business.member.utils;
|
||||
|
||||
import cn.hutool.core.io.resource.ClassPathResource;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.storeInformation.service.impl.LJStoreServiceImpl;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
|
||||
@ -17,11 +28,22 @@ import java.io.*;
|
||||
* @Date 2023/1/12 0012 13:38
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Component
|
||||
public class QrCodeUtils {
|
||||
/***
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private ILJStaffService staffService;
|
||||
|
||||
/**
|
||||
* 在一张背景图上添加二维码
|
||||
* @param url 二维码字符串
|
||||
* @param outImgPath 输出路径
|
||||
* @param staffId 员工id
|
||||
* @param storeId 店铺id
|
||||
*/
|
||||
public static void createLogoCodePicture(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, String storeName, String storeNumber) {
|
||||
public void createLogoCodePicture(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId) {
|
||||
try {
|
||||
// 读取原图片信息
|
||||
//得到文件
|
||||
@ -45,11 +67,33 @@ public class QrCodeUtils {
|
||||
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。
|
||||
g.drawImage(image, 260, 320, null);
|
||||
// 设置字体,样式,字体大小
|
||||
g.setFont(new Font("TimesRoman", Font.BOLD, 50));
|
||||
g.setFont(new Font("TimesRoman", Font.BOLD, 40));
|
||||
//设置颜色。
|
||||
g.setColor(Color.BLACK);
|
||||
|
||||
// 查询当前店铺信息
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
// 查询加油员信息
|
||||
LJStaff staff = null;
|
||||
if (ObjectUtil.isNotEmpty(staffId)){
|
||||
staff = staffService.selectStaffById(staffId);
|
||||
}
|
||||
LJStaff staff1 = staffService.selectStaffByStoreId(storeId);
|
||||
|
||||
// 店铺名称位置文字绘制到指定位置
|
||||
g.drawString(storeName, 200, 880);
|
||||
g.drawString(store.getName(), returnX(g,bufImg.getWidth(),store.getName()), 300);
|
||||
// 加油员姓名位置文字绘制到指定位置
|
||||
if (ObjectUtil.isNotEmpty(staff)) {
|
||||
g.drawString("加油员:"+staff.getRealName(), returnX(g, bufImg.getWidth(), "加油员:"+staff.getRealName()), 750);
|
||||
}
|
||||
// 站长名称位置文字绘制到指定位置
|
||||
g.drawString("站长名称:"+staff1.getRealName(), returnX(g, bufImg.getWidth(), "站长名称:"+staff1.getRealName()), 810);
|
||||
// 服务监督电话位置文字绘制到指定位置
|
||||
g.drawString("服务监督电话:"+staff1.getMobile(), returnX(g, bufImg.getWidth(), "服务监督电话:"+staff1.getMobile()), 870);
|
||||
// 店铺地址位置文字绘制到指定位置
|
||||
// g.drawString(store.getAddress(), returnX(g,bufImg.getWidth(),store.getAddress()), 900);
|
||||
drawStringWithMultiLine(g,store.getAddress(), bufImg.getWidth()-20,20,940,10 );
|
||||
|
||||
// // 将码牌编号文字绘制到指定位置
|
||||
// g.drawString(storeNumber, 200, 800);
|
||||
g.dispose();
|
||||
@ -69,6 +113,60 @@ public class QrCodeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public int returnX(Graphics2D g,Integer bufImgWidth,String name){
|
||||
FontMetrics fm = g.getFontMetrics();
|
||||
Rectangle2D stringBounds = fm.getStringBounds(name, g);
|
||||
int x = (bufImgWidth - (int) stringBounds.getWidth())/2;
|
||||
return x;
|
||||
}
|
||||
/**
|
||||
* Graphic2D文本绘制换行,多行绘制
|
||||
*
|
||||
* @param graphics2D Graphics2D画笔实例
|
||||
* @param text 需要绘制的文本内容
|
||||
* @param maxWidth 一行的总宽度(像素)
|
||||
* @param startX X坐标起始点(像素)
|
||||
* @param startY Y坐标起始点(像素)
|
||||
* @param heightSpace 每行间距(像素)
|
||||
*/
|
||||
public void drawStringWithMultiLine(Graphics2D graphics2D, String text, int maxWidth, int startX, int startY, int heightSpace) {
|
||||
// INFO: Dechert: 2021/1/7 获取画笔的字体
|
||||
Font font = graphics2D.getFont();
|
||||
// INFO: Dechert: 2021/1/7 通过JLabel获取文本的总长度和总高度
|
||||
JLabel jLabel = new JLabel(text);
|
||||
jLabel.setFont(font);
|
||||
FontMetrics fontMetrics = jLabel.getFontMetrics(font);
|
||||
int textLength = text.length();
|
||||
int totalWidth = fontMetrics.stringWidth(text); //一行的总长度,用于判断是否超出了范围
|
||||
int textHeight = fontMetrics.getHeight(); //计算一行的高度
|
||||
|
||||
if (totalWidth > maxWidth) {
|
||||
// INFO: Dechert: 2021/1/7 总长度超过了整个长度限制
|
||||
int alreadyWriteLine = 0; //已经写了多少行
|
||||
int nowWidth = 0; //目前一行写的长度
|
||||
for (int i = 0; i < textLength; i++) {
|
||||
int oneWordWidth = fontMetrics.charWidth(text.charAt(i)); //获取单个字符的长度
|
||||
int tempWidth = oneWordWidth + nowWidth; //判断目前的一行加上这个字符的长度是否超出了总长度
|
||||
if (tempWidth > maxWidth) {
|
||||
// INFO: Dechert: 2021/1/7 如果超出了一行的总长度,则要换成下一行
|
||||
nowWidth = 0;
|
||||
alreadyWriteLine++;
|
||||
int writeY = startY + alreadyWriteLine * (textHeight + heightSpace);
|
||||
graphics2D.drawString(text.charAt(i) + "", startX + nowWidth, writeY);
|
||||
nowWidth = oneWordWidth;
|
||||
} else {
|
||||
// INFO: Dechert: 2021/1/7 当前行长度足够,可以直接画
|
||||
int writeY = startY + alreadyWriteLine * (textHeight + heightSpace);
|
||||
graphics2D.drawString(text.charAt(i) + "", startX + nowWidth, writeY);
|
||||
nowWidth = tempWidth;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// INFO: Dechert: 2021/1/7 没有超过限制,直接画
|
||||
graphics2D.drawString(text, startX, startY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字符串转为二维码
|
||||
*
|
||||
@ -78,7 +176,7 @@ public class QrCodeUtils {
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private static BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
|
||||
private BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
|
||||
QrConfig config = new QrConfig(width, height);
|
||||
Image image = ImageIO.read(logoStream);
|
||||
config.setImg(image);
|
||||
|
@ -9,6 +9,7 @@ import com.fuint.business.order.service.HangBillService;
|
||||
import com.fuint.business.order.vo.HangBillVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -108,8 +109,8 @@ public class HangBillController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("allAmount")
|
||||
public ResponseObject allAmount(){
|
||||
return getSuccessResult(hangBillService.selectAllAmount());
|
||||
public ResponseObject allAmount(HangBillVo hangBill){
|
||||
return getSuccessResult(hangBillService.selectAllAmount(hangBill));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,8 +118,8 @@ public class HangBillController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("allReturnAmount")
|
||||
public ResponseObject allReturnAmount(){
|
||||
return getSuccessResult(hangBillService.selectReturnAmount());
|
||||
public ResponseObject allReturnAmount(HangBillVo hangBill){
|
||||
return getSuccessResult(hangBillService.selectReturnAmount(hangBill));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,8 +127,8 @@ public class HangBillController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("allNoReturnAmount")
|
||||
public ResponseObject allNoReturnAmount(){
|
||||
return getSuccessResult(hangBillService.selectNoReturnAmount());
|
||||
public ResponseObject allNoReturnAmount(HangBillVo hangBill){
|
||||
return getSuccessResult(hangBillService.selectNoReturnAmount(hangBill));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -135,8 +136,8 @@ public class HangBillController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("returnTotal")
|
||||
public ResponseObject returnTotal(){
|
||||
return getSuccessResult(hangBillService.selectCountReturn());
|
||||
public ResponseObject returnTotal(HangBillVo hangBill){
|
||||
return getSuccessResult(hangBillService.selectCountReturn(hangBill));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,6 +56,18 @@ public class OilBalanceChangeController extends BaseController {
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOilType())){
|
||||
queryWrapper.eq(OilBalanceChange::getOilType,oilBalanceChange.getOilType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getChangeType())){
|
||||
queryWrapper.eq(OilBalanceChange::getChangeType,oilBalanceChange.getChangeType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOrderNo())){
|
||||
queryWrapper.like(OilBalanceChange::getOrderNo,oilBalanceChange.getOrderNo());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getParams()) && oilBalanceChange.getParams().size()==2){
|
||||
String beginTime = oilBalanceChange.getParams().get("beginTime").toString();
|
||||
String endTime = oilBalanceChange.getParams().get("endTime").toString();
|
||||
endTime = endTime.substring(0,endTime.length()-1) + (Integer.valueOf(endTime.substring(endTime.length()-1)) + 1);
|
||||
queryWrapper.between(OilBalanceChange::getCreateTime,beginTime,endTime);
|
||||
}
|
||||
queryWrapper.orderByDesc(OilBalanceChange::getCreateTime);
|
||||
return getSuccessResult(this.oilBalanceChangeService.page(page, queryWrapper));
|
||||
}
|
||||
@ -123,6 +135,18 @@ public class OilBalanceChangeController extends BaseController {
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOilType())){
|
||||
queryWrapper.eq(OilBalanceChange::getOilType,oilBalanceChange.getOilType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getChangeType())){
|
||||
queryWrapper.eq(OilBalanceChange::getChangeType,oilBalanceChange.getChangeType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOrderNo())){
|
||||
queryWrapper.like(OilBalanceChange::getOrderNo,oilBalanceChange.getOrderNo());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilBalanceChange.getParams()) && oilBalanceChange.getParams().size()==2){
|
||||
String beginTime = oilBalanceChange.getParams().get("beginTime").toString();
|
||||
String endTime = oilBalanceChange.getParams().get("endTime").toString();
|
||||
endTime = endTime.substring(0,endTime.length()-1) + (Integer.valueOf(endTime.substring(endTime.length()-1)) + 1);
|
||||
queryWrapper.between(OilBalanceChange::getCreateTime,beginTime,endTime);
|
||||
}
|
||||
List<OilBalanceChange> list = this.oilBalanceChangeService.list(queryWrapper);
|
||||
//充值笔数
|
||||
List<OilBalanceChange> collectIn = list.stream().filter(o -> o.getChangeType().equals("1")).collect(Collectors.toList());
|
||||
|
@ -3,12 +3,15 @@ package com.fuint.business.order.entity;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 余油变化表(OilBalanceChange)表实体类
|
||||
@ -54,5 +57,11 @@ public class OilBalanceChange extends Model<OilBalanceChange> {
|
||||
private Date updateTime;
|
||||
//更新人
|
||||
private String updateBy;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params;
|
||||
|
||||
}
|
||||
|
||||
|
@ -48,17 +48,23 @@ public interface HangBillMapper extends BaseMapper<HangBill> {
|
||||
* 查询当前店铺所有的订单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectAllAmount(@Param("storeId") int storeId);
|
||||
Double selectAllAmount(@Param("hangBill") HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectReturnAmount(@Param("storeId") int storeId);
|
||||
Double selectReturnAmount(@Param("hangBill") HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺未归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectNoReturnAmount(@Param("storeId") int storeId);
|
||||
Double selectNoReturnAmount(@Param("hangBill") HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还账单的数量
|
||||
* @return
|
||||
*/
|
||||
int selectCountReturn(@Param("hangBill") HangBillVo hangBill);
|
||||
}
|
||||
|
@ -56,14 +56,107 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAllAmount" resultType="java.lang.Double">
|
||||
select sum(amount) from hang_bill where store_id = #{storeId}
|
||||
<select id="selectAllAmount" resultType="java.lang.Double" parameterType="com.fuint.business.order.vo.HangBillVo">
|
||||
select sum(t.amount) from
|
||||
(select ms.real_name,ms.mobile,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit,hb.*
|
||||
from hang_bill hb
|
||||
left join mt_staff ms on hb.staff_id = ms.id
|
||||
left join credit_unit cu on hb.credit_unit_id = cu.id) t
|
||||
<where>
|
||||
t.store_id = #{hangBill.storeId}
|
||||
<if test="hangBill.status != null and hangBill.status != ''">
|
||||
and t.status = #{hangBill.status}
|
||||
</if>
|
||||
<if test="hangBill.returnType != null and hangBill.returnType != ''">
|
||||
and t.return_type = #{hangBill.returnType}
|
||||
</if>
|
||||
<if test="hangBill.unitName != null and hangBill.unitName != ''">
|
||||
and t.unit_name like concat('%', #{hangBill.unitName}, '%')
|
||||
</if>
|
||||
<if test="hangBill.personCredit != null and hangBill.personCredit != ''">
|
||||
and t.person_credit like concat('%', #{hangBill.personCredit}, '%')
|
||||
</if>
|
||||
<if test="hangBill.contactMobile != null and hangBill.contactMobile != ''">
|
||||
and t.contact_mobile like concat('%', #{hangBill.contactMobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.mobile != null and hangBill.mobile != ''">
|
||||
and t.mobile like concat('%', #{hangBill.mobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{hangBill.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectReturnAmount" resultType="java.lang.Double">
|
||||
select sum(repaid_amount) from hang_bill where store_id = #{storeId}
|
||||
select sum(repaid_amount) from
|
||||
(select ms.real_name,ms.mobile,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit,hb.*
|
||||
from hang_bill hb
|
||||
left join mt_staff ms on hb.staff_id = ms.id
|
||||
left join credit_unit cu on hb.credit_unit_id = cu.id) t
|
||||
<where>
|
||||
t.store_id = #{hangBill.storeId}
|
||||
<if test="hangBill.status != null and hangBill.status != ''">
|
||||
and t.status = #{hangBill.status}
|
||||
</if>
|
||||
<if test="hangBill.returnType != null and hangBill.returnType != ''">
|
||||
and t.return_type = #{hangBill.returnType}
|
||||
</if>
|
||||
<if test="hangBill.unitName != null and hangBill.unitName != ''">
|
||||
and t.unit_name like concat('%', #{hangBill.unitName}, '%')
|
||||
</if>
|
||||
<if test="hangBill.personCredit != null and hangBill.personCredit != ''">
|
||||
and t.person_credit like concat('%', #{hangBill.personCredit}, '%')
|
||||
</if>
|
||||
<if test="hangBill.contactMobile != null and hangBill.contactMobile != ''">
|
||||
and t.contact_mobile like concat('%', #{hangBill.contactMobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.mobile != null and hangBill.mobile != ''">
|
||||
and t.mobile like concat('%', #{hangBill.mobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{hangBill.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectNoReturnAmount" resultType="java.lang.Double">
|
||||
select sum(outstand_amount) from hang_bill where store_id = #{storeId}
|
||||
select sum(outstand_amount) from
|
||||
(select ms.real_name,ms.mobile,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit,hb.*
|
||||
from hang_bill hb
|
||||
left join mt_staff ms on hb.staff_id = ms.id
|
||||
left join credit_unit cu on hb.credit_unit_id = cu.id) t
|
||||
<where>
|
||||
t.store_id = #{hangBill.storeId}
|
||||
<if test="hangBill.status != null and hangBill.status != ''">
|
||||
and t.status = #{hangBill.status}
|
||||
</if>
|
||||
<if test="hangBill.returnType != null and hangBill.returnType != ''">
|
||||
and t.return_type = #{hangBill.returnType}
|
||||
</if>
|
||||
<if test="hangBill.unitName != null and hangBill.unitName != ''">
|
||||
and t.unit_name like concat('%', #{hangBill.unitName}, '%')
|
||||
</if>
|
||||
<if test="hangBill.personCredit != null and hangBill.personCredit != ''">
|
||||
and t.person_credit like concat('%', #{hangBill.personCredit}, '%')
|
||||
</if>
|
||||
<if test="hangBill.contactMobile != null and hangBill.contactMobile != ''">
|
||||
and t.contact_mobile like concat('%', #{hangBill.contactMobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.mobile != null and hangBill.mobile != ''">
|
||||
and t.mobile like concat('%', #{hangBill.mobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{hangBill.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectHangBillsByCreditUnit" resultType="com.fuint.business.order.vo.HangBillVo"
|
||||
parameterType="com.fuint.business.order.vo.HangBillVo">
|
||||
@ -136,4 +229,42 @@
|
||||
</where>
|
||||
order by hb.create_time desc
|
||||
</select>
|
||||
<select id="selectCountReturn" resultType="java.lang.Integer"
|
||||
parameterType="com.fuint.business.order.vo.HangBillVo">
|
||||
select count(t.amount) from
|
||||
(select ms.real_name,ms.mobile,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit,hb.*
|
||||
from hang_bill hb
|
||||
left join mt_staff ms on hb.staff_id = ms.id
|
||||
left join credit_unit cu on hb.credit_unit_id = cu.id) t
|
||||
<where>
|
||||
t.store_id = #{hangBill.storeId}
|
||||
<if test="hangBill.status == null or hangBill.status == ''">
|
||||
and t.status = '1'
|
||||
</if>
|
||||
<if test="hangBill.status != null and hangBill.status != ''">
|
||||
and t.status = #{hangBill.status}
|
||||
</if>
|
||||
<if test="hangBill.returnType != null and hangBill.returnType != ''">
|
||||
and t.return_type = #{hangBill.returnType}
|
||||
</if>
|
||||
<if test="hangBill.unitName != null and hangBill.unitName != ''">
|
||||
and t.unit_name like concat('%', #{hangBill.unitName}, '%')
|
||||
</if>
|
||||
<if test="hangBill.personCredit != null and hangBill.personCredit != ''">
|
||||
and t.person_credit like concat('%', #{hangBill.personCredit}, '%')
|
||||
</if>
|
||||
<if test="hangBill.contactMobile != null and hangBill.contactMobile != ''">
|
||||
and t.contact_mobile like concat('%', #{hangBill.contactMobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.mobile != null and hangBill.mobile != ''">
|
||||
and t.mobile like concat('%', #{hangBill.mobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{hangBill.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -97,7 +97,10 @@
|
||||
oo.pay_amount payAmount,
|
||||
oo.pay_type payType,
|
||||
oo.order_no orderNo,
|
||||
oo.order_type orderType
|
||||
oo.order_type orderType,
|
||||
oo.balance_amount balanceAmount,
|
||||
oo.oil_card_amount oilCardAmount,
|
||||
oo.order_status orderStatus
|
||||
from oil_order oo
|
||||
left join oil_name onu on oo.oils = onu.id
|
||||
left join mt_store ms on ms.id = oo.store_id
|
||||
|
@ -91,25 +91,25 @@ public interface HangBillService extends IService<HangBill> {
|
||||
* 查询当前店铺所有的订单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectAllAmount();
|
||||
Double selectAllAmount(HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还账单的数量
|
||||
* @return
|
||||
*/
|
||||
int selectCountReturn();
|
||||
int selectCountReturn(HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectReturnAmount();
|
||||
Double selectReturnAmount(HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询当前店铺未归还的账单总额
|
||||
* @return
|
||||
*/
|
||||
Double selectNoReturnAmount();
|
||||
Double selectNoReturnAmount(HangBillVo hangBill);
|
||||
|
||||
void export(HttpServletResponse response, HangBillVo hangBill);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.entity.OilBalanceChange;
|
||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
@ -13,6 +14,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -62,6 +64,18 @@ public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeM
|
||||
LambdaQueryWrapper<CardBalanceChange> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CardBalanceChange::getStoreId,nowAccountInfo.getStoreId());
|
||||
queryWrapper.orderByDesc(CardBalanceChange::getCreateTime);
|
||||
if (ObjectUtils.isNotEmpty(cardBalanceChange.getChangeType())){
|
||||
queryWrapper.eq(CardBalanceChange::getChangeType,cardBalanceChange.getChangeType());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(cardBalanceChange.getOrderNo())){
|
||||
queryWrapper.like(CardBalanceChange::getOrderNo,cardBalanceChange.getOrderNo());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(cardBalanceChange.getParams()) && cardBalanceChange.getParams().size()==2){
|
||||
String beginTime = cardBalanceChange.getParams().get("beginTime").toString();
|
||||
String endTime = cardBalanceChange.getParams().get("endTime").toString();
|
||||
endTime = endTime.substring(0,endTime.length()-1) + (Integer.valueOf(endTime.substring(endTime.length()-1)) + 1);
|
||||
queryWrapper.between(CardBalanceChange::getCreateTime,beginTime,endTime);
|
||||
}
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
return page1;
|
||||
}
|
||||
|
@ -268,30 +268,31 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAllAmount() {
|
||||
public Double selectAllAmount(HangBillVo hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectAllAmount(nowAccountInfo.getStoreId());
|
||||
hangBill.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectAllAmount(hangBill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectCountReturn() {
|
||||
public int selectCountReturn(HangBillVo hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
queryWrapper.eq("status","1");
|
||||
return baseMapper.selectCount(queryWrapper);
|
||||
hangBill.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectCountReturn(hangBill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectReturnAmount() {
|
||||
public Double selectReturnAmount(HangBillVo hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectReturnAmount(nowAccountInfo.getStoreId());
|
||||
hangBill.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectReturnAmount(hangBill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectNoReturnAmount() {
|
||||
public Double selectNoReturnAmount(HangBillVo hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return baseMapper.selectNoReturnAmount(nowAccountInfo.getStoreId());
|
||||
hangBill.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectNoReturnAmount(hangBill);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,6 +10,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/business/storeInformation/qrCode")
|
||||
public class QRCodeController extends BaseController {
|
||||
@ -32,6 +35,13 @@ public class QRCodeController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
@PostMapping("/createStoreQrCode")
|
||||
public ResponseObject createStoreQrCode(HttpServletRequest request, @RequestBody Map<String,String> map) throws Exception {
|
||||
String type = map.get("type");
|
||||
Integer storeId = Integer.valueOf(map.get("storeId"));
|
||||
return getSuccessResult(iqrCodeService.createStoreQrCode(type,storeId,request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺id查询二维码信息
|
||||
* @return
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -20,6 +21,8 @@ public interface IQRCodeService extends IService<QRCode> {
|
||||
*/
|
||||
public IPage<QRCode> selectQRCodeList(Page page, QRCode qrCode);
|
||||
|
||||
String createStoreQrCode(String type,Integer storeId, HttpServletRequest request) throws Exception;
|
||||
|
||||
/**
|
||||
* 根据店铺id查询二维码信息
|
||||
* @return
|
||||
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.indexBanner.entity.IndexBanner;
|
||||
import com.fuint.business.indexBanner.service.IndexBannerService;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.utils.QrCodeUtils;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
import com.fuint.business.storeInformation.mapper.QRCodeMapper;
|
||||
@ -14,8 +16,16 @@ import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.storeInformation.service.IQRCodeService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.module.backendApi.controller.BackendFileController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 门店信息 业务层
|
||||
@ -36,6 +46,49 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
||||
return baseMapper.selectQRCodeList(page,qrCode);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private QrCodeUtils qrCodeUtils;
|
||||
@Autowired
|
||||
private BackendFileController backendFileController;
|
||||
|
||||
@Override
|
||||
public String createStoreQrCode(String type, Integer storeId, HttpServletRequest request) throws Exception {
|
||||
QRCode qrCode = selectQRCodeByStoreId(storeId);
|
||||
// 根据id查询员工信息和店铺信息
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
//在图片上生成二维码
|
||||
String backgroundImage = "";
|
||||
if (type.equals("0")){
|
||||
backgroundImage = "static/qrCodeImg/laigeyouhui_bg.jpg";
|
||||
}else {
|
||||
backgroundImage = "static/qrCodeImg/laigeyouhui_bg1.jpg";
|
||||
}
|
||||
|
||||
String logoImage = "static/qrCodeImg/logo.png";
|
||||
// if (StringUtils.isNotEmpty(store.getLogo())){
|
||||
// logoImage = store.getLogo();
|
||||
// }
|
||||
String url = qrCode.getCollection();
|
||||
String area = store.getName();
|
||||
String finalPath="/temp/qrCode/" + area + ".jpg";
|
||||
InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
|
||||
InputStream logoStream = this.getClass().getClassLoader().getResourceAsStream(logoImage);
|
||||
//背景图片路径 loge图片 二维码 输出地址
|
||||
qrCodeUtils.createLogoCodePicture(backgroundStream, logoStream, url, finalPath, null,store.getId());
|
||||
File file1 = new File("/temp/qrCode/");
|
||||
// 判断目录是否存在
|
||||
if (!file1.exists()) {
|
||||
file1.mkdir();
|
||||
}
|
||||
|
||||
File file =new File(finalPath);
|
||||
FileInputStream fileInputStream =new FileInputStream(file);
|
||||
MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream);
|
||||
// 返回图片路径
|
||||
String saveFile = backendFileController.saveFile(resFile);
|
||||
return saveFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QRCode selectQRCode() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -73,11 +73,11 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
|
||||
/**
|
||||
* 统计信息
|
||||
* @param chainStoreId
|
||||
* @param user
|
||||
* @param sumValue
|
||||
* @return
|
||||
*/
|
||||
public Double selectSumByStore(@Param("chainStoreId") int chainStoreId,@Param("sumValue") String sumValue);
|
||||
public Double selectSumByStore(@Param("user") LJUserVo user,@Param("sumValue") String sumValue);
|
||||
|
||||
|
||||
LJUserVo selectAllInfoById(@Param("userId") Integer userId);
|
||||
|
@ -155,14 +155,56 @@
|
||||
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 1">
|
||||
and mub.card_balance != 0
|
||||
</if>
|
||||
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mu.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mu.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询会员统计信息-->
|
||||
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
|
||||
select sum(${sumValue}) from mt_user_balance
|
||||
select sum(${sumValue}) from
|
||||
(select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
mub.second_card,mub.fixing_level,mub.chain_store_id
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id) t
|
||||
<where>
|
||||
chain_store_id = #{chainStoreId}
|
||||
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||
and t.chain_store_id = #{user.chainStoreId}
|
||||
</if>
|
||||
<if test="user.storeId != null and user.storeId != ''">
|
||||
and t.store_id = #{user.storeId}
|
||||
</if>
|
||||
<if test="user.mobile != null and user.mobile != ''">
|
||||
and t.mobile like concat('%', #{user.mobile}, '%')
|
||||
</if>
|
||||
<if test="user.userNo != null and user.userNo != ''">
|
||||
and t.user_no like concat('%', #{user.userNo}, '%')
|
||||
</if>
|
||||
<if test="user.name != null and user.name != ''">
|
||||
and t.name like concat('%', #{user.name}, '%')
|
||||
</if>
|
||||
<if test="user.gradeId != null and user.gradeId != ''">
|
||||
and t.grade_id = #{user.gradeId}
|
||||
</if>
|
||||
<if test="user.official != null and user.official != ''">
|
||||
and t.official = #{user.official}
|
||||
</if>
|
||||
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 2">
|
||||
and t.card_balance = 0
|
||||
</if>
|
||||
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 1">
|
||||
and t.card_balance != 0
|
||||
</if>
|
||||
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(t.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!-- 根据手机号查询会员信息-->
|
||||
|
@ -126,8 +126,9 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
Integer chainStoreId = store.getChainStoreId();
|
||||
Double balance = baseMapper.selectSumByStore(chainStoreId, "card_balance");
|
||||
Double point = baseMapper.selectSumByStore(chainStoreId, "points");
|
||||
user.setChainStoreId(chainStoreId);
|
||||
Double balance = baseMapper.selectSumByStore(user, "t.card_balance");
|
||||
Double point = baseMapper.selectSumByStore(user, "t.points");
|
||||
// Double literCard = baseMapper.selectSumByStore(storeId, "liter_card");
|
||||
// Double refuelMoney = baseMapper.selectSumByStore(storeId, "refuel_money");
|
||||
|
||||
|
@ -299,6 +299,15 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
|
||||
}
|
||||
ljStaffMapper.insert(staff);
|
||||
// 添加员工码信息
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mobile",param.get("mobile").toString());
|
||||
queryWrapper.eq("store_id",mtStore.getId());
|
||||
queryWrapper.eq("if_delete","0");
|
||||
staff = ljStaffMapper.selectOne(queryWrapper);
|
||||
staff.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff.getId());
|
||||
ljStaffMapper.updateById(staff);
|
||||
|
||||
// LJStaff staff1 = ljStaffMapper.selectById(staff.getId());
|
||||
if (ObjectUtil.isNotEmpty(staff.getId())){
|
||||
editTAccount.setStaffId(staff.getId());
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 941 KiB |
@ -4,12 +4,12 @@
|
||||
<el-card class="box-card">
|
||||
<el-radio-group v-model="radio1">
|
||||
<el-radio-button label="会员列表"></el-radio-button>
|
||||
<el-radio-button label="余额记录"></el-radio-button>
|
||||
<el-radio-button label="余额变动记录"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-card>
|
||||
|
||||
<vipList v-if="radio1 == '会员列表' "></vipList>
|
||||
<balanceList v-if="radio1 == '余额记录' "></balanceList>
|
||||
<balanceList v-if="radio1 == '余额变动记录' "></balanceList>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
@ -115,19 +115,19 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil}}</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfOil || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">优惠总额</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer}}</div>
|
||||
<div class="size-bole">{{orderStatistics.theTotalAmountOfTheOffer || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">交易数量</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions}}</div>
|
||||
<div class="size-bole">{{orderStatistics.numberOfTransactions || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实收总额</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived}}</div>
|
||||
<div class="size-bole">{{orderStatistics.totalAmountReceived || 0}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">微信</div>
|
||||
@ -308,6 +308,8 @@
|
||||
<div v-else-if="oilOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else-if="oilOrder.payType == 'balance'">储值卡</div>
|
||||
<div v-else-if="oilOrder.payType == 'oilCard'">囤油卡</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
@ -541,7 +543,12 @@
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi().then(res=>{
|
||||
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=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
|
@ -2,219 +2,461 @@
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="储值卡记录" name="balanceCard"></el-tab-pane>
|
||||
<el-tab-pane label="升数卡记录" name="ascendCard"></el-tab-pane>
|
||||
<el-tab-pane label="储值卡变动记录" name="balanceCard">
|
||||
<div style="display: flex;">
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<el-form size="small" :inline="true" label-width="100px" :model="queryParams">
|
||||
<el-form-item label="充值变化类型" prop="changeType">
|
||||
<el-select
|
||||
v-model="queryParams.changeType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="充值" :value="1"></el-option>
|
||||
<el-option label="消费" :value="0"></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-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<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>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">余额汇总</div>-->
|
||||
<!-- <div class="size-bole">{{ totalBalance.toFixed(2) }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="box">
|
||||
<div class="size-hui">充值笔数</div>
|
||||
<div class="size-bole">{{ inCount }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值总额</div>
|
||||
<div class="size-bole">{{ totalRecharge.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费笔数</div>
|
||||
<div class="size-bole">{{ outCount }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费总额</div>
|
||||
<div class="size-bole">{{ totalConsumption.toFixed(2) }}</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">新增会员</el-button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="cardBalanceList"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户信息" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="220" align="center"> </el-table-column>
|
||||
<el-table-column prop="changeType" label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详细信息" align="center">
|
||||
<el-table-column prop="balance" label="变动金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterTheChange" label="变动后余额" align="center" > </el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fromType" label="消费来源" align="center" > </el-table-column>
|
||||
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
v-show="total>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getCardBalanceList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="囤油卡变动记录" name="ascendCard">
|
||||
<div style="display: flex;">
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<el-form size="small" :inline="true" label-width="100px" :model="queryParams">
|
||||
<el-form-item label="充值变化类型" prop="changeType">
|
||||
<el-select
|
||||
v-model="queryParams.changeType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="充值" :value="1"></el-option>
|
||||
<el-option label="消费" :value="0"></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-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<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>-->
|
||||
<div class="box">
|
||||
<div class="size-hui">充值笔数</div>
|
||||
<div class="size-bole">{{ inCount1 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值总额</div>
|
||||
<div class="size-bole">{{ totalRecharge1.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费笔数</div>
|
||||
<div class="size-bole">{{ outCount1 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费总额</div>
|
||||
<div class="size-bole">{{ totalConsumption1.toFixed(2) }}</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">新增会员</el-button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="cardOilList"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户信息" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oilType" label="油品类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="changeType" label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详细信息" align="center">
|
||||
<el-table-column prop="oilBalance" label="变动金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterOilChange" label="变动后余额" align="center" > </el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="230" align="center"> </el-table-column>
|
||||
<el-table-column prop="fromType" label="消费来源" width="230" align="center" > </el-table-column>
|
||||
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
v-show="total1>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total1"
|
||||
:page.sync="queryParams1.page"
|
||||
:limit.sync="queryParams1.pageSize"
|
||||
@current-change="getCardOilList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div style="display: flex;">
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<el-form size="small" :inline="true" label-width="100px" :model="queryParams">
|
||||
<el-form-item label="充值变化类型" prop="changeType">
|
||||
<el-select
|
||||
v-model="queryParams.changeType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="充值" :value="1"></el-option>
|
||||
<el-option label="消费" :value="0"></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-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!--<!– <div class="top-app-sou">–>-->
|
||||
<!-- <el-form size="small" :inline="true" label-width="100px" :model="queryParams">-->
|
||||
<!-- <el-form-item label="充值变化类型" prop="changeType">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.changeType"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option label="充值" :value="1"></el-option>-->
|
||||
<!-- <el-option label="消费" :value="0"></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-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!--<!– <div style="margin-left: 10px">–>-->
|
||||
<!--<!– <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<!-- 储值卡-->
|
||||
<div v-if="activeName == 'balanceCard' ">
|
||||
<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 v-if="activeName == 'balanceCard' ">-->
|
||||
<!-- <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>–>-->
|
||||
<!--<!– <div class="box">–>-->
|
||||
<!--<!– <div class="size-hui">余额汇总</div>–>-->
|
||||
<!--<!– <div class="size-bole">{{ totalBalance.toFixed(2) }}</div>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">充值笔数</div>-->
|
||||
<!-- <div class="size-bole">{{ inCount }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="box">
|
||||
<div class="size-hui">余额汇总</div>
|
||||
<div class="size-bole">{{ totalBalance.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值笔数</div>
|
||||
<div class="size-bole">{{ inCount }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值总额</div>
|
||||
<div class="size-bole">{{ totalRecharge.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费笔数</div>
|
||||
<div class="size-bole">{{ outCount }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费总额</div>
|
||||
<div class="size-bole">{{ totalConsumption.toFixed(2) }}</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">新增会员</el-button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="cardBalanceList"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户信息" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="220" align="center"> </el-table-column>
|
||||
<el-table-column prop="changeType" label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详细信息">
|
||||
<el-table-column prop="balance" label="变动金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterTheChange" label="变动后余额" align="center" > </el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fromType" label="消费来源" align="center" > </el-table-column>
|
||||
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
v-show="total>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getCardBalanceList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- 升数卡-->
|
||||
<div v-if="activeName == 'ascendCard' ">
|
||||
<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">{{ totalRecharge.toFixed(2) }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="box">
|
||||
<div class="size-hui">充值笔数</div>
|
||||
<div class="size-bole">{{ inCount1 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">充值总额</div>
|
||||
<div class="size-bole">{{ totalRecharge1.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费笔数</div>
|
||||
<div class="size-bole">{{ outCount1 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">消费总额</div>
|
||||
<div class="size-bole">{{ totalConsumption1.toFixed(2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>列表</div>
|
||||
<div style="display: flex ">
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">消费笔数</div>-->
|
||||
<!-- <div class="size-bole">{{ outCount }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">消费总额</div>-->
|
||||
<!-- <div class="size-bole">{{ totalConsumption.toFixed(2) }}</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">新增会员</el-button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="cardOilList"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{store.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户信息" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oilType" label="油品类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="changeType" label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详细信息">
|
||||
<el-table-column prop="oilBalance" label="变动金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="afterOilChange" label="变动后余额" align="center" > </el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNo" label="订单号" width="230" align="center"> </el-table-column>
|
||||
<el-table-column prop="fromType" label="消费来源" width="230" align="center" > </el-table-column>
|
||||
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||
<!--<!– <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="table-box">-->
|
||||
<!-- <el-table-->
|
||||
<!-- :data="cardBalanceList"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column prop="storeId" label="所属油站" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{store.name}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="userId" label="用户信息" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="orderNo" label="订单号" width="220" align="center"> </el-table-column>-->
|
||||
<!-- <el-table-column prop="changeType" label="类型" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>-->
|
||||
<!-- <span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="详细信息" align="center">-->
|
||||
<!-- <el-table-column prop="balance" label="变动金额" align="center"> </el-table-column>-->
|
||||
<!-- <el-table-column prop="afterTheChange" label="变动后余额" align="center" > </el-table-column>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="fromType" label="消费来源" align="center" > </el-table-column>-->
|
||||
<!-- <el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>-->
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
v-show="total1>0"
|
||||
layout="prev, pager, next"
|
||||
:total="total1"
|
||||
:page.sync="queryParams1.page"
|
||||
:limit.sync="queryParams1.pageSize"
|
||||
@current-change="getCardOilList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- </el-table>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="pagination-box">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- background-->
|
||||
<!-- v-show="total>0"-->
|
||||
<!-- layout="prev, pager, next"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :page.sync="queryParams.page"-->
|
||||
<!-- :limit.sync="queryParams.pageSize"-->
|
||||
<!-- @current-change="getCardBalanceList">-->
|
||||
<!-- </el-pagination>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
<!--<!– 升数卡–>-->
|
||||
<!-- <div v-if="activeName == 'ascendCard' ">-->
|
||||
<!-- <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>–>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">充值笔数</div>-->
|
||||
<!-- <div class="size-bole">{{ inCount1 }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">充值总额</div>-->
|
||||
<!-- <div class="size-bole">{{ totalRecharge1.toFixed(2) }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">消费笔数</div>-->
|
||||
<!-- <div class="size-bole">{{ outCount1 }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">消费总额</div>-->
|
||||
<!-- <div class="size-bole">{{ totalConsumption1.toFixed(2) }}</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">新增会员</el-button>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="table-box">-->
|
||||
<!-- <el-table-->
|
||||
<!-- :data="cardOilList"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column prop="storeId" label="所属油站" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{store.name}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="userId" label="用户信息" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="oilType" label="油品类型" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="changeType" label="类型" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>-->
|
||||
<!-- <span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="详细信息" align="center">-->
|
||||
<!-- <el-table-column prop="oilBalance" label="变动金额" align="center"> </el-table-column>-->
|
||||
<!-- <el-table-column prop="afterOilChange" label="变动后余额" align="center" > </el-table-column>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="orderNo" label="订单号" width="230" align="center"> </el-table-column>-->
|
||||
<!-- <el-table-column prop="fromType" label="消费来源" width="230" align="center" > </el-table-column>-->
|
||||
<!-- <el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>-->
|
||||
|
||||
<!-- </el-table>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="pagination-box">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- background-->
|
||||
<!-- v-show="total1>0"-->
|
||||
<!-- layout="prev, pager, next"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- :page.sync="queryParams1.page"-->
|
||||
<!-- :limit.sync="queryParams1.pageSize"-->
|
||||
<!-- @current-change="getCardOilList">-->
|
||||
<!-- </el-pagination>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
@ -381,7 +623,6 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
console.log(this.queryParams)
|
||||
listCardBalanceRecord(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
this.cardBalanceList = res.data.records
|
||||
this.total = res.data.total
|
||||
|
@ -75,7 +75,7 @@
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
@ -559,7 +559,7 @@
|
||||
this.getConfig();
|
||||
this.getUserList();
|
||||
this.getOfficial();
|
||||
this.getStatistic();
|
||||
// this.getStatistic();
|
||||
},
|
||||
methods:{
|
||||
getOfficial(){
|
||||
@ -592,16 +592,23 @@
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.getStatistic()
|
||||
},
|
||||
// 获得统计信息
|
||||
getStatistic(){
|
||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.addNum = response.data.addNum;
|
||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||
this.balance = response.data.balance;
|
||||
this.point = response.data.point;
|
||||
// this.literCard = response.data.literCard;
|
||||
// this.refuelMoney = response.data.refuelMoney;
|
||||
if (!response.data.balance) {
|
||||
this.balance = 0
|
||||
}else {
|
||||
this.balance = response.data.balance;
|
||||
}
|
||||
if (!response.data.point) {
|
||||
this.point = 0
|
||||
}else {
|
||||
this.point = response.data.point;
|
||||
}
|
||||
});
|
||||
listUserGrade({page:1,pageSize:20}).then( response => {
|
||||
this.userGradeList = response.data.records;
|
||||
|
@ -10,8 +10,8 @@
|
||||
<!-- <el-table-column prop="date" label="变动账户"/> -->
|
||||
<el-table-column align="center" prop="changeType" label="类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
<el-tag v-if="scope.row.changeType == 0">消费</el-tag>
|
||||
<el-tag type="success" v-else>充值</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="详细信息">
|
||||
@ -50,8 +50,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.changeType === '0'">减少</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">增加</el-tag>
|
||||
<el-tag v-if="scope.row.changeType === '0'">消费</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">充值</el-tag>
|
||||
<el-tag type="success" v-else>--</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-table-column label="订单时间" prop="createTime" align="center"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
<el-table-column label="商品数量" align="center" prop="goodsNum" />
|
||||
<!-- <el-table-column label="储值卡" align="center" prop="mobile"/> -->
|
||||
<el-table-column label="优惠金额" align="center" prop="discount" />
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
@ -21,7 +21,14 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<!-- <el-table-column label="订单类型" align="center" prop="point"/> -->
|
||||
<el-table-column label="付款状态" align="center" prop="orderStatus">
|
||||
<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>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
<el-table-column label="订单金额" align="center" prop="orderAmount"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="discountAmount"/>
|
||||
<el-table-column label="储值卡消费金额" align="center" prop="balanceAmount"/>
|
||||
<el-table-column label="囤油卡消费升数" align="center" prop="oilCardAmount"/>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
@ -25,12 +27,22 @@
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<div v-else-if="scope.row.payType == 'balance'">储值卡</div>
|
||||
<div v-else-if="scope.row.payType == 'oilCard'">囤油卡</div>
|
||||
<span v-else>小程序码</span>
|
||||
<!-- <span>{{getName(payTypeList,scope.row.payType)}}</span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
|
||||
<el-table-column label="订单类型" align="center" prop="orderType"/>
|
||||
<el-table-column label="付款状态" align="center" prop="orderStatus">
|
||||
<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>
|
||||
|
||||
<pagination
|
||||
|
@ -6,8 +6,8 @@
|
||||
<el-table-column label="类型" align="center" prop="changeType">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
|
||||
<el-tag type="success" v-else>增加</el-tag>
|
||||
<el-tag v-if="scope.row.changeType == 0">兑换</el-tag>
|
||||
<el-tag type="success" v-else>赠送</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
Loading…
Reference in New Issue
Block a user