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
8cdf7311
Commit
8cdf7311
authored
Jun 13, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化所属部门所属门店
parent
79946d5a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
215 additions
and
86 deletions
+215
-86
agent.html
application/index/view/agent/agent.html
+10
-2
users_list.html
application/index/view/member/users_list.html
+21
-12
index.html
application/index/view/store/index.html
+1
-2
agent.js
public/resource/js/agent.js
+94
-7
storeList.js
public/resource/js/storeList.js
+50
-33
user.js
public/resource/js/user.js
+39
-30
No files found.
application/index/view/agent/agent.html
View file @
8cdf7311
...
...
@@ -96,8 +96,16 @@
<input
type=
"text"
class=
"form-control btn6"
name=
"password"
id=
"password"
value=
"44444"
placeholder=
"填写密码"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
绑定门店ID:
</label>
<input
type=
"number"
class=
"form-control btn6"
name=
"store_id"
value=
""
placeholder=
"填写门店ID"
>
<label
class=
"col-sm-3 control-label"
>
所属部门:
</label>
<select
name=
"district_id"
class=
"form-control btn6"
>
<option
value=
""
>
选择所属部门
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
所属门店:
</label>
<select
name=
"store_id"
class=
"form-control btn6"
>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
性别:
</label>
...
...
application/index/view/member/users_list.html
View file @
8cdf7311
...
...
@@ -156,7 +156,7 @@
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
name=
"phone"
placeholder=
"客户姓名或手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
name=
"invite_phone"
placeholder=
"邀请人(C端用户)手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
name=
"invite_agent_phone"
placeholder=
"邀请人(经纪人)手机号"
type=
"text"
value=
""
>
<!--业态选择-->
<select
class=
"form-control btn2 margin-top-ld"
name=
"industry_type"
>
...
...
@@ -199,30 +199,39 @@
<option
value=
"2"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id"
placeholder=
""
title=
"
<select
class=
"form-control btn2 margin-top-ld"
name=
"public_status"
>
<option
value=
"2"
>
客户状态
</option>
<option
value=
"0"
>
求租
</option>
<option
value=
"1"
>
已租
</option>
<option
value=
"-1"
>
无效
</option>
</select>
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id"
title=
"
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项"
>
<option
value=
""
>
客方所属部门
</option>
</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=
""
title=
"
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项"
>
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"guest_stores"
title=
"
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项"
value=
""
>
</select>
<!--邀请人-->
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id2"
placeholder=
""
title=
"
<select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"district_id2"
title=
"
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项"
>
<option
value=
""
>
邀请人所属部门
</option>
</select>
<
input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"guest_stores2"
placeholder=
"邀请人所属门店"
type=
"text"
value=
"
"
title=
"
<
select
class=
"form-control btn2 margin-top-ld input"
name=
""
id=
"guest_stores2
"
title=
"
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项"
>
</select>
<input
class=
"form-control btn2 margin-top-ld input"
data-rule-phoneus=
"false"
data-rule-required=
"false"
name=
"invite_agent_phone"
placeholder=
"邀请人(经纪人)手机号"
type=
"text"
value=
""
>
<!--<div class="clear"></div>-->
<!--<span class='left bottom'>(注:客方所属部门,客方所属门店与邀请人所属部门,邀请人所属门店不作为并列筛选项)</span>-->
<select
class=
"form-control btn2 margin-top-ld"
name=
"public_status"
>
<option
value=
"2"
>
客户状态
</option>
<option
value=
"0"
>
求租
</option>
<option
value=
"1"
>
已租
</option>
<option
value=
"-1"
>
无效
</option>
</select>
<div
class=
"clear"
></div>
...
...
application/index/view/store/index.html
View file @
8cdf7311
...
...
@@ -194,8 +194,7 @@
<select
name=
"qx-store"
class=
"form-control btn2"
id=
"qx-store"
>
<option
value=
""
selected=
"selected"
>
选择部门
</option>
</select>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mend_name"
placeholder=
"门店名称"
type=
"text"
value=
""
>
<select
name=
"mend_name"
class=
"form-control btn2"
id=
"mend_name"
></select>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"name"
placeholder=
"店长姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"phone"
placeholder=
"店长手机号"
type=
"text"
value=
""
>
<span
class=
"btn btn-default btn3"
id=
"search"
>
搜索
</span>
...
...
public/resource/js/agent.js
View file @
8cdf7311
...
...
@@ -10,7 +10,25 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
agent
.
event
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
agent
.
getDistrict
(
function
(){
_doc
.
on
(
'input'
,
'[name=district_id]'
,
function
(){
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
var
_objTemp
=
_this
.
parent
().
next
().
find
(
'select'
);
_objTemp
.
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
){
agent
.
getDistrictStoreList
(
_id
,
function
(
_data
){
var
_str
=
''
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_objTemp
.
html
(
_str
);
});
}
else
{
};
});
})
$
(
'#search'
).
click
(
function
(
pageNo
)
{
agent
.
getList
(
1
);
});
...
...
@@ -23,6 +41,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$
(
"#title"
).
html
(
"新增经纪人"
);
$
(
"#password"
).
parent
().
addClass
(
'hide'
);
//新增不显示密码
$
(
".form-horizontal"
)[
0
].
reset
();
//重置表单
agent
.
emptyInput
();
//清空表单
});
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
...
...
@@ -31,6 +50,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"#password"
).
parent
().
removeClass
(
'hide'
);
//编辑显示密码
$
(
"#password"
).
attr
(
'type'
,
'text'
);
agent
.
emptyInput
();
//清空表单
agent
.
Edit
();
});
...
...
@@ -112,16 +132,26 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
){
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"#admin_off"
).
val
(
data
.
data
.
admin_off
);
$
(
"[name = district_id]"
).
val
(
data
.
data
.
district_id
);
if
(
data
.
data
.
district_id
){
agent
.
getDistrictStoreList
(
data
.
data
.
district_id
,
function
(
_data
){
var
_str
=
''
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
$
(
"[name = store_id]"
).
html
(
_str
).
val
(
data
.
data
.
store_id
);
});
}
else
{
}
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#password"
).
val
(
data
.
data
.
password
);
$
(
"input[name='password']"
).
attr
(
'form-group'
);
// store.getDistrict(data.data.district_name);
if
(
data
.
data
.
sex
==
'0'
)
{
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
)
{
...
...
@@ -129,6 +159,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
else
{
$
(
"#sex2"
).
attr
(
'checked'
,
true
);
}
}
}
else
{
alert
(
'获取经纪人数据失败'
);
}
...
...
@@ -142,7 +174,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
params
.
district_id
=
$
(
"[name = district_id]"
).
val
();
params
.
store_id
=
$
(
"[name = store_id]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
...
...
@@ -156,8 +189,15 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'
绑定门店ID
必填'
);
alert
(
'
所属门店
必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
...
...
@@ -184,6 +224,17 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
});
},
emptyInput
:
function
(){
console
.
count
(
'emptyInput'
);
$
(
"input[name = name]"
).
val
(
''
);
$
(
"input[name = phone]"
).
val
(
''
);
$
(
"#password"
).
val
(
''
);
$
(
"[name = district_id]"
).
val
(
''
);
$
(
"[name = store_id]"
).
html
(
''
);
$
(
"input[name =sex]"
).
val
(
'0'
);
$
(
"#admin_off"
).
val
(
'0'
);
$
(
"#remarks"
).
val
(
''
);
},
getList
:
function
(
pageNo
)
{
agent
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
@@ -229,6 +280,42 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
});
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'[name=district_id]'
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
){
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
}
};
return
agent
;
...
...
public/resource/js/storeList.js
View file @
8cdf7311
...
...
@@ -21,10 +21,10 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"body"
).
append
(
template
);
store
.
getList
();
store
.
event
();
store
.
getRegionsDisc
();
store
.
getDistrict
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
"#search"
).
click
(
function
()
{
store
.
getList
(
1
);
});
...
...
@@ -33,6 +33,26 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
document
.
getElementById
(
"form_search"
).
reset
();
});
store
.
getDistrict
({
'type'
:
1
},
function
(){
_doc
.
on
(
'input'
,
'#qx-store'
,
function
(){
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
){
store
.
getDistrictStoreList
(
_id
,
function
(
_data
){
var
_str
=
''
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
store_name
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_this
.
next
().
html
(
_str
);
});
}
else
{
};
});
});
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
store
.
id
=
$
(
this
).
attr
(
"data-id"
);
...
...
@@ -67,7 +87,6 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
document
).
delegate
(
".add"
,
"click"
,
function
()
{
//list2消失
document
.
getElementById
(
'form_id'
).
reset
();
store
.
getDistrict
();
});
/************************************************百度地址定位相关*************************************************************/
...
...
@@ -185,29 +204,6 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
/************************************************百度地址定位相关****结束*************************************************************/
},
getRegionsDisc
:
function
(
name
)
{
var
params
=
{};
params
.
parent_code
=
310100
;
$
.
ajax
({
url
:
'/index/regions'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
_html
+=
'<option value="'
+
n
.
fullName
+
'">'
+
n
.
fullName
+
'</option>'
;
});
$
(
"#area"
).
append
(
_html
);
}
else
{
alert
(
'请求省市区错误'
);
}
}
});
},
Edit
:
function
(){
//获取编辑的数据
$
.
ajax
({
'type'
:
'GET'
,
...
...
@@ -229,7 +225,10 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"#latitude"
).
val
(
data
.
data
.
latitude
)
//经纬度
store
.
agents_id
=
data
.
data
.
agents_id
;
//经纪人id
store
.
district_id
=
data
.
data
.
district_id
;
//部门id
store
.
getDistrict
(
data
.
data
.
district_name
);
store
.
getDistrict
({
'type'
:
2
,
'name'
:
data
.
data
.
district_name
});
}
else
{
alert
(
'获取失败!'
);
...
...
@@ -350,7 +349,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
}
});
},
getDistrict
:
function
(
name
)
{
getDistrict
:
function
(
obj
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictListByName'
,
type
:
'GET'
,
...
...
@@ -359,24 +358,42 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
_html
=
'
<option value="" selected="selected">请选择</option>
'
;
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
if
(
n
.
district_name
==
name
&&
(
typeof
name
!=
undefined
)
)
{
if
(
obj
.
type
==
'2'
&&
n
.
district_name
==
obj
.
name
)
{
_html
+=
'<option selected="selected" value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
else
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
});
if
(
obj
.
type
==
'2'
){
$
(
"#ss-store"
).
html
(
_html
);
}
else
if
(
obj
.
type
==
'1'
){
$
(
"#qx-store"
).
append
(
_html
);
// $("#qx-store").html(_html);
}
else
{}
fn
&&
fn
();
}
else
{
alert
(
'获取部门信息失败'
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
){
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
}
};
return
store
;
...
...
public/resource/js/user.js
View file @
8cdf7311
...
...
@@ -11,8 +11,6 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
(
"body"
).
append
(
template
);
user
.
getList
();
user
.
event
();
user
.
getDistrict
();
user
.
getDistricttwo
();
//时间控件初始化
/* $('#datetimepicker').datetimepicker({
format: 'yyyy-MM-dd',
...
...
@@ -24,6 +22,23 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
},
event
:
function
()
{
var
_doc
=
$
(
document
);
user
.
getDistrict
(
function
(){
_doc
.
on
(
'input'
,
'#district_id, #district_id2'
,
function
(){
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
){
user
.
getDistrictStoreList
(
_id
,
function
(
_data
){
var
_str
=
''
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
store_name
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_this
.
next
().
html
(
_str
);
});
}
else
{
};
});
});
$
(
".Bannertu"
).
click
(
function
()
{
BrowseServer
(
'cover_image'
);
});
...
...
@@ -174,6 +189,7 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
});
// ===================
},
addphone
:
function
(
obj
){
var
user_ht
=
$
(
obj
).
html
();
...
...
@@ -377,15 +393,14 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
var
params
=
{};
console
.
log
(
$
(
"#start_date"
).
val
());
if
(
$
(
"#district_id"
).
val
()
!=
0
||
$
(
"#guest_stores"
).
val
()
!=
''
){
$
(
"#district_id2"
).
val
(
'0'
);
$
(
"#guest_stores2"
).
val
(
''
);
};
if
(
$
(
"#district_id2"
).
val
()
!=
0
||
$
(
"#guest_stores2"
).
val
()
!=
''
){
$
(
"#district_id1"
).
val
(
'0'
);
$
(
"#guest_stores1"
).
val
(
''
);
};
// if($("#district_id").val()!=0||$("#guest_stores").val()!=''){
// $("#district_id2").val('0');
// $("#guest_stores2").val('');
// };
// if($("#district_id2").val()!=0||$("#guest_stores2").val()!=''){
// $("#district_id1").val('0');
// $("#guest_stores1").val('');
// };
// 输入 name
// params.name = $("input[name='user']").val();
params
.
phone
=
$
(
"input[name='phone']"
).
val
();
...
...
@@ -430,11 +445,6 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
console
.
log
(
data
.
data
.
total
);
console
.
log
(
user
.
pageSize
);
console
.
log
(
pageNo
);
}
});
},
...
...
@@ -520,40 +530,39 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
}
});
},
getDistrict
:
function
()
{
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
5
0
},
data
:
{
"pageSize"
:
100
0
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
'
<option value="0">客方所属部门</option>
'
;
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
"#district_id"
).
html
(
str
);
$
(
"#district_id"
).
append
(
str
);
$
(
"#district_id2"
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
getDistricttwo
:
function
()
{
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
url
:
'/index/getDistrict
StoreList
'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
50
},
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
'<option value="0">邀请人所属部门</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
"#district_id2"
).
html
(
str
);
fn
&&
fn
(
data
.
data
);
}
}
});
...
...
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