购物车,订单,霸王餐
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>
|
||||
Reference in New Issue
Block a user