代客下单修改,增加线上店铺装修页面
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user