支持优惠券发放

This commit is contained in:
sj
2022-11-30 16:30:03 +08:00
parent a2082879ef
commit 4d93aae5d5
2 changed files with 23 additions and 5 deletions
+9
View File
@@ -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,
+14 -5
View File
@@ -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>