diff --git a/src/views/operation/limit/product.vue b/src/views/operation/limit/product.vue index 7c58cb1..24a5a90 100644 --- a/src/views/operation/limit/product.vue +++ b/src/views/operation/limit/product.vue @@ -44,6 +44,7 @@ import ProductSku from './sku.vue'; const store = useStore(); const route = useRoute(); + const { proxy } = getCurrentInstance(); const loading = ref(false); const code = computed(() => store.state.limitProduct.code); const list = computed(() => store.state.limitProduct.list); @@ -98,7 +99,11 @@ const refsPicker = ref(null); const handleCreate = async () => { - unref(refsPicker).show(); + if (unref(opts).timeRange.length) { + unref(refsPicker).show(); + } else { + proxy.$message.error('没有时间段无法添加商品'); + } }; const handlePick = async (rows) => { loading.value = true;