Files
mp-vue/src/views/shop/shopDealerWithdraw/components/search.vue
赵忠林 d822b7b857 feat(shop): 新增分销商提现管理功能
- 在 shopDealerWithdraw 模型中增加用户真实姓名、昵称、手机号、头像字段- 增加微信账号和姓名字段用于微信提现- 添加支付凭证图片和备注字段以支持打款记录
- 修改 auditTime 类型为 any以适配多种时间格式
- 新增 shopDealerWithdraw 页面及组件实现提现申请的增删改查
- 实现提现申请的状态管理(待审核、审核通过、驳回、已打款)- 支持根据不同打款方式(微信、支付宝、银行卡)展示相应信息
- 添加提现记录的导入功能组件
- 实现提现申请的批量删除与状态更新操作
- 增加表格列显示用户信息、收款信息、创建时间等关键数据
- 提供编辑弹窗用于查看和修改提现申请详情
- 引入搜索组件优化提现记录筛选体验
2025-10-24 17:32:02 +08:00

107 lines
2.3 KiB
Vue

<template>
<div class="flex items-center gap-20">
<!-- 搜索表单 -->
<a-form
:model="where"
layout="inline"
class="search-form"
@finish="handleSearch"
>
<a-form-item>
<a-space>
<a-button
danger
class="ele-btn-icon"
v-if="selection.length > 0"
:disabled="selection?.length === 0"
@click="removeBatch"
>
<template #icon>
<DeleteOutlined/>
</template>
<span>批量删除</span>
</a-button>
</a-space>
</a-form-item>
<a-form-item>
<a-space>
<a-input-search
allow-clear
placeholder="请输入用户ID"
style="width: 240px"
v-model:value="where.keywords"
@search="handleSearch"
/>
<a-button @click="resetSearch">
重置
</a-button>
</a-space>
</a-form-item>
</a-form>
</div>
<!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="emit('importDone')"/>
</template>
<script lang="ts" setup>
import {ref} from 'vue';
import {
DeleteOutlined
} from '@ant-design/icons-vue';
import Import from './Import.vue';
import useSearch from "@/utils/use-search";
import {ShopDealerWithdrawParam} from "@/api/shop/shopDealerWithdraw/model";
withDefaults(
defineProps<{
// 选中的数据
selection?: any[];
}>(),
{
selection: () => []
}
);
const emit = defineEmits<{
(e: 'search', where?: ShopDealerWithdrawParam): void;
(e: 'batchSettle'): void;
(e: 'export'): void;
(e: 'importDone'): void;
(e: 'remove'): void;
}>();
// 是否显示导入弹窗
const showImport = ref(false);
// 搜索表单
const {where, resetFields} = useSearch<ShopDealerWithdrawParam>({
keywords: '',
});
// 搜索
const handleSearch = () => {
const searchParams = {...where};
// 清除空值
Object.keys(searchParams).forEach(key => {
if (searchParams[key] === '' || searchParams[key] === undefined) {
delete searchParams[key];
}
});
emit('search', searchParams);
};
// 重置搜索
const resetSearch = () => {
resetFields();
emit('search', {});
};
// 批量删除
const removeBatch = () => {
emit('remove');
};
</script>