代客下单增加单品备注,退客座费
台桌列表修改时间展示不足1分钟显示0分
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div
|
||||
class="flex order-item relative"
|
||||
:class="[isActive]"
|
||||
@click="itemClick"
|
||||
>
|
||||
<div class="flex order-item relative" :class="[isActive]" @click="itemClick">
|
||||
<span class="absolute pack" v-if="item.isPack === 'true'"> 包 </span>
|
||||
<span class="absolute tui" v-if="item.status === 'return'"> 退 </span>
|
||||
<div class="flex">
|
||||
|
||||
<div class="img">
|
||||
<div class="isSeatFee img u-line-1 u-flex u-col-center u-row-center" v-if="isSeatFee">
|
||||
<div
|
||||
class="isSeatFee img u-line-1 u-flex u-col-center u-row-center"
|
||||
v-if="isSeatFee"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<img v-else :src="item.coverImg" class="" alt="" />
|
||||
</div>
|
||||
<div class="good-info">
|
||||
<div class="flex lh-16">
|
||||
<div class="name" :class="{ 'free-price': item.status === 'return' }">{{ item.name }}</div>
|
||||
<div class="name" :class="{ 'free-price': item.status === 'return' }">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<span class="good_info_discount" v-if="item.isGift === 'true'"
|
||||
>赠</span
|
||||
>
|
||||
@@ -24,6 +24,9 @@
|
||||
<div v-if="item.specSnap" class="specSnap">
|
||||
{{ item.specSnap }}
|
||||
</div>
|
||||
<template v-if="item.note">
|
||||
<div class="note">备注:{{ item.note || "" }}</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
@@ -50,10 +53,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="color-333 total-price">
|
||||
<div v-if="item.isGift === 'true'||item.status=='return' ">¥0</div>
|
||||
<div :class="{ 'free-price': item.isGift === 'true'||item.status=='return' }">
|
||||
<div v-if="item.isGift === 'true' || item.status == 'return'">¥0</div>
|
||||
<div
|
||||
:class="{
|
||||
'free-price': item.isGift === 'true' || item.status == 'return',
|
||||
}"
|
||||
>
|
||||
<span v-if="isSeatFee"> ¥{{ item.totalAmount }}</span>
|
||||
<span v-else> ¥{{ item.salePrice }}</span>
|
||||
</div>
|
||||
@@ -66,22 +73,22 @@
|
||||
export default {
|
||||
props: {
|
||||
//是否是餐位费
|
||||
isSeatFee:{
|
||||
isSeatFee: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//是否是历史订单商品
|
||||
isOld:{
|
||||
isOld: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//第几次下单 1以及以上为历史订单 0为当前购物车
|
||||
placeNum:{
|
||||
type: [String,Number],
|
||||
placeNum: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
selPlaceNum:{
|
||||
type: [String,Number],
|
||||
selPlaceNum: {
|
||||
type: [String, Number],
|
||||
default: -1,
|
||||
},
|
||||
//是否允许改变数量
|
||||
@@ -112,11 +119,12 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isActive(){
|
||||
const isSel= (this.selIndex === this.index)&&(this.placeNum===this.selPlaceNum)
|
||||
console.log(isSel)
|
||||
return isSel?'active':'';
|
||||
}
|
||||
isActive() {
|
||||
const isSel =
|
||||
this.selIndex === this.index && this.placeNum === this.selPlaceNum;
|
||||
console.log(isSel);
|
||||
return isSel ? "active" : "";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"item.number": function (val) {
|
||||
@@ -135,17 +143,16 @@ export default {
|
||||
}
|
||||
newval = `${newval}`.split(".")[0] * 1;
|
||||
this.number = newval;
|
||||
this.$emit("cartGoodsNumberChange",newval, this.index);
|
||||
|
||||
this.$emit("cartGoodsNumberChange", newval, this.index);
|
||||
},
|
||||
//购物车商品输入框数量输入
|
||||
cartGoodsNumberInput(newval) {
|
||||
if (newval <= 0) {
|
||||
return this.number =1
|
||||
return (this.number = 1);
|
||||
}
|
||||
newval = `${newval}`.split(".")[0] * 1;
|
||||
this.number = newval;
|
||||
this.$emit("cartGoodsNumberInput",newval, this.index);
|
||||
this.$emit("cartGoodsNumberInput", newval, this.index);
|
||||
},
|
||||
changeOrderNumber(isReduce) {
|
||||
this.$emit("changeOrderNumber", this.index, isReduce);
|
||||
@@ -154,7 +161,7 @@ export default {
|
||||
// if(this.isSeatFee){
|
||||
// return
|
||||
// }
|
||||
this.$emit("itemClick", this.index,this.canChangeNumber,this.placeNum);
|
||||
this.$emit("itemClick", this.index, this.canChangeNumber, this.placeNum);
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -171,8 +178,8 @@ export default {
|
||||
padding: 0 4px;
|
||||
text-align: center;
|
||||
}
|
||||
.isSeatFee{
|
||||
background: #3F9EFF;
|
||||
.isSeatFee {
|
||||
background: #3f9eff;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -204,6 +211,7 @@ export default {
|
||||
padding: 4px;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -220,7 +228,7 @@ export default {
|
||||
text-align: center;
|
||||
line-height: 17px;
|
||||
}
|
||||
.tui{
|
||||
.tui {
|
||||
right: 100%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
@@ -272,7 +280,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.note{
|
||||
max-width: 70%;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
margin-top: 2px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.order-number-box {
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
this.tags.splice(index,1)
|
||||
},
|
||||
addNote(tag) {
|
||||
if(this.note.length<=0){
|
||||
if(!this.note){
|
||||
return this.note = tag
|
||||
}
|
||||
this.note = tag + "," + this.note;
|
||||
@@ -76,13 +76,14 @@ export default {
|
||||
},
|
||||
confirm(){
|
||||
const originTags = [...this.tags]
|
||||
if(this.note.length>=1){
|
||||
if(this.note){
|
||||
if(originTags>=10){
|
||||
originTags.shift()
|
||||
}
|
||||
const newTags=new Set([this.note,...originTags])
|
||||
console.log(newTags)
|
||||
localStorage.setItem("tags", JSON.stringify([...newTags]));
|
||||
if(this.note.length<=16){
|
||||
const newTags=new Set([this.note,...originTags])
|
||||
localStorage.setItem("tags", JSON.stringify([...newTags]));
|
||||
}
|
||||
}
|
||||
this.$emit('confirm',this.note)
|
||||
this.close()
|
||||
|
||||
Reference in New Issue
Block a user