优化小票打印新增餐位费和打包费
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user