优化代客下单逻辑
This commit is contained in:
@@ -19,37 +19,49 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="price" v-if="props.item.is_temporary">
|
||||
<div class="price" v-if="item.is_time_discount == 1">
|
||||
<span class="dis">
|
||||
¥{{ formatDecimal(+item.salePrice, 2, true) }}
|
||||
</span>
|
||||
<span>
|
||||
¥{{ formatDecimal(+props.item.discount_sale_amount, 2, true) }}
|
||||
¥{{ formatDecimal(+item.time_discount_price, 2, true) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="price" v-else>
|
||||
<template v-if="+props.item.discount_sale_amount">
|
||||
<span class="dis">
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice
|
||||
: +props.item.lowPrice,
|
||||
2, true) }}
|
||||
</span>
|
||||
<template v-else>
|
||||
<div class="price" v-if="props.item.is_temporary">
|
||||
<span>
|
||||
¥{{ formatDecimal(+props.item.discount_sale_amount, 2, true) }}
|
||||
</span>
|
||||
</template>
|
||||
<div class="flex" v-else>
|
||||
<template v-if="goodsStore.showVipPrice">
|
||||
</div>
|
||||
<div class="price" v-else>
|
||||
<template v-if="+props.item.discount_sale_amount">
|
||||
<span class="dis">
|
||||
¥{{ formatDecimal(+props.item.lowPrice, 2, true) }}
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice ||
|
||||
+props.item.lowPrice
|
||||
: +props.item.lowPrice,
|
||||
2, true) }}
|
||||
</span>
|
||||
<span>
|
||||
¥{{ formatDecimal(+props.item.discount_sale_amount, 2, true) }}
|
||||
</span>
|
||||
</template>
|
||||
<span>
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice
|
||||
:
|
||||
+props.item.lowPrice,
|
||||
2,
|
||||
true) }}
|
||||
</span>
|
||||
<div class="flex" v-else>
|
||||
<template v-if="goodsStore.showVipPrice">
|
||||
<span class="dis">
|
||||
¥{{ formatDecimal(+props.item.lowPrice, 2, true) }}
|
||||
</span>
|
||||
</template>
|
||||
<span>
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice ||
|
||||
+props.item.lowPrice
|
||||
:
|
||||
+props.item.lowPrice,
|
||||
2,
|
||||
true) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div class="remark_wrap" @click="showRemark(props.item)">
|
||||
|
||||
@@ -104,13 +104,22 @@
|
||||
<div class="item_empty" v-if="shopListType == 'text'"></div>
|
||||
<div class="price">
|
||||
<div class="price_warp">
|
||||
<template v-if="!goodsStore.showVipPrice">
|
||||
<el-text>¥{{ item.skuList[0].salePrice }}</el-text>
|
||||
<template v-if="item.is_time_discount == 1">
|
||||
<el-text tag="del" class="del" size="small">¥{{ item.lowPrice }}</el-text>
|
||||
<el-text>¥{{ +item.time_discount_price }}</el-text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-text tag="del" class="del" size="small">¥{{ item.skuList[0].salePrice
|
||||
}}</el-text>
|
||||
<el-text>¥{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}</el-text>
|
||||
<template v-if="!goodsStore.showVipPrice">
|
||||
<el-text>¥{{ item.skuList[0].salePrice }}</el-text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-text tag="del" class="del" size="small">
|
||||
¥{{ item.skuList[0].salePrice }}
|
||||
</el-text>
|
||||
<el-text>
|
||||
¥{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}
|
||||
</el-text>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div class="show_more_btn" v-if="showEditor">
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
{{ item.product_name }}
|
||||
</div>
|
||||
<div class="n">x{{ formatDecimal(+item.number, 2, true) }}</div>
|
||||
<div class="p" :class="{ undeline: goodsStore.showVipPrice && item.memberPrice }">
|
||||
<div class="p"
|
||||
:class="{ undeline: (goodsStore.showVipPrice && item.memberPrice) || item.is_time_discount }">
|
||||
<template v-if="item.is_temporary">
|
||||
<template v-if="item.is_gift">
|
||||
<span class="t_line">¥{{ formatDecimal(+item.discount_sale_amount) }}</span>
|
||||
@@ -98,7 +99,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_wrap" v-if="goodsStore.showVipPrice && item.memberPrice">
|
||||
<div class="gift_wrap" v-if="goodsStore.showVipPrice && item.memberPrice && !item.is_time_discount">
|
||||
<div class="name">
|
||||
<span>[会员价]</span>
|
||||
</div>
|
||||
@@ -109,6 +110,30 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_wrap" v-if="item.is_time_discount">
|
||||
<template v-if="item.time_dicount_mode == 'vip-price'">
|
||||
<div class="name">
|
||||
<span>[会员价]</span>
|
||||
</div>
|
||||
<div class="n"></div>
|
||||
<div class="p">
|
||||
<span>
|
||||
¥{{ formatDecimal(+item.memberPrice) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="name">
|
||||
<span>[限时折扣]</span>
|
||||
</div>
|
||||
<div class="n"></div>
|
||||
<div class="p">
|
||||
<span>
|
||||
¥{{ formatDecimal(+item.time_discount_price) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<span class="t">选择会员</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="user_info" @click="goodsStore.vipUserInfo = ''">
|
||||
<div class="user_info" @click="goodsStore.clearVipUserInfo()">
|
||||
<!-- <el-text class="n">{{ goodsStore.vipUserInfo.nickName }}</el-text> -->
|
||||
<el-text class="p">{{ formatPhoneNumber(goodsStore.vipUserInfo.phone) }}</el-text>
|
||||
</div>
|
||||
@@ -29,7 +29,7 @@
|
||||
<ArrowRight />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="u_icon" v-else @click.stop="clearVipUserHandle">
|
||||
<div class="u_icon" v-else @click.stop="goodsStore.clearVipUserInfo()">
|
||||
<el-icon class="i">
|
||||
<Close />
|
||||
</el-icon>
|
||||
@@ -267,15 +267,7 @@ function printReloadHandle() {
|
||||
// 选择会员
|
||||
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()
|
||||
goodsStore.selectUser(row)
|
||||
}
|
||||
|
||||
// 挂单量
|
||||
@@ -411,13 +403,6 @@ function showTableMerging() {
|
||||
let data = cartList.value.filter(item => item.placeNum)
|
||||
tableMergingRef.value.show(data)
|
||||
}
|
||||
|
||||
// 清除会员与会员价
|
||||
function clearVipUserHandle() {
|
||||
goodsStore.vipUserInfo = ''
|
||||
goodsStore.showVipPrice = 0
|
||||
goodsStore.calcCartInfo()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user