对接订单打印小票
This commit is contained in:
@@ -299,7 +299,7 @@ async function payTypeChange(index, item) {
|
||||
showBuyerHandle()
|
||||
}
|
||||
if (payActive.value != 'buyer') {
|
||||
if (payList.value[payActive.value].payType == 'deposit' && !global.orderMemberInfo.id) {
|
||||
if (payList.value[payActive.value].payType == 'deposit') {
|
||||
scanModalRef.value.show()
|
||||
}
|
||||
}
|
||||
@@ -313,11 +313,12 @@ async function confirmOrder() {
|
||||
try {
|
||||
payLoading.value = true
|
||||
// 暂时使用现金支付
|
||||
payData.value.checkOrderPay.orderAmount = formatDecimal(+money.value)
|
||||
payData.value.checkOrderPay.roundAmount = formatDecimal(props.amount - money.value)
|
||||
payData.value.checkOrderPay.userId = goodsStore.vipUserInfo.userId ? goodsStore.vipUserInfo.userId : ''
|
||||
payData.value.checkOrderPay.vipPrice = goodsStore.vipUserInfo.userId ? 1 : 0
|
||||
await cashPay(payData.value)
|
||||
|
||||
payLoading.value = false
|
||||
ElMessage.success('支付成功')
|
||||
goodsStore.successDeleteCartItem()
|
||||
emit('paySuccess')
|
||||
return
|
||||
await staffPermission('yun_xu_shou_kuan')
|
||||
@@ -491,27 +492,27 @@ function cancelDiscount() {
|
||||
|
||||
onMounted(() => {
|
||||
money.value = `${formatDecimal(props.amount)}`
|
||||
|
||||
payData.value = {
|
||||
shopId: store.shopInfo.id,
|
||||
buyerRemark: '', // 订单备注
|
||||
checkOrderPay: {
|
||||
orderId: goodsStore.orderListInfo.id,
|
||||
userId: '',
|
||||
vipPrice: 0, // 是否使用会员价
|
||||
allPack: 0,// 是否整单打包
|
||||
userId: goodsStore.vipUserInfo.id,
|
||||
seatNum: goodsStore.tableInfo.num, // 用餐人数
|
||||
originAmount: goodsStore.orderListInfo.originAmount, // 订单原金额(包含打包费+餐位费) 不含折扣价格
|
||||
originAmount: formatDecimal(+goodsStore.cartInfo.totalAmount), // 订单原金额(包含打包费+餐位费) 不含折扣价格
|
||||
discountRatio: 1, // 折扣比例(计算时 向上取整保留 两位小数)
|
||||
discountAmount: 0, // 手动优惠金额
|
||||
productCouponDiscountAmount: 0, // 商品优惠券抵扣金额
|
||||
fullCouponDiscountAmount: 0, // 满减优惠券抵扣金额
|
||||
couponList: [], // 用户使用的卡券
|
||||
orderAmount: goodsStore.orderListInfo.originAmount, // 订单金额
|
||||
orderAmount: formatDecimal(+goodsStore.cartInfo.totalAmount - goodsStore.cartInfo.packFee), // 订单金额
|
||||
roundAmount: 0, // 抹零金额 减免多少钱
|
||||
pointsDiscountAmount: 0, // 积分抵扣金额(tb_points_basic_setting表)
|
||||
pointsNum: 0 // 使用的积分数量 (扣除各类折扣 enable_deduction后使用)
|
||||
}
|
||||
}
|
||||
|
||||
queryPayTypeAjax()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user