From c8893544549b95a5dd0506a61c3c2a4d59c01384 Mon Sep 17 00:00:00 2001 From: sw <17615834396@163.com> Date: Fri, 8 Nov 2024 09:45:44 +0800 Subject: [PATCH] 11.8 --- fuintAdmin/src/api/handover/handover.js | 7 + .../src/views/handover/HandoverRecord.vue | 11 +- .../controller/HandoverRecordController.java | 10 + .../order/mapper/HandoverRecordMapper.java | 2 +- .../order/mapper/xml/HandoverRecordMapper.xml | 68 +++--- .../order/service/HandoverRecordService.java | 2 +- .../impl/HandoverRecordServiceImpl.java | 102 ++++++++- .../HandoverShiftPrintingReceipt.java | 23 +- fuintCashierWeb/src/api/handover/handover.js | 21 ++ .../views/cashier/NewComponents/Handover.vue | 216 +++++++++++------- .../cashier/NewComponents/HandoverRecord.vue | 11 +- 11 files changed, 334 insertions(+), 139 deletions(-) diff --git a/fuintAdmin/src/api/handover/handover.js b/fuintAdmin/src/api/handover/handover.js index 997d08388..954c3d888 100644 --- a/fuintAdmin/src/api/handover/handover.js +++ b/fuintAdmin/src/api/handover/handover.js @@ -59,3 +59,10 @@ export function handoverShiftPrintingReceiptss(data) { }) } +export function handoverShiftPrintingReceiptsfor(data) { + return request({ + url: '/business/handoverRecord/handoverShiftPrintingReceiptsfor', + method: 'post', + data: data + }) +} diff --git a/fuintAdmin/src/views/handover/HandoverRecord.vue b/fuintAdmin/src/views/handover/HandoverRecord.vue index cafb3318f..27f0e70ad 100644 --- a/fuintAdmin/src/views/handover/HandoverRecord.vue +++ b/fuintAdmin/src/views/handover/HandoverRecord.vue @@ -2,6 +2,7 @@ import {listStaff} from "@/api/order/staff"; import {getHandoverListApi} from "@/api/handover/handover"; import HandoverDetailsInfo from "@/views/handover/HandoverDetailsInfo.vue"; +import {handoverShiftPrintingReceiptsfor} from "../../api/handover/handover"; export default { name: "HandoverRecord", @@ -112,6 +113,14 @@ export default { console.in console.log("data",data) }, + printReceipts(data) { + console.log(data) + handoverShiftPrintingReceiptsfor(data.id).then(res => { + this.dataList = res.data.records + this.total = res.data.total + + }) + }, openSeeDetailsMethods(data) { this.openSeeDetails = true; console.log("data") @@ -196,7 +205,7 @@ export default { 查看详情 交易明细 商品汇总 - 打印 + 打印 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java index c1403624d..a74df55b4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java @@ -209,4 +209,14 @@ public class HandoverRecordController extends BaseController { public ResponseObject handoverShiftPrintingReceiptss(Integer staffId) { return getSuccessResult(handoverRecordService.handover3(staffId)); } + + /** + * 交接班补打小票 + * @return + */ + @PostMapping("handoverShiftPrintingReceiptsfor") + public void handoverShiftPrintingReceiptsfor(@RequestBody String id) { + Map handAll=handoverRecordService.handover4(id); + printerService.handoverShiftPrintingReceipt(handAll); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HandoverRecordMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HandoverRecordMapper.java index 1e1b1a7ac..70b7bbdfe 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HandoverRecordMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HandoverRecordMapper.java @@ -133,6 +133,6 @@ public interface HandoverRecordMapper { List> returnedToTheAccount1(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId); List> staffStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId); - + HandoverRecord selectById(@Param("id")String id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HandoverRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HandoverRecordMapper.xml index 019a38842..162768fb5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HandoverRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HandoverRecordMapper.xml @@ -589,29 +589,27 @@ limit 1 select - sum(if(status='paid',goods_money,0.00)) oilOrder, - sum(if(status='paid',discount_amount,0.00)) oilRefund, - sum(if(status='refund',ref_money,0.00)) oilPaid, - (select IFNULL(sum(amount),0.00) from hang_bill where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) onAccount, - sum(if(type='3',pay_money,0.00)) consumptionMoney, + IFNULL(sum(if(status='paid',goods_money,0.00)),0) oilOrder, + IFNULL(sum(if(status='paid',discount_amount,0.00)),0) oilRefund, + IFNULL(sum(if(status='refund',ref_money,0.00)),0) oilPaid, + IFNULL((select IFNULL(sum(amount),0.00) from hang_bill where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) onAccount, + IFNULL(sum(if(type='3',pay_money,0.00)),0) consumptionMoney, IFNULL(sum(pay_money),0.00) receiptsMoney, - (select IFNULL(sum(recharge_balance),0.00) from card_value_record where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) onAccount, - (select IFNULL(sum(gift_balance),0.00) from card_value_record where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) giftAccount, - (select IFNULL(sum(card_balance),0.00) from mt_user_balance where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) memberBalance, - (select IFNULL(sum(points),0.00) from mt_user_balance where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) memberPoints, - (select IFNULL(sum(bid_balance),0.00) from card_value_record where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime}) rechargeAll + IFNULL((select IFNULL(sum(recharge_balance),0.00) from card_value_record where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) onAccount, + IFNULL((select IFNULL(sum(gift_balance),0.00) from card_value_record where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) giftAccount, + IFNULL((select IFNULL(sum(card_balance),0.00) from mt_user_balance where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) memberBalance, + IFNULL((select IFNULL(sum(points),0.00) from mt_user_balance where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) memberPoints, + IFNULL((select IFNULL(sum(bid_balance),0.00) from card_value_record where store_id = #{storeId} + and create_time BETWEEN #{startTime} AND #{endTime}),0) rechargeAll from all_order_info where store_id = #{storeId} and create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - + @@ -627,15 +625,14 @@ limit 1 when pay_type = 'car_card_value' then '车队卡' when pay_type = 'car_fule_card' then '车队囤油卡' when pay_type = 'after_pay' then '挂账' + when pay_type is null then '合计' else '未知' end as payType, COUNT(id) as orderNum, IFNULL(sum(pay_money),0.00) as truePay from all_order_info where store_id = #{storeId} and create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - + GROUP BY pay_type with rollup @@ -656,9 +653,7 @@ limit 1 on onn.id=oo.oils where oo.store_id = #{storeId} and oo.create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - ) a + ) a GROUP BY a.`name` with rollup @@ -679,9 +674,7 @@ limit 1 on onn.id=oo.oils where oo.store_id = #{storeId} and oo.create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - ) a + ) a GROUP BY a.`name` with rollup @@ -718,9 +711,7 @@ limit 1 LEFT JOIN credit_unit cu on cu.id=hb.credit_unit_id where hb.store_id = #{storeId} and hb.create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - ) a + ) a GROUP BY a.`name` WITH ROLLUP @@ -744,9 +735,6 @@ limit 1 from card_value_record where store_id = #{storeId} and create_time BETWEEN #{startTime} AND #{endTime} - - and staff_id = #{staffId} - group by payment_type with rollup @@ -884,5 +872,17 @@ limit 1 and aoi.create_time BETWEEN #{startTime} AND #{endTime}) a GROUP BY a.`name` WITH ROLLUP + + + + select + id, staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by + from handover_record + + + and id = #{id} + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java index d025d0a64..4e7b07f49 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java @@ -68,5 +68,5 @@ public interface HandoverRecordService { public void printLocally(Map aa); public Map handover3(Integer staffId); - + public Map handover4(String id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java index d4aaad626..05d78ce9d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java @@ -1274,7 +1274,6 @@ public class HandoverRecordServiceImpl implements HandoverRecordService { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); Map allStatistics = new HashMap<>(); Map oilOrderStatistics = handoverRecordMapper.oilOrderStatistics1(startTime, endTime, nowAccountInfo.getStoreId(), staffId); - Double.valueOf(oilOrderStatistics.get("oilOrder").toString()); allStatistics.putAll(oilOrderStatistics); allStatistics.put("operatingAmount", Double.valueOf(oilOrderStatistics.get("oilOrder").toString())- Double.valueOf(oilOrderStatistics.get("onAccount").toString())); allStatistics.put("trueAmount", Double.valueOf(oilOrderStatistics.get("receiptsMoney").toString())- Double.valueOf(oilOrderStatistics.get("onAccount").toString())); @@ -1415,4 +1414,105 @@ public class HandoverRecordServiceImpl implements HandoverRecordService { List> returnedToTheAccount = handoverRecordMapper.staffStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId); return returnedToTheAccount; } + + + + @Override + public Map handover4(String id) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + MtStore mtStore = new MtStore(); + try { + mtStore = storeService.queryStoreById2(nowAccountInfo.getStoreId()); + } catch (BusinessCheckException e) { + e.printStackTrace(); + } + // 获取当前日期 + LocalDate today = LocalDate.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + // 格式化当前时间 + String formattedEndTime = ""; + + Map handoverMap = new HashMap<>(); + + String startTime = "2023-01-01 12:12:12"; + + // HandoverRecord handoverRecord = selectByTime(staffId); + HandoverRecord handoverRecords = selectById(id); + if (!ObjectUtil.isEmpty(handoverRecords) && !ObjectUtil.isEmpty(handoverRecords.getEndTime())) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + startTime = sdf.format(handoverRecords.getStartTime()); + formattedEndTime=sdf.format(handoverRecords.getEndTime()); + } + String handoverType = handoverRecords.getStatus(); + Integer staff = nowAccountInfo.getStaffId(); + LJStaff ljStaff = iljStaffService.selectStaffById(staff); + + // 填充 baseInfo + Map baseInfo = new HashMap<>(); + baseInfo.put("storeName", mtStore.getName()); + baseInfo.put("realName", ljStaff.getRealName()); + baseInfo.put("handoverType", handoverType); + baseInfo.put("startTime", startTime); + baseInfo.put("endTime", formattedEndTime); +// baseInfo.put("handoverPrem", ljStaff.getHandoverPrem()); // 交班权限 +// baseInfo.put("handoverOut", ljStaff.getHandoverOut()); // 交班是否退出 + handoverMap.put("baseInfo",baseInfo); + Integer staffId=null; + // 获取订单汇总 + Map orderSummaryMap = orderSummary1(startTime, formattedEndTime, staffId); + + orderSummaryMap.put("orderall", + (new BigDecimal(orderSummaryMap.get("oilOrder").toString())).add(new BigDecimal(orderSummaryMap.get("rechargeAll").toString()))); + orderSummaryMap.put("orderalls", + (new BigDecimal(orderSummaryMap.get("receiptsMoney").toString()).add(new BigDecimal(orderSummaryMap.get("onAccount").toString())))); + handoverMap.put("orderSummary",orderSummaryMap); + // 支付方式汇总 + List> paymentAggregationMap = paymentAggregation1(startTime, formattedEndTime, staffId); + handoverMap.put("paymentAggregation",paymentAggregationMap); + // 油号统计 + List> oilNumberStatisticsMap = oilNumberStatistics1(startTime, formattedEndTime, staffId); + handoverMap.put("oilNumberStatistics",oilNumberStatisticsMap); + // 优惠统计 + List> discountStatisticsMap = discountStatistics(startTime, formattedEndTime, staffId); + handoverMap.put("discountStatistics",discountStatisticsMap); + // 退款统计 + List> backMoneyStatisticsMap = backMoneyStatistics(startTime, formattedEndTime, staffId); + handoverMap.put("backMoneyStatistics",backMoneyStatisticsMap); + // 挂账统计 + List> billingDetailsMap = billingDetails1(startTime, formattedEndTime, staffId); + handoverMap.put("billingDetails",billingDetailsMap); + // 会员充值记录 + List> employeeStatisticsMap = employeeStatistics1(startTime, formattedEndTime, staffId); + handoverMap.put("employeeStatistics",employeeStatisticsMap); + // 会员消费统计 + List> consumptionStatisticsMap = consumptionStatistics(startTime, formattedEndTime, staffId); + handoverMap.put("consumptionStatistics",consumptionStatisticsMap); + // 便利店交易信息 + List> goodsNumberStatistics = goodsNumberStatistics1(startTime, formattedEndTime, staffId); + handoverMap.put("goodsNumberStatistics",goodsNumberStatistics); + // 积分商城兑换信息 + List> IntegerNumberStatistics = IntegerNumberStatistics1(startTime, formattedEndTime, staffId); + handoverMap.put("integerNumberStatistics",IntegerNumberStatistics); + // 会员新增统计 + Map memberStatisticsMap = memberStatistics1(startTime, formattedEndTime, staffId); + handoverMap.put("memberStatistics",memberStatisticsMap); + // 挂账归还 + List> returnedToTheAccountMap = returnedToTheAccount1(startTime, formattedEndTime, staffId) ; + handoverMap.put("returnedToTheAccount",returnedToTheAccountMap); + + // 员工统计 + List> staffStatisticsMap = staffStatistics(startTime, formattedEndTime, staffId); + handoverMap.put("staffStatistics",staffStatisticsMap); + + + + // huiyuan支付方式汇总 +// List> paymentAggregationMap = paymentAggregationByhuiyuan(startTime, formattedEndTime, staffId); +// handoverMap.put("paymentAggregation",paymentAggregationMap); + // 合计 + return handoverMap; + } + public HandoverRecord selectById(String id) { + return handoverRecordMapper.selectById(id); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/HandoverShiftPrintingReceipt.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/HandoverShiftPrintingReceipt.java index 05c37aa09..19ada84ff 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/HandoverShiftPrintingReceipt.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/HandoverShiftPrintingReceipt.java @@ -41,7 +41,6 @@ public class HandoverShiftPrintingReceipt { sb.append("充值赠送:"+String.valueOf(o1.get("giftAccount")) +"\r\n"); sb.append("会员总余额:"+String.valueOf(o1.get("memberBalance")) +"\r\n"); sb.append("会员总积分:"+String.valueOf(o1.get("memberPoints")) +"\r\n"); - sb.append("---------------------------"+"\r\n"); sb.append("------营业收入统计------"+"\r\n"); sb.append("类型订单金额实收金额"); sb.append("营业总额"); @@ -53,7 +52,7 @@ public class HandoverShiftPrintingReceipt { sb.append("合计"); sb.append(""+String.valueOf(o1.get("orderall"))+""); sb.append(""+String.valueOf(o1.get("orderalls"))+""); - sb.append(""); + sb.append("\r\n"); sb.append("------支付方式统计------"+"\r\n"); sb.append("支付方式笔数实收金额"); List> o2 = (List>)handover.get("paymentAggregation"); @@ -62,7 +61,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o2.get(i).get("orderNum"))+""); sb.append(""+ String.valueOf(o2.get(i).get("truePay"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------油品实收统计------"+"\r\n"); sb.append("油号笔数实收金额"); List> o3 = (List>)handover.get("oilNumberStatistics"); @@ -71,7 +70,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o3.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o3.get(m).get("payAmount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------优惠统计------"+"\r\n"); sb.append("油号笔数实收金额"); List> o4 = (List>)handover.get("discountStatistics"); @@ -80,7 +79,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o4.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o4.get(m).get("discountAmount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------退款统计------"+"\r\n"); sb.append("油号笔数实收金额"); List> o5 = (List>)handover.get("backMoneyStatistics"); @@ -89,7 +88,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o5.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o5.get(m).get("refMoney"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------挂账统计------"+"\r\n"); sb.append("关账单位笔数实收金额"); List> o6 = (List>)handover.get("billingDetails"); @@ -98,7 +97,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o6.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o6.get(m).get("amount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------会员充值统计------"+"\r\n"); sb.append("支付方式笔数实收金额"); List> o7 = (List>)handover.get("employeeStatistics"); @@ -107,7 +106,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o7.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o7.get(m).get("rechargeBalance"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------会员消费统计------"+"\r\n"); sb.append("支付方式笔数实收金额"); List> o8 = (List>)handover.get("consumptionStatistics"); @@ -125,7 +124,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o9.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o9.get(m).get("payAmount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------积分商城统计------"+"\r\n"); sb.append("支付方式笔数实收金额"); List> o10 = (List>)handover.get("integerNumberStatistics"); @@ -134,13 +133,13 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o10.get(m).get("orderNum"))+""); sb.append(""+ String.valueOf(o10.get(m).get("amount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------新增会员统计------"+"\r\n"); Map o11 = (Map)handover.get("memberStatistics"); sb.append("新增会员数"+ String.valueOf(o11.get("userNum"))+""); - sb.append(""); + sb.append("\r\n"); sb.append("------挂账归还统计------"+"\r\n"); sb.append("支付方式笔数实收金额"); List> o12 = (List>)handover.get("returnedToTheAccount"); @@ -149,7 +148,7 @@ public class HandoverShiftPrintingReceipt { sb.append(""+String.valueOf(o12.get(m).get("returnNum"))+""); sb.append(""+ String.valueOf(o12.get(m).get("amount"))+""); } - sb.append(""); + sb.append("\r\n"); sb.append("------员工实收统计------"+"\r\n"); sb.append("员工笔数实收金额"); List> o13 = (List>)handover.get("staffStatistics"); diff --git a/fuintCashierWeb/src/api/handover/handover.js b/fuintCashierWeb/src/api/handover/handover.js index 51aa40b04..f824784fd 100644 --- a/fuintCashierWeb/src/api/handover/handover.js +++ b/fuintCashierWeb/src/api/handover/handover.js @@ -77,3 +77,24 @@ export function printLocallyApi(data) { data: data }) } +export function handoverShiftPrintingReceipts(data) { + return request({ + url: '/business/handoverRecord/handoverShiftPrintingReceipts', + method: 'post', + data: data + }) +} +export function handoverShiftPrintingReceiptss(data) { + return request({ + url: '/business/handoverRecord/handoverShiftPrintingReceiptss', + method: 'post', + data: data + }) +} +export function handoverShiftPrintingReceiptsfor(data) { + return request({ + url: '/business/handoverRecord/handoverShiftPrintingReceiptsfor', + method: 'post', + data: data + }) +} diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue b/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue index b5ebb66e3..289127bd3 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue @@ -46,7 +46,7 @@ 门店交接单 - 打印 + 打印 油站名称 @@ -74,39 +74,39 @@ 优惠金额 - {{ orderSummary.allDis }} - - - 退款金额 {{ orderSummary.oilRefund }} + + 退款金额 + {{ orderSummary.oilPaid }} + 挂账金额 - -- + {{ orderSummary.onAccount }} 会员消费 - {{ orderSummary.allBalanceP }} + {{ orderSummary.consumptionMoney }} 实收金额 - {{ orderSummary.allMoney }} + {{ orderSummary.receiptsMoney }} 充值金额 - {{ orderSummary.cardPaid }} + {{ orderSummary.onAccount }} 充值赠送 - {{ orderSummary.cardGiftPaid }} + {{ orderSummary.giftAccount }} 会员总余额 - {{ orderSummary.points }} + {{ orderSummary.memberBalance }} 会员总积分 - {{ orderSummary.sumnum }} + {{ orderSummary.memberPoints }} @@ -123,18 +123,18 @@ 营业总额 - {{ orderSummary.allyingye1 }} - ¥{{ orderSummary.allyingye }} + {{ orderSummary.oilOrder }} + ¥{{ orderSummary.receiptsMoney }} 充值总额 - {{ orderSummary.allchuzhika1 }} - ¥{{ orderSummary.allchuzhika }} + {{ orderSummary.rechargeAll }} + ¥{{ orderSummary.onAccount }} 合计 - {{ orderSummary.allyingye1 + orderSummary.allchuzhika1 }} - ¥{{ orderSummary.allyingye + orderSummary.allchuzhika }} + {{ orderSummary.orderall}} + ¥{{ orderSummary.orderalls}} @@ -151,9 +151,9 @@ 实收金额 - {{ calculateThePaymentMethod(item.payType) }} - {{ item.numberOfDeals }} - ¥{{ item.paidAmount }} + {{item.payType}} + {{ item.orderNum }} + ¥{{ item.truePay }} @@ -169,9 +169,9 @@ 实收金额 - {{ item.oilName }} - {{ item.numberOfDeals }} - ¥{{ item.paidAmount }} + {{ item.name }} + {{ item.orderNum }} + ¥{{ item.payAmount }} @@ -186,10 +186,10 @@ 笔数 实收金额 - - {{ item.oilName }} - {{ item.numberOfDeals }} - ¥{{ item.paidAmount }} + + {{ item.name }} + {{ item.orderNum }} + ¥{{ item.discountAmount }} @@ -204,10 +204,10 @@ 笔数 实收金额 - - {{ item.oilName }} - {{ item.numberOfDeals }} - ¥{{ item.paidAmount }} + + {{ item.name }} + {{ item.orderNum }} + ¥{{ item.refMoney }} @@ -223,12 +223,11 @@ 笔数 实收金额 - {{ item.name }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + {{ item.orderNum}} + ¥{{ item.amount}} @@ -243,10 +242,10 @@ 笔数 实收金额 - - {{ calculateThePaymentMethod(item.payType) }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + + {{item.payType}} + {{ item.orderNum}} + ¥{{ item.rechargeBalance}} @@ -261,12 +260,10 @@ 笔数 实收金额 - - 合计 - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + + {{ item.payType}} + {{ item.orderNums }} + ¥{{item.orderNum}} @@ -281,10 +278,10 @@ 笔数 实收金额 - - {{ calculateThePaymentMethod(item.payType) }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + + {{item.payType }} + {{ item.orderNum}} + ¥{{ item.payAmount}} @@ -300,10 +297,10 @@ 笔数 实收金额 - - {{ calculateThePaymentMethod(item.payType) }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + + {{item.payType }} + {{ item.orderNum}} + ¥{{ item.amount}} @@ -317,7 +314,7 @@ 新增会员数 - {{ orderSummary.sumnum }} + {{ memberStatistics.userNum }} @@ -326,7 +323,7 @@ - 挂账归还统计(再处理) + 挂账归还统计 @@ -335,9 +332,9 @@ 实收金额 - {{ item.name ? item.name : '--' }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + {{ item.status }} + {{ item.returnNum }} + ¥{{ item.amount}} @@ -352,10 +349,10 @@ 笔数 实收金额 - - {{ item.name ? item.name : '--' }} - {{ item.numberOfDeals ? item.numberOfDeals : '--' }} - ¥{{ item.paidAmount ? item.paidAmount : '--' }} + + {{ item.name }} + {{ item.staffNum }} + ¥{{ item.monye}} @@ -383,7 +380,9 @@ import { printLocallyApi, getStatisticsApi, getDicts, - listStaff + listStaff, + handoverShiftPrintingReceipts, + handoverShiftPrintingReceiptss } from '@/api/handover/handover' import HandoverOnly from '@/views/cashier/NewComponents/HandoverOnly.vue' @@ -397,7 +396,33 @@ export default { data() { return { - + baseInfo : {}, + //汇总 + orderSummary : {}, + //支付 + paymentAggregation :[], + //油号 + oilNumberStatistics:[], + //优惠 + discountStatistics:[], + //退款 + backMoneyStatistics:[], + //挂账 + billingDetails :[], + //会员充值 + employeeStatistics:[], + //会员消费 + consumptionStatistics:[], + //便利店消费 + goodsNumberStatistics:[], + //积分 + integerNumberStatistics:[], + //会员新增统计 + memberStatistics:{}, + //挂账归还 + returnedToTheAccount:[], + //员工统计 + staffStatistics:[], tabs: [ '交接班', '交班记录' @@ -412,14 +437,7 @@ export default { shiftHandoverList: '', handoverList: {}, handoverData: {}, - baseInfo: {}, - billingDetails: [], - employeeStatistics: [], greaseGunStatistics: [], - oilNumberStatistics: [], - orderSummary: {}, - paymentAggregation: [], - returnedToTheAccount: [], // base queryParams: { @@ -448,10 +466,10 @@ export default { }, created() { this.getList() - this.getHandover() - this.getStatistics() - this.getStatus() - this.getStaffList() + // this.getHandover() + // this.getStatistics() + // this.getStatus() + // this.getStaffList() }, watch: { 'queryParams.status': { @@ -484,21 +502,46 @@ export default { }) } , - + handoverShiftPrintingReceipt() { + handoverShiftPrintingReceipts(this.queryParams).then(res => { + this.dataList = res.data.records + this.total = res.data.total + }) + }, getindex(index) { this.tabindex = index } , getList() { - this.dateRange = [] - if (this.beginTime && this.endTime) { - this.dateRange.push(this.beginTime.toLocaleDateString()) - this.dateRange.push(this.endTime.toLocaleDateString()) - } - getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res => { - this.dataList = res.data.records - this.total = res.data.total - + handoverShiftPrintingReceiptss(this.queryParams).then(res => { + this.handoverData = res.data; + this.baseInfo = this.handoverData.baseInfo, + //汇总 + this.orderSummary = this.handoverData.orderSummary, + //支付 + this.paymentAggregation = this.handoverData.paymentAggregation, + //油号 + this.oilNumberStatistics = this.handoverData.oilNumberStatistics, + //优惠 + this.discountStatistics = this.handoverData.discountStatistics, + //退款 + this.backMoneyStatistics = this.handoverData.backMoneyStatistics, + //挂账 + this.billingDetails = this.handoverData.billingDetails, + //会员充值 + this.employeeStatistics = this.handoverData.employeeStatistics, + //会员消费 + this.consumptionStatistics = this.handoverData.consumptionStatistics, + //便利店消费 + this.goodsNumberStatistics = this.handoverData.goodsNumberStatistics, + //积分 + this.integerNumberStatistics = this.handoverData.integerNumberStatistics, + //会员新增统计 + this.memberStatistics = this.handoverData.memberStatistics, + //挂账归还 + this.returnedToTheAccount = this.handoverData.returnedToTheAccount, + //员工统计 + this.staffStatistics = this.handoverData.staffStatistics }) } , @@ -506,7 +549,6 @@ export default { getStatisticsApi().then(res => { this.statisticsForm = res.data }) - console.log('123123123', this.statisticsForm) } , diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/HandoverRecord.vue b/fuintCashierWeb/src/views/cashier/NewComponents/HandoverRecord.vue index 9699617af..f1be7b475 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/HandoverRecord.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/HandoverRecord.vue @@ -1,5 +1,5 @@