新增单品备注
This commit is contained in:
parent
3a11828f3c
commit
ca3b0eddbc
|
|
@ -182,8 +182,8 @@ const printData = reactive({
|
||||||
totalAmount: "10",
|
totalAmount: "10",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
amount: "30.00",
|
amount: "10.00",
|
||||||
originAmount: '30.00',
|
originAmount: '10.00',
|
||||||
discountAmount: "0.00",
|
discountAmount: "0.00",
|
||||||
discount: 0,
|
discount: 0,
|
||||||
remark: "给我多放点辣椒,谢谢老板",
|
remark: "给我多放点辣椒,谢谢老板",
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
<div class="price" v-else>
|
<div class="price" v-else>
|
||||||
<template v-if="+props.item.discount_sale_amount">
|
<template v-if="+props.item.discount_sale_amount">
|
||||||
<span class="dis">
|
<span class="dis">
|
||||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice : +props.item.lowPrice,
|
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice
|
||||||
|
: +props.item.lowPrice,
|
||||||
2, true) }}
|
2, true) }}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
|
|
@ -41,7 +42,9 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span>
|
<span>
|
||||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice : +props.item.lowPrice,
|
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice
|
||||||
|
:
|
||||||
|
+props.item.lowPrice,
|
||||||
2,
|
2,
|
||||||
true) }}
|
true) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -49,6 +52,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="remark_wrap" @click="showRemark(props.item)">
|
||||||
|
备注:<span class="t">{{ props.item.remark }}</span><el-icon class="icon" v-if="props.type == 'cart'">
|
||||||
|
<EditPen />
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
<div class="sku_list" v-if="props.item.sku_name">
|
<div class="sku_list" v-if="props.item.sku_name">
|
||||||
<div class="tag" v-for="item in item.sku_name.split(',')">
|
<div class="tag" v-for="item in item.sku_name.split(',')">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
|
|
@ -82,10 +90,13 @@
|
||||||
<el-text class="t">x{{ formatDecimal(+props.item.number, 2, true) }}</el-text>
|
<el-text class="t">x{{ formatDecimal(+props.item.number, 2, true) }}</el-text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 备注 -->
|
||||||
|
<remarkModal ref="remarkRef" @success="remarkSuccess" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import remarkModal from "@/components/remarkModal.vue";
|
||||||
import { useGoods } from '@/store/goods.js'
|
import { useGoods } from '@/store/goods.js'
|
||||||
import { formatDecimal } from '@/utils/index.js'
|
import { formatDecimal } from '@/utils/index.js'
|
||||||
|
|
||||||
|
|
@ -122,9 +133,34 @@ function selectCartItemHandle() {
|
||||||
goodsStore.selectOrderItem(props.index, props.i)
|
goodsStore.selectOrderItem(props.index, props.i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加单品备注
|
||||||
|
const remarkRef = ref(null)
|
||||||
|
function showRemark() {
|
||||||
|
if (props.type == 'cart') {
|
||||||
|
remarkRef.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改备注
|
||||||
|
function remarkSuccess(e) {
|
||||||
|
goodsStore.operateCart({ ...props.item, remark: e }, 'edit')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.remark_wrap {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cart_item {
|
.cart_item {
|
||||||
padding: var(--el-font-size-base);
|
padding: var(--el-font-size-base);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="gift_wrap" style="padding-bottom: 10px;">
|
||||||
|
<div class="name">备注:{{ item.remark || '无' }}</div>
|
||||||
|
</div>
|
||||||
<div class="tag_wrap" v-if="item.sku_name">
|
<div class="tag_wrap" v-if="item.sku_name">
|
||||||
<div class="tag" v-for="item in item.sku_name.split(',')">
|
<div class="tag" v-for="item in item.sku_name.split(',')">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,9 @@
|
||||||
<span>{{ item.productName }}</span>
|
<span>{{ item.productName }}</span>
|
||||||
<span class="amount">¥{{ formatDecimal(+item.payAmount) }}</span>
|
<span class="amount">¥{{ formatDecimal(+item.payAmount) }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="num">
|
||||||
|
备注: {{ item.remark || "无" }}
|
||||||
|
</div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<span>¥{{ formatDecimal(+item.unitPrice) }}</span>
|
<span>¥{{ formatDecimal(+item.unitPrice) }}</span>
|
||||||
<span>x{{ item.num }}</span>
|
<span>x{{ item.num }}</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue