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
1b861860
Commit
1b861860
authored
Sep 06, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 城市筛选
parent
98a114fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
196 additions
and
76 deletions
+196
-76
RemarkFollowIndex.js
public/resource/js/RemarkFollowIndex.js
+49
-20
houseFollowUp.js
public/resource/js/houseFollowUp.js
+49
-19
houseList.js
public/resource/js/houseList.js
+49
-18
user.js
public/resource/js/user.js
+49
-19
No files found.
public/resource/js/RemarkFollowIndex.js
View file @
1b861860
...
...
@@ -54,27 +54,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
var
day_end
=
y
+
'-'
+
(
m
<
10
?
(
'0'
+
m
)
:
m
)
+
'-'
+
(
d
<
10
?
(
'0'
+
d
)
:
d
);
$
(
'#start_date'
).
val
(
day_end
);
$
(
'#end_date'
).
val
(
day_end
);
//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
if
(
$
(
"#user_city_choose"
).
val
()
==
310100
){
var
city_id
=
310100
;
}
if
(
$
(
"#user_city_choose"
).
val
()
==
330100
){
var
city_id
=
330100
;
}
//区域 渲染
if
(
city_id
)
{
user
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#user_area_choose"
).
html
(
_str
);
});
}
else
{
};
user
.
initializationCityFunction
();
user
.
getList
();
user
.
event
();
//时间控件初始化
...
...
@@ -154,6 +135,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_doc
.
on
(
'input'
,
'#user_city_add,#user_city_edit'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
user
.
setUpCityFunction
(
_id
);
_this
.
next
().
html
(
''
);
//先清空
//新增 编辑
if
(
_id
&&
_id
!=
'0'
)
{
...
...
@@ -1634,6 +1616,53 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
}
});
},
//初始化 城市
initializationCityFunction
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/getCurrentCity'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
data
.
city
==
'上海市'
){
$
(
"#user_city_choose"
).
val
(
'310100'
);
};
if
(
data
.
data
.
city
==
'杭州市'
){
$
(
"#user_city_choose"
).
val
(
'330100'
);
};
var
city_id
=
$
(
"#user_city_choose"
).
val
();
if
(
city_id
)
{
user
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#user_area_choose"
).
html
(
_str
);
});
}
else
{};
}
});
},
//设置 城市
setUpCityFunction
:
function
(
city
)
{
if
(
city
==
310100
){
city
=
'上海市'
;
};
if
(
city
==
330100
){
city
=
'杭州市'
;
};
$
.
ajax
({
url
:
'/index/settingCity'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'city'
:
city
},
dataType
:
'json'
,
success
:
function
(
data
)
{
}
});
},
getInfor
:
function
(
params
)
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
...
...
public/resource/js/houseFollowUp.js
View file @
1b861860
...
...
@@ -67,27 +67,9 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
$
(
'#create_time_start'
).
val
(
day_start
);
$
(
'#create_time_end'
).
val
(
day_end
);
//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
if
(
$
(
"#user_city_choose"
).
val
()
==
310100
){
var
city_id
=
310100
;
}
if
(
$
(
"#user_city_choose"
).
val
()
==
330100
){
var
city_id
=
330100
;
}
//区域 渲染
if
(
city_id
)
{
house
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#shop_area_id"
).
html
(
_str
);
});
}
else
{
};
house
.
initializationCityFunction
();
house
.
getList
(
0
);
//商铺跟进列表
// 部门 门店 二级联动
house
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'#district_id, #district_id2'
,
function
()
{
...
...
@@ -153,6 +135,7 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
house
.
getList
();
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
house
.
setUpCityFunction
(
_id
);
_this
.
next
().
html
(
''
);
//先清空
//新增 编辑
var
_objTemp
=
_this
.
parent
().
next
().
find
(
'select'
);
...
...
@@ -379,6 +362,53 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
}
});
},
//初始化 城市
initializationCityFunction
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/getCurrentCity'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
data
.
city
==
'上海市'
){
$
(
"#user_city_choose"
).
val
(
'310100'
);
};
if
(
data
.
data
.
city
==
'杭州市'
){
$
(
"#user_city_choose"
).
val
(
'330100'
);
};
var
city_id
=
$
(
"#user_city_choose"
).
val
();
if
(
city_id
)
{
house
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#shop_area_id"
).
html
(
_str
);
});
}
else
{};
}
});
},
//设置 城市
setUpCityFunction
:
function
(
city
)
{
if
(
city
==
310100
){
city
=
'上海市'
;
};
if
(
city
==
330100
){
city
=
'杭州市'
;
};
$
.
ajax
({
url
:
'/index/settingCity'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'city'
:
city
},
dataType
:
'json'
,
success
:
function
(
data
)
{
}
});
},
//城市 区域 筛选
getCityAreaList
:
function
(
id
,
fn
)
{
$
.
ajax
({
...
...
public/resource/js/houseList.js
View file @
1b861860
...
...
@@ -79,24 +79,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
// $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间
//初始化城市 区域筛选
if
(
$
(
"#user_city_choose"
).
val
()
==
310100
){
var
city_id
=
310100
;
}
if
(
$
(
"#user_city_choose"
).
val
()
==
330100
){
var
city_id
=
330100
;
}
//区域 渲染
if
(
city_id
)
{
business
.
getDistrictStoreList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#shop_area_id"
).
html
(
_str
);
});
}
else
{
};
business
.
initializationCityFunction
();
business
.
getList
(
1
);
business
.
event
();
business
.
resetLoad
();
...
...
@@ -273,6 +256,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business
.
getList
();
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
business
.
setUpCityFunction
(
_id
);
$
(
'#user_area_choose'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
business
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
...
...
@@ -1179,6 +1163,53 @@ if(data.code == 200) {
}
});
},
//初始化 城市
initializationCityFunction
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/getCurrentCity'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
data
.
city
==
'上海市'
){
$
(
"#user_city_choose"
).
val
(
'310100'
);
};
if
(
data
.
data
.
city
==
'杭州市'
){
$
(
"#user_city_choose"
).
val
(
'330100'
);
};
var
city_id
=
$
(
"#user_city_choose"
).
val
();
if
(
city_id
)
{
business
.
getDistrictStoreList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#shop_area_id"
).
html
(
_str
);
});
}
else
{};
}
});
},
//设置 城市
setUpCityFunction
:
function
(
city
)
{
if
(
city
==
310100
){
city
=
'上海市'
;
};
if
(
city
==
330100
){
city
=
'杭州市'
;
};
$
.
ajax
({
url
:
'/index/settingCity'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'city'
:
city
},
dataType
:
'json'
,
success
:
function
(
data
)
{
}
});
},
delBusiness
:
function
()
{
$
.
ajax
({
url
:
'/index/houseDel'
,
...
...
public/resource/js/user.js
View file @
1b861860
...
...
@@ -49,24 +49,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
//初始化dot
$
(
"body"
).
append
(
template
);
//初始化城市 区域筛选
if
(
$
(
"#user_city_choose"
).
val
()
==
310100
){
var
city_id
=
310100
;
}
if
(
$
(
"#user_city_choose"
).
val
()
==
330100
){
var
city_id
=
330100
;
}
//区域 渲染
if
(
city_id
)
{
user
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#user_area_choose"
).
html
(
_str
);
});
}
else
{
};
user
.
initializationCityFunction
();
//初始化时间
function
getPreMonth
(
date
)
{
var
arr
=
date
.
split
(
'-'
);
...
...
@@ -231,6 +214,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user
.
getList
();
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
user
.
setUpCityFunction
(
_id
);
$
(
'#user_area_choose'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
user
.
getCityAreaList
(
_id
,
function
(
_data
)
{
...
...
@@ -1864,7 +1848,53 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
});
},
//初始化 城市
initializationCityFunction
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/getCurrentCity'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
data
.
city
==
'上海市'
){
$
(
"#user_city_choose"
).
val
(
'310100'
);
};
if
(
data
.
data
.
city
==
'杭州市'
){
$
(
"#user_city_choose"
).
val
(
'330100'
);
};
var
city_id
=
$
(
"#user_city_choose"
).
val
();
if
(
city_id
)
{
user
.
getCityAreaList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
fullName
+
'">'
+
item
.
fullName
+
'</option>'
;
});
$
(
"#user_area_choose"
).
html
(
_str
);
});
}
else
{};
}
});
},
//设置 城市
setUpCityFunction
:
function
(
city
)
{
if
(
city
==
310100
){
city
=
'上海市'
;
};
if
(
city
==
330100
){
city
=
'杭州市'
;
};
$
.
ajax
({
url
:
'/index/settingCity'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'city'
:
city
},
dataType
:
'json'
,
success
:
function
(
data
)
{
}
});
},
getInfor
:
function
(
params
)
{
//上一页 下一页 调用接口
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
params
=
{};
...
...
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