no message
This commit is contained in:
parent
570f8c9c0f
commit
d570586be5
@ -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,
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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">
|
||||
|
@ -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') >= 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') <= 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>
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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")
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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());
|
||||
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
})
|
||||
|
@ -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=>{
|
||||
|
@ -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
|
||||
@ -714,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 = {};
|
||||
@ -1084,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){
|
||||
@ -1109,6 +1141,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
// this.reset()
|
||||
this.dialogVisiblej = false
|
||||
this.visflg = false
|
||||
this.authCode = '';
|
||||
},
|
||||
async printLocally(data) {
|
||||
@ -1201,7 +1234,7 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
if (!newValue) {
|
||||
if (!newValue && !this.visflg) {
|
||||
console.log("newValue",newValue)
|
||||
|
||||
this.queryParams= {
|
||||
@ -1215,6 +1248,8 @@ import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
this.handClose()
|
||||
this.reset()
|
||||
|
||||
} else {
|
||||
this.visflg = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user