From 831eef4ed7295ff773c0a7606ae017b9fd18339a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=96=87=E5=8F=AF?= <1041367524@qq.com> Date: Fri, 29 Apr 2022 16:53:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=92=E6=9D=80=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/operation/limit/product.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;