优化小票打印新增餐位费和打包费

This commit is contained in:
gyq
2026-01-14 09:39:37 +08:00
parent a60acb4f1a
commit 217cabcb96
7 changed files with 225 additions and 116 deletions

View File

@@ -163,6 +163,8 @@ export function commOrderPrintData(orderInfo) {
shop_name: userStore.shopInfo.shopName,
loginAccount: userStore.userInfo.name,
carts: [],
discountAllAmount: formatDecimal(+orderInfo.discountAllAmount),
orderAmount: formatDecimal(+orderInfo.orderAmount),
amount: formatDecimal(+orderInfo.payAmount),
originAmount: formatDecimal(+orderInfo.originAmount),
discountAmount:
@@ -191,6 +193,32 @@ export function commOrderPrintData(orderInfo) {
});
});
if (orderInfo.seatAmount > 0) {
console.log('有餐位费', orderInfo.seatAmount);
data.carts.push({
categoryId: '',
name: '餐位费',
number: orderInfo.seatNum,
skuName: '',
salePrice: formatDecimal(orderInfo.seatAmount / orderInfo.seatNum),
totalAmount: orderInfo.seatAmount,
proGroupInfo: "",
})
}
if (orderInfo.packFee > 0) {
data.carts.push({
categoryId: '',
name: '打包费',
number: '',
skuName: '',
salePrice: '',
totalAmount: orderInfo.packFee,
proGroupInfo: "",
})
}
return data;
}