From 288d0015793d4f3e5d8ee1a587c0f83d69f1d645 Mon Sep 17 00:00:00 2001 From: XingQue Date: Sun, 5 Jul 2026 18:27:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=9A=E5=91=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=A1=B5=E4=B8=8E=E4=BF=B1=E4=B9=90=E9=83=A8?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=80=BB=E4=BC=9A=E5=91=98=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实现会员充值记录筛选表格与汇总;俱乐部视图增加新建总会员按钮并对接 hy-bundle-create、hy-recharge-records 接口。 Co-authored-by: Cursor --- src/utils/club-context.js | 2 + src/views/member/Data.vue | 408 +++++++++++++++++++++++++++++++++++++- src/views/member/List.vue | 169 +++++++++++++++- 3 files changed, 568 insertions(+), 11 deletions(-) diff --git a/src/utils/club-context.js b/src/utils/club-context.js index 836be85..e7fa2dd 100644 --- a/src/utils/club-context.js +++ b/src/utils/club-context.js @@ -308,6 +308,8 @@ export const JITUAN_API = { memberEnable: '/jituan/houtai/hthysj', memberDisable: '/jituan/houtai/hthyxj', memberCardUpload: '/jituan/houtai/hy-card-upload', + memberRechargeRecords: '/jituan/houtai/hy-recharge-records', + memberBundleCreate: '/jituan/houtai/hy-bundle-create', identityTagList: '/jituan/houtai/identity-tag/list', identityTagManage: '/jituan/houtai/identity-tag/manage', identityTagBindList: '/jituan/houtai/identity-tag/bind-list', diff --git a/src/views/member/Data.vue b/src/views/member/Data.vue index 02409e3..c15a194 100644 --- a/src/views/member/Data.vue +++ b/src/views/member/Data.vue @@ -1,8 +1,410 @@ - - \ No newline at end of file + diff --git a/src/views/member/List.vue b/src/views/member/List.vue index 9f49e89..549375c 100644 --- a/src/views/member/List.vue +++ b/src/views/member/List.vue @@ -24,7 +24,16 @@ show-icon class="member-scope-tip" title="集团汇总视图" - description="可新建全局会员类型;修改售价/体验配置请切换到具体俱乐部。" + description="可新建全局会员类型(含总会员开关);修改售价/体验/装饰图请切换到具体俱乐部。" + /> +
@@ -34,12 +43,10 @@ @click="openAddDialog" :icon="Plus" >新建全局会员类型 - 上架会员 +
@@ -241,6 +248,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { } } +const openBundleDialog = () => { + if (isAllClubScope.value) { + ElMessage.warning('请切换到具体俱乐部后再新建总会员') + return + } + if (enableSubMemberOptions.value.length === 0) { + ElMessage.warning('请先上架至少一个普通会员,再创建总会员') + return + } + bundleForm.value = { + jieshao: '', + jiage: 0, + formal_days: 30, + guanshifc: 0, + zuzhangfc: 0, + jtjieshao: '', + included_huiyuan_ids: enableSubMemberOptions.value.map((m) => m.huiyuan_id), + } + bundleDialogVisible.value = true +} + +const closeBundleDialog = () => { + bundleDialogVisible.value = false + bundleFormRef.value?.resetFields() +} + +const submitBundle = async () => { + try { + await bundleFormRef.value?.validate() + } catch { + return + } + const f = bundleForm.value + if (f.jiage <= 0) { + ElMessage.error('正式价格必须大于 0') + return + } + if (!validatePriceSplit(f.jiage, f.guanshifc, f.zuzhangfc, false, 0, 0, 0)) { + return + } + if (!f.included_huiyuan_ids?.length) { + ElMessage.error('请至少选择一个包含的子会员') + return + } + bundling.value = true + try { + const res = await request.post(JITUAN_API.memberBundleCreate, { + username: username.value, + jieshao: f.jieshao, + jiage: f.jiage, + formal_days: f.formal_days, + guanshifc: f.guanshifc, + zuzhangfc: f.zuzhangfc, + jtjieshao: f.jtjieshao || '', + included_huiyuan_ids: f.included_huiyuan_ids, + }) + if (res.code === 0) { + ElMessage.success('总会员创建并上架成功') + bundleDialogVisible.value = false + await fetchMemberList() + } else { + ElMessage.error(res.msg || '创建失败') + } + } catch (error) { + console.error(error) + ElMessage.error('创建失败') + } finally { + bundling.value = false + } +} + const openCatalogDialog = async () => { if (isAllClubScope.value) { ElMessage.warning('请切换到具体俱乐部后再上架会员')