From 85d81ccc682eeec47dff60c34b0f06d3e22e9f00 Mon Sep 17 00:00:00 2001 From: PQZ Date: Thu, 19 Sep 2024 22:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/coupon/index.js | 115 ++++---- src/views/member/active/ActiveMainForm.vue | 54 +++- .../member/active/ActiveRuleCouponForm.vue | 208 ++++++++++++++ src/views/member/active/ActiveRuleForm.vue | 218 ++++++++++++++ src/views/member/active/ChooseCouponDraw.vue | 258 +++++++++++++++++ src/views/member/active/index.vue | 22 +- src/views/member/coupon/ChildCouponForm.vue | 170 +++++++++++ src/views/member/coupon/CopyCouponDraw.vue | 267 ++++++++++++++++++ src/views/member/coupon/CouponForm.vue | 7 +- src/views/member/coupon/index.vue | 43 ++- 10 files changed, 1280 insertions(+), 82 deletions(-) create mode 100644 src/views/member/active/ActiveRuleCouponForm.vue create mode 100644 src/views/member/active/ActiveRuleForm.vue create mode 100644 src/views/member/active/ChooseCouponDraw.vue create mode 100644 src/views/member/coupon/ChildCouponForm.vue create mode 100644 src/views/member/coupon/CopyCouponDraw.vue diff --git a/src/api/member/coupon/index.js b/src/api/member/coupon/index.js index 5d01f53..b9f1d17 100644 --- a/src/api/member/coupon/index.js +++ b/src/api/member/coupon/index.js @@ -1,53 +1,62 @@ -import request from '@/utils/request' - -// 创建基础卡券 -export function createCoupon(data) { - return request({ - url: '/member/coupon/create', - method: 'post', - data: data - }) -} - -// 更新基础卡券 -export function updateCoupon(data) { - return request({ - url: '/member/coupon/update', - method: 'put', - data: data - }) -} - -// 删除基础卡券 -export function deleteCoupon(id) { - return request({ - url: '/member/coupon/delete?id=' + id, - method: 'delete' - }) -} - -// 获得基础卡券 -export function getCoupon(id) { - return request({ - url: '/member/coupon/get?id=' + id, - method: 'get' - }) -} - -// 获得基础卡券分页 -export function getCouponPage(params) { - return request({ - url: '/member/coupon/page', - method: 'get', - params - }) -} -// 导出基础卡券 Excel -export function exportCouponExcel(params) { - return request({ - url: '/member/coupon/export-excel', - method: 'get', - params, - responseType: 'blob' - }) -} \ No newline at end of file +import request from '@/utils/request' + +// 创建基础卡券 +export function createCoupon(data) { + return request({ + url: '/member/coupon/create', + method: 'post', + data: data + }) +} + +// 复制附属权益 +export function copyCoupon(data) { + return request({ + url: '/member/coupon/copy', + method: 'post', + data: data + }) +} + +// 更新基础卡券 +export function updateCoupon(data) { + return request({ + url: '/member/coupon/update', + method: 'put', + data: data + }) +} + +// 删除基础卡券 +export function deleteCoupon(id) { + return request({ + url: '/member/coupon/delete?id=' + id, + method: 'delete' + }) +} + +// 获得基础卡券 +export function getCoupon(id) { + return request({ + url: '/member/coupon/get?id=' + id, + method: 'get' + }) +} + +// 获得基础卡券分页 +export function getCouponPage(params) { + return request({ + url: '/member/coupon/page', + method: 'get', + params + }) +} +// 导出基础卡券 Excel +export function exportCouponExcel(params) { + return request({ + url: '/member/coupon/export-excel', + method: 'get', + params, + responseType: 'blob' + }) +} diff --git a/src/views/member/active/ActiveMainForm.vue b/src/views/member/active/ActiveMainForm.vue index cc2b6b3..3be3615 100644 --- a/src/views/member/active/ActiveMainForm.vue +++ b/src/views/member/active/ActiveMainForm.vue @@ -44,17 +44,41 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -93,7 +117,9 @@ export default { endTime: undefined, status: '01', remark: undefined, - isMember: '0', + isRechRule: '0', + isPack:'0', + isCoupon:'0', }, // 表单校验 formRules: {}, @@ -151,7 +177,9 @@ export default { endTime: undefined, status: '01', remark: undefined, - isMember: '0', + isRechRule: '0', + isPack:'0', + isCoupon:'0', }; this.resetForm("formRef"); } diff --git a/src/views/member/active/ActiveRuleCouponForm.vue b/src/views/member/active/ActiveRuleCouponForm.vue new file mode 100644 index 0000000..f7a2da2 --- /dev/null +++ b/src/views/member/active/ActiveRuleCouponForm.vue @@ -0,0 +1,208 @@ + + + diff --git a/src/views/member/active/ActiveRuleForm.vue b/src/views/member/active/ActiveRuleForm.vue new file mode 100644 index 0000000..42fc375 --- /dev/null +++ b/src/views/member/active/ActiveRuleForm.vue @@ -0,0 +1,218 @@ + + + diff --git a/src/views/member/active/ChooseCouponDraw.vue b/src/views/member/active/ChooseCouponDraw.vue new file mode 100644 index 0000000..d9db175 --- /dev/null +++ b/src/views/member/active/ChooseCouponDraw.vue @@ -0,0 +1,258 @@ + + + diff --git a/src/views/member/active/index.vue b/src/views/member/active/index.vue index f60f8e1..c87e799 100644 --- a/src/views/member/active/index.vue +++ b/src/views/member/active/index.vue @@ -54,6 +54,12 @@ diff --git a/src/views/member/coupon/CopyCouponDraw.vue b/src/views/member/coupon/CopyCouponDraw.vue new file mode 100644 index 0000000..99f83cc --- /dev/null +++ b/src/views/member/coupon/CopyCouponDraw.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/views/member/coupon/CouponForm.vue b/src/views/member/coupon/CouponForm.vue index 322e9d0..641c218 100644 --- a/src/views/member/coupon/CouponForm.vue +++ b/src/views/member/coupon/CouponForm.vue @@ -118,6 +118,7 @@ export default { remark: undefined, outRule: undefined, unitPrice: undefined, + parentId:null }, // 表单校验 formRules: {}, @@ -125,9 +126,12 @@ export default { }, methods: { /** 打开弹窗 */ - async open(id) { + async open(id,parentId) { this.dialogVisible = true; this.reset(); + if (parentId){ + this.formData.parentId = parentId + } // 修改时,设置数据 if (id) { this.formLoading = true; @@ -180,6 +184,7 @@ export default { remark: undefined, outRule: undefined, unitPrice: undefined, + parentId:null }; this.resetForm("formRef"); } diff --git a/src/views/member/coupon/index.vue b/src/views/member/coupon/index.vue index 291a16b..49d8080 100644 --- a/src/views/member/coupon/index.vue +++ b/src/views/member/coupon/index.vue @@ -31,23 +31,17 @@ v-hasPermi="['member:coupon:create']">新增 - - 导出 - - - - + + - + @@ -57,20 +51,26 @@ - + - + - +