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() + } } }