refactor(customer): 优化客户数据查询和表单字段校验
- 移除新增客户页面对手机号的必填和格式校验 - 修改手机号字段标签为“手机号/微信号”,取消必填和长度限制 - 新增判断当前用户是否为超级管理员逻辑 - 抽取并统一构建客户查询参数方法,根据权限动态设置筛选条件 - 优化客户列表数据获取逻辑,支持超级管理员查看全部客户 - 调整依赖项,更新使用了新构建的查询参数函数 - 增强状态统计接口参数构建,统一调用参数生成函数 - 优化副作用 Hook 依赖,保证数据加载时机正确
This commit is contained in:
@@ -3,7 +3,7 @@ import {Loading, CellGroup, Cell, Input, Form, Calendar, Popup, SearchBar} from
|
||||
import {Edit, Calendar as CalendarIcon, ArrowRight, Del} from '@nutui/icons-react-taro'
|
||||
import Taro from '@tarojs/taro'
|
||||
import {useRouter} from '@tarojs/taro'
|
||||
import {View, Text} from '@tarojs/components'
|
||||
import {View, Text, ScrollView} from '@tarojs/components'
|
||||
import FixedButton from "@/components/FixedButton";
|
||||
import {ShopDealerApply} from "@/api/shop/shopDealerApply/model";
|
||||
import {
|
||||
@@ -699,9 +699,9 @@ const AddShopDealerApply = () => {
|
||||
position="bottom"
|
||||
round
|
||||
onClose={() => setShowReceptionistPicker(false)}
|
||||
style={{height: '70%'}}
|
||||
style={{height: '70vh'}}
|
||||
>
|
||||
<View className="flex flex-col h-full">
|
||||
<View style={{height: '100%', display: 'flex', flexDirection: 'column'}}>
|
||||
{/* 标题栏 */}
|
||||
<View className="flex items-center justify-between px-4 py-3 border-b border-gray-100">
|
||||
<Text className="text-base font-semibold text-gray-800">选择接待人员</Text>
|
||||
@@ -718,7 +718,10 @@ const AddShopDealerApply = () => {
|
||||
/>
|
||||
</View>
|
||||
{/* 列表 */}
|
||||
<View className="flex-1 overflow-y-auto">
|
||||
<ScrollView
|
||||
scrollY
|
||||
style={{flex: 1, minHeight: 0, height: 'calc(70vh - 112px)'}}
|
||||
>
|
||||
{receptionistLoading ? (
|
||||
<View className="flex justify-center items-center py-8">
|
||||
<Loading>加载中</Loading>
|
||||
@@ -742,7 +745,7 @@ const AddShopDealerApply = () => {
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</Popup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user