Browse Source

支持优惠券发放

master
sj 2 years ago
parent
commit
4d93aae5d5
  1. 9
      src/api/bxg/yxStoreCoupon.js
  2. 13
      src/views/bxg/activity/coupon/form3.vue

9
src/api/bxg/yxStoreCoupon.js

@ -8,6 +8,15 @@ export function add(data) {
})
}
//发放优惠券
export function give(data) {
return request({
url: '/bxg/api/yxStoreCoupon/give',
method: 'post',
data
})
}
export function del(id) {
return request({
url: '/bxg/api/yxStoreCoupon/' + id,

13
src/views/bxg/activity/coupon/form3.vue

@ -91,6 +91,7 @@
<script>
import checkPermission from '@/utils/permission'
import { add, edit } from '@/api/bxg/yxStoreCouponIssue'
import {give} from '@/api/bxg/yxStoreCoupon'
import initData from '@/mixins/crud'
export default {
mixins: [initData],
@ -135,7 +136,6 @@ export default {
methods: {
handleSelectionChange(val){
this.multipleSelection = val;
console.log('this.multipleSelection',this.multipleSelection )
},
checkPermission,
beforeInit() {
@ -154,6 +154,16 @@ export default {
},
doSubmit() {
this.loading = true
let data={
userIds:this.multipleSelection,
couponId:this.form.cid
}
give(data).then(res=>{
// if (res){
this.$message.success("发放成功")
this.loading=false
// }
})
},
doAdd() {
add(this.form).then(res => {
@ -208,4 +218,3 @@ export default {
<style scoped>
</style>
Loading…
Cancel
Save