更新代客下单能够购买判断

This commit is contained in:
2024-10-24 15:44:45 +08:00
parent c19eb54d6d
commit a232e77a2d
6 changed files with 57 additions and 436 deletions

View File

@@ -111,21 +111,17 @@
console.log(props.goodsData.isStock);
number.value = newval.suit || 1
})
const isCanBuy=computed(()=>{
if(!goods.value) {
const isCanBuy = computed(() => {
if (!goods.value) {
return false
}
console.log(util.isCanBuy({
...goods.value,
isStock: props.goodsData.isStock
}));
return util.isCanBuy({
...goods.value,
isStock: props.goodsData.isStock
})
return util.isCanBuy(
goods.value,
props.goodsData
)
})
//全部规格是否都无法使用
@@ -169,11 +165,11 @@
function close() {
model.value.close()
}
const isDisabled=computed(()=>{
return isAllDisabled.value || !isCanBuy.value
const isDisabled = computed(() => {
return isAllDisabled.value || !isCanBuy.value
})
function reduce() {
if (isDisabled.value) {
return
@@ -194,7 +190,7 @@
number.value = newval
}
function confirm() {
close()

View File

@@ -135,7 +135,7 @@
.btn-hover-class {
opacity: .6;
}
image{will-change: transform}
.item {
// width: 250rpx;
// height: 272rpx;