注册修改为绑定
This commit is contained in:
@@ -126,16 +126,16 @@ Page({
|
||||
|
||||
if (!phone.trim()) {
|
||||
this.setData({
|
||||
errorMessage: '请输入手机号'
|
||||
errorMessage: '请输入员工工号'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 简单的手机号格式验证
|
||||
const phoneRegex = /^1[3-9]\d{9}$/;
|
||||
// 简单的工号格式验证
|
||||
const phoneRegex = /^\d+$/;
|
||||
if (!phoneRegex.test(phone)) {
|
||||
this.setData({
|
||||
errorMessage: '请输入正确的手机号格式'
|
||||
errorMessage: '工号只能包含数字'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<view class="search-input-wrapper">
|
||||
<input
|
||||
class="search-input"
|
||||
placeholder="搜索员工姓名、手机号或角色"
|
||||
placeholder="搜索员工姓名、工号或角色"
|
||||
bindinput="onSearchInput"
|
||||
value="{{searchKeyword}}"
|
||||
/>
|
||||
@@ -70,16 +70,16 @@
|
||||
<text class="avatar-text">{{item.name.charAt(0)}}</text>
|
||||
</view>
|
||||
<view class="employee-details">
|
||||
<view class="employee-name-row">
|
||||
<text class="employee-name">{{item.name}}</text>
|
||||
<text class="employee-role {{item.role === 'ADMIN' ? 'admin-role' : ''}}">
|
||||
<text class="role-icon">{{item.role === 'ADMIN' ? '👑' : '🚚'}}</text>
|
||||
{{getRoleText(item.role)}}
|
||||
</text>
|
||||
<view class="employee-name-row">
|
||||
<text class="employee-name">{{item.name}}</text>
|
||||
<text class="employee-role {{item.role === 'ADMIN' ? 'admin-role' : ''}}">
|
||||
<text class="role-icon">{{item.role === 'ADMIN' ? '👑' : '🚚'}}</text>
|
||||
{{getRoleText(item.role)}}
|
||||
</text>
|
||||
</view>
|
||||
<text class="employee-phone">工号: {{item.phone}}</text>
|
||||
<text class="employee-id">ID: {{item.id}}</text>
|
||||
</view>
|
||||
<text class="employee-phone">{{item.phone}}</text>
|
||||
<text class="employee-id">ID: {{item.id}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="employee-actions">
|
||||
<button
|
||||
@@ -119,10 +119,10 @@
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">手机号码</text>
|
||||
<text class="form-label">员工工号</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入手机号码"
|
||||
placeholder="请输入员工工号"
|
||||
type="number"
|
||||
value="{{addForm.phone}}"
|
||||
bindinput="onFormInput"
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
<view class="form-hint">
|
||||
<text class="hint-text">
|
||||
提示:添加员工后,用户可以使用该员工的姓名和手机号进行注册
|
||||
提示:添加员工后,用户可以使用该员工的姓名和工号进行绑定
|
||||
</text>
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user