From a95fa6d95d2d4e72a66b14b13e8f2b425b03d104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 4 Feb 2026 01:12:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(gltTicketTemplate):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=B0=B4=E7=A5=A8=E6=A8=A1=E6=9D=BF=E7=BC=96=E8=BE=91=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将启用字段类型从字符串改为布尔值 - 添加确认加载状态指示器 - 使用选择器替换商品ID输入框并支持搜索功能 - 添加商品信息展示包括名称和价格标签 - 使用开关组件替代启用字段的输入框 - 为数值字段添加数字输入框并设置合理的默认值和范围限制 - 添加买赠倍率和计入购买量的开关控制 - 实现发放规则分组显示包括最小购买数量等字段 - 添加首期释放时机的单选按钮组 - 添加表单验证规则包括必填项和长度限制 - 实现商品列表异步加载和搜索功能 - 添加选中商品的预览显示 - 优化表单布局使用栅格系统 --- src/api/glt/gltTicketTemplate/model/index.ts | 4 +- .../components/gltTicketTemplateEdit.vue | 508 ++++++++++++------ 2 files changed, 360 insertions(+), 152 deletions(-) diff --git a/src/api/glt/gltTicketTemplate/model/index.ts b/src/api/glt/gltTicketTemplate/model/index.ts index dbd5a11..263393c 100644 --- a/src/api/glt/gltTicketTemplate/model/index.ts +++ b/src/api/glt/gltTicketTemplate/model/index.ts @@ -4,14 +4,14 @@ import type { PageParam } from '@/api'; * 水票 */ export interface GltTicketTemplate { - // + // id?: number; // 关联商品ID goodsId?: number; // 名称 name?: string; // 启用 - enabled?: string; + enabled?: boolean; // 单位名称 unitName?: string; // 最小购买数量 diff --git a/src/views/glt/gltTicketTemplate/components/gltTicketTemplateEdit.vue b/src/views/glt/gltTicketTemplate/components/gltTicketTemplateEdit.vue index 1b67119..6753ca9 100644 --- a/src/views/glt/gltTicketTemplate/components/gltTicketTemplateEdit.vue +++ b/src/views/glt/gltTicketTemplate/components/gltTicketTemplateEdit.vue @@ -5,6 +5,7 @@ :visible="visible" :maskClosable="false" :maxable="maxable" + :confirm-loading="loading" :title="isUpdate ? '编辑水票' : '添加水票'" :body-style="{ paddingBottom: '28px' }" @update:visible="updateVisible" @@ -19,106 +20,215 @@ styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' } " > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 基本信息 + + + + + + + +
+ {{ goods.name }} + ¥{{ goods.price || 0 }} +
+
+ +
+ {{ goodsLoading ? '加载中...' : '暂无商品数据' }} +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + {{ selectedGoods.name }} + ¥{{ selectedGoods.price || 0 }} + ID: {{ selectedGoods.goodsId }} + + + +
+ + + 发放规则 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 支付成功当刻 + 下个月同日 + + + + + + + + + + + + + + + + + +