|
@@ -81,7 +81,7 @@
|
81
|
81
|
</div>
|
82
|
82
|
<span slot="footer" class="dialog-footer">
|
83
|
83
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
84
|
|
- <el-button type="primary" @click="vipCharge">激 活</el-button>
|
|
84
|
+ <el-button type="primary" @click="vipCharger">激 活</el-button>
|
85
|
85
|
</span>
|
86
|
86
|
</el-dialog>
|
87
|
87
|
</div>
|
|
@@ -97,6 +97,7 @@ export default {
|
97
|
97
|
name: '',
|
98
|
98
|
data () {
|
99
|
99
|
return {
|
|
100
|
+ ajaxOff: true,
|
100
|
101
|
centerDialogVisible: false,
|
101
|
102
|
CardNo: '',
|
102
|
103
|
salesPhone: '',
|
|
@@ -194,7 +195,7 @@ export default {
|
194
|
195
|
})
|
195
|
196
|
}
|
196
|
197
|
},
|
197
|
|
- vipCharge () {
|
|
198
|
+ vipCharger () {
|
198
|
199
|
if (this.vip.VipCardChildCode === '') {
|
199
|
200
|
this.$message({
|
200
|
201
|
type: 'error',
|
|
@@ -209,22 +210,28 @@ export default {
|
209
|
210
|
})
|
210
|
211
|
return
|
211
|
212
|
}
|
212
|
|
- var that = this
|
213
|
|
- this.VipCharge({
|
214
|
|
- code: this.vip.VipCardChildCode,
|
215
|
|
- tel: this.customer.Phone,
|
216
|
|
- salesid: this.sales.UserId || '',
|
217
|
|
- salesname: this.sales.RealName || '',
|
218
|
|
- }).then(() => {
|
219
|
|
- this.$message({
|
220
|
|
- type: 'success',
|
221
|
|
- message: '激活成功!',
|
|
213
|
+ if (this.ajaxOff) {
|
|
214
|
+ this.ajaxOff = false
|
|
215
|
+ this.VipCharge({
|
|
216
|
+ code: this.vip.VipCardChildCode,
|
|
217
|
+ tel: this.customer.Phone,
|
|
218
|
+ salesid: this.sales.UserId || '',
|
|
219
|
+ salesname: this.sales.RealName || '',
|
|
220
|
+ }).then(() => {
|
|
221
|
+ this.ajaxOff = true
|
|
222
|
+ this.$message({
|
|
223
|
+ type: 'success',
|
|
224
|
+ message: '激活成功!',
|
|
225
|
+ })
|
|
226
|
+ // setTimeout(() => {
|
|
227
|
+ // that.setNull()
|
|
228
|
+ // that.centerDialogVisible = false
|
|
229
|
+ // }, 1000)
|
|
230
|
+ this.$router.push({name: 'vipList'})
|
|
231
|
+ }).catch(() => {
|
|
232
|
+ this.ajaxOff = true
|
222
|
233
|
})
|
223
|
|
- setTimeout(() => {
|
224
|
|
- that.setNull()
|
225
|
|
- that.centerDialogVisible = false
|
226
|
|
- }, 1000)
|
227
|
|
- })
|
|
234
|
+ }
|
228
|
235
|
},
|
229
|
236
|
},
|
230
|
237
|
mounted () { }
|