优化台桌结算不结算购物车信息
This commit is contained in:
@@ -19,14 +19,24 @@
|
||||
<div class="cart_list">
|
||||
<div class="item" v-for="item in cartList" :key="item.id">
|
||||
<div class="top">
|
||||
<span class="name">{{ item.productName }}</span>
|
||||
<span class="name">
|
||||
<span v-if="item.isTemporary" style="color: #999;">[临时菜]</span>
|
||||
<span v-if="item.isGift" style="color: #999;">[赠]</span>
|
||||
{{ item.productName }}
|
||||
</span>
|
||||
<span class="n">x{{ item.num - item.returnNum }}</span>
|
||||
<span class="p">¥{{ item.price }}</span>
|
||||
<span class="p">¥{{ item.unitPrice }}</span>
|
||||
</div>
|
||||
<div class="top" v-if="item.returnNum > 0" style="font-size: 12px;color: #999;">
|
||||
<span class="name">[退菜]</span>
|
||||
<span class="n">x{{ item.returnNum }}</span>
|
||||
<span class="p" color="color:var(--el-color-danger)">-¥{{ item.returnAmount }}</span>
|
||||
<span class="p">-¥{{ item.returnNum * item.price }}</span>
|
||||
</div>
|
||||
<div class="top" v-if="item.discountSaleAmount > 0 && item.isTemporary == 0"
|
||||
style="font-size: 12px;color: #999;">
|
||||
<span class="name">[改价优惠]</span>
|
||||
<span class="n"></span>
|
||||
<span class="p">-¥{{ item.price - item.unitPrice }}</span>
|
||||
</div>
|
||||
<div class="tag_wrap" v-if="item.skuName">
|
||||
<div class="tag" v-for="item in item.skuName.split(',')">
|
||||
@@ -62,7 +72,7 @@
|
||||
<el-button type="primary" style="width: 100%;" @click="clearTableStatus">清理完成</el-button>
|
||||
</div>
|
||||
<div class="btn_wrap" v-if="props.tableInfo.status == 'unbound'">
|
||||
<el-button type="default" disabled style="width: 100%;">{{ props.tableInfo.statusMsg }}</el-button>
|
||||
<el-button type="default" disabled style="width: 100%;">{{ props.tableInfo.statusMsg }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<transition name="el-fade-in">
|
||||
@@ -85,7 +95,7 @@
|
||||
</transition>
|
||||
</div>
|
||||
<!-- 结算订单 -->
|
||||
<SettleAccount ref="SettleAccountRef" @success="emits('success')" />
|
||||
<SettleAccount ref="SettleAccountRef" type="table" @success="emits('success')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -190,7 +200,7 @@ async function getOrderDetail() {
|
||||
|
||||
let total = 0
|
||||
res.cartList.forEach(item => {
|
||||
total += +item.payAmount - (item.returnAmount || 0)
|
||||
total += +item.payAmount - (item.returnNum * item.price)
|
||||
})
|
||||
orderInfo.value.orderAmount = formatDecimal(total)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user