feat(glt): 水票功能模块重构优化
- 将水票模板表单的标题从"编辑水票"改为"规则设置" - 统一表单数据绑定方式,移除computed计算属性直接使用form绑定 - 调整includeBuyQty字段类型从string改为boolean并更新相关逻辑 - 添加normalizeBoolean函数处理布尔值转换 - 更新商品列表API调用参数从pageSize改为limit - 优化水票模板表格列配置,调整列标题和对齐方式 - 隐藏部分不必要的表格列如备注、排序、状态等 - 移除水票编辑表单中的多余字段如用户ID、状态等 - 重构搜索组件,使用关键词搜索替换按钮添加功能 - 在表格中新增用户信息展示列,包含头像、昵称、ID和手机号 - 调整水票记录和释放记录的表格列布局和标题 - 移除表格中的操作列和修改时间列 - 修复布尔值在表单提交时的类型转换问题 - 添加表单验证前的数据类型标准化处理
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
<!-- 搜索表单 -->
|
||||
<template>
|
||||
<a-space :size="10" style="flex-wrap: wrap">
|
||||
<a-button type="primary" class="ele-btn-icon" @click="add">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
<span>添加</span>
|
||||
</a-button>
|
||||
<a-input-search
|
||||
allow-clear
|
||||
placeholder="用户ID|订单编号"
|
||||
style="width: 240px"
|
||||
v-model:value="where.keywords"
|
||||
@search="reload"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PlusOutlined } from '@ant-design/icons-vue';
|
||||
import type { GradeParam } from '@/api/user/grade/model';
|
||||
import { watch } from 'vue';
|
||||
import useSearch from "@/utils/use-search";
|
||||
import {GltUserTicketLogParam} from "@/api/glt/gltUserTicketLog/model";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -24,15 +25,20 @@
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'search', where?: GradeParam): void;
|
||||
(e: 'search', where?: GltUserTicketLogParam): void;
|
||||
(e: 'add'): void;
|
||||
(e: 'remove'): void;
|
||||
(e: 'batchMove'): void;
|
||||
}>();
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
emit('add');
|
||||
// 表单数据
|
||||
const { where } = useSearch<GltUserTicketLogParam>({
|
||||
keywords: '',
|
||||
userId: undefined
|
||||
});
|
||||
|
||||
const reload = () => {
|
||||
emit('search', where);
|
||||
};
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user