支持优惠券发放
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -87,10 +87,11 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<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() {
|
||||
@@ -153,7 +153,17 @@ export default {
|
||||
this.dialog = false
|
||||
},
|
||||
doSubmit() {
|
||||
this.loading = true
|
||||
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 => {
|
||||
@@ -204,8 +214,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user