Merge remote-tracking branch 'origin/master'

This commit is contained in:
@QQNZX 2024-02-28 16:44:42 +08:00
commit ec24a5c512
31 changed files with 684 additions and 229 deletions

View File

@ -666,7 +666,7 @@ export default {
//
giftImages: [],
//
uploadAction: process.env.VUE_APP_SERVER_URL + 'backendApi/file/upload',
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
uploadHeader: { 'Access-Token' : getToken() },
//
hideUpload: false,
@ -676,7 +676,7 @@ export default {
url:'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'}
],
//
imagePath: process.env.VUE_APP_SERVER_URL,
imagePath: process.env.VUE_APP_BASE_API,
dialogImageUrl: "",
dialogVisible: false,

View File

@ -49,8 +49,8 @@ public class Const {
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
//异步通知(回调地址)
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
//下单
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";

View File

@ -123,8 +123,8 @@ public class IntegralOrdersController extends BaseController {
* @return
*/
@GetMapping("/statistics")
public ResponseObject statistics(Integer orderType) {
return getSuccessResult(this.integralOrdersService.statistics(orderType));
public ResponseObject statistics(IntegralOrdersDTO integralOrders) {
return getSuccessResult(this.integralOrdersService.statistics(integralOrders));
}

View File

@ -97,7 +97,7 @@ public interface IntegralOrdersMapper {
* 统计数据
* @return
*/
Map<String, String> statistics(@Param("storeId") Integer storeId, @Param("orderType") Integer orderType);
Map<String, String> statistics(@Param("integralOrders") IntegralOrdersDTO integralOrders);
List<IntegralOrders> getListByOrderNo(@Param("orderNumber") String orderNumber,@Param("storeId") Integer storeId);

View File

@ -103,7 +103,9 @@
and ig.gift_name like CONCAT ('%',#{integralGift.giftName},'%')
</if>
<if test="integralGift.deliveryMethod != null and integralGift.deliveryMethod != ''">
and ig.delivery_method like CONCAT ('%',#{integralGift.deliveryMethod},'%')
and (ig.delivery_method like CONCAT ('%',#{integralGift.deliveryMethod},'%')
or ig.delivery_method = '[]'
)
</if>
<if test="integralGift.categoryId != null">

View File

@ -295,16 +295,68 @@
</select>
<select id="statistics" resultType="java.util.Map">
select count(0) num,
sum(exchange_quantity) exchangeQuantity,
sum(integral) integral,
sum(amount) amount,
SUM(CASE WHEN order_status IN ('待处理', '待发货') THEN 1 ELSE 0 END) AS await,
SUM(CASE WHEN order_status IN ('已完成', '已发货') THEN 1 ELSE 0 END) AS dispose,
SUM(CASE WHEN order_status IN ('已拒绝', '已退款') THEN 1 ELSE 0 END) AS refuse
from integral_orders
where store_id = #{storeId}
<if test="orderType != null">
and order_type = #{orderType}
sum(io.exchange_quantity) exchangeQuantity,
sum(io.integral) integral,
sum(io.amount) amount,
SUM(CASE WHEN io.order_status IN ('待处理', '待发货') THEN 1 ELSE 0 END) AS await,
SUM(CASE WHEN io.order_status IN ('已完成', '已发货') THEN 1 ELSE 0 END) AS dispose,
SUM(CASE WHEN io.order_status IN ('已拒绝', '已退款') THEN 1 ELSE 0 END) AS refuse
from integral_orders io
left join mt_user mu ON io.user_id = mu.id
left join integral_gift ig ON io.gift_id = ig.id
left join mt_user_express_address ea ON io.address_id = ea.id
where io.store_id = #{integralOrders.storeId}
<if test="integralOrders.orderType != null">
and order_type = #{integralOrders.orderType}
</if>
<if test="integralOrders.mobile != null">
and mu.mobile like CONCAT ('%',#{integralOrders.mobile},'%')
</if>
<if test="integralOrders.params.beginTime != null and integralOrders.params.beginTime != ''">
and date_format(io.create_time,'%y%m%d') &gt;= date_format(#{integralOrders.params.beginTime},'%y%m%d')
</if>
<if test="integralOrders.params.endTime != null and integralOrders.params.endTime != ''">
and date_format(io.create_time,'%y%m%d') &lt;= date_format(#{integralOrders.params.endTime},'%y%m%d')
</if>
<if test="integralOrders.orderNumber != null and integralOrders.orderNumber != ''">
and io.order_number like CONCAT ('%',#{integralOrders.orderNumber},'%')
</if>
<if test="integralOrders.shippingType != null and integralOrders.shippingType != ''">
and io.shipping_type = #{integralOrders.shippingType}
</if>
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' and integralOrders.orderStatus != 0 ">
and (
(#{integralOrders.orderStatus} = 1 and (io.order_status = '待处理' or io.order_status = '待发货')) or
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成' or io.order_status = '已发货')) or
(#{integralOrders.orderStatus} = 3 and (io.order_status = '已退款' or io.order_status = '已拒绝')) or
(#{integralOrders.orderStatus} = 4 and io.order_status = '未支付')
)
</if>
<if test="integralOrders.id != null">
and io.id = #{integralOrders.id}
</if>
<if test="integralOrders.userId != null">
and io.user_id = #{integralOrders.userId}
</if>
<if test="integralOrders.giftId != null">
and io.gift_id = #{integralOrders.giftId}
</if>
<if test="integralOrders.exchangeQuantity != null">
and io.exchange_quantity = #{integralOrders.exchangeQuantity}
</if>
<if test="integralOrders.status != null and integralOrders.status != ''">
and io.status = #{integralOrders.status}
</if>
<if test="integralOrders.processingResult != null and integralOrders.processingResult != ''">
and io.processing_result = #{integralOrders.processingResult}
</if>
<if test="integralOrders.createTime != null">
and io.create_time = #{integralOrders.createTime}
</if>
<if test="integralOrders.updateTime != null">
and io.update_time = #{integralOrders.updateTime}
</if>
</select>

View File

@ -66,7 +66,7 @@ public interface IntegralOrdersService {
* @return 是否成功
*/
boolean deleteById(Integer id);
Map<String, String> statistics(Integer orderType);
Map<String, String> statistics(IntegralOrdersDTO integralOrders);
IntegralOrders integralOrdersProcessing(IntegralOrdersRequest integralOrdersList);

View File

@ -156,9 +156,10 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
}
@Override
public Map<String, String> statistics(Integer orderType) {
public Map<String, String> statistics(IntegralOrdersDTO integralOrders) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
return this.integralOrdersDao.statistics(nowAccountInfo.getStoreId(),orderType);
integralOrders.setStoreId(nowAccountInfo.getStoreId());
return this.integralOrdersDao.statistics(integralOrders);
}
@Resource
@ -326,7 +327,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
for (IntegralOrders integralOrders : listByOrderNo) {
// 查询员工信息
LJStaff ljStaff = ljStaffMapper.selectById(integralOrders.getStaffId());
if (ObjectUtil.isEmpty(integralOrders.getIntegral())) integralOrders.setIntegral(0.0);
totalPoints = totalPoints.add(new BigDecimal(integralOrders.getIntegral()));
// 加兑换卷和优惠券判断
IntegralGift integralGift = integralGiftService.queryById(integralOrders.getGiftId());

View File

@ -269,6 +269,18 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
e.printStackTrace();
}
}
}else {
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
if (ObjectUtil.isNotEmpty(tAccount)) {
if (tAccount.getAccountName().matches("\\d+")) {
tAccount.setAccountName(staff.getMobile());
}
try {
accountService.editAccount(tAccount, null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
return row;
}

View File

@ -54,7 +54,7 @@ public class HandoverRecordController extends BaseController {
@GetMapping("selectByTime")
public ResponseObject selectByTime() {
return getSuccessResult(this.handoverRecordService.selectByTime());
return getSuccessResult(this.handoverRecordService.selectByTime(null));
}
/**
@ -107,8 +107,8 @@ public class HandoverRecordController extends BaseController {
* @return
*/
@GetMapping("handover")
public ResponseObject handover() {
return getSuccessResult(handoverRecordService.handover());
public ResponseObject handover(Integer staffId) {
return getSuccessResult(handoverRecordService.handover(staffId));
}
@GetMapping("handoverByAllOrder")

View File

@ -38,6 +38,23 @@ public class OrderGoods extends BaseEntity implements Serializable {
* 商品数量
*/
private Integer num;
/**
* 商品单价
*/
private Double retailPrice;
/**
* 商品会员价
*/
private Double memberPrice;
/**
* 商品合计金额
*/
private Double allAmount;
/**
* 商品实付金额
*/
private Double payAmount;
}

View File

@ -85,25 +85,25 @@ public interface HandoverRecordMapper {
int deleteById(Integer id);
// 油品交易信息
Map<String, Object> oilOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
Map<String, Object> oilOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
// 会员储值交易信息
Map<String, Object> cardOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
Map<String, Object> cardOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
// 油卡交易信息
Map<String, Object> fuelOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
Map<String, Object> fuelOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
// 普通交易
Map<String, Object> goodsOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
Map<String, Object> goodsOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
List<Map<String, Object>> paymentAggregation(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> paymentAggregation(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
List<Map<String, Object>> oilNumberStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> oilNumberStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
List<Map<String, Object>> greaseGunStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> greaseGunStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
List<Map<String, Object>> employeeStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> employeeStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
List<Map<String, Object>> billingDetails(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> billingDetails(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
List<Map<String, Object>> returnedToTheAccount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
List<Map<String, Object>> returnedToTheAccount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
}

View File

@ -99,6 +99,48 @@
</if>
</where>
) AS numberOfStrokes, -- 笔数
(SELECT count(*) FROM cashier_order
<where>
store_id = #{order.storeId}
and oil_order_id is not null
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.terminal != null and order.terminal != ''">
and terminal like concat('%', #{order.terminal}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''">
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''">
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
) AS numberOfStrokesByOil, -- 笔数
(SELECT count(*) FROM cashier_order
<where>
store_id = #{order.storeId}
and goods_order_id is not null
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.terminal != null and order.terminal != ''">
and terminal like concat('%', #{order.terminal}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''">
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''">
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
) AS numberOfStrokesByGoods, -- 笔数
(SELECT sum(amount) FROM cashier_order
<where>
store_id = #{order.storeId}

View File

@ -37,6 +37,9 @@
hr.store_id = #{handoverRecord.storeId}
<if test="handoverRecord.status != null and handoverRecord.status != ''">
and hr.status = #{handoverRecord.status}
</if>
<if test="handoverRecord.staffId != null">
and hr.staff_id = #{handoverRecord.staffId}
</if>
<if test="handoverRecord.type != null and handoverRecord.type != ''">
and hr.type = #{handoverRecord.type}
@ -208,7 +211,7 @@ limit 1
<select id="oilOrderStatistics" resultType="java.util.Map">
select
sum(order_amount) oilOrder,-- 油品订单
sum(if(order_status='refund',discount_amount,0.00)) oilRefund, -- 退款
sum(if(order_status='refund',pay_amount,0.00)) oilRefund, -- 退款
sum(if(order_status='paid',pay_amount,0.00)) oilPaid,
sum(if(order_status='paid',discount_amount,0.00)) oilDiacount
from oil_order
@ -225,7 +228,10 @@ limit 1
sum(if(pay_status='paid',gift_balance,0)) cardGiftPaid
from card_value_record
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime};
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and mt_staff_id = #{staffId}
</if>;
</select>
<select id="fuelOrderStatistics" resultType="java.util.Map">
select
@ -234,7 +240,10 @@ limit 1
sum(if(pay_status='paid',recharge_balance,0)) fuelPaid
from card_fuel_record
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime};
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and mt_staff_id = #{staffId}
</if>;
</select>
<select id="goodsOrderStatistics" resultType="java.util.Map">
@ -244,7 +253,10 @@ limit 1
SUM(IF(`status`='paid', pay_amount, 0)) AS goodsPaid
FROM mt_order
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime};
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>;
</select>
<select id="paymentAggregation" resultType="java.util.Map">
SELECT
@ -255,6 +267,9 @@ limit 1
FROM oil_order
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY pay_type
UNION ALL
@ -267,6 +282,9 @@ limit 1
FROM card_value_record
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and mt_staff_id = #{staffId}
</if>
GROUP BY payment_type
UNION ALL
@ -279,6 +297,9 @@ limit 1
FROM card_fuel_record
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and mt_staff_id = #{staffId}
</if>
GROUP BY payment_type
UNION ALL
@ -291,6 +312,9 @@ limit 1
FROM mt_order
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY pay_type
UNION ALL
@ -303,6 +327,9 @@ limit 1
FROM integral_orders
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY payment_type
having payment_type is not null
</select>
@ -323,6 +350,9 @@ limit 1
where on1.store_id = #{storeId}
and oo.store_id = 60
and oo.create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY oo.oils
</select>
@ -338,7 +368,9 @@ limit 1
left join oil_gun og on oo.oil_gun_num = og.id
where oo.store_id = #{storeId}
and oo.create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY oo.oil_gun_num
</select>

View File

@ -2,7 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.order.mapper.OrderGoodsMapper">
<sql id="selectOrderGoods">
select mog.id,mog.order_id,mog.goods_id as goods_id,mg.id as goodsId,mg.name,mg.retail_price,mg.member_price,mog.num,mg.unit
select mog.id,mog.order_id,mog.goods_id as goods_id,mg.id as goodsId,mg.name,mog.retail_price,
mog.member_price,mog.num,mg.unit,mog.all_amount,mog.pay_amount
from mt_order_goods mog inner join mt_goods mg on mog.goods_id = mg.id
</sql>

View File

@ -33,7 +33,7 @@ public interface HandoverRecordService {
*/
IPage<HandoverRecord> queryByPage(@Param("page") Page page, @Param("handoverRecord") HandoverRecord handoverRecord);
HandoverRecord selectByTime();
HandoverRecord selectByTime(Integer staffId);
/**
* 新增数据
@ -59,7 +59,7 @@ public interface HandoverRecordService {
*/
boolean deleteById(Integer id);
public Map<String, Object> handover();
public Map<String, Object> handover(Integer staffId);
public Map<String, Object> handoverByAllOrder();

View File

@ -43,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.HashMap;
@ -178,7 +179,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
BigDecimal refundAmtBig = new BigDecimal(map.get("refundAmt"));
BigDecimal refundAmtBefBig = refundAmtBig.multiply(new BigDecimal("100"));
map.put("totalAmt",money.toString());
map.put("refundAmt",refundAmtBefBig.toString());
map.put("refundAmt",refundAmtBefBig.setScale(0, RoundingMode.DOWN).toString());
map.put("orderNo",allOrderInfo.getOrderNo());
map.put("payType",allOrderInfo.getPayType());
@ -193,7 +194,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
throw new RuntimeException("该订单类型不支持退款!");
}
boolean flag = false;
if (!"CASH".equals(allOrderInfo.getPayType()) && Integer.valueOf(map.get("refundAmt")) > 0) {
if (!"CASH".equals(allOrderInfo.getPayType()) && Double.valueOf(map.get("refundAmt")) > 0) {
try {
refund = fyPayService.refund(map);
} catch (Exception e) {

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.generator.config.IFileCreate;
import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.order.entity.HandoverRecord;
@ -19,6 +20,7 @@ import com.fuint.system.dict.entity.SysDictData;
import com.fuint.system.dict.entity.SysDictType;
import com.fuint.system.dict.service.ISysDictDataService;
import com.fuint.system.dict.service.ISysDictTypeService;
import io.swagger.models.auth.In;
import javafx.print.Printer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -83,10 +85,11 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
}
@Override
public HandoverRecord selectByTime() {
public HandoverRecord selectByTime(Integer staffId) {
HandoverRecord handoverRecord = new HandoverRecord();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
handoverRecord.setStaffId(staffId);
return handoverRecordMapper.selectByTime(handoverRecord);
}
@ -100,7 +103,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
public HandoverRecord insert(HandoverRecord handoverRecord) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
handoverRecord.setStaffId(nowAccountInfo.getStaffId());
if (ObjectUtil.isEmpty(handoverRecord.getStaffId())) handoverRecord.setStaffId(nowAccountInfo.getStaffId());
this.handoverRecordMapper.insert(handoverRecord);
return handoverRecord;
@ -130,7 +133,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
}
@Override
public Map<String, Object> handover() {
public Map<String, Object> handover(Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
MtStore mtStore = new MtStore();
@ -148,15 +151,20 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
Map<String, Object> handoverMap = new HashMap<>();
String startTime = "2023-01-01 12:12:12";
HandoverRecord handoverRecord = selectByTime();
HandoverRecord handoverRecord = selectByTime(staffId);
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTime = sdf.format(handoverRecord.getEndTime());
}
LJStaff ljStaff = iljStaffService.selectStaffById(nowAccountInfo.getStaffId());
String handoverType = "统一交班";
Integer staff = nowAccountInfo.getStaffId();
if (ObjectUtil.isNotEmpty(staffId)){
staff = staffId;
handoverType = "个人交班";
}
LJStaff ljStaff = iljStaffService.selectStaffById(staff);
// String handover = iSysDictDataService.selectDictLabel("handover", ljStaff.getHandoverMode());
String handoverType = "暂无";
// if (!ObjectUtil.isEmpty(handover)) {
// handoverType = handover;
@ -164,7 +172,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
// 填充 baseInfo
Map<String, Object> baseInfo = new HashMap<>();
baseInfo.put("storeName", mtStore.getName());
baseInfo.put("realName", nowAccountInfo.getRealName());
baseInfo.put("realName", ljStaff.getRealName());
baseInfo.put("handoverType", handoverType);
baseInfo.put("startTime", startTime);
baseInfo.put("endTime", formattedEndTime);
@ -172,41 +180,41 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
// baseInfo.put("handoverOut", ljStaff.getHandoverOut()); // 交班是否退出
handoverMap.put("baseInfo",baseInfo);
// 获取订单汇总
Map<String, Object> orderSummaryMap = orderSummary(startTime, formattedEndTime);
Map<String, Object> orderSummaryMap = orderSummary(startTime, formattedEndTime, staffId);
handoverMap.put("orderSummary",orderSummaryMap);
// 支付方式汇总
List<Map<String, Object>> paymentAggregationMap = paymentAggregation(startTime, formattedEndTime);
List<Map<String, Object>> paymentAggregationMap = paymentAggregation(startTime, formattedEndTime, staffId);
handoverMap.put("paymentAggregation",paymentAggregationMap);
// 油号统计
List<Map<String, Object>> oilNumberStatisticsMap = oilNumberStatistics(startTime, formattedEndTime);
List<Map<String, Object>> oilNumberStatisticsMap = oilNumberStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("oilNumberStatistics",oilNumberStatisticsMap);
// 油枪统计
List<Map<String, Object>> greaseGunStatisticsMap = greaseGunStatistics(startTime, formattedEndTime);
List<Map<String, Object>> greaseGunStatisticsMap = greaseGunStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("greaseGunStatistics",greaseGunStatisticsMap);
// 员工统计
List<Map<String, Object>> employeeStatisticsMap = employeeStatistics(startTime, formattedEndTime);
List<Map<String, Object>> employeeStatisticsMap = employeeStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("employeeStatistics",employeeStatisticsMap);
// 挂账详情
List<Map<String, Object>> billingDetailsMap = billingDetails(startTime, formattedEndTime);
List<Map<String, Object>> billingDetailsMap = billingDetails(startTime, formattedEndTime, staffId);
handoverMap.put("billingDetails",billingDetailsMap);
// 挂账归还
List<Map<String, Object>> returnedToTheAccountMap = returnedToTheAccount(startTime, formattedEndTime);
List<Map<String, Object>> returnedToTheAccountMap = returnedToTheAccount(startTime, formattedEndTime, staffId) ;
handoverMap.put("returnedToTheAccount",returnedToTheAccountMap);
// 合计
return handoverMap;
}
public Map<String, Object> orderSummary(String startTime, String endTime) {
public Map<String, Object> orderSummary(String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Map<String, Object> allStatistics = new HashMap<>();
// 油品订单(订单) 油品订单(退款) 油品订单(实收) 油品优惠(实收) 油品交易(实收)
Map<String, Object> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
Map<String, Object> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
// 会员储值(订单) 会员储值(退款) 会员储值(实收) 储值赠送(订单) 储值赠送(退款) 储值赠送(实际)
Map<String, Object> cardOrderStatistics = handoverRecordMapper.cardOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
Map<String, Object> fuelOrderStatistics = handoverRecordMapper.fuelOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
Map<String, Object> cardOrderStatistics = handoverRecordMapper.cardOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
Map<String, Object> fuelOrderStatistics = handoverRecordMapper.fuelOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
// 普通收款(订单) 普通收款(退款) 普通收款(实收)
Map<String, Object> goodsOrderStatistics = handoverRecordMapper.goodsOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
Map<String, Object> goodsOrderStatistics = handoverRecordMapper.goodsOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
if (!ObjectUtil.isEmpty(oilOrderStatistics)) {
allStatistics.putAll(oilOrderStatistics);
}else{
@ -249,9 +257,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
* 汇总统计
*/
public List<Map<String, Object>> paymentAggregation(String startTime, String endTime) {
public List<Map<String, Object>> paymentAggregation(String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId(),staffId);
List<Map<String, Object>> allRefundMapList = new ArrayList<>();
if (!ObjectUtil.isEmpty(paymentAggregation)) {
for (Map<String, Object> stringStringMap : paymentAggregation) {
@ -298,9 +306,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
return mapList;
}
public Map<String, Object> paymentAggregation2(String startTime, String endTime) {
public Map<String, Object> paymentAggregation2(String startTime, String endTime,Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId() , staffId);
// 共有四个 转为普通map
Map<String, Object> allAggreMap = new HashMap<>();
Map<String, Object> allRefundMap = new HashMap<>();
@ -358,40 +366,40 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
/**
* 油号统计
*/
public List<Map<String, Object>> oilNumberStatistics (String startTime, String endTime) {
public List<Map<String, Object>> oilNumberStatistics (String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> oilNumberStatistics = handoverRecordMapper.oilNumberStatistics(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> oilNumberStatistics = handoverRecordMapper.oilNumberStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return oilNumberStatistics;
}
/**
* 油枪统计
*/
public List<Map<String, Object>> greaseGunStatistics (String startTime, String endTime) {
public List<Map<String, Object>> greaseGunStatistics (String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> greaseGunStatistics = handoverRecordMapper.greaseGunStatistics(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> greaseGunStatistics = handoverRecordMapper.greaseGunStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return greaseGunStatistics;
}
/**
* 员工统计
*/
public List<Map<String, Object>> employeeStatistics (String startTime, String endTime) {
public List<Map<String, Object>> employeeStatistics (String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> employeeStatistics = handoverRecordMapper.employeeStatistics(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> employeeStatistics = handoverRecordMapper.employeeStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return employeeStatistics;
}
// 挂账详情
public List<Map<String, Object>> billingDetails (String startTime, String endTime) {
public List<Map<String, Object>> billingDetails (String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> billingDetails = handoverRecordMapper.billingDetails(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> billingDetails = handoverRecordMapper.billingDetails(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return billingDetails;
}
// 挂账归还
public List<Map<String, Object>> returnedToTheAccount (String startTime, String endTime) {
public List<Map<String, Object>> returnedToTheAccount (String startTime, String endTime, Integer staffId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<Map<String, Object>> returnedToTheAccount = handoverRecordMapper.returnedToTheAccount(startTime, endTime, nowAccountInfo.getStoreId());
List<Map<String, Object>> returnedToTheAccount = handoverRecordMapper.returnedToTheAccount(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return returnedToTheAccount;
}
@ -431,7 +439,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
Map<String, Object> handoverMap = new HashMap<>();
String startTime = "2023-01-01 12:12:12";
HandoverRecord handoverRecord = selectByTime();
HandoverRecord handoverRecord = selectByTime(null);
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
startTime = sdf.format(handoverRecord.getEndTime());

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.entity.LJGoods;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.entity.OrderGoods;
import com.fuint.business.order.mapper.LJOrderMapper;
@ -122,6 +124,9 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
return baseMapper.getStatisticsByTime(time, goodsId, payType);
}
@Autowired
private LJGoodsService goodsService;
@Override
public void addGoodOrder(LJOrder order,Integer goodsId) {
if (ObjectUtil.isEmpty(order.getOrderNo())){
@ -134,10 +139,15 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
}
baseMapper.insert(order);
LJOrder ljOrder = this.selectGoodsOrder(order.getOrderNo());
LJGoods ljGoods = goodsService.selectLJGoodsById(goodsId);
OrderGoods orderGoods = new OrderGoods();
orderGoods.setGoodsId(goodsId);
orderGoods.setOrderId(ljOrder.getId());
orderGoods.setNum(ljOrder.getGoodsNum());
orderGoods.setRetailPrice(ljGoods.getRetailPrice());
orderGoods.setMemberPrice(ljGoods.getMemberPrice());
orderGoods.setAllAmount(order.getAmount());
orderGoods.setPayAmount(order.getPayAmount());
orderGoodsService.save(orderGoods);
}
}

View File

@ -521,6 +521,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// throw new RuntimeException("支付失败");
}
}else {
cashierOrder.setPayAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
}

View File

@ -40,6 +40,15 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
@Override
public int insertOrderGoods(OrderGoods goods,Integer storeId,Boolean isMember) {
LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
goods.setRetailPrice(ljGoods.getRetailPrice());
goods.setMemberPrice(ljGoods.getMemberPrice());
goods.setAllAmount(ljGoods.getRetailPrice()*goods.getNum());
if (isMember){
goods.setPayAmount(ljGoods.getMemberPrice()*goods.getNum());
}else {
goods.setPayAmount(ljGoods.getRetailPrice()*goods.getNum());
}
int row = baseMapper.insert(goods);
this.insertStockTrack(goods,storeId,isMember);
return row;

View File

@ -9,8 +9,10 @@ public class OrderGoodsVo {
private Integer goods_id;
private Integer goodsId;
private String name;
private String retailPrice;
private String memberPrice;
private Double retailPrice;
private Double memberPrice;
private Double allAmount;
private Double payAmount;
private Integer num;
private String unit;
}

View File

@ -1,10 +1,10 @@
import request from '@/utils/request'
export function getHandoverApi() {
export function getHandoverApi(query) {
return request({
url: '/business/handoverRecord/handover',
method: 'get',
// params: query
params: query
})
}

View File

@ -79,11 +79,11 @@
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardOrder : '0' }}</div>
</div>
<div class="input-box">
<div>会员储值(退款)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}</div>
<!-- <div class="input-box">-->
<!-- <div>会员储值(退款)</div>-->
<!-- <div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}</div>-->
</div>
<!-- </div>-->
<div class="input-box">
<div>会员储值(实收)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : '0' }}</div>
@ -94,11 +94,11 @@
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftOrder : '0' }}</div>
</div>
<div class="input-box">
<div>储值赠送(退款)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}</div>
<!-- <div class="input-box">-->
<!-- <div>储值赠送(退款)</div>-->
<!-- <div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}</div>-->
</div>
<!-- </div>-->
<div class="input-box">
<div>储值赠送(实际)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftPaid : '0' }}</div>
@ -111,11 +111,11 @@
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelOrder : '0' }}</div>
</div>
<div class="input-box">
<div>存油储值(退款)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}</div>
<!-- <div class="input-box">-->
<!-- <div>存油储值(退款)</div>-->
<!-- <div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}</div>-->
</div>
<!-- </div>-->
<div class="input-box">
<div>存油储值(实收)</div>
<div>{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelPaid : '0' }}</div>
@ -377,12 +377,24 @@
<div class="bottom-xz">
<!-- <div class="anniu" v-if="handoverList && handoverList.baseInfo && handoverList.baseInfo.handoverPrem == 'yqx'" @click="shift">交班</div>-->
<div class="anniu" @click="shift">交班</div>
<div class="anniu">
<span @click="chooseStaff()">
{{staff.staffName?staff.staffName:"选择员工交班"}}
</span>
<i v-if="staff.staffName" class="el-icon-close" @click="clean()"></i>
</div>
<!-- <div class="anniu-lv">云打印</div> -->
<div class="anniu-lv" @click="printLocally()">本地打印</div>
<div ><el-link type="primary" @click="recording">交班记录</el-link></div>
</div>
</el-card>
</div>
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff"
append-to-body>
<select-staff @send-data="handleDataFromChild">
</select-staff>
</el-dialog>
</div>
</template>
@ -392,23 +404,52 @@ import BigNumber from "bignumber.js";
import {removeUserId} from "@/utils/auth";
import { getLodop } from "@/api/LodopFuncs";
import Vue from 'vue';
import SelectStaff from "@/components/local/selectStaff.vue";
export default {
name: "Handover",
components: {SelectStaff},
data() {
return {
handoverList : {},
openStaff: false,
staff:{
staffId:'',
staffName:null
}
}
},
created() {
this.getHandover();
},
methods: {
clean() {
this.staff={
staffId:'',
staffName:null
}
},
//
chooseStaff() {
this.openStaff = true
},
handleDataFromChild(data) {
this.openStaff = false
this.staff.staffId = data.mtStaffId,
this.staff.staffName = data.realName
console.log("realName",this.staff.staffName)
this.getHandover();
},
getHandover() {
getHandoverApi().then(res=>{
getHandoverApi({staffId: this.staff.staffId}).then(res=>{
this.handoverList = res.data;
console.log("this.handoverList",this.handoverList)
// this.staff={
// staffId:'',
// staffName:null
// }
})
},
orderSummary() {
@ -608,13 +649,15 @@ import Vue from 'vue';
recordData:JSON.stringify(recordData),
type:0,
status:this.handoverList.baseInfo.handoverType,
staffId:this.staff.staffId
}
addHandoverApi(handoverRecord).then(res=>{
if (flag) {
removeUserId();
this.$store.dispatch('LogOut').then(() => {
location.href = '/';
})
this.clean()
// removeUserId();
// this.$store.dispatch('LogOut').then(() => {
// location.href = '/';
// })
}
this.getHandover();
})

View File

@ -7,16 +7,22 @@
<span>交班详情</span>
</div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<!-- <el-form-item label="交班方式" prop="status">-->
<!-- <el-select v-model="queryParams.status" style="width: 150px" placeholder="交班方式" clearable>-->
<!-- <el-option-->
<!-- v-for="option in shiftHandoverList"-->
<!-- :key="option.dictCode"-->
<!-- :label="option.dictLabel"-->
<!-- :value="option.dictLabel"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="交班方式" prop="status">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="交班方式" clearable>
<el-option label="统一交班" value="统一交班">统一交班</el-option>
<el-option label="个人交班" value="个人交班">个人交班</el-option>
</el-select>
</el-form-item>
<el-form-item label="交班员工" prop="staffId">
<el-select v-model="queryParams.staffId" style="width: 150px" placeholder="交班方式" clearable>
<el-option
v-for="option in staffList"
:key="option.id"
:label="option.realName"
:value="option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="交班状态">
<el-select v-model="queryParams.type" style="width: 150px" placeholder="交班状态" clearable>
<el-option label="交班" value="0">交班</el-option>
@ -100,6 +106,7 @@ import {getStatisticsApi } from "@/api/cashier/integralOrder/order";
import Detail from '@/views/cashier/NewComponents/integralOrder/detail'
import {getDicts} from "@/api/dict/data";
import HandoverOnly from "@/views/cashier/NewComponents/HandoverOnly";
import {listStaff} from "@/api/staff/staff";
export default {
name: "pointsCashier",
@ -128,7 +135,7 @@ export default {
defaultSort: {prop: 'createTime', order: 'descending'},
total: 0,
staffList:[],
statisticsForm: {
num:0,
exchangeQuantity:0,
@ -141,6 +148,7 @@ export default {
this.getList();
this.getStatistics();
this.getStatus();
this.getStaffList();
},
methods: {
getList(){
@ -174,6 +182,14 @@ export default {
this.getList();
},
getStaffList() {
listStaff(this.addDateRange({ page: 1,
pageSize: 10000})).then(response => {
this.staffList = response.data.records;
}
);
},
resetQuery(){
this.queryParams = {
giftName: '',
@ -184,6 +200,7 @@ export default {
pageSize:10
},
this.dateRange = []
this.getList();
},
printLocally(data) {
printLocallyApi(data).then(res=>{

View File

@ -37,7 +37,7 @@
border-radius: 5px;text-align: center">
<el-tooltip placement="top">
<div slot="content">
会员等级{{ member.gradeId?getGrade(member.gradeId):'未知' }}
会员等级{{ gradeName }}
</div>
<i class="el-icon-medal" style="font-size: 35px"></i>
</el-tooltip>
@ -198,7 +198,7 @@
<el-descriptions-item label="会员备注">{{member.remark ? member.remark : "--"}}</el-descriptions-item>
</el-descriptions>
<el-descriptions title="会员等级">
<el-descriptions-item label="等级名称">{{member.gradeId ? member.gradeId : "--"}}</el-descriptions-item>
<el-descriptions-item label="等级名称">{{member.gradeId ? getGradeName(gradeList,member.gradeId) : "--"}}</el-descriptions-item>
</el-descriptions>
<el-descriptions title="储值余额">
<template slot="extra">
@ -380,7 +380,7 @@
<el-divider></el-divider>
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
<el-button @click="dialogVisiblej = false" class="but"> </el-button>
<el-button @click="dialogVisiblej = false, visflg = true" class="but"> </el-button>
<el-button type="primary" class="but" @click="collection"> </el-button>
</span>
</div>
@ -462,9 +462,10 @@ import {
import PointsCashier from "@/views/cashier/NewComponents/integralOrder/pointsCashier";
import {getDicts} from "@/api/dict/data";
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
import {getUserGrade} from "@/api/cashier/usergrade";
import {getUserGrade, listUserGrade} from "@/api/cashier/usergrade";
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
import {connectFlag, getLodop} from "@/api/LodopFuncs";
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
export default {
name: "Integral",
@ -499,6 +500,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
dialogVisiblevip:false, //
dialogVisibleMember: false,//
dialogVisiblej: false,//
visflg: false,//
openShoppingCart: false,
openOrderHistory: false,
//
@ -509,7 +511,8 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
select1:'会员手机号',
//
userNo:"",
gradeName:"",
gradeList:"",
//
staffList:[],
staff:"",
@ -533,6 +536,8 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
this.getPayList()
this.getStaffList();
this.getStaff();
this.getCouponList();
},
directives: {
// v-focus
@ -595,7 +600,34 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
// })
// }
if (data.markPurchases) {
if (this.shoppingCart.length != 0) {
//
let flag = false
this.shoppingCart.forEach(res => {
if (res.exchangeMethod == "积分+加钱购") {
flag = true
}
})
if (data.exchangeMethod == "积分+加钱购" || flag) {
flag = false
this.shoppingCart.forEach(res => {
if (res.id != data.id ) {
flag = true
return
}
})
}
if (flag){
this.$message.error('“加钱购”商品仅支持在单商品结算时支持积分不足情况下使用加钱购进行付款,多个商品结算不支持“加钱够”计算');
return
}
}
if (data.markPurchases) {
if (data.markPurchases>=data.remainingInventory){
this.$message.error('库存不足');
return
@ -617,6 +649,9 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
//
this.dataChange(data);
if (this.shoppingCart.length === 0) {
this.shoppingCart.push(data);
} else {
@ -684,12 +719,12 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
}
},
//
getGrade(id){
getUserGrade(id).then( response => {
this.gradeName = response.data.name;
})
return this.gradeName;
},
// getGrade(id){
// getUserGrade(id).then( response => {
// this.gradeName = response.data.name;
// })
// return this.gradeName;
// },
//
resetMember(){
this.member = {};
@ -739,6 +774,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
});
} else {
this.openShoppingCart = true
this.dataChange(this.shoppingCart[0])
}
},
//
@ -790,7 +826,9 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
//
this.member.points = this.member.points?this.member.points:0
let points = this.member.points - exchangePoints.toNumber(); // 使 toNumber() BigNumber
if (this.member.points<0) {
points = 0
}
//
if (points < 0) {
@ -874,33 +912,74 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
}else if (data.exchangeMethod =='积分+加钱购') {
let exchange = new BigNumber(data.exchangePoints);
let mark = new BigNumber(data.markPurchases);
let exchangePoints_sum = exchange.multipliedBy(mark);
this.$set(data, "exchangePoints_sum", exchangePoints_sum);
if (data.exchangePoints_sum) {
data.exchangePoints_sum = Number(exchangePoints_sum);
}else {
this.$set(data, "exchangePoints_sum", exchangePoints_sum);
let exchangePoints_sum = 0
let exchangeAmount_sum = 0
// let data1 = this.shoppingCart[0];
//
let markPurchases = new BigNumber(data.markPurchases);
let exchangePoints = markPurchases.multipliedBy(new BigNumber(data.exchangePoints));
//
this.member.points = this.member.points?this.member.points:0
let points = this.member.points - exchangePoints.toNumber(); // 使 toNumber() BigNumber
console.log("points",points)
//
if (points < 0) {
//
points = Math.abs(points);
exchangeAmount_sum = points * data.moneyRatio; // 使 JavaScript
exchangeAmount_sum = exchangeAmount_sum.toFixed(2);
exchangePoints_sum = this.member.points;
} else {
exchangeAmount_sum = 0
exchangePoints_sum = exchangePoints.toNumber();
}
this.$set(data, "exchangePoints_sum", exchangePoints_sum)
this.$set(data, "exchangeAmount_sum", exchangeAmount_sum)
let ratio = new BigNumber(data.moneyRatio);
let moneyRatio_sum = ratio.multipliedBy(mark);
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
if (data.moneyRatio_sum) {
data.moneyRatio_sum = moneyRatio_sum;
}else {
this.$set(data, "moneyRatio_sum", moneyRatio_sum);
}
if (data.totalPoints_sum) {
data.totalPoints_sum = exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"";
data.totalPoints_sum = exchangePoints_sum+"积分"+"+"+exchangeAmount_sum+"";
}else {
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+exchangeAmount_sum+"");
}
console.log("data积分",data)
console.log("数据",data)
return
//
// let exchange = new BigNumber(data.exchangePoints);
// let mark = new BigNumber(data.markPurchases);
// let exchangePoints_sum = exchange.multipliedBy(mark);
// this.$set(data, "exchangePoints_sum", exchangePoints_sum);
//
// if (data.exchangePoints_sum) {
// data.exchangePoints_sum = Number(exchangePoints_sum);
// }else {
// this.$set(data, "exchangePoints_sum", exchangePoints_sum);
// }
//
// let ratio = new BigNumber(data.moneyRatio);
// let moneyRatio_sum = ratio.multipliedBy(mark);
// this.$set(data, "totalPoints_sum", exchangePoints_sum+""+"+"+moneyRatio_sum+"");
//
// if (data.moneyRatio_sum) {
// data.moneyRatio_sum = moneyRatio_sum;
// }else {
// this.$set(data, "moneyRatio_sum", moneyRatio_sum);
// }
// if (data.totalPoints_sum) {
// data.totalPoints_sum = exchangePoints_sum+""+"+"+moneyRatio_sum+"";
// }else {
// this.$set(data, "totalPoints_sum", exchangePoints_sum+""+"+"+moneyRatio_sum+"");
//
// }
// console.log("data",data)
}
},
//
@ -1010,10 +1089,37 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
},15000)
}
this.printLocally()
if (this.isPaySuccess) {
this.printLocally()
}
// this.paymentType = ''
},
//
getCouponList(){
listCardFavorableRecord().then(response => {
this.couponList = response.data.records
})
let map = {
page:1,
pageSize:20,
}
listUserGrade(map).then(response => {
this.gradeList = response.data.records
})
},
// id
getGradeName(list,id){
let name = "";
list.forEach(item => {
if (item.id == id){
name = item.name
}
})
this.gradeName = name;
return name;
},
//
handClose(){
// if(this.isPaySuccess){
@ -1035,6 +1141,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
// this.reset()
this.dialogVisiblej = false
this.visflg = false
this.authCode = '';
},
async printLocally(data) {
@ -1127,7 +1234,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
},
watch: {
dialogVisiblej(newValue) {
if (!newValue) {
if (!newValue && !this.visflg) {
console.log("newValue",newValue)
this.queryParams= {
@ -1141,6 +1248,8 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
this.handClose()
this.reset()
} else {
this.visflg = false
}
}
},

View File

@ -2460,7 +2460,6 @@
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
}
},
@ -2700,7 +2699,9 @@
this.isOilStorageCard = false;
if (this.balance>0){
this.checkAll4 = true
this.payType = "balance"
if (this.goodsOrder.length==0) {
this.payType = "balance"
}
}
}else {
this.checkAll4 = false
@ -2720,7 +2721,9 @@
this.checkAll3 = false
this.isOilStorageCard = false;
this.consumeRefuelMoney = 0;
this.payType = "balance"
if (this.goodsOrder.length==0) {
this.payType = "balance"
}
this.countAmountFull();
this.isUseBalance = false;
}
@ -2742,7 +2745,9 @@
this.couponAmount = 0
if (this.balance>0){
this.checkAll4 = true
this.payType = "balance"
if (this.goodsOrder.length==0) {
this.payType = "balance"
}
}
}
this.countAmountFull();
@ -2920,13 +2925,11 @@
// if (response.data.fixingLevel.storeValue=="no" && _this.consumeAmount>0){
// _this.oilDiscount = 0
// _this.checkAll4 = false
// console.log(111)
// }else {
_this.oilDiscount += discount.discount
_this.gradeDiscount.push(discount)
_this.checkAll2 = true
_this.checkedCities2.push(discount.gunName)
// console.log(222)
// }
}
}
@ -3085,7 +3088,9 @@
// }
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
this.checkAll4 = true
this.payType = "balance"
if (this.goodsOrder.length==0){
this.payType = "balance"
}
this.countAmountFull()
}
await this.getGrade(this.member.id,this.member.gradeId)
@ -3172,7 +3177,6 @@
}
}
// }
// console.log(_this.couponAmount,222)
if(!this.isOilStorageCard){
this.countAmountFull()
}
@ -3182,7 +3186,6 @@
if (type==0){
this.countAmountFull()
}
// console.log(discount,_this.gradeDiscount,_this.couponDiscount,_this.fullReduceDiscount,"1264")
})
})
},
@ -3258,7 +3261,9 @@
//
_this.checkAll1 = false
_this.checkAll4 = true;
this.payType = "balance"
if (_this.goodsOrder.length==0) {
_this.payType = "balance"
}
_this.fullReduction = 0
_this.isUseFull = true;
}else {
@ -3448,7 +3453,6 @@
},
//
chooseStaff(data){
console.log(data,"qusnv")
this.staff = data;
this.map.staffId = this.staff.id;
this.dialogVisible = false
@ -3460,6 +3464,7 @@
},
//
changeGoods(val){
this.payType = "WECHAT"
let result = true;
let goods = this.goodsOrder;
let _this = this;
@ -3473,19 +3478,20 @@
break;
}
goods[i].num = goods[i].num + 1;
val.num = goods[i].num + 1;
this.goodsTotal += 1;
if (_this.isMember) {
this.goodsDiscount += +((goods[i].retailPrice-goods[i].memberPrice)*goods[i].num).toFixed(2)
}
amount += goods[i].retailPrice * goods[i].num
result = false;
break;
} else {
result = true;
}
if (_this.isMember) {
this.goodsDiscount += +((goods[i].retailPrice-goods[i].memberPrice)*goods[i].num).toFixed(2)
}
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
}
this.goodsAmount = amount;
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
// this.goodsAmount = amount;
// this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
} else {
result = true;
}
@ -3498,6 +3504,7 @@
if (_this.isMember) {
this.goodsDiscount += (val.retailPrice - val.memberPrice)
}
console.log(this.goodsAmount)
this.goodsAmount += +val.retailPrice
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
this.goodsOrder.push(val);
@ -3507,14 +3514,26 @@
this.$modal.msgError("商品库存不足,请重新选择商品")
return;
}
if (_this.isMember) {
this.goodsDiscount += (val.retailPrice - val.memberPrice) * val.num
// if (_this.isMember) {
// this.goodsDiscount += (val.retailPrice - val.memberPrice) * val.num
// }
// this.goodsAmount += val.retailPrice * val.num
// this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
_this.goodsDiscount = 0
_this.goodsAmount = 0
if (this.goodsOrder.length > 0) {
goods.forEach(item => {
// if (item.id != val.id){
if (_this.isMember) {
_this.goodsDiscount += (item.retailPrice - item.memberPrice) * item.num
}
_this.goodsAmount += item.retailPrice * item.num
_this.goodsActualPay = _this.goodsAmount - _this.goodsDiscount;
// }
})
}
this.goodsAmount += +val.retailPrice * val.num
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
}
this.goods = ""
},
//
settlement(){
@ -3555,6 +3574,7 @@
this.gradeDiscount = [];
this.couponDiscount = [];
this.checkAll4 = false;
this.isExistOilOrder = false
if (this.member.refuelMoney!=null){
this.refuelMoney = JSON.parse(this.member.refuelMoney)
@ -3621,7 +3641,9 @@
}
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
this.checkAll4 = true
this.payType = "balance"
if (this.goodsOrder.length==0) {
this.payType = "balance"
}
this.countAmountFull()
}
await this.getGrade(this.member.id,this.member.gradeId)
@ -3845,6 +3867,7 @@
this.map.staffId = this.staff.id
this.map.cardFavorableId = this.cardFavorableId
this.map.recordId = this.recordId
this.map.userId = this.member.id
let _this = this;
if (this.payType=="APPLET_CODE"){
@ -3877,7 +3900,6 @@
let isPaySuccess = false;
await addLJGoods(_this.map).then( response => {
console.log('3867386738673867')
_this.orderNo = response.data.orderNo;
if (response.data.oilOrder!=null){
if (response.data.oilOrder.orderStatus == "paid"){
@ -4147,11 +4169,15 @@
payMethod(payType){
if (payType == 'oilCard'){
if (this.isMember){
if (this.goodsOrder.length>0){
this.$message.error("商品不可使用囤油卡付款")
return;
}
if (this.refuelMoney1.length>0){
this.checkAll3 = true
this.handleCheckAllChange3(true)
}else {
this.$message.error("请先充值囤油卡")
this.$message.error("请先充值")
return;
}
}else {
@ -4161,8 +4187,17 @@
}
if (payType == 'balance'){
if (this.isMember){
this.checkAll4 = true
this.handleCheckAllChange4(true)
if (this.goodsOrder.length>0){
this.$message.error("商品不可使用储值卡付款")
return;
}
if (this.balance>0){
this.checkAll4 = true
this.handleCheckAllChange4(true)
}else {
this.$message.error("请先充值!!")
return;
}
}else {
this.$message.error("请先选择会员")
return;

View File

@ -194,7 +194,7 @@ export default {
})
},
getStatistics() {
getStatisticsApi().then(res=>{
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.statisticsForm = res.data
})
console.log("123123123",this.statisticsForm)
@ -210,6 +210,7 @@ export default {
handleUpdate(){},
handleQuery(){
this.getList();
this.getStatistics();
},
resetQuery(){
@ -222,6 +223,9 @@ export default {
pageSize:10
},
this.dateRange = []
this.getList()
this.getStatistics();
},
handleDetail(data){
this.openDetail = true

View File

@ -54,9 +54,19 @@
<span>收银台订单统计</span>
</div>
<div class="box-gang">
<div class="box">
<div class="size-hui">笔数</div>
<div class="size-bole">{{ orderStatistics.numberOfStrokes?orderStatistics.numberOfStrokes:0 }}</div>
<div class="box" style="display: flex;align-items: center;width: 250px">
<div>
<div class="size-hui">笔数</div>
<div class="size-bole">{{ orderStatistics.numberOfStrokes?orderStatistics.numberOfStrokes:0 }}</div>
</div>
<div style="margin-left: 30px">
<div class="size-hui" >油品笔数</div>
<div class="size-bole">{{ orderStatistics.numberOfStrokesByOil?orderStatistics.numberOfStrokesByOil:0 }}</div>
</div>
<div style="margin-left: 30px">
<div class="size-hui">商品笔数</div>
<div class="size-bole">{{ orderStatistics.numberOfStrokesByGoods?orderStatistics.numberOfStrokesByGoods:0 }}</div>
</div>
</div>
<div class="box">
<div class="size-hui">订单总金额</div>
@ -246,32 +256,32 @@
</div>
<div style="margin-top: 30px">
<el-descriptions :column="1" direction="vertical">
<!-- <el-descriptions-item label="油品详情">-->
<!-- <el-table-->
<!-- v-loading="loading"-->
<el-descriptions-item label="油品详情">
<el-table
v-loading="loading"
<!-- :data="oilInfo"-->
<!-- style="width: 100%">-->
<!-- <el-table-column label="油号油枪" prop="terminal">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="油品金额" align="center" prop="orderAmount">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.orderAmount }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="加油升数" align="center" prop="oilNum" >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.oilNum }}L</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="油品单价" align="center" prop="amount">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.oilPrice }}/L</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
:data="oilInfo"
style="width: 100%">
<el-table-column label="油号油枪" prop="terminal">
<template slot-scope="scope">
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>
</template>
</el-table-column>
<el-table-column label="油品金额" align="center" prop="orderAmount">
<template slot-scope="scope">
<span>{{ scope.row.orderAmount }}</span>
</template>
</el-table-column>
<el-table-column label="加油升数" align="center" prop="oilNum" >
<template slot-scope="scope">
<span>{{ scope.row.oilNum }}L</span>
</template>
</el-table-column>
<el-table-column label="油品单价" align="center" prop="amount">
<template slot-scope="scope">
<span>{{ scope.row.oilPrice }}/L</span>
</template>
</el-table-column>
<!-- <el-table-column label="满减活动优惠" align="center" prop="activeId">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.activeType==1">{{ scope.row.deductionAmount }}</span>-->
@ -284,8 +294,8 @@
<!-- <span v-else>0</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-descriptions-item>-->
</el-table>
</el-descriptions-item>
<el-descriptions-item label="商品详情">
<el-table
:data="goodsInfo"
@ -304,13 +314,12 @@
<el-table-column label="数量" align="center" prop="num"/>
<el-table-column label="合计金额" align="center" prop="num">
<template slot-scope="scope">
<span>{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
<span>{{ scope.row.allAmount }}</span>
</template>
</el-table-column>
<el-table-column label="实付金额" align="center" prop="num">
<template slot-scope="scope">
<span v-if="cashierOrder.payUser == '散客'">{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
<span v-else>{{ (scope.row.memberPrice * scope.row.num).toFixed(2) }}</span>
<span>{{ scope.row.payAmount }}</span>
</template>
</el-table-column>
</el-table>

View File

@ -20,16 +20,29 @@
<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-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>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -142,16 +155,29 @@
<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-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>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -164,7 +190,7 @@
</div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>升数卡统计</span>
<span>囤油卡统计</span>
</div>
<div class="box-gang">
<!-- <div class="box" v-for="(item,index) in 7" :key="index">-->
@ -507,6 +533,8 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
totalConsumption1:0,
totalRecharge1:0,
dateRange:[],
beginTime:"",
endTime:"",
//
userList:[],
@ -623,6 +651,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
if (val!=undefined){
this.queryParams.page = val
}
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listCardBalanceRecord(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.cardBalanceList = res.data.records
this.total = res.data.total
@ -633,6 +665,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
if (val!=undefined){
this.queryParams.page = val
}
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
cardBalanceCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.inCount = res.data.inCount
this.outCount = res.data.outCount
@ -645,6 +681,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
if (val!=undefined){
this.queryParams.page = val
}
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listCardOilRecord(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.cardOilList = res.data.records
this.total1 = res.data.total
@ -655,6 +695,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
if (val!=undefined){
this.queryParams.page = val
}
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
cardOilCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.inCount1 = res.data.inCount
this.outCount1 = res.data.outCount

View File

@ -86,9 +86,9 @@
<view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
</view>
</view> -->
</view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;">
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
@ -490,6 +490,10 @@
},
//
getAddress(storeId) {
// uni.showToast({
// title:"id"+storeId,
// icon:"none"
// })
let _this = this;
uni.getLocation({
// 使wgs84 使gcj02