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
aa21c533
Commit
aa21c533
authored
May 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表部门改为select和经纪人编辑去除区域id
parent
2c1868c1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
27 deletions
+67
-27
Agent.php
application/index/controller/Agent.php
+8
-1
District.php
application/index/controller/District.php
+24
-0
Member.php
application/index/controller/Member.php
+2
-3
Basic.php
application/index/extend/Basic.php
+2
-1
agent.html
application/index/view/agent/agent.html
+2
-6
users_list.html
application/index/view/member/users_list.html
+7
-4
route.php
application/route.php
+1
-1
agent.js
public/resource/js/agent.js
+0
-1
user.js
public/resource/js/user.js
+21
-10
No files found.
application/index/controller/Agent.php
View file @
aa21c533
...
...
@@ -92,7 +92,7 @@ class Agent extends Basic
}
$field
=
"a.id,a.store_id,a.district_id,a.`level`,a.`name`,a.phone,a.`status`,a.inviter_id,a.create_time,
ifnull(s.store_name,'')store_name,ifnull(d.district_name,'')district_name,ifnull(g.title,'无')groupname"
;
$order
=
'a.id
asc
'
;
$order
=
'a.id
DESC
'
;
$join
=
[
[
'a_store s'
,
' a.store_id=s.id'
,
'left'
],
[
'a_district d'
,
'a.district_id=d.id'
,
'left'
],
...
...
@@ -136,6 +136,13 @@ class Agent extends Basic
if
(
$table
->
repetition
(
'phone'
,
$data
[
'phone'
])
&&
empty
(
$id
))
{
return
$this
->
response
(
100
,
'存在重复值'
);
}
if
(
empty
(
$this
->
params
[
'store_id'
]))
{
return
$this
->
response
(
100
,
'门店id为空!'
);
}
$store
=
new
AStore
();
$data
[
'district_id'
]
=
$store
->
getStoreKeyById
(
'district_id'
,
[
'id'
=>
$this
->
params
[
'store_id'
]]);
$data
[
'password'
]
=
md5
(
substr
(
$data
[
'phone'
],
-
6
));
if
(
$table
->
editData
(
$data
,
$id
))
{
return
$this
->
response
(
200
,
'成功'
);
...
...
application/index/controller/District.php
View file @
aa21c533
...
...
@@ -131,4 +131,27 @@ class District extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getList
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$agents
=
new
ADistrict
();
$where
=
[];
$field
=
'id,district_name'
;
$where
[
'status'
]
=
0
;
$data
[
'data'
]
=
$agents
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/index/controller/Member.php
View file @
aa21c533
...
...
@@ -171,9 +171,8 @@ class Member extends Basic{
$type
=
3
;
}
if
(
!
empty
(
$params
[
'district_name'
]))
{
$district
=
new
ADistrict
();
$where
[
'b.district_id'
]
=
$district
->
getDistrictKeyById
(
'id'
,
[
'district_name'
=>
$params
[
'district_name'
]]);
if
(
!
empty
(
$params
[
'district_id'
])
&&
$params
[
'district_id'
]
!=
-
1
)
{
$where
[
'b.district_id'
]
=
$params
[
'district_id'
];
$type
=
3
;
}
...
...
application/index/extend/Basic.php
View file @
aa21c533
...
...
@@ -45,7 +45,8 @@ class Basic extends Controller
'index/bannerList'
,
'index/getLabelsList'
,
'index/regions'
,
'index/getAuth2'
'index/getAuth2'
,
'index/getDistrict'
);
/**
...
...
application/index/view/agent/agent.html
View file @
aa21c533
...
...
@@ -7,8 +7,8 @@
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
经纪人
列表
</a></li>
<li
class=
"active"
>
新增
</li>
<li><a
href=
"#"
>
经纪人
管理
</a></li>
<li
class=
"active"
>
经纪人列表
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
...
...
@@ -85,10 +85,6 @@
<label
class=
"col-sm-3 control-label"
>
门店ID:
</label>
<input
type=
"number"
class=
"form-control btn6"
name=
"store_id"
value=
""
placeholder=
"填写门店ID"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
区域ID:
</label>
<input
type=
"number"
class=
"form-control btn6"
id=
"district_id"
name=
"district_id"
value=
""
placeholder=
"填写区域ID"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
手机号:
</label>
<input
type=
"number"
class=
"form-control btn6"
name=
"phone"
value=
""
placeholder=
"填写手机号"
>
...
...
application/index/view/member/users_list.html
View file @
aa21c533
...
...
@@ -82,8 +82,8 @@
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
客
户列表
</a></li>
<li
class=
"active"
>
添加客户
</li>
<li><a
href=
"#"
>
客
源管理
</a></li>
<li
class=
"active"
>
客户列表
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
...
...
@@ -149,8 +149,11 @@
<option
value=
"2"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"guest_department"
placeholder=
"客方所属部门"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"guest_stores"
placeholder=
"客方所属门店"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id"
placeholder=
""
>
</select>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"guest_stores"
placeholder=
"客方所属门店"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 margin-top-ld"
name=
"public_status"
>
<option
value=
"2"
>
客户状态
</option>
...
...
application/route.php
View file @
aa21c533
...
...
@@ -169,7 +169,7 @@ Route::group('index', [
'labelEdit'
=>
[
'index/label/index'
,[
'method'
=>
'get|post'
]],
//编辑标签
'getLabelsList'
=>
[
'index/label/getLabelsList'
,[
'method'
=>
'get'
]],
//标签列表
'lable'
=>
[
'index/label/index'
,[
'method'
=>
'get'
]],
//标签列表
'getDistrict'
=>
[
'index/District/getList'
,
[
'method'
=>
'get'
]
],
//获取部门列表
//数据统计
'RemarkFollowList'
=>
[
'index/remark/followUpList'
,[
'method'
=>
'get'
]],
//跟进列表
'phone_list'
=>
[
'index/Phone/index'
,[
'method'
=>
'get'
]],
//隐私号码列表
...
...
public/resource/js/agent.js
View file @
aa21c533
...
...
@@ -147,7 +147,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"input[name = district_id]"
).
val
(
data
.
data
.
district_id
);
$
(
"#admin_off"
).
val
(
data
.
data
.
admin_off
);
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#status"
).
val
(
data
.
data
.
status
);
...
...
public/resource/js/user.js
View file @
aa21c533
...
...
@@ -10,6 +10,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
(
"body"
).
append
(
template
);
user
.
getList
();
user
.
event
();
user
.
getDistrict
();
//时间控件初始化
/* $('#datetimepicker').datetimepicker({
format: 'yyyy-MM-dd',
...
...
@@ -365,10 +366,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
params
.
rent_user
=
$
(
"select[name=public_status]"
).
val
();
params
.
public_user
=
$
(
"select[name=male_status]"
).
val
();
params
.
store_name
=
$
(
"#guest_stores"
).
val
();
params
.
district_
name
=
$
(
"#guest_department
"
).
val
()
params
.
district_
id
=
$
(
"#district_id
"
).
val
()
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
console
.
log
(
$
(
"#guest_stores"
).
val
());
$
.
ajax
({
url
:
'/index/users_list'
,
// /index/users_list
...
...
@@ -385,14 +386,6 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
/* $ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
every: user.pageSize,
onClick: function (el) {
user.getList (el.num.current);
}
});*/
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
console
.
log
(
data
.
data
.
total
);
console
.
log
(
user
.
pageSize
);
+
...
...
@@ -476,6 +469,24 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
}
}
});
},
getDistrict
:
function
()
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
50
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
'<option value="-1">客方所属部门</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
"#district_id"
).
html
(
str
);
}
}
});
}
};
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