This commit is contained in:
sw 2024-11-08 09:45:44 +08:00
parent 1af2d0861b
commit c889354454
11 changed files with 334 additions and 139 deletions

View File

@ -59,3 +59,10 @@ export function handoverShiftPrintingReceiptss(data) {
})
}
export function handoverShiftPrintingReceiptsfor(data) {
return request({
url: '/business/handoverRecord/handoverShiftPrintingReceiptsfor',
method: 'post',
data: data
})
}

View File

@ -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 {
<el-button size="mini" type="text" @click="openSeeDetailsMethods(scope.row)">查看详情</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod(scope.row)">交易明细</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod2(scope.row)">商品汇总</el-button>
<el-button size="mini" type="text">打印</el-button>
<el-button size="mini" type="text"@click="printReceipts(scope.row)">打印</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -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<String, Object> handAll=handoverRecordService.handover4(id);
printerService.handoverShiftPrintingReceipt(handAll);
}
}

View File

@ -133,6 +133,6 @@ public interface HandoverRecordMapper {
List<Map<String, Object>> returnedToTheAccount1(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
List<Map<String, Object>> staffStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
HandoverRecord selectById(@Param("id")String id);
}

View File

@ -589,29 +589,27 @@ limit 1
<select id="oilOrderStatistics1" resultType="java.util.Map">
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}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
</select>
@ -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}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
GROUP BY pay_type with rollup
</select>
@ -656,9 +653,7 @@ limit 1
on onn.id=oo.oils
where oo.store_id = #{storeId}
and oo.create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>) a
) a
GROUP BY a.`name` with rollup
</select>
@ -679,9 +674,7 @@ limit 1
on onn.id=oo.oils
where oo.store_id = #{storeId}
and oo.create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>) a
) a
GROUP BY a.`name` with rollup
</select>
<select id="backMoneyStatistics" resultType="java.util.Map">
@ -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}
<if test="staffId != null">
and staff_id = #{staffId}
</if>) a
) a
GROUP BY a.`name` WITH ROLLUP
</select>
@ -744,9 +735,6 @@ limit 1
from card_value_record
where store_id = #{storeId}
and create_time BETWEEN #{startTime} AND #{endTime}
<if test="staffId != null">
and staff_id = #{staffId}
</if>
group by payment_type with rollup
</select>
@ -884,5 +872,17 @@ limit 1
and aoi.create_time BETWEEN #{startTime} AND #{endTime}) a
GROUP BY a.`name` WITH ROLLUP
</select>
<select id="selectById" resultType="com.fuint.business.order.entity.HandoverRecord">
select
id, staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by
from handover_record
<where>
<if test="id != null">
and id = #{id}
</if>
</where>
</select>
</mapper>

View File

@ -68,5 +68,5 @@ public interface HandoverRecordService {
public void printLocally(Map<String, Object> aa);
public Map<String, Object> handover3(Integer staffId);
public Map<String, Object> handover4(String id);
}

View File

@ -1274,7 +1274,6 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Map<String, Object> allStatistics = new HashMap<>();
Map<String, Object> 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<Map<String, Object>> returnedToTheAccount = handoverRecordMapper.staffStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
return returnedToTheAccount;
}
@Override
public Map<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<Map<String, Object>> paymentAggregationMap = paymentAggregation1(startTime, formattedEndTime, staffId);
handoverMap.put("paymentAggregation",paymentAggregationMap);
// 油号统计
List<Map<String, Object>> oilNumberStatisticsMap = oilNumberStatistics1(startTime, formattedEndTime, staffId);
handoverMap.put("oilNumberStatistics",oilNumberStatisticsMap);
// 优惠统计
List<Map<String, Object>> discountStatisticsMap = discountStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("discountStatistics",discountStatisticsMap);
// 退款统计
List<Map<String, Object>> backMoneyStatisticsMap = backMoneyStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("backMoneyStatistics",backMoneyStatisticsMap);
// 挂账统计
List<Map<String, Object>> billingDetailsMap = billingDetails1(startTime, formattedEndTime, staffId);
handoverMap.put("billingDetails",billingDetailsMap);
// 会员充值记录
List<Map<String, Object>> employeeStatisticsMap = employeeStatistics1(startTime, formattedEndTime, staffId);
handoverMap.put("employeeStatistics",employeeStatisticsMap);
// 会员消费统计
List<Map<String, Object>> consumptionStatisticsMap = consumptionStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("consumptionStatistics",consumptionStatisticsMap);
// 便利店交易信息
List<Map<String, Object>> goodsNumberStatistics = goodsNumberStatistics1(startTime, formattedEndTime, staffId);
handoverMap.put("goodsNumberStatistics",goodsNumberStatistics);
// 积分商城兑换信息
List<Map<String, Object>> IntegerNumberStatistics = IntegerNumberStatistics1(startTime, formattedEndTime, staffId);
handoverMap.put("integerNumberStatistics",IntegerNumberStatistics);
// 会员新增统计
Map<String, Object> memberStatisticsMap = memberStatistics1(startTime, formattedEndTime, staffId);
handoverMap.put("memberStatistics",memberStatisticsMap);
// 挂账归还
List<Map<String, Object>> returnedToTheAccountMap = returnedToTheAccount1(startTime, formattedEndTime, staffId) ;
handoverMap.put("returnedToTheAccount",returnedToTheAccountMap);
// 员工统计
List<Map<String, Object>> staffStatisticsMap = staffStatistics(startTime, formattedEndTime, staffId);
handoverMap.put("staffStatistics",staffStatisticsMap);
// huiyuan支付方式汇总
// List<Map<String, Object>> paymentAggregationMap = paymentAggregationByhuiyuan(startTime, formattedEndTime, staffId);
// handoverMap.put("paymentAggregation",paymentAggregationMap);
// 合计
return handoverMap;
}
public HandoverRecord selectById(String id) {
return handoverRecordMapper.selectById(id);
}
}

View File

@ -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("<center>---------------------------</center>"+"\r\n");
sb.append("<center>------营业收入统计------</center>"+"\r\n");
sb.append("<table><tr><td>类型</td><td>订单金额</td><td>实收金额</td></tr>");
sb.append("<tr><td>营业总额</td>");
@ -53,7 +52,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<tr><td>合计</td>");
sb.append("<td>"+String.valueOf(o1.get("orderall"))+"</td>");
sb.append("<td>"+String.valueOf(o1.get("orderalls"))+"</td></tr>");
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------支付方式统计------</center>"+"\r\n");
sb.append("<table><tr><td>支付方式</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o2 = (List<Map<String,String>>)handover.get("paymentAggregation");
@ -62,7 +61,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o2.get(i).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o2.get(i).get("truePay"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------油品实收统计------</center>"+"\r\n");
sb.append("<table><tr><td>油号</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o3 = (List<Map<String,String>>)handover.get("oilNumberStatistics");
@ -71,7 +70,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o3.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o3.get(m).get("payAmount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------优惠统计------</center>"+"\r\n");
sb.append("<table><tr><td>油号</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o4 = (List<Map<String,String>>)handover.get("discountStatistics");
@ -80,7 +79,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o4.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o4.get(m).get("discountAmount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------退款统计------</center>"+"\r\n");
sb.append("<table><tr><td>油号</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o5 = (List<Map<String,String>>)handover.get("backMoneyStatistics");
@ -89,7 +88,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o5.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o5.get(m).get("refMoney"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------挂账统计------</center>"+"\r\n");
sb.append("<table><tr><td>关账单位</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o6 = (List<Map<String,String>>)handover.get("billingDetails");
@ -98,7 +97,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o6.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o6.get(m).get("amount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------会员充值统计------</center>"+"\r\n");
sb.append("<table><tr><td>支付方式</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o7 = (List<Map<String,String>>)handover.get("employeeStatistics");
@ -107,7 +106,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o7.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o7.get(m).get("rechargeBalance"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------会员消费统计------</center>"+"\r\n");
sb.append("<table><tr><td>支付方式</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o8 = (List<Map<String,String>>)handover.get("consumptionStatistics");
@ -125,7 +124,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o9.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o9.get(m).get("payAmount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------积分商城统计------</center>"+"\r\n");
sb.append("<table><tr><td>支付方式</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o10 = (List<Map<String,String>>)handover.get("integerNumberStatistics");
@ -134,13 +133,13 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o10.get(m).get("orderNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o10.get(m).get("amount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------新增会员统计------</center>"+"\r\n");
Map<String,String> o11 = (Map<String,String>)handover.get("memberStatistics");
sb.append("<table><tr><td>新增会员数</td><td>"+ String.valueOf(o11.get("userNum"))+"</td></tr>");
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------挂账归还统计------</center>"+"\r\n");
sb.append("<table><tr><td>支付方式</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o12 = (List<Map<String,String>>)handover.get("returnedToTheAccount");
@ -149,7 +148,7 @@ public class HandoverShiftPrintingReceipt {
sb.append("<td>"+String.valueOf(o12.get(m).get("returnNum"))+"</td>");
sb.append("<td>"+ String.valueOf(o12.get(m).get("amount"))+"</td></tr>");
}
sb.append("</table>");
sb.append("</table>\r\n");
sb.append("<center>------员工实收统计------</center>"+"\r\n");
sb.append("<table><tr><td>员工</td><td>笔数</td><td>实收金额</td></tr>");
List<Map<String,String>> o13 = (List<Map<String,String>>)handover.get("staffStatistics");

View File

@ -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
})
}

View File

@ -46,7 +46,7 @@
<div class="title_" style="display: flex;justify-content: space-between">
<div style="width: 10%;"></div>
<div>门店交接单</div>
<div style=" color: #FF9655;font-size: 14px;">打印</div>
<div style="cursor: pointer; color: #FF9655;font-size: 14px;" @click="handoverShiftPrintingReceipt">打印</div>
</div>
<div class="d-s-b">
<div>油站名称</div>
@ -74,39 +74,39 @@
</div>
<div class="d-s-b">
<div>优惠金额</div>
<div>{{ orderSummary.allDis }}</div>
</div>
<div class="d-s-b">
<div>退款金额</div>
<div>{{ orderSummary.oilRefund }}</div>
</div>
<div class="d-s-b">
<div>退款金额</div>
<div>{{ orderSummary.oilPaid }}</div>
</div>
<div class="d-s-b">
<div>挂账金额</div>
<div>--</div>
<div>{{ orderSummary.onAccount }}</div>
</div>
<div class="d-s-b">
<div>会员消费</div>
<div>{{ orderSummary.allBalanceP }}</div>
<div>{{ orderSummary.consumptionMoney }}</div>
</div>
<div class="d-s-b">
<div>实收金额</div>
<div>{{ orderSummary.allMoney }}</div>
<div>{{ orderSummary.receiptsMoney }}</div>
</div>
<div class="d-s-b">
<div>充值金额</div>
<div>{{ orderSummary.cardPaid }}</div>
<div>{{ orderSummary.onAccount }}</div>
</div>
<div class="d-s-b">
<div>充值赠送</div>
<div>{{ orderSummary.cardGiftPaid }}</div>
<div>{{ orderSummary.giftAccount }}</div>
</div>
<div class="d-s-b">
<div>会员总余额</div>
<div>{{ orderSummary.points }}</div>
<div>{{ orderSummary.memberBalance }}</div>
</div>
<div class="d-s-b">
<div>会员总积分</div>
<div>{{ orderSummary.sumnum }}</div>
<div>{{ orderSummary.memberPoints }}</div>
</div>
<div class="xxing"></div>
<div style="overflow: auto; height: 32vh;scrollbar-width: none; ">
@ -123,18 +123,18 @@
</div>
<div class="d-s-b">
<div class="l-size">营业总额</div>
<div class="s-size">{{ orderSummary.allyingye1 }}</div>
<div class="r-size">{{ orderSummary.allyingye }}</div>
<div class="s-size">{{ orderSummary.oilOrder }}</div>
<div class="r-size">{{ orderSummary.receiptsMoney }}</div>
</div>
<div class="d-s-b">
<div class="l-size">充值总额</div>
<div class="s-size">{{ orderSummary.allchuzhika1 }}</div>
<div class="r-size">{{ orderSummary.allchuzhika }}</div>
<div class="s-size">{{ orderSummary.rechargeAll }}</div>
<div class="r-size">{{ orderSummary.onAccount }}</div>
</div>
<div class="d-s-b">
<div class="l-size">合计</div>
<div class="s-size">{{ orderSummary.allyingye1 + orderSummary.allchuzhika1 }}</div>
<div class="r-size">{{ orderSummary.allyingye + orderSummary.allchuzhika }}</div>
<div class="s-size">{{ orderSummary.orderall}}</div>
<div class="r-size">{{ orderSummary.orderalls}}</div>
</div>
</div>
@ -151,9 +151,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all'">
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
<div class="l-size">{{item.payType}}</div>
<div class="s-size">{{ item.orderNum }}</div>
<div class="r-size">{{ item.truePay }}</div>
</div>
</div>
@ -169,9 +169,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.orderNum }}</div>
<div class="r-size">{{ item.payAmount }}</div>
</div>
</div>
@ -186,10 +186,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
<div class="d-s-b" v-for="item in discountStatistics">
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.orderNum }}</div>
<div class="r-size">{{ item.discountAmount }}</div>
</div>
</div>
@ -204,10 +204,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
<div class="d-s-b" v-for="item in backMoneyStatistics">
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.orderNum }}</div>
<div class="r-size">{{ item.refMoney }}</div>
</div>
</div>
@ -223,12 +223,11 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation"
v-if="item.flag == 'all' && item.payType == 'balance'"
<div class="d-s-b" v-for="item in billingDetails"
>
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="s-size">{{ item.orderNum}}</div>
<div class="r-size">{{ item.amount}}</div>
</div>
</div>
@ -243,10 +242,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'allbalance'">
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="d-s-b" v-for="item in employeeStatistics" >
<div class="l-size">{{item.payType}}</div>
<div class="s-size">{{ item.orderNum}}</div>
<div class="r-size">{{ item.rechargeBalance}}</div>
</div>
</div>
@ -261,12 +260,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation"
v-if="item.flag == 'all' && item.payType == 'balance'"
>
<div class="l-size">合计</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="d-s-b" v-for="item in consumptionStatistics">
<div class="l-size">{{ item.payType}}</div>
<div class="s-size">{{ item.orderNums }}</div>
<div class="r-size">{{item.orderNum}}</div>
</div>
</div>
@ -281,10 +278,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'goods'">
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="d-s-b" v-for="item in goodsNumberStatistics">
<div class="l-size">{{item.payType }}</div>
<div class="s-size">{{ item.orderNum}}</div>
<div class="r-size">{{ item.payAmount}}</div>
</div>
</div>
@ -300,10 +297,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'point'">
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="d-s-b" v-for="item in integerNumberStatistics">
<div class="l-size">{{item.payType }}</div>
<div class="s-size">{{ item.orderNum}}</div>
<div class="r-size">{{ item.amount}}</div>
</div>
</div>
@ -317,7 +314,7 @@
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">新增会员数</div>
<!-- <div class="f-size">笔数</div>-->
<div class="r-size">{{ orderSummary.sumnum }}</div>
<div class="r-size">{{ memberStatistics.userNum }}</div>
</div>
</div>
@ -326,7 +323,7 @@
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>挂账归还统计(再处理)</div>
<div>挂账归还统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
@ -335,9 +332,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in returnedToTheAccount">
<div class="l-size">{{ item.name ? item.name : '--' }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="l-size">{{ item.status }}</div>
<div class="s-size">{{ item.returnNum }}</div>
<div class="r-size">{{ item.amount}}</div>
</div>
</div>
@ -352,10 +349,10 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in employeeStatistics">
<div class="l-size">{{ item.name ? item.name : '--' }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
<div class="d-s-b" v-for="item in staffStatistics">
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.staffNum }}</div>
<div class="r-size">{{ item.monye}}</div>
</div>
</div>
</div>
@ -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)
}
,

View File

@ -1,5 +1,5 @@
<script>
import {listStaff,getHandoverListApi} from "@/api/handover/handover";
import {listStaff,getHandoverListApi,handoverShiftPrintingReceiptsfor} from "@/api/handover/handover";
import HandoverDetailsInfo from "@/views/cashier/NewComponents/HandoverDetailsInfo.vue";
export default {
@ -79,6 +79,13 @@ export default {
this.getList();
},
printReceipts(data) {
handoverShiftPrintingReceiptsfor(data.id).then(res => {
this.dataList = res.data.records
this.total = res.data.total
})
},
resetQuery(){
this.queryParams = {
giftName: '',
@ -188,7 +195,7 @@ export default {
<el-button size="mini" type="text" @click="openSeeDetailsMethods(scope.row)">查看详情</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod(scope.row)">交易明细</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod2(scope.row)">商品汇总</el-button>
<el-button size="mini" type="text">打印</el-button>
<el-button size="mini" type="text" @click="printReceipts(scope.row)">打印</el-button>
</template>
</el-table-column>
</el-table>