优化代客下单逻辑

This commit is contained in:
gyq
2025-11-18 09:06:47 +08:00
parent 7c7fc3ef0f
commit 4478cc01fe
11 changed files with 193 additions and 259 deletions

View File

@@ -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">