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
faf18a11
Commit
faf18a11
authored
Aug 14, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人列表 选择城市 部门
parent
db3668bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
agent.html
application/index/view/broker/agent.html
+11
-1
agent.js
public/resource/js/agent.js
+30
-2
No files found.
application/index/view/broker/agent.html
View file @
faf18a11
...
...
@@ -142,11 +142,21 @@
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"industry_type"
placeholder=
"角色"
type=
"text"
value=
""
name=
"groupname"
>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="门店"
type="text" value="" name="store_name">-->
<select
class=
"form-control btn2 input ld-Marheight"
name=
""
id=
"district_id2_city"
>
<option
value=
""
>
选择城市
</option>
<option
value=
"上海市"
>
上海市
</option>
<option
value=
"杭州市"
>
杭州市
</option>
<option
value=
"深圳市"
>
深圳市
</option>
<option
value=
"广州市"
>
广州市
</option>
<option
value=
"北京市"
>
北京市
</option>
</select>
<select
class=
"form-control btn2 input ld-Marheight"
name=
""
id=
"district_id2"
>
<option
value=
""
>
部门
</option>
<option
value=
""
>
选择
部门
</option>
</select>
<select
class=
"form-control btn2 input ld-Marheight"
name=
""
id=
"guest_stores"
>
<option
value=
""
>
选择门店
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"id"
placeholder=
"姓名/手机号"
name=
"search"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 ld-Marheight"
name=
"agent_status"
placeholder=
"经纪人状态"
>
...
...
public/resource/js/agent.js
View file @
faf18a11
...
...
@@ -15,6 +15,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
document
).
on
(
"input"
,
"#district_id2_city"
,
function
()
{
//点击城市
//列表选择城市
agent
.
getDistrictList
();
});
agent
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2,[name=district_id_add],[name=district_id_business],[name=district_id_city]'
,
function
()
{
var
_this
=
$
(
this
);
...
...
@@ -26,7 +31,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
_id
&&
_id
!=
'0'
)
{
agent
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="">
全部
</option>'
;
var
_str
=
'<option value="">
选择门店
</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
...
...
@@ -978,7 +983,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'[name=district_id]'
).
append
(
str
);
$
(
'#district_id2'
).
append
(
str
);
$
(
'[name=district_id_add]'
).
append
(
str
);
$
(
'[name=district_id_business]'
).
append
(
str
);
$
(
'[name=district_id_city]'
).
append
(
str
);
...
...
@@ -988,6 +992,30 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
});
},
//获取城市所在部门
getDistrictList
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
,
"city"
:
$
(
'#district_id2_city'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
// var str = '';
var
str
=
'<option value="">选择部门</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'#district_id2'
).
html
(
str
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
...
...
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