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
74e222d3
Commit
74e222d3
authored
Apr 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进入跟进页面,默认选中上一状态的标签
parent
8ff133ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
Label.php
application/index/controller/Label.php
+16
-1
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+6
-0
user.js
public/resource/js/user.js
+15
-0
No files found.
application/index/controller/Label.php
View file @
74e222d3
...
...
@@ -10,8 +10,10 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\FollowUp
;
use
app\model\GLabels
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowPp
;
use
think\Session
;
class
Label
extends
Basic
...
...
@@ -157,6 +159,18 @@ class Label extends Basic
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
/**
* 获取用户上一次跟进状态
*
* @return \think\Response
*/
public
function
getUserLabel
()
{
if
(
empty
(
$this
->
params
[
'user_id'
]))
{
return
$this
->
response
(
101
,
'没有用户信息'
);
}
$follow
=
new
UPhoneFollowPp
();
$user_status
=
$follow
->
getUserFollowKey
(
'user_status'
,
[
'user_id'
=>
$this
->
params
[
'user_id'
]],
'id DESC'
);
return
$this
->
response
(
200
,
''
,
$user_status
);
}
}
\ No newline at end of file
application/model/UPhoneFollowPp.php
View file @
74e222d3
...
...
@@ -224,4 +224,10 @@ class UPhoneFollowPp extends BaseModel
->
where
(
$params
)
->
count
();
}
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'asc'
)
{
return
$this
->
where
(
$where
)
->
order
(
$order
)
->
value
(
$field
);
}
}
public/resource/js/user.js
View file @
74e222d3
...
...
@@ -49,6 +49,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
);
user
.
getGenjinLabel
();
});
$
(
document
).
delegate
(
"#add_user"
,
"click"
,
function
()
{
//新增客户
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
...
...
@@ -320,6 +321,20 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
user
.
getList
(
user
.
pageNo
);
}
});
},
getGenjinLabel
:
function
()
{
$
.
ajax
({
url
:
'/index/getUserLabel'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"input[type='radio'][name='user_status'][value="
+
data
.
data
+
"]"
).
attr
(
"checked"
,
"checked"
);
}
}
});
}
}
return
user
;
...
...
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