代客下单修改是否售尽判断
This commit is contained in:
parent
f2c73eca9a
commit
5e14f29ecb
|
|
@ -504,10 +504,7 @@
|
|||
<template v-if="layout.sel === 'img-and-text'">
|
||||
<div
|
||||
class="sell-out-svg"
|
||||
v-if="
|
||||
item.isPauseSale ||
|
||||
(item.typeEnum !== 'sku' && item.stockNumber <= 0)
|
||||
"
|
||||
v-if="isSellOut(item)"
|
||||
>
|
||||
<svg
|
||||
t="1724234807994"
|
||||
|
|
@ -552,10 +549,7 @@
|
|||
<template v-if="layout.sel === 'text'">
|
||||
<div class="text-sell-out flex">
|
||||
<svg
|
||||
v-if="
|
||||
item.isPauseSale ||
|
||||
(item.typeEnum !== 'sku' && item.stockNumber <= 0)
|
||||
"
|
||||
v-if="isSellOut(item)"
|
||||
t="1724236049267"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
|
|
@ -591,13 +585,7 @@
|
|||
<div class="stockNumber"></div>
|
||||
<div class="">¥{{ item.lowPrice }}</div>
|
||||
<template v-if="layout.sel === 'default'">
|
||||
<div
|
||||
class="flex"
|
||||
v-if="
|
||||
item.isPauseSale ||
|
||||
(item.typeEnum !== 'sku' && item.stockNumber <= 0)
|
||||
"
|
||||
>
|
||||
<div class="flex" v-if="isSellOut(item)">
|
||||
<div class="timeSale">售罄</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -1428,10 +1416,17 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getGoods();
|
||||
this.getCategory();
|
||||
// this.getGoods();
|
||||
// this.getCategory();
|
||||
},
|
||||
methods: {
|
||||
//判读单规格商品是否售尽
|
||||
isSellOut(item) {
|
||||
return (
|
||||
item.isPauseSale ||
|
||||
(item.typeEnum !== "sku" && item.specList[0].stockNumber <= 0)
|
||||
);
|
||||
},
|
||||
toggleFullScreen() {
|
||||
if (!document.fullscreenElement) {
|
||||
this.enterFullScreen();
|
||||
|
|
@ -1729,17 +1724,22 @@ export default {
|
|||
const order = this.prveOrder.list[sel];
|
||||
const orderMasterId = order.carList[0].masterId;
|
||||
//当前订单是否是当前挂单
|
||||
const nowOrderIsPrverOrder =this.isPrverOrder && orderMasterId === this.masterId
|
||||
const nowOrderIsPrverOrder =
|
||||
this.isPrverOrder && orderMasterId === this.masterId;
|
||||
if (nowOrderIsPrverOrder) {
|
||||
const res= await this.$confirm("您正在删除当前购物车订单,是否删除?", "提示", {
|
||||
const res = await this.$confirm(
|
||||
"您正在删除当前购物车订单,是否删除?",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
if (!res) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (isRequest) {
|
||||
|
|
@ -1747,8 +1747,8 @@ export default {
|
|||
orderId: order.orderId,
|
||||
});
|
||||
if (nowOrderIsPrverOrder) {
|
||||
this.note.content=''
|
||||
this.order.list=[]
|
||||
this.note.content = "";
|
||||
this.order.list = [];
|
||||
}
|
||||
this.$notify({
|
||||
message: "删除成功",
|
||||
|
|
@ -2376,6 +2376,7 @@ export default {
|
|||
this.masterId = res.masterId;
|
||||
this.getCart();
|
||||
this.getGoods();
|
||||
this.getCategory();
|
||||
// this.getPrveCart();
|
||||
this.getCacheOrder();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue