diff --git a/apps/web-antd/src/api/mall/promotion/coupon/coupon.ts b/apps/web-antd/src/api/mall/promotion/coupon/coupon.ts
index 6cba23c16..52bc96290 100644
--- a/apps/web-antd/src/api/mall/promotion/coupon/coupon.ts
+++ b/apps/web-antd/src/api/mall/promotion/coupon/coupon.ts
@@ -40,9 +40,9 @@ export namespace MallCouponApi {
}
/** 发送优惠券 */
- export interface SendCoupon {
+ export interface CouponSendReqVO {
/** 优惠券编号 */
- couponId: number;
+ templateId: number;
/** 用户编号数组 */
userIds: number[];
}
@@ -62,6 +62,6 @@ export function getCouponPage(params: PageParam) {
}
/** 发送优惠券 */
-export function sendCoupon(data: MallCouponApi.SendCoupon) {
+export function sendCoupon(data: MallCouponApi.CouponSendReqVO) {
return requestClient.post('/promotion/coupon/send', data);
}
diff --git a/apps/web-antd/src/views/mall/promotion/coupon/components/CouponSendForm.vue b/apps/web-antd/src/views/mall/promotion/coupon/components/CouponSendForm.vue
new file mode 100644
index 000000000..7a6247606
--- /dev/null
+++ b/apps/web-antd/src/views/mall/promotion/coupon/components/CouponSendForm.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/member/user/index.vue b/apps/web-antd/src/views/member/user/index.vue
index b69faae13..23c7a97e7 100644
--- a/apps/web-antd/src/views/member/user/index.vue
+++ b/apps/web-antd/src/views/member/user/index.vue
@@ -6,11 +6,13 @@ import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
+import { isEmpty } from '@vben/utils';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getUserPage } from '#/api/member/user';
import { $t } from '#/locales';
+import CouponSendForm from '../../mall/promotion/coupon/components/CouponSendForm.vue';
import { useGridColumns, useGridFormSchema } from './data';
import BalanceForm from './modules/balance-form.vue';
import Form from './modules/form.vue';
@@ -39,6 +41,11 @@ const [LevelFormModal, levelFormModalApi] = useVbenModal({
destroyOnClose: true,
});
+const [CouponSendFormModal, couponSendFormModalApi] = useVbenModal({
+ connectedComponent: CouponSendForm,
+ destroyOnClose: true,
+});
+
/** 刷新表格 */
function handleRefresh() {
gridApi.query();
@@ -65,9 +72,12 @@ function handleUpdateBalance(row: MemberUserApi.User) {
}
/** 发送优惠券 */
-// TODO @xingyu:这个功能没开发对,是发送优惠劵哈;
-function handleSendCoupon() {
- formModalApi.setData(null).open();
+async function handleSendCoupon() {
+ couponSendFormModalApi
+ .setData({
+ userIds: checkedIds.value,
+ })
+ .open();
}
const checkedIds = ref([]);
@@ -137,6 +147,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
+