采用最新结算函数优化代客下单

This commit is contained in:
gyq
2025-11-14 18:14:27 +08:00
parent bec6bd6668
commit 7c7fc3ef0f
13 changed files with 369 additions and 17189 deletions

View File

@@ -265,13 +265,16 @@ function printReloadHandle() {
}
// 选择会员
function selectUser(row) {
async function selectUser(row) {
console.log('selectUser===', row);
goodsStore.vipUserInfo = { ...row }
if (store.shopInfo.isMemberPrice && row.isVip) {
goodsStore.showVipPrice = 1
}
await goodsStore.updateGoodsList()
goodsStore.calcCartInfo()
}
@@ -297,13 +300,14 @@ async function createOrderHandle(t = 0) {
shopId: store.shopInfo.id, // 店铺id
seatNum: goodsStore.tableInfo.num || 0, // 用餐人数
packFee: goodsStore.cartInfo.packFee, // 打包费
originAmount: formatDecimal(+goodsStore.cartInfo.totalAmount, 2, true), // 订单原金额(包含打包费+餐位费) 不含折扣价格
originAmount: goodsStore.cartInfo.costSummary.goodsOriginalAmount,
tableCode: goodsStore.cartList[0].table_code, // 台桌号
dineMode: goodsStore.allSelected ? store.shopInfo.eatModel.split(',')[1] : store.shopInfo.eatModel.split(',')[0], // 用餐方式
remark: remark.value, // 备注
placeNum: (goodsStore.orderListInfo.placeNum || 0) + 1, // 下单次数
waitCall: 0, // 是否叫号
userId: goodsStore.vipUserInfo.userId, // 会员用户id
userId: goodsStore.vipUserInfo.userId || '', // 会员用户id
limitRate: goodsStore.limitDiscountRes
}
createOrderLoading.value = true;