代客下单修改,增加线上店铺装修页面

This commit is contained in:
2025-02-22 10:00:04 +08:00
parent e0ae1cca67
commit 504aa80c9e
16 changed files with 1371 additions and 45 deletions

View File

@@ -35,7 +35,7 @@
<div class="u-flex" style="margin-top: 14px">
<el-button v-if="!skuData.isGrounding" disabled style="width: 100%">已下架</el-button>
<template v-else>
<el-button type="primary" style="width: 100%"> </el-button>
<el-button type="primary" style="width: 100%" @click="confirm"> </el-button>
</template>
</div>
</template>
@@ -87,6 +87,7 @@ function open(data) {
}
function close() {
show.value = false;
number.value = 1;
resetData();
}
const skuName = computed(() => {
@@ -110,6 +111,27 @@ const skuData = computed(() => {
});
});
watch(
() => skuData.value,
(newval) => {
if (newval) {
number.value = newval.suitNum;
}
}
);
const emits = defineEmits(["confirm"]);
function confirm() {
if (skuData.value) {
emits("confirm", {
sku_id: skuData.value.id,
product_id: goods.value.id,
number: number.value,
});
close();
}
}
defineExpose({ open, close });
</script>