feat: 店铺列表新增条件
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m47s

This commit is contained in:
luo
2026-07-21 18:20:35 +08:00
parent 830476d49d
commit 5079f97326
5 changed files with 126 additions and 0 deletions

View File

@@ -452,6 +452,7 @@
const initialSearchState = {
shop_name: '',
shop_code: '',
contact_phone: '',
parent_shop_name: '',
parent_id: undefined as number | undefined,
level: undefined as number | undefined,
@@ -486,6 +487,10 @@
// 搜索处理
const handleSearch = () => {
if (searchForm.contact_phone && !/^\d{11}$/.test(searchForm.contact_phone)) {
ElMessage.warning('联系电话必须为11位数字')
return
}
pagination.currentPage = 1
getShopList()
}
@@ -510,6 +515,21 @@
placeholder: '请输入店铺编号'
}
},
{
label: '联系电话',
prop: 'contact_phone',
type: 'input',
config: {
clearable: true,
maxlength: 11,
inputmode: 'numeric',
placeholder: '请输入11位联系电话',
onInput: (event: InputEvent) => {
const input = event.target as HTMLInputElement
searchForm.contact_phone = input.value.replace(/\D/g, '').slice(0, 11)
}
}
},
{
label: '上级店铺',
prop: 'parent_id',
@@ -891,6 +911,7 @@
page_size: pagination.pageSize,
shop_name: searchForm.shop_name || undefined,
shop_code: searchForm.shop_code || undefined,
contact_phone: searchForm.contact_phone || undefined,
parent_shop_name: searchForm.parent_shop_name || undefined,
parent_id: searchForm.parent_id,
level: searchForm.level,