feat: 所有列表页表单支持选择变更自动搜索和输入框回车搜索

已更新以下页面:
- 订单管理页
- 店铺概览页订单列表
- 推广费管理页
- 商品管理页
- 店铺管理页
- 月销量目标管理页
- 刷单记录管理页
- 订单状态配置页
- 推广费类型配置页
- 账号管理页
- 超级账号管理页
- 公司管理页
- 部门管理页
- 文件管理页
- 图片管理页
- 商品列表页(2个)
This commit is contained in:
小蟑螂
2026-03-27 20:58:38 +08:00
parent 4f5b5e8c9e
commit a8feee3364
17 changed files with 110 additions and 25 deletions
@@ -176,7 +176,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入平台订单号', placeholder: '请输入平台订单号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'platformOrderNo', fieldName: 'platformOrderNo',
label: '平台订单号', label: '平台订单号',
@@ -185,8 +186,9 @@ const formOptions = computed(() => ({
component: 'Select', component: 'Select',
componentProps: { componentProps: {
placeholder: '请选择店铺', placeholder: '请选择店铺',
options: shopOptions.value, options: shopOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'shopId', fieldName: 'shopId',
label: '店铺', label: '店铺',
@@ -198,6 +200,7 @@ const formOptions = computed(() => ({
min: 0, min: 0,
precision: 2, precision: 2,
style: { width: '100%' }, style: { width: '100%' },
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'minBrushAmount', fieldName: 'minBrushAmount',
label: '金额范围', label: '金额范围',
@@ -209,6 +212,7 @@ const formOptions = computed(() => ({
min: 0, min: 0,
precision: 2, precision: 2,
style: { width: '100%' }, style: { width: '100%' },
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'maxBrushAmount', fieldName: 'maxBrushAmount',
label: '', label: '',
@@ -220,6 +224,7 @@ const formOptions = computed(() => ({
showTime: true, showTime: true,
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'startBrushTime', fieldName: 'startBrushTime',
label: '刷单时间', label: '刷单时间',
@@ -231,6 +236,7 @@ const formOptions = computed(() => ({
showTime: true, showTime: true,
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'endBrushTime', fieldName: 'endBrushTime',
label: '', label: '',
@@ -119,7 +119,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入状态名称', placeholder: '请输入状态名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'statusName', fieldName: 'statusName',
label: '状态名称', label: '状态名称',
@@ -133,6 +134,7 @@ const formOptions = computed(() => ({
{ label: '不参与自动统计', value: 0 }, { label: '不参与自动统计', value: 0 },
], ],
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'autoStatistics', fieldName: 'autoStatistics',
label: '自动统计', label: '自动统计',
@@ -133,7 +133,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入类型名称', placeholder: '请输入类型名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'typeName', fieldName: 'typeName',
label: '类型名称', label: '类型名称',
@@ -147,6 +148,7 @@ const formOptions = computed(() => ({
{ label: '禁用', value: 0 }, { label: '禁用', value: 0 },
], ],
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'isActive', fieldName: 'isActive',
label: '状态', label: '状态',
@@ -263,7 +263,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入平台订单号', placeholder: '请输入平台订单号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'platformOrderNo', fieldName: 'platformOrderNo',
label: '平台订单号', label: '平台订单号',
@@ -278,6 +279,7 @@ const formOptions = computed(() => ({
filterOption: false, filterOption: false,
onSearch: handleShopSearch, onSearch: handleShopSearch,
onPopupScroll: handleShopPopupScroll, onPopupScroll: handleShopPopupScroll,
onChange: () => gridApi?.reload(),
loading: shopLoading, loading: shopLoading,
dropdownMenuColumnStyle: { maxHeight: '300px', overflow: 'auto' }, dropdownMenuColumnStyle: { maxHeight: '300px', overflow: 'auto' },
}, },
@@ -290,6 +292,7 @@ const formOptions = computed(() => ({
placeholder: '请选择状态', placeholder: '请选择状态',
options: orderStatusOptions, options: orderStatusOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'statusId', fieldName: 'statusId',
label: '订单状态', label: '订单状态',
@@ -300,6 +303,7 @@ const formOptions = computed(() => ({
placeholder: '选择排序字段', placeholder: '选择排序字段',
options: sortFieldOptions, options: sortFieldOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'sortField', fieldName: 'sortField',
label: '排序字段', label: '排序字段',
@@ -310,6 +314,7 @@ const formOptions = computed(() => ({
placeholder: '选择排序方式', placeholder: '选择排序方式',
options: sortOrderOptions, options: sortOrderOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'sortOrder', fieldName: 'sortOrder',
label: '排序方式', label: '排序方式',
@@ -206,7 +206,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品名称', placeholder: '请输入商品名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '商品名称', label: '商品名称',
@@ -214,7 +215,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品编码', placeholder: '请输入商品编码(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'productCode', fieldName: 'productCode',
label: '商品编码', label: '商品编码',
@@ -222,7 +224,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入规格编码', placeholder: '请输入规格编码(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'specCode', fieldName: 'specCode',
label: '规格编码', label: '规格编码',
@@ -230,7 +233,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入规格名称', placeholder: '请输入规格名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'specName', fieldName: 'specName',
label: '规格名称', label: '规格名称',
@@ -187,6 +187,7 @@ const formOptions = computed(() => ({
// TODO: 这里需要从店铺API获取店铺列表 // TODO: 这里需要从店铺API获取店铺列表
options: [], options: [],
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'shopId', fieldName: 'shopId',
label: '店铺', label: '店铺',
@@ -198,6 +199,7 @@ const formOptions = computed(() => ({
// TODO: 这里需要从推广费类型API获取类型列表 // TODO: 这里需要从推广费类型API获取类型列表
options: [], options: [],
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'feeTypeId', fieldName: 'feeTypeId',
label: '推广费类型', label: '推广费类型',
@@ -208,6 +210,7 @@ const formOptions = computed(() => ({
placeholder: '请选择平台', placeholder: '请选择平台',
options: platformOptions, options: platformOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'platform', fieldName: 'platform',
label: '平台', label: '平台',
@@ -217,6 +220,7 @@ const formOptions = computed(() => ({
componentProps: { componentProps: {
placeholder: '开始日期', placeholder: '开始日期',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'feeDateStart', fieldName: 'feeDateStart',
label: '发生日期', label: '发生日期',
@@ -226,6 +230,7 @@ const formOptions = computed(() => ({
componentProps: { componentProps: {
placeholder: '结束日期', placeholder: '结束日期',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'feeDateEnd', fieldName: 'feeDateEnd',
label: '至', label: '至',
@@ -144,7 +144,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品名称', placeholder: '请输入商品名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '商品名称', label: '商品名称',
@@ -152,7 +153,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品编码', placeholder: '请输入商品编码(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'productCode', fieldName: 'productCode',
label: '商品编码', label: '商品编码',
@@ -144,7 +144,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品名称', placeholder: '请输入商品名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '商品名称', label: '商品名称',
@@ -152,7 +153,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入商品编码', placeholder: '请输入商品编码(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'productCode', fieldName: 'productCode',
label: '商品编码', label: '商品编码',
@@ -162,7 +162,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入店铺名称', placeholder: '请输入店铺名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '店铺名称', label: '店铺名称',
@@ -173,6 +174,7 @@ const formOptions = computed(() => ({
placeholder: '请选择平台', placeholder: '请选择平台',
options: platformOptions, options: platformOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'platform', fieldName: 'platform',
label: '平台', label: '平台',
@@ -167,8 +167,9 @@ const formOptions = computed(() => ({
component: 'Select', component: 'Select',
componentProps: { componentProps: {
placeholder: '请选择店铺', placeholder: '请选择店铺',
options: shopOptions.value, options: shopOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'shopId', fieldName: 'shopId',
label: '店铺', label: '店铺',
@@ -179,6 +180,7 @@ const formOptions = computed(() => ({
placeholder: '开始月份', placeholder: '开始月份',
picker: 'month', picker: 'month',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'startTargetMonth', fieldName: 'startTargetMonth',
label: '目标月份', label: '目标月份',
@@ -189,6 +191,7 @@ const formOptions = computed(() => ({
placeholder: '结束月份', placeholder: '结束月份',
picker: 'month', picker: 'month',
style: { width: '100%' }, style: { width: '100%' },
onChange: () => gridApi?.reload(),
}, },
fieldName: 'endTargetMonth', fieldName: 'endTargetMonth',
label: '至', label: '至',
@@ -559,7 +559,8 @@ const orderFormOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入平台订单号', placeholder: '请输入平台订单号(回车搜索)',
onPressEnter: () => orderGridApi?.reload(),
}, },
fieldName: 'platformOrderNo', fieldName: 'platformOrderNo',
label: '订单号', label: '订单号',
@@ -568,8 +569,9 @@ const orderFormOptions = computed(() => ({
component: 'Select', component: 'Select',
componentProps: { componentProps: {
placeholder: '请选择订单状态', placeholder: '请选择订单状态',
options: orderStatusOptions.value, options: orderStatusOptions,
allowClear: true, allowClear: true,
onChange: () => orderGridApi?.reload(),
}, },
fieldName: 'statusId', fieldName: 'statusId',
label: '订单状态', label: '订单状态',
@@ -580,6 +582,7 @@ const orderFormOptions = computed(() => ({
placeholder: '最小金额', placeholder: '最小金额',
min: 0, min: 0,
style: { width: '100%' }, style: { width: '100%' },
onPressEnter: () => orderGridApi?.reload(),
}, },
fieldName: 'minReceivedAmount', fieldName: 'minReceivedAmount',
label: '实收金额(起)', label: '实收金额(起)',
@@ -590,6 +593,7 @@ const orderFormOptions = computed(() => ({
placeholder: '最大金额', placeholder: '最大金额',
min: 0, min: 0,
style: { width: '100%' }, style: { width: '100%' },
onPressEnter: () => orderGridApi?.reload(),
}, },
fieldName: 'maxReceivedAmount', fieldName: 'maxReceivedAmount',
label: '实收金额(止)', label: '实收金额(止)',
@@ -603,6 +607,7 @@ const orderFormOptions = computed(() => ({
{ label: '未确认', value: 0 }, { label: '未确认', value: 0 },
], ],
allowClear: true, allowClear: true,
onChange: () => orderGridApi?.reload(),
}, },
fieldName: 'confirm', fieldName: 'confirm',
label: '确认状态', label: '确认状态',
@@ -613,6 +618,7 @@ const orderFormOptions = computed(() => ({
placeholder: '选择排序字段', placeholder: '选择排序字段',
options: orderSortFieldOptions, options: orderSortFieldOptions,
allowClear: true, allowClear: true,
onChange: () => orderGridApi?.reload(),
}, },
fieldName: 'sortField', fieldName: 'sortField',
label: '排序字段', label: '排序字段',
@@ -623,6 +629,7 @@ const orderFormOptions = computed(() => ({
placeholder: '选择排序方式', placeholder: '选择排序方式',
options: orderSortOrderOptions, options: orderSortOrderOptions,
allowClear: true, allowClear: true,
onChange: () => orderGridApi?.reload(),
}, },
fieldName: 'sortOrder', fieldName: 'sortOrder',
label: '排序方式', label: '排序方式',
@@ -180,7 +180,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入文件名', placeholder: '请输入文件名(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'filename', fieldName: 'filename',
label: '文件名', label: '文件名',
@@ -191,6 +192,7 @@ const formOptions = computed(() => ({
placeholder: '请选择文件格式', placeholder: '请选择文件格式',
options: fileFormatOptions, options: fileFormatOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'fileFormat', fieldName: 'fileFormat',
label: '文件格式', label: '文件格式',
@@ -188,7 +188,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入文件名', placeholder: '请输入文件名(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'filename', fieldName: 'filename',
label: '文件名', label: '文件名',
@@ -199,6 +200,7 @@ const formOptions = computed(() => ({
placeholder: '请选择图片分类', placeholder: '请选择图片分类',
options: props.categoryOptions, options: props.categoryOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'category', fieldName: 'category',
label: '图片分类', label: '图片分类',
@@ -56,14 +56,29 @@ const formOptions = computed(() => ({
{ {
fieldName: 'loginCode', fieldName: 'loginCode',
label: '登录账号', label: '登录账号',
component: 'Input',
componentProps: {
placeholder: '请输入登录账号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'realName', fieldName: 'realName',
label: '真实姓名', label: '真实姓名',
component: 'Input',
componentProps: {
placeholder: '请输入真实姓名(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'phone', fieldName: 'phone',
label: '手机号', label: '手机号',
component: 'Input',
componentProps: {
placeholder: '请输入手机号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'status', fieldName: 'status',
@@ -72,6 +87,7 @@ const formOptions = computed(() => ({
componentProps: { componentProps: {
options: statusOptions, options: statusOptions,
placeholder: '请选择状态', placeholder: '请选择状态',
onChange: () => gridApi?.reload(),
}, },
}, },
], ],
@@ -53,14 +53,29 @@ const formOptions = computed(() => ({
{ {
fieldName: 'loginCode', fieldName: 'loginCode',
label: '登录账号', label: '登录账号',
component: 'Input',
componentProps: {
placeholder: '请输入登录账号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'realName', fieldName: 'realName',
label: '真实姓名', label: '真实姓名',
component: 'Input',
componentProps: {
placeholder: '请输入真实姓名(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'phone', fieldName: 'phone',
label: '手机号', label: '手机号',
component: 'Input',
componentProps: {
placeholder: '请输入手机号(回车搜索)',
onPressEnter: () => gridApi?.reload(),
},
}, },
{ {
fieldName: 'status', fieldName: 'status',
@@ -69,6 +84,7 @@ const formOptions = computed(() => ({
componentProps: { componentProps: {
options: statusOptions, options: statusOptions,
placeholder: '请选择状态', placeholder: '请选择状态',
onChange: () => gridApi?.reload(),
}, },
}, },
], ],
@@ -201,7 +201,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入公司名称', placeholder: '请输入公司名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '公司名称', label: '公司名称',
@@ -209,7 +210,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入联系人', placeholder: '请输入联系人(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'contactPerson', fieldName: 'contactPerson',
label: '联系人', label: '联系人',
@@ -217,7 +219,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入联系电话', placeholder: '请输入联系电话(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'contactPhone', fieldName: 'contactPhone',
label: '联系电话', label: '联系电话',
@@ -225,7 +228,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入邮箱', placeholder: '请输入邮箱(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'email', fieldName: 'email',
label: '邮箱', label: '邮箱',
@@ -236,6 +240,7 @@ const formOptions = computed(() => ({
placeholder: '请选择状态', placeholder: '请选择状态',
options: statusOptions, options: statusOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'status', fieldName: 'status',
label: '状态', label: '状态',
@@ -249,6 +254,7 @@ const formOptions = computed(() => ({
{ label: '正常', value: 'false' }, { label: '正常', value: 'false' },
], ],
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'expired', fieldName: 'expired',
label: '过期状态', label: '过期状态',
@@ -207,7 +207,8 @@ const formOptions = computed(() => ({
{ {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入部门名称', placeholder: '请输入部门名称(回车搜索)',
onPressEnter: () => gridApi?.reload(),
}, },
fieldName: 'name', fieldName: 'name',
label: '部门名称', label: '部门名称',
@@ -216,8 +217,9 @@ const formOptions = computed(() => ({
component: 'Select', component: 'Select',
componentProps: { componentProps: {
placeholder: '请选择父部门', placeholder: '请选择父部门',
options: parentDepartmentOptions.value, options: parentDepartmentOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'parentId', fieldName: 'parentId',
label: '父部门', label: '父部门',
@@ -228,6 +230,7 @@ const formOptions = computed(() => ({
placeholder: '请选择状态', placeholder: '请选择状态',
options: statusOptions, options: statusOptions,
allowClear: true, allowClear: true,
onChange: () => gridApi?.reload(),
}, },
fieldName: 'status', fieldName: 'status',
label: '状态', label: '状态',