作者 景龙
1 个管道 的构建 通过 耗费 18 秒

修改用户后加手机号

... ... @@ -87,7 +87,7 @@ class AdminCompanyController extends AdminBaseController
public function getStaff($identity){
$user = Db::name('user')
->where(['user_type'=>2,'user_status'=>1,'identity'=>$identity])
->field('id,user_login')
->field('id,user_login,mobile')
->select()
->toArray();
return $user;
... ...
... ... @@ -265,7 +265,7 @@ class AdminProjectController extends AdminBaseController
$user = Db::name('user')
->whereIn('id',$ids)
->where('user_status',1)
->field('id,user_login')
->field('id,user_login,mobile')
->order('id desc')
->select()
->toArray();
... ...
... ... @@ -15,13 +15,14 @@ use think\Validate;
class UserValidate extends Validate
{
protected $rule = [
'user_login' => 'require|unique:user,user_login',
'user_login' => 'require',
// 'user_login' => 'require|unique:user,user_login',
'mobile' => ['require','unique'=>'user,mobile','regex'=>'/(^(13\d|14\d|15\d|16\d|17\d|18\d|19\d)\d{8})$/'],
'identity' => 'require'
];
protected $message = [
'user_login.require' => '用户不能为空',
'user_login.unique' => '姓名已存在',
// 'user_login.unique' => '姓名已存在',
'mobile.require' => '手机号不能为空',
'mobile' => '手机号格式不正确',
'mobile.unique' => '手机号已存在',
... ...
... ... @@ -6,21 +6,20 @@
.users_leader{
border:1px solid #f0f0f0;
padding:5px 10px;
height:80px;
height:150px;
overflow-y: scroll;
}
.users_staff{
border:1px solid #f0f0f0;
padding:5px 10px;
height:150px;
height:250px;
overflow-y: scroll;
}
.users{
width:100px;
width:250px;
float:left;
}
.user_name{
width:45px;
text-align: justify;
text-align-last: justify;
float:left;
... ... @@ -86,7 +85,7 @@
<div class="users_leader">
<volist name="user_leader" id="vo">
<div class="users">
<div class="user_name">{$vo.user_login}</div>
<div class="user_name">{$vo.user_login}({$vo.mobile})</div>
<div class="box"><input type="checkbox" name="u_l_id[]" value="{$vo.id}"/></div>
</div>
</volist>
... ... @@ -100,7 +99,7 @@
<div class="users_staff">
<volist name="user_staff" id="vo">
<div class="users">
<div class="user_name">{$vo.user_login}</div>
<div class="user_name">{$vo.user_login}({$vo.mobile})</div>
<div class="box"><input type="checkbox" name='u_s_id[]' value="{$vo.id}"/></div>
</div>
</volist>
... ... @@ -366,7 +365,7 @@
a_company += '<div class="users_leader">';
a_company += '<volist name="user_leaders" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="radio" name="u_ls_id'+index+'" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ... @@ -380,7 +379,7 @@
a_company += '<div class="users_leader">';
a_company += '<volist name="user_leader" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="checkbox" name="u_l_id'+index+'[]" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ... @@ -394,7 +393,7 @@
a_company += '<div class="users_staff">';
a_company += '<volist name="user_staff" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="checkbox" name="u_s_id'+index+'[]" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ...
... ... @@ -6,21 +6,20 @@
.users_leader{
border:1px solid #f0f0f0;
padding:5px 10px;
height:80px;
height:150px;
overflow-y: scroll;
}
.users_staff{
border:1px solid #f0f0f0;
padding:5px 10px;
height:150px;
height:250px;
overflow-y: scroll;
}
.users{
width:100px;
width:250px;
float:left;
}
.user_name{
width:45px;
text-align: justify;
text-align-last: justify;
float:left;
... ... @@ -87,7 +86,7 @@
<div class="users_leader">
<volist name="user_leader" id="vo">
<div class="users">
<div class="user_name">{$vo.user_login}</div>
<div class="user_name">{$vo.user_login}({$vo.mobile})</div>
<div class="box"><input type="checkbox" name="u_l_id[]" value="{$vo.id}" <if condition='in_array($vo.id,$post.u_l_id)'> checked</if> /></div>
</div>
</volist>
... ... @@ -101,7 +100,7 @@
<div class="users_staff">
<volist name="user_staff" id="vo">
<div class="users">
<div class="user_name">{$vo.user_login}</div>
<div class="user_name">{$vo.user_login}({$vo.mobile})</div>
<div class="box"><input type="checkbox" name="u_s_id[]" value="{$vo.id}" <if condition='in_array($vo.id,$post.u_s_id)'> checked</if>/></div>
</div>
</volist>
... ... @@ -200,7 +199,7 @@
<div class="users_leader">
<volist name="user_leaders" id="voo">
<div class="users">
<div class="user_name">{$voo.user_login}</div>
<div class="user_name">{$voo.user_login}({$voo.mobile})</div>
<div class="box"><input type="radio" name="u_ls_id{$key1}" value="{$voo.id}" <eq name="voo.id" value="$vo.u_ls_id">checked</eq> /></div>
</div>
</volist>
... ... @@ -213,7 +212,7 @@
<div class="users_leader">
<volist name="user_leader" id="voo">
<div class="users">
<div class="user_name">{$voo.user_login}</div>
<div class="user_name">{$voo.user_login}({$voo.mobile})</div>
<div class="box"><input type="checkbox" name="u_l_id{$key1}[]" value="{$voo.id}" <if condition='in_array($voo.id,$vo.u_l_id)'> checked</if>/></div>
</div>
</volist>
... ... @@ -227,7 +226,7 @@
<div class="users_staff">
<volist name="user_staff" id="voo">
<div class="users">
<div class="user_name">{$voo.user_login}</div>
<div class="user_name">{$voo.user_login}({$voo.mobile})</div>
<div class="box"><input type="checkbox" name="u_s_id{$key1}[]" value="{$voo.id}" <if condition='in_array($voo.id,$vo.u_s_id)'> checked</if>/></div>
</div>
</volist>
... ... @@ -428,7 +427,7 @@
a_company += '<div class="users_leader">';
a_company += '<volist name="user_leaders" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="radio" name="u_ls_id'+index+'" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ... @@ -442,7 +441,7 @@
a_company += '<div class="users_leader">';
a_company += '<volist name="user_leader" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="checkbox" name="u_l_id'+index+'[]" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ... @@ -456,7 +455,7 @@
a_company += '<div class="users_staff">';
a_company += '<volist name="user_staff" id="vo">';
a_company += '<div class="users">';
a_company += '<div class="user_name">{$vo.user_login}</div>';
a_company += '<div class="user_name">{$vo.user_login}({$vo.mobile})</div>';
a_company += '<div class="box"><input type="checkbox" name="u_s_id'+index+'[]" value="{$vo.id}"/></div>';
a_company += '</div>';
a_company += '</volist>';
... ...
... ... @@ -6,21 +6,20 @@
.users_leader{
border:1px solid #f0f0f0;
padding:5px 10px;
height:80px;
height:150px;
overflow-y: scroll;
}
.users_staff{
border:1px solid #f0f0f0;
padding:5px 10px;
height:100px;
height:150px;
overflow-y: scroll;
}
.users{
width:100px;
width:250px;
float:left;
}
.user_name{
width:45px;
text-align: justify;
text-align-last: justify;
float:left;
... ... @@ -281,7 +280,7 @@
var part_a = '';
$.each(data['part_a'],function(index,val){
part_a += '<div class="users">';
part_a += '<div class="user_name">'+val['user_login']+'</div>';
part_a += '<div class="user_name">'+val['user_login']+'('+val['mobile']+')</div>';
part_a += '<div class="box"><input type="checkbox" name="a_sid[]" value="'+val['id']+'"/></div>';
part_a += '</div>';
});
... ... @@ -291,7 +290,7 @@
var part_b = '';
$.each(data['part_b'],function(index,val){
part_b += '<div class="users">';
part_b += '<div class="user_name">'+val['user_login']+'</div>';
part_b += '<div class="user_name">'+val['user_login']+'('+val['mobile']+')</div>';
part_b += '<div class="box"><input type="checkbox" name="b_sid[]" value="'+val['id']+'"/></div>';
part_b += '</div>';
});
... ...
... ... @@ -6,21 +6,20 @@
.users_leader{
border:1px solid #f0f0f0;
padding:5px 10px;
height:80px;
height:150px;
overflow-y: scroll;
}
.users_staff{
border:1px solid #f0f0f0;
padding:5px 10px;
height:100px;
height:150px;
overflow-y: scroll;
}
.users{
width:100px;
width:250px;
float:left;
}
.user_name{
width:45px;
text-align: justify;
text-align-last: justify;
float:left;
... ... @@ -331,7 +330,7 @@
$.each(data['part_a'],function(index,val){
var check = val['check'];
part_a += '<div class="users">';
part_a += '<div class="user_name">'+val['user_login']+'</div>';
part_a += '<div class="user_name">'+val['user_login']+'('+val['mobile']+')</div>';
part_a += '<div class="box box_a"><input type="checkbox" name="a_sid[]" value="'+val['id']+'"/><input type="hidden" value="'+check+'"></div>';
part_a += '</div>';
});
... ... @@ -353,7 +352,7 @@
$.each(data['part_b'],function(index,val){
var check = val['check'];
part_b += '<div class="users">';
part_b += '<div class="user_name">'+val['user_login']+'</div>';
part_b += '<div class="user_name">'+val['user_login']+'('+val['mobile']+')</div>';
part_b += '<div class="box box_b"><input type="checkbox" name="b_sid[]" value="'+val['id']+'"/><input type="hidden" value="'+check+'"></div>';
part_b += '</div>';
});
... ...