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
34022770
Commit
34022770
authored
Apr 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表跟进增加状态标签
parent
2faff2a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
19 deletions
+43
-19
Member.php
application/index/controller/Member.php
+13
-13
users_list.html
application/index/view/member/users_list.html
+12
-1
user.js
public/resource/js/user.js
+18
-5
No files found.
application/index/controller/Member.php
View file @
34022770
...
...
@@ -179,26 +179,26 @@ class Member extends Basic{
/**
* 添加跟进
*
* @return \think\Response
*/
public
function
pcAddFollow
(){
$status
=
200
;
$msg
=
'成功!'
;
$table
=
new
UPhoneFollowPp
;
$table
=
new
UPhoneFollowPp
;
$params
=
$this
->
request
->
param
();
$time
=
date
(
"Y-m-d H:i:s"
,
time
());
//当前时间
if
(
!
empty
(
$params
[
'content'
])
&&!
empty
(
$params
[
'user_id'
])){
$params
[
'id'
]
=
''
;
$params
[
'labels_id'
]
=
0
;
$params
[
'agent_id'
]
=
Session
::
get
(
"user_info.id"
);
$params
[
'type'
]
=
2
;
$params
[
'create_time'
]
=
$time
;
$params
[
'update_time'
]
=
$time
;
$table
->
save
(
$params
);
return
$this
->
response
(
$status
,
$msg
,
$params
);
}
else
{
return
$this
->
response
(
101
,
$msg
=
'缺少参数'
,
$params
);
if
(
empty
(
$params
[
'content'
])
||
empty
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
101
,
$msg
=
'缺少参数'
,
$params
);
}
$params
[
'id'
]
=
''
;
$params
[
'labels_id'
]
=
0
;
$params
[
'agent_id'
]
=
Session
::
get
(
"user_info.id"
);
$params
[
'type'
]
=
1
;
$params
[
'user_status'
]
=
$params
;
$table
->
allowField
(
true
)
->
save
(
$params
);
return
$this
->
response
(
$status
,
$msg
,
$params
);
}
...
...
application/index/view/member/users_list.html
View file @
34022770
...
...
@@ -303,7 +303,18 @@
</h4>
</div>
<div
class=
"modal-body"
>
<textarea
class=
"form-control"
rows=
"3"
id=
"genj_text"
></textarea>
<label
class=
"col-sm-3 control-label"
>
跟进:
</label>
<div
class=
"col-sm-9"
>
<textarea
class=
"form-control"
rows=
"3"
id=
"genj_text"
></textarea>
<span
class=
"use-span text-danger"
>
(必填)
</span>
</div>
<label
class=
"col-sm-3 control-label"
>
状态标签:
</label>
<div
class=
"col-sm-9"
>
<label
class=
"control-label"
>
求租
</label><input
type=
"radio"
name=
"user_status"
value=
"0"
>
<label
class=
"control-label"
>
已租
</label><input
type=
"radio"
name=
"user_status"
value=
"1"
>
<label
class=
"control-label"
>
无效
</label><input
type=
"radio"
name=
"user_status"
value=
"-1"
>
<span
class=
"text-danger"
>
(必填)
</span>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
...
...
public/resource/js/user.js
View file @
34022770
...
...
@@ -48,6 +48,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
});
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"input[name = 'user_status']:checked"
).
attr
(
"checked"
,
false
);
});
$
(
document
).
delegate
(
"#add_user"
,
"click"
,
function
()
{
//新增客户
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
...
...
@@ -168,21 +169,33 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
});
},
edit_add
:
function
()
{
//提交跟进
var
user_status
=
$
(
"input[name = 'user_status']:checked"
).
val
();
var
genj_text
=
$
(
"#genj_text"
).
val
();
if
(
genj_text
==
''
)
{
alert
(
'跟进内容为空'
);
return
false
;
}
if
(
user_status
==
undefined
)
{
alert
(
'状态标签未选中'
);
return
false
;
}
$
.
ajax
({
url
:
'/index/pcAddFollow'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"content"
:
$
(
"#genj_text"
).
val
()
"user_id"
:
user
.
user_id
,
"content"
:
genj_text
,
"user_status"
:
user_status
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
}
else
{
if
(
data
.
code
!=
200
)
{
alert
(
data
.
msg
);
}
}
});
},
...
...
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