购物车,订单,霸王餐
This commit is contained in:
@@ -171,7 +171,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell-item"
|
||||
<!-- <view class="cell-item"
|
||||
v-if="listinfo && listinfo.pointsDiscountAmount && listinfo.pointsDiscountAmount > 0">
|
||||
<view class="label">积分抵扣</view>
|
||||
<view class="val">
|
||||
@@ -179,7 +179,7 @@
|
||||
<view style="font-size: 28rpx;">¥</view>
|
||||
<view>{{listinfo.pointsDiscountAmount.toFixed(2)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</block>
|
||||
|
||||
<view class="total-wrap">
|
||||
@@ -193,7 +193,7 @@
|
||||
<view class="row" @click="copyHandle(listinfo.orderNo)">
|
||||
<text class="t">订单编号:</text>
|
||||
<text class="info"
|
||||
style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{listinfo.orderNo}}(点击复制)</text>
|
||||
style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{listinfo.orderNo}}(点击复制)</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="t">下单时间:</text>
|
||||
@@ -316,7 +316,12 @@
|
||||
default: {
|
||||
isTableFee: 0
|
||||
}
|
||||
},
|
||||
changeFreeenable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
const is_type = ref(0)
|
||||
@@ -337,8 +342,23 @@
|
||||
|
||||
}
|
||||
|
||||
// 清空
|
||||
const bwcclear = () => {
|
||||
IntegralInputclose()
|
||||
// 清空优惠卷
|
||||
favorablelist[1].value = ''
|
||||
favorablelist[0].value = ''
|
||||
}
|
||||
|
||||
// 跳转
|
||||
const goUrl = (item) => {
|
||||
if (props.changeFreeenable) {
|
||||
uni.showToast({
|
||||
title: '不可与其他优惠共享!',
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
switch (item.type) {
|
||||
case 'coupon':
|
||||
// 清空积分
|
||||
@@ -433,7 +453,8 @@
|
||||
// 将方法暴露给父组件
|
||||
defineExpose({
|
||||
dataprocessing,
|
||||
getCalcUsablePoints
|
||||
getCalcUsablePoints,
|
||||
bwcclear
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -701,6 +722,7 @@
|
||||
}
|
||||
|
||||
.shop-info {
|
||||
padding-top: 28rpx;
|
||||
border-bottom: 2rpx dashed #e5e5e5;
|
||||
|
||||
.item:nth-child(1) {
|
||||
|
||||
@@ -4,99 +4,84 @@
|
||||
<view class="rechargeFree_bg" @click="changeFree">
|
||||
<view class="left">
|
||||
<view class="icon">优惠</view>
|
||||
<view class="text">充值消费{{freeDingConfig.rechargeTimes}}倍(订单满¥{{freeDingConfig.rechargeThreshold}}元可用),本单立享免单!</view>
|
||||
<view class="text">
|
||||
充值消费{{freeDineConfig.rechargeTimes}}倍(订单满¥{{freeDineConfig.rechargeThreshold}}元可用),本单立享免单!</view>
|
||||
</view>
|
||||
<u-checkbox-group iconPlacement="right" >
|
||||
<u-checkbox :disabled="freeDisabled" v-model="rechargeFreeChecked" :checked="rechargeFreeChecked" @change="changeFree" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<up-checkbox :disabled="!freeDineConfig.enable" @change="change" shape="circle" usedAlone v-model:checked="changeFreeenable" icon-size="20" size="20">
|
||||
</up-checkbox>
|
||||
<!-- <up-checkbox-group iconPlacement="right">
|
||||
<up-checkbox : v-model="changeFreeenable"
|
||||
:checked="freeDineConfig.enable" @change="change" activeColor="#E8AD7B" shape="circle"
|
||||
icon-size="16" size="16">
|
||||
</up-checkbox>
|
||||
</up-checkbox-group> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
freeDisabled: false,
|
||||
}
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
defineProps,
|
||||
defineEmits
|
||||
} from 'vue';
|
||||
|
||||
// 定义接收的属性
|
||||
const props = defineProps({
|
||||
freeDineConfig: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
props:{
|
||||
shopUserInfo:{
|
||||
type: Object
|
||||
},
|
||||
freeDingConfig:{
|
||||
type: Object
|
||||
},
|
||||
payAmount: {
|
||||
type: Number
|
||||
},
|
||||
rechargeFreeChecked: {
|
||||
type: Boolean
|
||||
},
|
||||
|
||||
payAmount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
watch: {
|
||||
payAmount (newVal) {
|
||||
if ( this.freeDingConfig && this.payAmount < this.freeDingConfig.rechargeThreshold ) {
|
||||
this.freeDisabled = true
|
||||
} else {
|
||||
this.freeDisabled = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if ( this.freeDingConfig && this.payAmount < this.freeDingConfig.rechargeThreshold ) {
|
||||
this.freeDisabled = true
|
||||
} else {
|
||||
this.freeDisabled = false
|
||||
}
|
||||
console.log(this.freeDisabled )
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 监听是否免单
|
||||
*/
|
||||
changeFree ( e ) {
|
||||
if ( this.freeDisabled ) {
|
||||
return;
|
||||
}
|
||||
this.$emit("changeFree",this.rechargeFreeChecked)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const emits = defineEmits(['changeFree']);
|
||||
|
||||
const changeFreeenable = ref(false)
|
||||
|
||||
/**
|
||||
* 监听是否免单
|
||||
*/
|
||||
const change = (e) => {
|
||||
emits('changeFree', e);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 充值免单
|
||||
.rechargeFree{
|
||||
<style lang="scss" scoped>
|
||||
.rechargeFree {
|
||||
// padding: 0 20rpx;
|
||||
margin-top: 32rpx;
|
||||
.rechargeFree_bg{
|
||||
|
||||
.rechargeFree_bg {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 32rpx 24rpx;
|
||||
border-radius: 24rpx;
|
||||
background-color: #fff;
|
||||
.left{
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon{
|
||||
|
||||
.icon {
|
||||
width: 68rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
background: linear-gradient( 180deg, #FEDE81 0%, #FEB263 100%);
|
||||
background: linear-gradient(180deg, #FEDE81 0%, #FEB263 100%);
|
||||
border-radius: 12rpx 0rpx 12rpx 0rpx;
|
||||
font-weight: 500;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.text{
|
||||
width: 90%;
|
||||
|
||||
.text {
|
||||
width: 80%;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
@@ -104,5 +89,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
@@ -80,6 +80,7 @@
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
@@ -113,7 +114,7 @@
|
||||
|
||||
// 去使用优惠券
|
||||
const navigatorGo = (item) => {
|
||||
console.log(Orderinfo.payAmount, item)
|
||||
// console.log(Orderinfo.payAmount, item)
|
||||
if (Orderinfo.payAmount < item.fullAmount) {
|
||||
uni.showToast({
|
||||
title: "当前订单金额不足使用金额",
|
||||
@@ -138,6 +139,23 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 计算合并后的数组 num相加
|
||||
const mergedArray = computed(() => {
|
||||
const map = new Map();
|
||||
Orderinfo.shoppingCart.forEach(item => {
|
||||
if (map.has(item.productId)) {
|
||||
const existingItem = map.get(item.productId);
|
||||
existingItem.num += item.num;
|
||||
} else {
|
||||
map.set(item.productId, {
|
||||
...item
|
||||
});
|
||||
}
|
||||
});
|
||||
return Array.from(map.values());
|
||||
});
|
||||
|
||||
const Selectedlist = ref([])
|
||||
|
||||
// 商品卷
|
||||
@@ -146,12 +164,31 @@
|
||||
if (!item.show) {
|
||||
return false;
|
||||
}
|
||||
console.log(Orderinfo.shoppingCart)
|
||||
if (Orderinfo.shoppingCart.length < Selectedlist.value.length) {
|
||||
// 查找选中的数组里面 统计指定 id 的重复次数
|
||||
const count = Selectedlist.value.filter(item => item.id === item.id).length;
|
||||
|
||||
// 查找选中的数组里面 统计指定 id 的重复次数
|
||||
const foundObject = mergedArray.value.find(i => i.productId === item.proId)
|
||||
if (foundObject.num <= count) {
|
||||
uni.showToast({
|
||||
title: '不可多余下单参数哦!'
|
||||
title: '不可多余商品!',
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
// 查找选中的数组里面 统计指定 id 的重复次数
|
||||
|
||||
console.log(mergedArray.value)
|
||||
console.log(item)
|
||||
console.log(Selectedlist.value)
|
||||
console.log(Orderinfo.shoppingCart)
|
||||
// if (Orderinfo.shoppingCart.length <= Selectedlist.value.length) {
|
||||
// uni.showToast({
|
||||
// title: '不可多余下单数!',
|
||||
// icon:'none'
|
||||
// })
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (item.Selected) {
|
||||
Selectedlist.value = Selectedlist.value.filter(i => i.id !== item.id)
|
||||
@@ -251,15 +288,12 @@
|
||||
};
|
||||
});
|
||||
}
|
||||
console.log(res)
|
||||
if (res.length > 0) {
|
||||
fromInfo.list = res
|
||||
} else {
|
||||
fromInfo.list = []
|
||||
return false
|
||||
}
|
||||
console.log(res)
|
||||
|
||||
}
|
||||
// 商品取消
|
||||
const cancelCoupon = () => {
|
||||
@@ -296,12 +330,8 @@
|
||||
|
||||
uni.setNavigationBarTitle({
|
||||
title: Orderinfo.typeOrder == 2 ? '商品卷' : '优惠卷',
|
||||
success: () => {
|
||||
console.log('导航栏标题修改成功');
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('导航栏标题修改失败', err);
|
||||
}
|
||||
success: () => {},
|
||||
fail: (err) => {}
|
||||
});
|
||||
|
||||
Orderinfo.shopUserId = options.shopUserId
|
||||
|
||||
@@ -36,39 +36,18 @@
|
||||
<!-- x详情 -->
|
||||
<orderInfoAfter ref="orderInfoAfterRef" :rechargeFreeChecked="rechargeFreeChecked" :freeCheck="freeCheck"
|
||||
:listinfo="listinfo" :orderVIP="orderVIP" :ordershopUserInfo='ordershopUserInfo' @istype="istype"
|
||||
@clickPointsamount='clickPointsamount' @learcoupons="learcoupons">
|
||||
@clickPointsamount='clickPointsamount' @learcoupons="learcoupons" :changeFreeenable='changeFreeenable'>
|
||||
</orderInfoAfter>
|
||||
|
||||
<!-- 充值免单 -->
|
||||
<!-- <block v-if="listinfo.useType == 'dine-in-after'">
|
||||
<rechargeFree
|
||||
:rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="listinfo.freeDingConfig&&listinfo.freeDingConfig.enable == 1&&(listinfo.status == 'unpaid' || listinfo.status == 'paying')"
|
||||
ref="rechargeFree"
|
||||
:freeDisabled="freeDisabled"
|
||||
:payAmount="listinfo.payAmount"
|
||||
:freeDingConfig="listinfo.freeDingConfig" :shopUserInfo="orderVIP" @changeFree="changeFree"></rechargeFree>
|
||||
</block>
|
||||
<block v-else>
|
||||
<rechargeFree
|
||||
:rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="listinfo.freeDingConfig&&listinfo.freeDingConfig.enable == 1&&(!listinfo.couponInfoList&&listinfo.pointsDiscountAmount<=0)&&(listinfo.status == 'unpaid' || listinfo.status == 'paying')"
|
||||
ref="rechargeFree"
|
||||
:freeDisabled="freeDisabled"
|
||||
:payAmount="listinfo.payAmount"
|
||||
:freeDingConfig="listinfo.freeDingConfig" :shopUserInfo="orderVIP" @changeFree="changeFree"></rechargeFree>
|
||||
|
||||
</block> -->
|
||||
<!-- 霸王餐 -->
|
||||
<rechargeFree :freeDineConfig="orderVIP.freeDineConfig" :payAmount="listinfo.totalPrices"
|
||||
v-if="listinfo.status == 'unpaid' && orderVIP.freeDineConfig.enable" @changeFree="changeFree">
|
||||
</rechargeFree>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<paymentMethodes ref="paymentMethodref" :orderVIP="orderVIP" @groupChange="groupChange"
|
||||
v-if="listinfo.status == 'unpaid'">
|
||||
:changeFreeenable='changeFreeenable' v-if="listinfo.status == 'unpaid'">
|
||||
</paymentMethodes>
|
||||
<!-- <paymentMethodes ref="paymentMethodes" :rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="orderVIP&&listinfo.status == 'unpaid' || listinfo.status == 'paying'" :freeCheck="freeCheck"
|
||||
:payAmount="listinfo.payAmount" :orderVIP="orderVIP" @groupChange="groupChange"></paymentMethodes> -->
|
||||
|
||||
|
||||
<view class="fixedview">
|
||||
<view class="flex-between" v-if="listinfo.status == 'unpaid'">
|
||||
<view class="fixedview_one flex-start">
|
||||
@@ -77,8 +56,13 @@
|
||||
<text>¥</text>{{listinfo.totalCost}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_tow" @tap="$u.debounce(goToPay,1000)">
|
||||
{{paymentmethod.paymentBtnText}}
|
||||
<view class="flex-colum-end">
|
||||
<view class="fixedview_tow" @tap="$u.debounce(istoricalorders,1000)">
|
||||
{{paymentmethod.paymentBtnText}}
|
||||
</view>
|
||||
<!-- <view class="fixedview_tows" @tap="$u.debounce(APIputuserorderclick,1000)">
|
||||
取消订单
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -97,11 +81,12 @@
|
||||
} from 'vue';
|
||||
|
||||
import {
|
||||
APIgetOrderById
|
||||
APIgetOrderById,
|
||||
APIputuserorder,
|
||||
APIhistoryOrder
|
||||
} from '@/common/api/order/index.js'
|
||||
|
||||
import {
|
||||
APIusershopInfodetail,
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
@@ -131,7 +116,7 @@
|
||||
import payPassword from '@/components/payPassword.vue'
|
||||
import orderInfoAfter from './components/orderInfoAfter.vue'
|
||||
// import orderInfoBefore from '../components/orderInfoBefore.vue'
|
||||
// import rechargeFree from '../components/rechargeFree.vue'
|
||||
import rechargeFree from './components/rechargeFree.vue'
|
||||
import paymentMethodes from '@/components/paymentMethod.vue'; //支付方式
|
||||
import {
|
||||
onBackPress
|
||||
@@ -186,13 +171,13 @@
|
||||
})
|
||||
if (res) {
|
||||
Object.assign(listinfo, res);
|
||||
if (listinfo.status == 'unpaid') {
|
||||
try {
|
||||
let res = await APIhistoryOrder({
|
||||
orderId: orderId.value
|
||||
})
|
||||
} catch (error) {}
|
||||
}
|
||||
// if (listinfo.status == 'unpaid') {
|
||||
// try {
|
||||
// let res = await APIhistoryOrder({
|
||||
// orderId: orderId.value
|
||||
// })
|
||||
// } catch (error) {}
|
||||
// }
|
||||
// 历史订单
|
||||
if (listinfo.detailMap) {
|
||||
let combinedArray = [];
|
||||
@@ -245,6 +230,13 @@
|
||||
0 ? listinfo.Seatcharge : 0) - (listinfo.Productroll || 0) - (listinfo
|
||||
.coupondiscountAmount || 0) - (listinfo.pointsDiscountAmount || 0);
|
||||
listinfo.totalCost = Math.round(sums * 100) / 100;
|
||||
// 霸王餐
|
||||
console.log(orderVIP.value.freeDineConfig.enable, changeFreeenable.value)
|
||||
if (orderVIP.value.freeDineConfig.enable && changeFreeenable.value) {
|
||||
listinfo.totalCost = (parseFloat(listinfo.totalCost) * parseFloat(orderVIP.value
|
||||
.freeDineConfig
|
||||
.rechargeTimes)).toFixed(2)
|
||||
}
|
||||
// 积分
|
||||
if (listinfo.totalCost && listinfo.status == 'unpaid') {
|
||||
uni.$u.debounce(memberPointscalcUsablePoints, 500)
|
||||
@@ -256,6 +248,34 @@
|
||||
}
|
||||
});
|
||||
|
||||
// 霸王餐
|
||||
const changeFreeenable = ref(false)
|
||||
|
||||
const changeFree = (e) => {
|
||||
console.log(e)
|
||||
if (e) {
|
||||
uniqueIds.value = [] // 筛选出商品卷的id
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
listinfo.Productroll = 0 // 商品卷总价价格
|
||||
uniqueIds.value = [] // 筛选出商品卷的id
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
// 支付方式切换
|
||||
// #ifdef MP-WEIXIN
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
// paymentmethod.radiovalue = 2;
|
||||
// paymentmethod.paymentBtnText = "微信支付";
|
||||
// paymentmethod.payType = 'wechatPay';
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
paymentMethodref.value.groupChanges(3)
|
||||
// paymentmethod.radiovalue = 3;
|
||||
// paymentmethod.paymentBtnText = "支付宝支付";
|
||||
// paymentmethod.payType = 'wechatPay';
|
||||
// #endif
|
||||
}
|
||||
changeFreeenable.value = e
|
||||
}
|
||||
|
||||
const saveImage = (url) => {
|
||||
uni.saveImage({
|
||||
url: url,
|
||||
@@ -268,6 +288,9 @@
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
const paymentMethodref = ref(null)
|
||||
|
||||
// 支付方式切换
|
||||
const paymentmethod = reactive({
|
||||
radiovalue: 2,
|
||||
@@ -330,8 +353,52 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 删除订单
|
||||
const APIputuserorderclick = async () => {
|
||||
await APIputuserorder(listinfo.id)
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const istoricalorders = async () => {
|
||||
console.log(paymentmethod.payType, '1212')
|
||||
// 先调用历史订单
|
||||
let APIhistoryOrderres = await APIhistoryOrder({
|
||||
tableCode: listinfo.tableCode
|
||||
})
|
||||
// 判断是否有历史订单
|
||||
if (APIhistoryOrderres.detailMap) {
|
||||
let combinedArray = [];
|
||||
for (const key in APIhistoryOrderres.detailMap) {
|
||||
if (APIhistoryOrderres.detailMap.hasOwnProperty(key)) {
|
||||
let subArray = APIhistoryOrderres.detailMap[key];
|
||||
combinedArray = [...combinedArray, ...subArray]
|
||||
}
|
||||
}
|
||||
// 判断支付之前是是否还有新加订单
|
||||
if (listinfo.combinedArray.length === combinedArray.length) {
|
||||
goToPay()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '你的订单已更新!',
|
||||
icon: 'none'
|
||||
})
|
||||
orderorderInfo()
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '你的小伙伴已提交订单~',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
orderorderInfo()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
// * 去支付
|
||||
const goToPay = async () => {
|
||||
// 霸王餐
|
||||
|
||||
// 余额支付
|
||||
if (paymentmethod.payType == 'accountPay') {
|
||||
if (orderVIP.value.isVip == 0) {
|
||||
@@ -369,34 +436,48 @@
|
||||
}
|
||||
return false
|
||||
}
|
||||
let checkOrderPay = {
|
||||
orderId: orderId.value,
|
||||
vipPrice: orderVIP.value.isVip == 1 && ordershopUserInfo.value.isMemberPrice == 1 ? 1 :
|
||||
0, //是否使用会员价0否1是
|
||||
userAllPack: is_type.value == 0 ? 0 : 1, //是否整单打包
|
||||
seatNum: is_type.value == 0 ? listinfo.seatNum : 0, //用餐人数
|
||||
originAmount: listinfo.originAmount, //订单原金额(包含打包费+餐位费) 不含折扣价格
|
||||
discountRatio: 1, //折扣比例(计算时 向上取整保留 两位小数) 写死1
|
||||
discountAmount: 0, //手动优惠金额 写死0
|
||||
productCouponDiscountAmount: listinfo.Productroll, //商品优惠券抵扣金额
|
||||
fullCouponDiscountAmount: listinfo.coupondiscountAmount, //满减优惠券抵扣金额
|
||||
couponList: uniqueIds.value, //用户使用的卡券
|
||||
orderAmount: listinfo.totalCost, // 最中订单金额
|
||||
roundAmount: 0, //抹零金额 减免多少钱
|
||||
pointsDiscountAmount: listinfo.pointsDiscountAmount, //积分抵扣金额(tb_points_basic_setting表)
|
||||
pointsNum: 0, //(扣除各类折扣 enable_deduction后使用)
|
||||
remark: '', //用户备注
|
||||
}
|
||||
try {
|
||||
await storeMemberpay.actionsltPayOrder({
|
||||
checkOrderPay,
|
||||
payType: paymentmethod.payType,
|
||||
buyerRemark: '',
|
||||
returnUrl: ''
|
||||
if (orderVIP.value.freeDineConfig.enable && changeFreeenable.value) {
|
||||
await storeMemberpay.actionspayltPayVip({
|
||||
shopId: orderVIP.value.shopId,
|
||||
shopUserId: orderVIP.value.id,
|
||||
orderId: orderId.value,
|
||||
userAllPack: is_type.value == 0 ? 0 : 1, //是否整单打包
|
||||
amount: listinfo.totalCost, // 最终订单金额
|
||||
returnUrl: '', //跳转地址
|
||||
buyerRemark: ''
|
||||
})
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
return false;
|
||||
} else {
|
||||
let checkOrderPay = {
|
||||
orderId: orderId.value,
|
||||
vipPrice: orderVIP.value.isVip == 1 && ordershopUserInfo.value.isMemberPrice == 1 ? 1 :
|
||||
0, //是否使用会员价0否1是
|
||||
userAllPack: is_type.value == 0 ? 0 : 1, //是否整单打包
|
||||
seatNum: is_type.value == 0 ? listinfo.seatNum : 0, //用餐人数
|
||||
originAmount: listinfo.originAmount, //订单原金额(包含打包费+餐位费) 不含折扣价格
|
||||
discountRatio: 1, //折扣比例(计算时 向上取整保留 两位小数) 写死1
|
||||
discountAmount: 0, //手动优惠金额 写死0
|
||||
productCouponDiscountAmount: listinfo.Productroll, //商品优惠券抵扣金额
|
||||
fullCouponDiscountAmount: listinfo.coupondiscountAmount, //满减优惠券抵扣金额
|
||||
couponList: uniqueIds.value, //用户使用的卡券
|
||||
orderAmount: listinfo.totalCost, // 最终订单金额
|
||||
roundAmount: 0, //抹零金额 减免多少钱
|
||||
pointsDiscountAmount: listinfo.pointsDiscountAmount, //积分抵扣金额(tb_points_basic_setting表)
|
||||
pointsNum: 0, //(扣除各类折扣 enable_deduction后使用)
|
||||
remark: '', //用户备注
|
||||
}
|
||||
try {
|
||||
await storeMemberpay.actionsltPayOrder({
|
||||
checkOrderPay,
|
||||
payType: paymentmethod.payType,
|
||||
buyerRemark: '',
|
||||
returnUrl: ''
|
||||
})
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
}
|
||||
|
||||
orderorderInfo()
|
||||
}
|
||||
|
||||
@@ -906,6 +987,7 @@
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
// height: 80rpx;
|
||||
.flex-between {
|
||||
width: 100%;
|
||||
padding: 36rpx 54rpx 102rpx 54rpx;
|
||||
@@ -932,14 +1014,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: #E3AD7F;
|
||||
border-radius: 36rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 14rpx 44rpx;
|
||||
.flex-colum-end {
|
||||
.fixedview_tow {
|
||||
background: #E3AD7F;
|
||||
border-radius: 36rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 14rpx 44rpx;
|
||||
}
|
||||
|
||||
.fixedview_tows {
|
||||
background: #c3c3c3;
|
||||
border-radius: 36rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 14rpx 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user