From 566eb111b4e2bd94a9622f33fb5c62d1023a8440 Mon Sep 17 00:00:00 2001 From: dy-hu Date: Wed, 19 Jun 2024 15:59:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=AB=AF=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=95=86=E5=93=81=E9=80=89=E6=8B=A9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E6=90=9C=E7=B4=A2=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/marketing/coupon/add.vue | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/views/marketing/coupon/add.vue b/src/views/marketing/coupon/add.vue index 55161be..51cb59f 100644 --- a/src/views/marketing/coupon/add.vue +++ b/src/views/marketing/coupon/add.vue @@ -134,6 +134,10 @@ :modal="false" > +
+ + {{$t('common.query')}} +
- +
@@ -326,6 +330,7 @@ export default { pageSize: 10 }, shopMultipleSelection: [], + prodSearch: undefined } }, watch: { @@ -345,7 +350,6 @@ export default { } }, mounted() { - console.log('mounted-------') this.shopCouponId = this.couponId if (this.shopCouponId) { this.getCouponInfo() @@ -421,6 +425,15 @@ export default { return false } } + if (this.addForm.applyType === 4) { + if (!this.addForm.ids || !this.addForm.ids.length || this.addForm.ids.length === 0) { + this.$message({ + message: '请选择指定店铺', + type: 'warning' + }) + return false + } + } this.addForm.effectiveStart = this.dateInfo[0] this.addForm.effectiveEnd = this.dateInfo[1] if (this.shopCouponId) { @@ -567,6 +580,8 @@ export default { // 取消选择 closeSelect() { this.isVisible = false + this.prodSearch = undefined + this.proOption.searchContent = undefined }, // 保存选择店铺ID @@ -624,7 +639,6 @@ export default { }) } else if (this.addForm.applyType === 4) { this.idList = res.data.ids - console.log('idList-->', this.idList) /*this.addForm.products.forEach(item => { this.idList.push(item.productId) })*/ @@ -638,6 +652,13 @@ export default { this.addForm.threshold = 0 } }, + + searchProd() { + this.proOption.page = 1 + this.proOption.pageSize = 10 + this.proOption.searchContent = this.prodSearch + this.getProList() + } } }