bug
This commit is contained in:
parent
9e2a581288
commit
7b5d47d115
@ -218,10 +218,10 @@
|
|||||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
||||||
<span v-else>0</span>
|
<span v-else>0</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="囤油卡消费升数">
|
<!-- <el-descriptions-item label="囤油卡消费升数">-->
|
||||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>
|
<!-- <span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>-->
|
||||||
<span v-else>0</span>
|
<!-- <span v-else>0</span>-->
|
||||||
</el-descriptions-item>
|
<!-- </el-descriptions-item>-->
|
||||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="付款方式">
|
<el-descriptions-item label="付款方式">
|
||||||
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
<el-table-column label="付款信息" align="center">
|
<el-table-column label="付款信息" align="center">
|
||||||
<el-table-column prop="payAmount" label="实付金额" align="center"> </el-table-column>
|
<el-table-column prop="payAmount" label="实付金额" align="center"> </el-table-column>
|
||||||
<el-table-column prop="balanceAmount" label="储值卡付款金额" align="center" width="115"/>
|
<el-table-column prop="balanceAmount" label="储值卡付款金额" align="center" width="115"/>
|
||||||
<el-table-column prop="oilCardAmount" label="囤油卡付款升数" align="center" width="115"/>
|
<!-- <el-table-column prop="oilCardAmount" label="囤油卡付款升数" align="center" width="115"/>-->
|
||||||
<el-table-column prop="payUser" label="付款用户" align="center" width="110" > </el-table-column>
|
<el-table-column prop="payUser" label="付款用户" align="center" width="110" > </el-table-column>
|
||||||
<el-table-column prop="payType" label="付款方式" align="center">
|
<el-table-column prop="payType" label="付款方式" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -189,6 +189,7 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
oilOrder.setOrderStatus("paid");
|
oilOrder.setOrderStatus("paid");
|
||||||
oilOrder.setPayTime(date);
|
oilOrder.setPayTime(date);
|
||||||
oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
|
oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
|
||||||
|
oilOrderService.insertFavorable(oilOrder, Double.valueOf(map1.get("oilCardAmount")));
|
||||||
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
|
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
|
||||||
// 修改油罐容量
|
// 修改油罐容量
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
|
||||||
@ -213,6 +214,7 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
// 商品订单
|
// 商品订单
|
||||||
goodsOrder.setStatus("paid");
|
goodsOrder.setStatus("paid");
|
||||||
goodsOrder.setPayTime(date);
|
goodsOrder.setPayTime(date);
|
||||||
|
goodsOrderService.insertFavorable(goodsOrder);
|
||||||
Boolean isMember = false;
|
Boolean isMember = false;
|
||||||
if (goodsOrder.getUserId()!=null){
|
if (goodsOrder.getUserId()!=null){
|
||||||
isMember = true;
|
isMember = true;
|
||||||
|
@ -217,9 +217,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
queryWrapper.eq(CardFuelRecord::getStoreId,cardFuelRecordDTO.getStoreId());
|
queryWrapper.eq(CardFuelRecord::getStoreId,cardFuelRecordDTO.getStoreId());
|
||||||
queryWrapper.eq(CardFuelRecord::getMtUserId,cardFuelRecordDTO.getMtUserId());
|
queryWrapper.eq(CardFuelRecord::getMtUserId,cardFuelRecordDTO.getMtUserId());
|
||||||
List<CardFuelRecord> cardFuelRecords = cardFuelRecordMapper.selectList(queryWrapper);
|
List<CardFuelRecord> cardFuelRecords = cardFuelRecordMapper.selectList(queryWrapper);
|
||||||
if (ObjectUtils.isNotEmpty(cardFuelRecords)){
|
Optional<CardFuelRecord> max = cardFuelRecords.stream().min(Comparator.comparing(CardFuelRecord::getLockupPrice));
|
||||||
Integer cardFuelId = cardFuelRecords.get(0).getCardFuelId();
|
CardFuelRecord cardFuelRecord = max.get();
|
||||||
CardFuelDiesel cardFuelDiesel = cardFuelDieselService.getById(cardFuelId);
|
CardFuelDiesel cardFuelDiesel = cardFuelDieselService.getById(cardFuelRecord.getCardFuelId());
|
||||||
if ("2".equals(cardFuelDiesel.getActiveTime())){
|
if ("2".equals(cardFuelDiesel.getActiveTime())){
|
||||||
cardFuelRecordDTO.setExpireTime(cardFuelDiesel.getEndTime());
|
cardFuelRecordDTO.setExpireTime(cardFuelDiesel.getEndTime());
|
||||||
}else {
|
}else {
|
||||||
@ -230,7 +230,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
Date from = Date.from(instant1);
|
Date from = Date.from(instant1);
|
||||||
cardFuelRecordDTO.setExpireTime(from);
|
cardFuelRecordDTO.setExpireTime(from);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,6 +78,17 @@ public class FavorableRecordsController extends BaseController {
|
|||||||
return getSuccessResult(this.favorableRecordsService.insert(favorableRecords));
|
return getSuccessResult(this.favorableRecordsService.insert(favorableRecords));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param favorableRecords 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/insert")
|
||||||
|
public ResponseObject insert1(@RequestBody FavorableRecords favorableRecords) {
|
||||||
|
return getSuccessResult(this.favorableRecordsService.insert1(favorableRecords));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改数据
|
* 修改数据
|
||||||
*
|
*
|
||||||
|
@ -17,6 +17,8 @@ public interface FavorableRecordsService extends IService<FavorableRecords> {
|
|||||||
|
|
||||||
boolean insert(FavorableRecords favorableRecords);
|
boolean insert(FavorableRecords favorableRecords);
|
||||||
|
|
||||||
|
boolean insert1(FavorableRecords favorableRecords);
|
||||||
|
|
||||||
IPage selectList(Page page, FavorableRecords favorableRecords);
|
IPage selectList(Page page, FavorableRecords favorableRecords);
|
||||||
|
|
||||||
Map<String,Object> selectCount(FavorableRecords favorableRecords);
|
Map<String,Object> selectCount(FavorableRecords favorableRecords);
|
||||||
|
@ -7,10 +7,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.fuint.business.marketingActivity.favorableRecords.mapper.FavorableRecordsMapper;
|
import com.fuint.business.marketingActivity.favorableRecords.mapper.FavorableRecordsMapper;
|
||||||
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||||
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -26,6 +29,9 @@ import java.util.Map;
|
|||||||
@Service("favorableRecordsService")
|
@Service("favorableRecordsService")
|
||||||
public class FavorableRecordsServiceImpl extends ServiceImpl<FavorableRecordsMapper, FavorableRecords> implements FavorableRecordsService {
|
public class FavorableRecordsServiceImpl extends ServiceImpl<FavorableRecordsMapper, FavorableRecords> implements FavorableRecordsService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ILJStoreService storeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean insert(FavorableRecords favorableRecords) {
|
public boolean insert(FavorableRecords favorableRecords) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
@ -34,6 +40,13 @@ public class FavorableRecordsServiceImpl extends ServiceImpl<FavorableRecordsMap
|
|||||||
return save(favorableRecords);
|
return save(favorableRecords);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean insert1(FavorableRecords favorableRecords) {
|
||||||
|
LJStore store = storeService.selectStoreByStoreId(favorableRecords.getStoreId());
|
||||||
|
favorableRecords.setChainStoreId(store.getChainStoreId());
|
||||||
|
return save(favorableRecords);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage selectList(Page page, FavorableRecords favorableRecords) {
|
public IPage selectList(Page page, FavorableRecords favorableRecords) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
@ -3,7 +3,9 @@ package com.fuint.business.order.service;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||||
import com.fuint.business.order.entity.LJOrder;
|
import com.fuint.business.order.entity.LJOrder;
|
||||||
|
import com.fuint.business.order.entity.OilOrder;
|
||||||
import com.fuint.business.order.vo.LJOrderVo;
|
import com.fuint.business.order.vo.LJOrderVo;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -58,6 +60,9 @@ public interface LJOrderService extends IService<LJOrder> {
|
|||||||
*/
|
*/
|
||||||
public int updateGoodOrder(LJOrder order);
|
public int updateGoodOrder(LJOrder order);
|
||||||
|
|
||||||
|
// 添加优惠记录
|
||||||
|
void insertFavorable(LJOrder order);
|
||||||
|
|
||||||
Map<String, String> orderStatistics(LJOrder order);
|
Map<String, String> orderStatistics(LJOrder order);
|
||||||
|
|
||||||
LJOrder getStatisticsByTime(Date time ,Integer goodsId, String payType);
|
LJOrder getStatisticsByTime(Date time ,Integer goodsId, String payType);
|
||||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||||
import com.fuint.business.order.entity.CashierOrder;
|
import com.fuint.business.order.entity.CashierOrder;
|
||||||
import com.fuint.business.order.entity.OilOrder;
|
import com.fuint.business.order.entity.OilOrder;
|
||||||
import com.fuint.business.order.vo.OilOrderVo;
|
import com.fuint.business.order.vo.OilOrderVo;
|
||||||
@ -83,6 +84,12 @@ public interface OilOrderService extends IService<OilOrder> {
|
|||||||
*/
|
*/
|
||||||
public Map<String,Object> insertOilOrder(Map<String ,String> map) throws Exception;
|
public Map<String,Object> insertOilOrder(Map<String ,String> map) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加优惠记录信息
|
||||||
|
* @param order
|
||||||
|
*/
|
||||||
|
void insertFavorable(OilOrder order,Double oilCardAmount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费有礼调用接口
|
* 消费有礼调用接口
|
||||||
* @param storeId 店铺id
|
* @param storeId 店铺id
|
||||||
|
@ -8,7 +8,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.convenienceSore.entity.LJGoods;
|
import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||||
import com.fuint.business.order.entity.LJOrder;
|
import com.fuint.business.order.entity.LJOrder;
|
||||||
|
import com.fuint.business.order.entity.OilOrder;
|
||||||
import com.fuint.business.order.entity.OrderGoods;
|
import com.fuint.business.order.entity.OrderGoods;
|
||||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||||
import com.fuint.business.order.service.LJOrderService;
|
import com.fuint.business.order.service.LJOrderService;
|
||||||
@ -21,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -33,6 +37,8 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private OrderGoodsService orderGoodsService;
|
private OrderGoodsService orderGoodsService;
|
||||||
|
@Resource
|
||||||
|
private FavorableRecordsService favorableRecordsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<LJOrder> selectOrderList(Page page, LJOrder order) {
|
public IPage<LJOrder> selectOrderList(Page page, LJOrder order) {
|
||||||
@ -104,6 +110,21 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
|||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加优惠记录
|
||||||
|
@Override
|
||||||
|
public void insertFavorable(LJOrder order) {
|
||||||
|
FavorableRecords favorableRecords = new FavorableRecords();
|
||||||
|
favorableRecords.setStoreId(order.getStoreId());
|
||||||
|
favorableRecords.setOrderNo(order.getOrderNo());
|
||||||
|
favorableRecords.setFavConsumptionType("商品消费");
|
||||||
|
favorableRecords.setFavFrom("收银台");
|
||||||
|
favorableRecords.setFavType("商品消费");
|
||||||
|
if (order.getDiscount()>0.0){
|
||||||
|
favorableRecords.setFavMoney(order.getDiscount());
|
||||||
|
favorableRecordsService.insert1(favorableRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> orderStatistics(LJOrder order) {
|
public Map<String, String> orderStatistics(LJOrder order) {
|
||||||
//商品笔数
|
//商品笔数
|
||||||
|
@ -39,6 +39,8 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
|||||||
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
|
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
|
||||||
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
||||||
import com.fuint.business.marketingActivity.cardValueChildrens.service.CardValudChildrensService;
|
import com.fuint.business.marketingActivity.cardValueChildrens.service.CardValudChildrensService;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||||
|
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||||
import com.fuint.business.member.mapper.LJStaffMapper;
|
import com.fuint.business.member.mapper.LJStaffMapper;
|
||||||
import com.fuint.business.order.entity.*;
|
import com.fuint.business.order.entity.*;
|
||||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||||
@ -130,6 +132,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
private IntegralSettingsService integralSettingsService;
|
private IntegralSettingsService integralSettingsService;
|
||||||
@Resource
|
@Resource
|
||||||
private OilGunService oilGunService;
|
private OilGunService oilGunService;
|
||||||
|
@Resource
|
||||||
|
private FavorableRecordsService favorableRecordsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||||
@ -287,6 +291,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
log.info("11111111111111111111111285:",map.get("levelAmount"));
|
log.info("11111111111111111111111285:",map.get("levelAmount"));
|
||||||
Double levelAmount = Double.valueOf(map.get("levelAmount"));
|
Double levelAmount = Double.valueOf(map.get("levelAmount"));
|
||||||
Double activeAmount = Double.valueOf(map.get("activeAmount"));
|
Double activeAmount = Double.valueOf(map.get("activeAmount"));
|
||||||
|
Double oilCardAmount1 = Double.valueOf(map.get("oilCardAmount1"));
|
||||||
// 优惠券id
|
// 优惠券id
|
||||||
Integer cardFavorableId = null;
|
Integer cardFavorableId = null;
|
||||||
if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){
|
if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){
|
||||||
@ -496,11 +501,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
order.setPayTime(new Date());
|
order.setPayTime(new Date());
|
||||||
order.setOrderStatus("paid");
|
order.setOrderStatus("paid");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(this.selectOilOrderByOrderNo(orderNo))){
|
// if (ObjectUtil.isNotEmpty(this.selectOilOrderByOrderNo(orderNo))){
|
||||||
baseMapper.updateById(order);
|
// baseMapper.updateById(order);
|
||||||
}else {
|
// }else {
|
||||||
baseMapper.insert(order);
|
baseMapper.insert(order);
|
||||||
}
|
// }
|
||||||
oilOrder1 = this.selectOilOrderByOrderNo(orderNo);
|
oilOrder1 = this.selectOilOrderByOrderNo(orderNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -559,6 +564,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
map1.put("oilOrder",map.get("oilOrder"));
|
map1.put("oilOrder",map.get("oilOrder"));
|
||||||
map1.put("tankId",map.get("oilOrder"));
|
map1.put("tankId",map.get("oilOrder"));
|
||||||
map1.put("storeId",storeId.toString());
|
map1.put("storeId",storeId.toString());
|
||||||
|
map1.put("oilCardAmount",oilCardAmount1.toString());
|
||||||
|
|
||||||
// 调用支付接口
|
// 调用支付接口
|
||||||
try {
|
try {
|
||||||
@ -578,11 +584,13 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
if (oilOrder2.getOrderStatus().equals("paid")){
|
if (oilOrder2.getOrderStatus().equals("paid")){
|
||||||
cashierOrder.setPayTime(new Date());
|
cashierOrder.setPayTime(new Date());
|
||||||
if (ObjectUtil.isNotEmpty(oilOrder2.getUserId())) integralSettingsService.refuelPoints(oilOrder2);
|
if (ObjectUtil.isNotEmpty(oilOrder2.getUserId())) integralSettingsService.refuelPoints(oilOrder2);
|
||||||
|
insertFavorable(oilOrder2,oilCardAmount1);
|
||||||
}
|
}
|
||||||
cashierOrder.setOilOrderId(oilOrder2.getId());
|
cashierOrder.setOilOrderId(oilOrder2.getId());
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(goodsOrder1)){
|
if (!ObjectUtil.isEmpty(goodsOrder1)){
|
||||||
orders.put("goodsOrder",goodsOrder1);
|
orders.put("goodsOrder",goodsOrder1);
|
||||||
|
if (goodsOrder1.getStatus().equals("paid")) orderService.insertFavorable(goodsOrder1);
|
||||||
cashierOrder.setGoodsOrderId(goodsOrder1.getId());
|
cashierOrder.setGoodsOrderId(goodsOrder1.getId());
|
||||||
}
|
}
|
||||||
orders.put("orderNo",orderNo);
|
orders.put("orderNo",orderNo);
|
||||||
@ -590,6 +598,31 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加优惠记录
|
||||||
|
@Override
|
||||||
|
public void insertFavorable(OilOrder order,Double oilCardAmount) {
|
||||||
|
FavorableRecords favorableRecords = new FavorableRecords();
|
||||||
|
favorableRecords.setStoreId(order.getStoreId());
|
||||||
|
favorableRecords.setOrderNo(order.getOrderNo());
|
||||||
|
favorableRecords.setFavConsumptionType("油品消费");
|
||||||
|
favorableRecords.setFavFrom("收银台");
|
||||||
|
if (oilCardAmount>0.0){
|
||||||
|
favorableRecords.setFavType("囤油卡消费");
|
||||||
|
favorableRecords.setFavMoney(oilCardAmount);
|
||||||
|
favorableRecordsService.insert1(favorableRecords);
|
||||||
|
}
|
||||||
|
if (order.getLevelAmount()>0.0){
|
||||||
|
favorableRecords.setFavType("等级消费");
|
||||||
|
favorableRecords.setFavMoney(order.getLevelAmount());
|
||||||
|
favorableRecordsService.insert1(favorableRecords);
|
||||||
|
}
|
||||||
|
if (order.getActiveAmount()>0.0){
|
||||||
|
favorableRecords.setFavType("营销活动消费");
|
||||||
|
favorableRecords.setFavMoney(order.getActiveAmount());
|
||||||
|
favorableRecordsService.insert1(favorableRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 调用消费有礼接口
|
// 调用消费有礼接口
|
||||||
public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Double payAmount,Integer oilId) throws Exception {
|
public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Double payAmount,Integer oilId) throws Exception {
|
||||||
if (ObjectUtil.isNotEmpty(userId)){
|
if (ObjectUtil.isNotEmpty(userId)){
|
||||||
|
@ -85,3 +85,12 @@ export function getOilOrderAllAmount(id) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增优惠记录信息
|
||||||
|
export function addFavorable(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/marketingActivity/favorableRecords/insert',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -54,6 +54,21 @@
|
|||||||
<div class="hj-box" style="justify-content: flex-end">合计: ¥{{ (oilAmount + goodsAmount).toFixed(2) }}</div>
|
<div class="hj-box" style="justify-content: flex-end">合计: ¥{{ (oilAmount + goodsAmount).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="overflow-y: scroll;height: 42vh">
|
<div style="overflow-y: scroll;height: 42vh">
|
||||||
|
<div class="center-left-hj" v-show="isMember && refuelMoney && refuelMoney.length>0">
|
||||||
|
<div>
|
||||||
|
<!-- <el-checkbox-->
|
||||||
|
<!-- style="color: black;font-size: 16px"-->
|
||||||
|
<!-- v-model="checkAll3" @change="handleCheckAllChange3">-->
|
||||||
|
<!-- </el-checkbox>-->
|
||||||
|
囤油卡
|
||||||
|
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||||
|
({{ item.type }}卡
|
||||||
|
锁价:{{ item.lockupPrice ? item.lockupPrice : 0.00 }}元/L)
|
||||||
|
<!-- 余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L)-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="oilCardAmount>0">- ¥{{ oilCardAmount }}</div>
|
||||||
|
</div>
|
||||||
<div class="center-left-hj">
|
<div class="center-left-hj">
|
||||||
<div>
|
<div>
|
||||||
<el-popover
|
<el-popover
|
||||||
@ -121,21 +136,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-left-hj" v-show="isMember && refuelMoney && refuelMoney.length>0">
|
|
||||||
<div>
|
|
||||||
<el-checkbox
|
|
||||||
style="color: black;font-size: 16px"
|
|
||||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
|
||||||
</el-checkbox><!--:indeterminate="isIndeterminate3"-->
|
|
||||||
囤油卡
|
|
||||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
|
||||||
({{ item.type }}卡
|
|
||||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
|
||||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L)
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>- {{ consumeRefuelMoney }}L</div>
|
|
||||||
</div>
|
|
||||||
<div class="center-left-hj" v-show="isMember">
|
<div class="center-left-hj" v-show="isMember">
|
||||||
<div>
|
<div>
|
||||||
<el-checkbox style="color: black;font-size: 16px" :disabled="balance==0"
|
<el-checkbox style="color: black;font-size: 16px" :disabled="balance==0"
|
||||||
@ -574,13 +574,13 @@
|
|||||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "0"}}</span>
|
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "0"}}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="账户余额">{{member.cardBalance ? member.cardBalance : 0}}元</el-descriptions-item>
|
<el-descriptions-item label="账户余额">{{member.cardBalance ? member.cardBalance : 0}}元</el-descriptions-item>
|
||||||
<el-descriptions-item label="囤油卡余额" v-if="refuelMoney">
|
<!-- <el-descriptions-item label="囤油卡余额" v-if="refuelMoney">-->
|
||||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
<!-- <div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">-->
|
||||||
{{ item.type }}卡
|
<!-- {{ item.type }}卡-->
|
||||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
<!-- <!– <span style="color: #00afff">{{ item.oilType }}</span>–>-->
|
||||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L;
|
<!-- 余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L;-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-descriptions-item>
|
<!-- </el-descriptions-item>-->
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-row>
|
</el-row>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@ -732,7 +732,7 @@
|
|||||||
v-for="(item,index) in cardFuelDieselList" :key="index"
|
v-for="(item,index) in cardFuelDieselList" :key="index"
|
||||||
:class="activeKey === index ? 'select2' : ''"
|
:class="activeKey === index ? 'select2' : ''"
|
||||||
@click="recharge(index)">
|
@click="recharge(index)">
|
||||||
<div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>
|
<!-- <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>-->
|
||||||
<div style="font-size: 14px">售价<span style="color: #00afff;">{{ item.rechargeBalance }}</span>元</div>
|
<div style="font-size: 14px">售价<span style="color: #00afff;">{{ item.rechargeBalance }}</span>元</div>
|
||||||
<div style="font-size: 14px">锁价<span style="color: #00afff;">{{ item.lockupPrice }}</span>/升</div>
|
<div style="font-size: 14px">锁价<span style="color: #00afff;">{{ item.lockupPrice }}</span>/升</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1242,9 +1242,9 @@
|
|||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {getOilNameList, getOilNumGun, listOilNumGun} from "@/api/cashier/oilnumgun";
|
import {getOilNameList, getOilNumGun, listOilNumGun} from "@/api/cashier/oilnumgun";
|
||||||
import {listgoods} from "@/api/cashier/ljgoods";
|
import {listgoods} from "@/api/cashier/ljgoods";
|
||||||
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
import {getRecord, getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||||
import {queryStaffList, queryStaffs, staffInfo} from "@/api/cashier/staff";
|
import {queryStaffList, queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||||
import {addLJGoods, goodsOrder, oilOrder, scanAppletQrCode} from "@/api/cashier/oilorder";
|
import {addFavorable, addLJGoods, goodsOrder, oilOrder, scanAppletQrCode} from "@/api/cashier/oilorder";
|
||||||
import {getUserGrade, listUserGrade, userGradeInfo} from "@/api/cashier/usergrade";
|
import {getUserGrade, listUserGrade, userGradeInfo} from "@/api/cashier/usergrade";
|
||||||
import {getOilGun, getOilTank} from "@/api/cashier/oilGuns";
|
import {getOilGun, getOilTank} from "@/api/cashier/oilGuns";
|
||||||
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
|
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
|
||||||
@ -1378,6 +1378,8 @@
|
|||||||
},
|
},
|
||||||
// 会员消费金额(储值卡需要减少的金额)
|
// 会员消费金额(储值卡需要减少的金额)
|
||||||
consumeAmount:0,
|
consumeAmount:0,
|
||||||
|
// 囤油卡优惠金额
|
||||||
|
oilCardAmount:0,
|
||||||
// 账户余额
|
// 账户余额
|
||||||
balance:0,
|
balance:0,
|
||||||
// 绑定金额数据
|
// 绑定金额数据
|
||||||
@ -1854,9 +1856,9 @@
|
|||||||
await getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
await getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
||||||
if (res.data){
|
if (res.data){
|
||||||
this.member = res.data
|
this.member = res.data
|
||||||
if (res.data.refuelMoney){
|
// if (res.data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
// this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
||||||
}
|
// }
|
||||||
this.rechargeBalCard = false
|
this.rechargeBalCard = false
|
||||||
this.rechargeOilCard = false
|
this.rechargeOilCard = false
|
||||||
}
|
}
|
||||||
@ -2484,11 +2486,11 @@
|
|||||||
getUserInfoMobile({mobile:mobile}).then( response => {
|
getUserInfoMobile({mobile:mobile}).then( response => {
|
||||||
if (response.data){
|
if (response.data){
|
||||||
this.member = response.data
|
this.member = response.data
|
||||||
if (response.data.refuelMoney){
|
// if (response.data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
// this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||||
}else {
|
// }else {
|
||||||
this.refuelMoney = null
|
// this.refuelMoney = null
|
||||||
}
|
// }
|
||||||
this.storeId = response.data.storeId
|
this.storeId = response.data.storeId
|
||||||
this.isSure = true
|
this.isSure = true
|
||||||
}
|
}
|
||||||
@ -2600,7 +2602,7 @@
|
|||||||
this.map.authCode = this.authCode;
|
this.map.authCode = this.authCode;
|
||||||
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
||||||
this.map.consumeAmount = 0.0;
|
this.map.consumeAmount = 0.0;
|
||||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
// this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||||
this.map.couponId = this.useCouponIds
|
this.map.couponId = this.useCouponIds
|
||||||
if (this.staff){
|
if (this.staff){
|
||||||
this.map.staffId = this.staff.id
|
this.map.staffId = this.staff.id
|
||||||
@ -3136,12 +3138,10 @@
|
|||||||
this.map.userId = data.id;
|
this.map.userId = data.id;
|
||||||
this.balance = this.member.cardBalance;
|
this.balance = this.member.cardBalance;
|
||||||
await this.getGrade(this.member.id,this.member.gradeId)
|
await this.getGrade(this.member.id,this.member.gradeId)
|
||||||
if (data.refuelMoney){
|
|
||||||
// 使用囤油卡
|
// 使用囤油卡
|
||||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
|
||||||
await this.changeRefuelMoney();
|
await this.changeRefuelMoney();
|
||||||
}
|
|
||||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
if (this.balance>0 && this.oilAmount>0 || this.isOilStorageCard){
|
||||||
this.checkAll4 = true
|
this.checkAll4 = true
|
||||||
if (this.goodsOrder.length==0){
|
if (this.goodsOrder.length==0){
|
||||||
this.payType = "balance"
|
this.payType = "balance"
|
||||||
@ -3235,7 +3235,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
if(!this.isOilStorageCard){
|
if(this.isOilStorageCard){
|
||||||
this.countAmountFull()
|
this.countAmountFull()
|
||||||
}
|
}
|
||||||
if (type==1){
|
if (type==1){
|
||||||
@ -3363,15 +3363,15 @@
|
|||||||
// this.checkAll4 = true
|
// this.checkAll4 = true
|
||||||
// }
|
// }
|
||||||
if (this.checkAll4) {
|
if (this.checkAll4) {
|
||||||
if (this.balance >= (this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction)) {
|
if (this.balance >= (this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction - this.oilCardAmount)) {
|
||||||
this.oilActualPay = 0
|
this.oilActualPay = 0
|
||||||
this.consumeAmount = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction
|
this.consumeAmount = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction - this.oilCardAmount
|
||||||
} else {
|
} else {
|
||||||
this.oilActualPay = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction - this.balance
|
this.oilActualPay = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction - this.oilCardAmount - this.balance
|
||||||
this.consumeAmount = this.balance
|
this.consumeAmount = this.balance
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
this.oilActualPay = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction
|
this.oilActualPay = this.oilAmount - this.oilDiscount - this.couponAmount - this.fullReduction - this.oilCardAmount
|
||||||
this.consumeAmount = 0
|
this.consumeAmount = 0
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
@ -3495,11 +3495,11 @@
|
|||||||
handleChoose(data) {
|
handleChoose(data) {
|
||||||
this.isSure = true;
|
this.isSure = true;
|
||||||
this.member = data;
|
this.member = data;
|
||||||
if (data.refuelMoney){
|
// if (data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
// this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||||
}else {
|
// }else {
|
||||||
this.refuelMoney = null
|
// this.refuelMoney = null
|
||||||
}
|
// }
|
||||||
this.dialogVisibleMember = false;
|
this.dialogVisibleMember = false;
|
||||||
},
|
},
|
||||||
// 清空商品订单列表
|
// 清空商品订单列表
|
||||||
@ -3798,9 +3798,9 @@
|
|||||||
this.checkAll4 = false;
|
this.checkAll4 = false;
|
||||||
this.isExistOilOrder = false
|
this.isExistOilOrder = false
|
||||||
|
|
||||||
if (this.member.refuelMoney!=null){
|
// if (this.member.refuelMoney!=null){
|
||||||
this.refuelMoney = JSON.parse(this.member.refuelMoney)
|
// this.refuelMoney = JSON.parse(this.member.refuelMoney)
|
||||||
}
|
// }
|
||||||
this.amount = 0;
|
this.amount = 0;
|
||||||
},
|
},
|
||||||
// 获取员工列表
|
// 获取员工列表
|
||||||
@ -3853,11 +3853,11 @@
|
|||||||
if (this.isMember){
|
if (this.isMember){
|
||||||
|
|
||||||
await this.getGrade(this.member.id,this.member.gradeId)
|
await this.getGrade(this.member.id,this.member.gradeId)
|
||||||
if (this.refuelMoney){
|
// if (this.refuelMoney){
|
||||||
// 使用囤油卡
|
// 使用囤油卡
|
||||||
await this.changeRefuelMoney();
|
await this.changeRefuelMoney();
|
||||||
}
|
// }
|
||||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
if (this.balance>0 && this.oilAmount>0 || !this.isOilStorageCard){
|
||||||
this.checkAll4 = true
|
this.checkAll4 = true
|
||||||
if (this.goodsOrder.length==0) {
|
if (this.goodsOrder.length==0) {
|
||||||
this.payType = "balance"
|
this.payType = "balance"
|
||||||
@ -3873,60 +3873,31 @@
|
|||||||
},
|
},
|
||||||
// 囤油卡变化后总金额的变化
|
// 囤油卡变化后总金额的变化
|
||||||
changeRefuelMoney(){
|
changeRefuelMoney(){
|
||||||
this.oilDiscount = 0
|
getRecord({mtUserId:this.member.id}).then(res => {
|
||||||
this.couponAmount = 0
|
this.oilCardAmount = 0
|
||||||
this.fullReduction = 0
|
let oilAmount = 0
|
||||||
let _this = this;
|
this.refuelMoney = res.data
|
||||||
_this.consumeRefuelMoney = 0;
|
// 修改油品的单价
|
||||||
_this.oilActualPay = 0;
|
this.oilOrder.forEach(item => {
|
||||||
_this.hoardAmount = 0;
|
|
||||||
_this.oilAmount = 0;
|
|
||||||
_this.refuelMoney1 = []
|
|
||||||
let hoardAmount1 = 0;
|
|
||||||
let index = 0
|
|
||||||
let lastMoney=0;;
|
|
||||||
_this.oilOrder.forEach(item => {
|
|
||||||
let conRefMon = 0;
|
|
||||||
let hoardAmount = 0;
|
|
||||||
let amount = 0;
|
let amount = 0;
|
||||||
let amount1 = 0;
|
let flag = false;
|
||||||
let id = ""
|
this.refuelMoney.forEach(i => {
|
||||||
if (_this.refuelMoney){
|
if (item.oilName==i.oilType){
|
||||||
let innerFlag = 0;
|
item.lockupPrice = i.lockupPrice
|
||||||
for (let i = 0;i < _this.refuelMoney.length;i++){
|
amount = item.lockupPrice * item.liters
|
||||||
// 囤油卡升数变化
|
this.isOilStorageCard = true
|
||||||
if (_this.refuelMoney[i].oilType==item.oilName && _this.refuelMoney[i].refuelMoney>0&&_this.consumeRefuelMoney<_this.refuelMoney[i].refuelMoney){
|
flag = false
|
||||||
_this.refuelMoney1.push(item)
|
|
||||||
id = item.id
|
|
||||||
_this.isOilStorageCard = true
|
|
||||||
console.log(_this.refuelMoney[i].refuelMoney , item.liters,1547)
|
|
||||||
if(item.liters<=_this.refuelMoney[i].refuelMoney- _this.consumeRefuelMoney){
|
|
||||||
conRefMon= item.liters
|
|
||||||
}else {
|
}else {
|
||||||
conRefMon = _this.refuelMoney[i].refuelMoney - _this.consumeRefuelMoney
|
flag = true
|
||||||
//剩余油需要换算钱
|
|
||||||
let lastOil = item.liters - conRefMon
|
|
||||||
hoardAmount = lastOil * item.oilPrice
|
|
||||||
}
|
}
|
||||||
lastMoney += +hoardAmount
|
|
||||||
innerFlag =1;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(innerFlag ==0){
|
|
||||||
lastMoney += +item.amount
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
lastMoney += +item.amount
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.consumeRefuelMoney += +conRefMon
|
|
||||||
console.log(hoardAmount,1254)
|
|
||||||
_this.hoardAmount = +lastMoney.toFixed(2)
|
|
||||||
_this.oilAmount += +item.amount
|
|
||||||
})
|
})
|
||||||
|
// oilCardAmount
|
||||||
_this.isDefaultUseCard();
|
if (flag) amount = item.oilPrice * item.liters
|
||||||
|
oilAmount += amount
|
||||||
|
})
|
||||||
|
this.oilCardAmount = this.oilAmount - oilAmount
|
||||||
|
this.countAmountFull()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
changeBalance(hoardAmount,id){
|
changeBalance(hoardAmount,id){
|
||||||
if (this.balance>0 && id != ""){
|
if (this.balance>0 && id != ""){
|
||||||
@ -4001,11 +3972,11 @@
|
|||||||
getUserInfoMobile({mobile:this.userNo}).then( response => {
|
getUserInfoMobile({mobile:this.userNo}).then( response => {
|
||||||
if (response.data){
|
if (response.data){
|
||||||
this.member = response.data
|
this.member = response.data
|
||||||
if (response.data.refuelMoney){
|
// if (response.data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
// this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||||
}else {
|
// }else {
|
||||||
this.refuelMoney = null
|
// this.refuelMoney = null
|
||||||
}
|
// }
|
||||||
this.storeId = response.data.storeId
|
this.storeId = response.data.storeId
|
||||||
this.isSure = true
|
this.isSure = true
|
||||||
}else {
|
}else {
|
||||||
@ -4088,18 +4059,19 @@
|
|||||||
this.map.goodsAmount = this.goodsAmount;
|
this.map.goodsAmount = this.goodsAmount;
|
||||||
this.map.oilActualPay = this.oilActualPay;
|
this.map.oilActualPay = this.oilActualPay;
|
||||||
this.map.goodsActualPay = this.goodsActualPay;
|
this.map.goodsActualPay = this.goodsActualPay;
|
||||||
this.map.oilDiscount = (this.oilDiscount + this.fullReduction + this.couponAmount).toFixed(2) ;
|
this.map.oilDiscount = (this.oilDiscount + this.fullReduction + this.couponAmount + this.oilCardAmount).toFixed(2) ;
|
||||||
this.map.goodsDiscount = this.goodsDiscount;
|
this.map.goodsDiscount = this.goodsDiscount;
|
||||||
this.map.goodsNum = this.goodsTotal;
|
this.map.goodsNum = this.goodsTotal;
|
||||||
this.map.balanceAmount = this.consumeAmount;
|
this.map.balanceAmount = this.consumeAmount;
|
||||||
this.map.oilCardAmount = this.consumeRefuelMoney;
|
this.map.oilCardAmount = this.consumeRefuelMoney;
|
||||||
|
this.map.oilCardAmount1 = this.oilCardAmount;
|
||||||
this.map.oilOrder = JSON.stringify(this.oilOrder);
|
this.map.oilOrder = JSON.stringify(this.oilOrder);
|
||||||
this.map.goodsOrder = JSON.stringify(this.goodsOrder);
|
this.map.goodsOrder = JSON.stringify(this.goodsOrder);
|
||||||
this.map.authCode = this.authCode;
|
this.map.authCode = this.authCode;
|
||||||
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
||||||
this.map.consumeAmount = this.consumeAmount;
|
this.map.consumeAmount = this.consumeAmount;
|
||||||
if (this.consumeRefuelMoney>0) this.updateRefuelMoney();
|
// if (this.consumeRefuelMoney>0) this.updateRefuelMoney();
|
||||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
// this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||||
this.map.couponId = this.useCouponIds
|
this.map.couponId = this.useCouponIds
|
||||||
if (this.staff) {
|
if (this.staff) {
|
||||||
this.map.staffId = this.staff.id
|
this.map.staffId = this.staff.id
|
||||||
@ -4143,15 +4115,29 @@
|
|||||||
|
|
||||||
let isPaySuccess = false;
|
let isPaySuccess = false;
|
||||||
|
|
||||||
await addLJGoods(_this.map).then( response => {
|
await addLJGoods(_this.map).then( async response => {
|
||||||
_this.orderNo = response.data.orderNo;
|
_this.orderNo = response.data.orderNo;
|
||||||
if (response.data.oilOrder!=null){
|
if (response.data.oilOrder != null) {
|
||||||
if (response.data.oilOrder.orderStatus == "paid"){
|
if (response.data.oilOrder.orderStatus == "paid") {
|
||||||
|
|
||||||
_this.isPaySuccess = true;
|
_this.isPaySuccess = true;
|
||||||
isPaySuccess = true
|
isPaySuccess = true
|
||||||
_this.isPay = true;
|
_this.isPay = true;
|
||||||
_this.loading = false;
|
_this.loading = false;
|
||||||
|
|
||||||
|
_this.printLocally()
|
||||||
|
_this.oilOrderReport()
|
||||||
|
|
||||||
|
_this.resetting1()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (response.data.goodsOrder != null) {
|
||||||
|
if (response.data.goodsOrder.status == "paid") {
|
||||||
|
_this.isPaySuccess = true;
|
||||||
|
isPaySuccess = true
|
||||||
|
_this.isPay = true;
|
||||||
|
_this.loading = false;
|
||||||
_this.printLocally()
|
_this.printLocally()
|
||||||
_this.oilOrderReport()
|
_this.oilOrderReport()
|
||||||
|
|
||||||
@ -4159,27 +4145,14 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.data.goodsOrder!=null){
|
if (response.data.error == 1) {
|
||||||
if (response.data.goodsOrder.status == "paid"){
|
|
||||||
_this.isPaySuccess = true;
|
|
||||||
isPaySuccess = true
|
|
||||||
_this.isPay = true;
|
|
||||||
_this.loading = false;
|
|
||||||
_this.printLocally()
|
|
||||||
_this.oilOrderReport()
|
|
||||||
|
|
||||||
_this.resetting1()
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (response.data.error==1){
|
|
||||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.autofocus = false
|
this.autofocus = false
|
||||||
this.dialogVisiblej = false;
|
this.dialogVisiblej = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (response.data.error=="请先配置支付通道"){
|
if (response.data.error == "请先配置支付通道") {
|
||||||
this.$modal.msgError(response.data.error)
|
this.$modal.msgError(response.data.error)
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// this.dialogVisiblej = false;
|
// this.dialogVisiblej = false;
|
||||||
@ -4208,6 +4181,7 @@
|
|||||||
_this.consumeRefuelMoney = 0;
|
_this.consumeRefuelMoney = 0;
|
||||||
_this.oilTotal = 0;
|
_this.oilTotal = 0;
|
||||||
_this.goodsTotal = 0;
|
_this.goodsTotal = 0;
|
||||||
|
_this.oilCardAmount = 0;
|
||||||
_this.isMember = false;
|
_this.isMember = false;
|
||||||
_this.isSure = false;
|
_this.isSure = false;
|
||||||
_this.oilOrder = []
|
_this.oilOrder = []
|
||||||
@ -5068,9 +5042,9 @@
|
|||||||
}
|
}
|
||||||
.mon2 {
|
.mon2 {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
height: 75px;
|
height: 70px;
|
||||||
border: 0.5px #dadfe6 solid;
|
border: 0.5px #dadfe6 solid;
|
||||||
line-height: 25px;
|
line-height: 35px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
@ -229,10 +229,10 @@
|
|||||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
||||||
<span v-else>0</span>
|
<span v-else>0</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="囤油卡消费升数">
|
<!-- <el-descriptions-item label="囤油卡消费升数">-->
|
||||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>
|
<!-- <span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>-->
|
||||||
<span v-else>0</span>
|
<!-- <span v-else>0</span>-->
|
||||||
</el-descriptions-item>
|
<!-- </el-descriptions-item>-->
|
||||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="付款方式">
|
<el-descriptions-item label="付款方式">
|
||||||
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
<el-table-column label="付款信息" align="center">
|
<el-table-column label="付款信息" align="center">
|
||||||
<el-table-column prop="payAmount" label="实付金额" align="center"> </el-table-column>
|
<el-table-column prop="payAmount" label="实付金额" align="center"> </el-table-column>
|
||||||
<el-table-column prop="balanceAmount" label="储值卡付款金额" align="center" width="115"/>
|
<el-table-column prop="balanceAmount" label="储值卡付款金额" align="center" width="115"/>
|
||||||
<el-table-column prop="oilCardAmount" label="囤油卡付款升数" align="center" width="115"/>
|
<!-- <el-table-column prop="oilCardAmount" label="囤油卡付款升数" align="center" width="115"/>-->
|
||||||
<el-table-column prop="payUser" label="付款用户" align="center" width="110"> </el-table-column>
|
<el-table-column prop="payUser" label="付款用户" align="center" width="110"> </el-table-column>
|
||||||
<el-table-column prop="payType" label="付款方式" align="center">
|
<el-table-column prop="payType" label="付款方式" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -325,10 +325,10 @@
|
|||||||
<div>储值卡付款金额</div>
|
<div>储值卡付款金额</div>
|
||||||
<div>¥{{ oilOrder.balanceAmount }}</div>
|
<div>¥{{ oilOrder.balanceAmount }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="oilOrder.oilCardAmount>0">
|
<!-- <div class="input-box" v-if="oilOrder.oilCardAmount>0">-->
|
||||||
<div>囤油卡付款升数</div>
|
<!-- <div>囤油卡付款升数</div>-->
|
||||||
<div>¥{{ oilOrder.oilCardAmount }}</div>
|
<!-- <div>¥{{ oilOrder.oilCardAmount }}</div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<div>实付款</div>
|
<div>实付款</div>
|
||||||
<div>¥{{ oilOrder.payAmount }}</div>
|
<div>¥{{ oilOrder.payAmount }}</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user