Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
8649d60d
Commit
8649d60d
authored
Apr 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑客户
parent
6961c476
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
27 deletions
+24
-27
Member.php
application/index/controller/Member.php
+5
-7
Users.php
application/model/Users.php
+0
-1
user.js
public/resource/js/user.js
+18
-18
user_template_tpl.html
public/resource/template/user_template_tpl.html
+1
-1
No files found.
application/index/controller/Member.php
View file @
8649d60d
...
...
@@ -210,15 +210,13 @@ class Member extends Basic{
* @throws \think\exception\DbException
*/
public
function
pcEditClient
()
{
$data
=
[];
$data
=
array
();
if
(
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'id'
])
{
if
(
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'id'
])
{
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
params
[
'id'
])
{
//编辑
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
$this
->
operating_records
(
Session
::
get
(
"user_info.id"
),
$type
=
3
,
$remark
=
'用户编辑'
,
0
,
$this
->
params
[
'id'
]);
}
//编辑
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
$this
->
operating_records
(
$this
->
userId
,
$type
=
3
,
$remark
=
'用户编辑'
,
0
,
$this
->
params
[
'id'
]);
}
else
{
$data
[
'list'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
}
...
...
application/model/Users.php
View file @
8649d60d
...
...
@@ -200,7 +200,6 @@ class Users extends Model
//新增
$is_exist
=
$this
->
where
(
'user_phone'
,
$data
[
'user_phone'
])
->
count
();
if
(
empty
(
$is_exist
))
{
// $insert_data['referrer_id'] = $data['agents_id'];
$insert_data
[
'agent_id'
]
=
$data
[
'agents_id'
];
$insert_data
[
'source'
]
=
20
;
$insert_data
[
'status'
]
=
-
1
;
...
...
public/resource/js/user.js
View file @
8649d60d
...
...
@@ -2,7 +2,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
15
,
/*每页显示多少条*/
user_id
:
0
,
urls
:
''
,
init
:
function
()
{
//初始化dot
...
...
@@ -46,17 +46,17 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
user
.
delete_user
(
params
);
});
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
house
_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user
_id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
delegate
(
"#add_user"
,
"click"
,
function
()
{
//新增客户
user
.
house
_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user
_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_user
();
});
$
(
document
).
delegate
(
"#edit_add"
,
"click"
,
function
()
{
user
.
edit_add
();
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作跟进详情
user
.
house
_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user
_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
Caozuo
();
});
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号搜索客方
...
...
@@ -80,7 +80,6 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
user
.
addphone2
(
this
);
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交
user
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
Submit_follow
();
});
...
...
@@ -148,22 +147,23 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
});
},
Submit_follow
:
function
()
{
//提交
var
params
=
{};
params
.
id
=
user
.
user_id
;
params
.
user_nick
=
$
(
"#cus_name"
).
val
();
params
.
user_phone
=
$
(
"#cus_phone"
).
html
()
params
.
agent_id
=
user
.
agent_id2
;
params
.
sex
=
$
(
"#sex"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/pcEditClient'
,
data
:
{
"id"
:
user
.
house_id
,
"user_nick"
:
$
(
"#cus_name"
).
val
(),
"user_phone"
:
$
(
"#cus_phone"
).
html
(),
"agent_id"
:
user
.
agent_id2
,
//客方
"sex"
:
$
(
"#sex"
).
val
()
},
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
}
user
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
)
}
}
});
...
...
@@ -174,7 +174,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
type
:
'POST'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
house
_id
,
"user_id"
:
user
.
user
_id
,
"content"
:
$
(
"#genj_text"
).
val
()
},
dataType
:
'json'
,
...
...
@@ -191,7 +191,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/useraction_search'
,
data
:
{
"user_id"
:
user
.
house
_id
},
data
:
{
"user_id"
:
user
.
user
_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
...
...
@@ -228,7 +228,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
params
.
activate
=
$
(
"select[name=activate]"
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
// console.log(params);return ;
$
.
ajax
({
url
:
'/index/usersList'
,
type
:
'GET'
,
...
...
@@ -277,7 +277,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
}
$
.
ajax
({
url
:
'/index/
user_add
'
,
url
:
'/index/
pcEditClient
'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
...
...
public/resource/template/user_template_tpl.html
View file @
8649d60d
...
...
@@ -45,7 +45,7 @@
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
详细信息
<
/a
>
<
a
class
=
"btn1 btn-success genj_ure"
href
=
"#modal-add"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
跟进
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment