diff --git a/src/views/user_manage/components/addActive.vue b/src/views/user_manage/components/addActive.vue index 5054eed..0d3a14f 100644 --- a/src/views/user_manage/components/addActive.vue +++ b/src/views/user_manage/components/addActive.vue @@ -11,7 +11,8 @@ + v-model="form.giftAmount" + @input="(v) => (form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))"> @@ -39,7 +40,8 @@ --> - + @@ -177,6 +179,10 @@ export default { return false; } this.form.couponId = this.productIds[0].id + } else { + this.form.couponId = '' + this.form.couponName = '' + this.productIds = [] } // let arr = [] // this.productIds.forEach(ele => { @@ -207,14 +213,15 @@ export default { }) }, async show(obj) { + this.productIds = [] this.dialogVisible = true if (obj && obj.id) { this.form = { ...obj } + // 留着以后说不定多个优惠劵 // let res = await activate(obj.id) // this.productIds = res - if (obj.couponName) { + if (obj.couponId) { this.productIds = [{ title: obj.couponName }] - } console.log(obj, '调试1') }