Commit d2c64206 authored by hujun's avatar hujun

客户列表修改

parent 52d53167
......@@ -177,7 +177,7 @@ class Member extends Basic{
$type = 3;
}
$fields = 'a.id,a.user_nick,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status,b.create_time as follow_time';
$fields = 'a.id,a.user_nick,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status';
$data['list'] = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type);
$data['total'] = $this->user->getUserAgentTotal($where, $type);
$return = $this->response($data['status'], $data['msg'], $data);
......
......@@ -96,7 +96,6 @@ class Users extends Model
->select();
} else {
$result = $this->field($fields)->alias('a')
->join('u_phone_follow_up b','a.id = b.user_id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
......@@ -104,6 +103,7 @@ class Users extends Model
->select();
}
$user_follow = new UPhoneFollowPp();
foreach ($result as $k=>$v) {
$data[$k] = $v->getData();
......@@ -116,6 +116,7 @@ class Users extends Model
$user_data = $this->field('id,user_nick,user_phone')->where('id',$data[$k]['referrer_id'])->find();
$data[$k]['name'] = $user_data['user_nick'];
$data[$k]['phone'] = $user_data['user_phone'];
$data[$k]['follow_time'] = $user_follow->where('user_id',$data[$k]['id'])->order('id desc')->value('create_time');
}
return $data;
}
......
......@@ -56,9 +56,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$ (document).delegate (".genj_ure", "click", function () {
user.user_id = $ (this).attr ("data-id");
$("#genj_text").val('');
// $("input[name = 'user_status']:checked").removeAttr("checked");
$("input[name = 'user_status']:checked").attr("checked",true);
$("input[name = 'user_status']:checked").removeAttr("checked");
user.getGenjinLabel();
});
// ===========================新增客户====================
......@@ -472,15 +470,12 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
//
// user.user_id = $ (this).attr ("data-id");
console.log(user.user_id);
$("input[type='radio'][name='user_status'][value="+data.data+"]").prop("checked", "checked");
}
}
});
}
}
};
return user;
});
......
......@@ -11,10 +11,8 @@
<td>[%= it[item]["user_phone"] %]</td>
<td>[%= it[item]["create_time"] %]</td>
<td>
[% if(it[item]["follow_time"] == null) { %]
--
[% }else{ %]
[%= it[item]["follow_time"] %]
[% if(it[item]["follow_time"] != null) { %]
[%= it[item]["follow_time"] %]
[% } %]
</td>
<td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment