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
218e7da4
Commit
218e7da4
authored
Jun 04, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑楼盘字典
parent
f6538615
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
31 deletions
+131
-31
buildingDictionary.html
...ication/index/view/officeBuilding/buildingDictionary.html
+4
-2
buildingDictionary.js
public/resource/js/buildingDictionary.js
+127
-29
No files found.
application/index/view/officeBuilding/buildingDictionary.html
View file @
218e7da4
...
@@ -436,9 +436,11 @@
...
@@ -436,9 +436,11 @@
<div
class=
"detail-modal-bargaininfo-commission-addarea"
>
<div
class=
"detail-modal-bargaininfo-commission-addarea"
>
<div
class=
"detail-modal-bargaininfo-commission-sec form-group"
>
<div
class=
"detail-modal-bargaininfo-commission-sec form-group"
>
<label
class=
"control-label"
style=
"float: left;"
>
距离
</label>
<label
class=
"control-label"
style=
"float: left;"
>
距离
</label>
<select
class=
"form-control btn2-city shop_city_choose_site_list_line"
></select>
<select
class=
"form-control btn2-city shop_city_choose_site_list_line"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
</select>
<select
class=
"form-control btn2-city"
id=
"shop_area_id_line"
>
<select
class=
"form-control btn2-city"
id=
"shop_area_id_line"
>
<option
value=
""
selected=
"selected"
>
区域
</option>
<option
value=
""
selected=
"selected"
>
请选择
</option>
</select>
</select>
<input
type=
"number"
class=
"form-control btn2-city"
name=
"user_phone"
autocomplete=
"off"
id=
"set_father_id2"
placeholder=
"请输入"
>
<input
type=
"number"
class=
"form-control btn2-city"
name=
"user_phone"
autocomplete=
"off"
id=
"set_father_id2"
placeholder=
"请输入"
>
<label
class=
"control-label"
>
米
</label>
<label
class=
"control-label"
>
米
</label>
...
...
public/resource/js/buildingDictionary.js
View file @
218e7da4
...
@@ -25,7 +25,13 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -25,7 +25,13 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
agent_name
:
''
,
agent_name
:
''
,
/*每页显示多少条*/
/*每页显示多少条*/
id
:
''
,
id
:
''
,
isAdd
:
1
,
isAdd
:
1
,
//是否新增
city
:
''
,
//城市
province
:
''
,
//省份
addStr
:
''
,
//地铁
addStredit
:
''
,
//编辑获取地铁
buildingStations
:
''
,
delArr
:[],
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
...
@@ -75,7 +81,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -75,7 +81,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
alert
(
'最多添加5条'
);
alert
(
'最多添加5条'
);
return
false
;
return
false
;
}
else
{
}
else
{
_iYJAAObj
.
append
(
'<div class="form-group detail-modal-bargaininfo-commission-sec"><label class="control-label" style="float: left;">距离</label><select class="form-control btn2-city shop_city_choose_site_list_line">
</select><select class="form-control btn2-city" id="shop_area_id_line"><option value="" selected="selected">区域</option></select><input type="number" class="form-control btn2-city" name="user_phone" autocomplete="off" id="set_father_id2
" placeholder="请输入"><label class="control-label">米</label><span href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></span></div>'
);
_iYJAAObj
.
append
(
'<div class="form-group detail-modal-bargaininfo-commission-sec"><label class="control-label" style="float: left;">距离</label><select class="form-control btn2-city shop_city_choose_site_list_line">
'
+
business
.
addStr
+
'</select><select class="form-control btn2-city shop_area_id_line"><option value="" selected="selected">区域</option></select><input type="number" class="form-control btn2-city" name="user_phone" autocomplete="off" class="
" placeholder="请输入"><label class="control-label">米</label><span href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></span></div>'
);
};
};
});
});
//详情弹出框,成交信息里的实收佣金相关的事件,点击x删除这条
//详情弹出框,成交信息里的实收佣金相关的事件,点击x删除这条
...
@@ -83,6 +89,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -83,6 +89,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
this
).
parent
().
remove
();
$
(
this
).
parent
().
remove
();
business
.
delArr
.
push
(
$
(
this
).
parent
().
attr
(
"data-id"
));
});
});
$
(
"#search"
).
click
(
function
()
{
$
(
"#search"
).
click
(
function
()
{
...
@@ -105,7 +112,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -105,7 +112,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
$
(
'.isshowLou'
).
show
();
$
(
'.isshowLou'
).
show
();
business
.
id
=
$
(
this
).
attr
(
'data-id'
);
business
.
id
=
$
(
this
).
attr
(
'data-id'
);
business
.
getEditDetail
();
business
.
getEditDetail
();
business
.
delArr
=
[];
//删除id
});
});
//城市 区域 二级联动 筛选
//城市 区域 二级联动 筛选
...
@@ -222,6 +229,8 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -222,6 +229,8 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
_provinceInternalObj
.
val
(
data
[
'province'
]);
_provinceInternalObj
.
val
(
data
[
'province'
]);
_cityInternalObj
.
val
(
data
[
'city'
]);
_cityInternalObj
.
val
(
data
[
'city'
]);
_discInternalObj
.
val
(
data
[
'district'
]);
_discInternalObj
.
val
(
data
[
'district'
]);
business
.
province
=
data
[
'province'
];
business
.
city
=
data
[
'city'
];
var
_htmlOri
=
_this
.
find
(
'p:nth-of-type(2)'
).
html
(),
var
_htmlOri
=
_this
.
find
(
'p:nth-of-type(2)'
).
html
(),
_htmlDeal
=
''
,
_htmlDeal
=
''
,
_index1
=
_htmlOri
.
indexOf
(
'市'
),
_index1
=
_htmlOri
.
indexOf
(
'市'
),
...
@@ -235,7 +244,30 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -235,7 +244,30 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
_longitudeObj
.
val
(
_lng
);
_longitudeObj
.
val
(
_lng
);
_latitudeObj
.
val
(
_lat
);
_latitudeObj
.
val
(
_lat
);
searchRepeatShop
();
//调用搜索有无重盘的接口
searchRepeatShop
();
//调用搜索有无重盘的接口
// $('#position_box').hide();
//$('#position_box').hide();
//获取 地铁(新增)
$
.
ajax
({
url
:
'/office_index/getList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
business
.
city
,
'province'
:
business
.
province
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
_str
=
'<option value="">请选择</option>'
;
for
(
var
i
in
data
.
data
){
_str
+=
"<option value='"
+
i
+
"' data-id=' "
+
JSON
.
stringify
(
data
.
data
[
i
])
+
"'>"
+
i
+
'</option>'
;
};
$
(
'.shop_city_choose_site_list_line'
).
html
(
_str
);
business
.
addStr
=
_str
;
}
}
});
}
else
{
}
else
{
alert
(
'请重新选择地址'
);
alert
(
'请重新选择地址'
);
return
false
;
return
false
;
...
@@ -420,20 +452,19 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -420,20 +452,19 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
});
});
}
else
{};
}
else
{};
});
});
//地铁
区域
//地铁
获取地铁站
_doc
.
on
(
'input'
,
'.shop_city_choose_site_list_line'
,
function
()
{
_doc
.
on
(
'input'
,
'.shop_city_choose_site_list_line'
,
function
()
{
var
_this
=
$
(
this
);
// var arr_ = JSON.parse($(this).val());
var
_id
=
_this
.
val
();
var
arr_
=
JSON
.
parse
(
$
(
"option:selected"
,
this
).
attr
(
"data-id"
));
$
(
'#shop_area_id_line'
).
html
(
''
);
//先清空
// console.log($("option:selected",this).attr("data-id"));
if
(
_id
&&
_id
!=
'0'
)
{
var
_str
=
'<option value="">请选择</option>'
;
business
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
$
.
each
(
arr_
,
function
(
i
,
item
)
{
var
_str
=
'<option value="">区域</option>'
;
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
name
+
'</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
});
_str
+=
'<option value="'
+
item
.
name
+
'">'
+
item
.
name
+
'</option>'
;
$
(
this
).
next
().
html
(
_str
);
});
if
(
business
.
isAdd
==
0
){
$
(
'#shop_area_id_line'
).
html
(
_str
);
$
(
$
(
this
).
find
(
'option'
).
eq
(
0
)).
remove
();
//删除第一个option
});
}
}
else
{};
});
});
//点击 区域 获取 商圈(新增)
//点击 区域 获取 商圈(新增)
_doc
.
on
(
'input'
,
'#shop_area_id_add'
,
function
()
{
_doc
.
on
(
'input'
,
'#shop_area_id_add'
,
function
()
{
...
@@ -523,9 +554,18 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -523,9 +554,18 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
// var imgOffice = imgname.join(',');
// var imgOffice = imgname.join(',');
// var imgOffice = imgname;
// var imgOffice = imgname;
}
else
{
}
else
{
alert
(
"请选择图片"
);
//
alert("请选择图片");
};
};
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
//交通信息
var
detailArr
=
[];
$
.
each
(
$
(
'.detail-modal-bargaininfo-commission-sec'
),
function
(
i
,
v
)
{
detailArr
[
i
]
=
{
'stations_id'
:
$
.
trim
(
$
(
v
).
find
(
'select'
).
eq
(
1
).
val
()),
'distance'
:
$
.
trim
(
$
(
v
).
find
(
'input'
).
eq
(
0
).
val
())
};
});
var
_data
=
{
var
_data
=
{
'title'
:
$
(
'#loupan_title'
).
val
(),
'title'
:
$
(
'#loupan_title'
).
val
(),
...
@@ -540,9 +580,12 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -540,9 +580,12 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
'longitude'
:
_longitudeObj
.
val
(),
'longitude'
:
_longitudeObj
.
val
(),
'latitude'
:
_latitudeObj
.
val
(),
'latitude'
:
_latitudeObj
.
val
(),
'business_district_id'
:
$
(
'#business_rong'
).
val
(),
'business_district_id'
:
$
(
'#business_rong'
).
val
(),
'add_building_stations'
:
JSON
.
stringify
(
detailArr
),
};
};
if
(
business
.
isAdd
==
0
){
if
(
business
.
isAdd
==
0
){
_data
.
id
=
business
.
id
;
//编辑 传id
_data
.
id
=
business
.
id
;
//编辑 传id
_data
.
del_building_stations
=
business
.
delArr
.
toString
();
//删除 传id
business
.
url
=
'/office_index/houseDictionaryEdit'
;
business
.
url
=
'/office_index/houseDictionaryEdit'
;
}
else
{
}
else
{
...
@@ -593,7 +636,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -593,7 +636,7 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
if
(
$
(
'#shop_type'
).
val
()){
if
(
$
(
'#shop_type'
).
val
()){
params
.
type
=
$
(
'#shop_type'
).
val
();
params
.
type
=
$
(
'#shop_type'
).
val
();
}
}
if
(
$
(
'
#
shop_city_choose_site_list'
).
val
()){
if
(
$
(
'
.
shop_city_choose_site_list'
).
val
()){
params
.
city
=
$
(
'#shop_city_choose_site_list'
).
val
();
params
.
city
=
$
(
'#shop_city_choose_site_list'
).
val
();
}
}
if
(
$
(
'#shop_area_id'
).
val
()){
if
(
$
(
'#shop_area_id'
).
val
()){
...
@@ -642,14 +685,51 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -642,14 +685,51 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
//渲染已经有的列表
//渲染已经有的列表
for
(
i
=
0
;
i
<
data
.
data
.
building_images
.
length
;
i
++
)
{
if
(
data
.
data
.
building_images
){
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}" data-imgname="{2}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
for
(
i
=
0
;
i
<
data
.
data
.
building_images
.
length
;
i
++
)
{
'0'
:
data
.
data
.
building_images
[
i
].
id
,
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}" data-imgname="{2}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
'1'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
data
.
data
.
building_images
[
i
].
img_name
,
'0'
:
data
.
data
.
building_images
[
i
].
id
,
'2'
:
data
.
data
.
building_images
[
i
].
img_name
,
'1'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
data
.
data
.
building_images
[
i
].
img_name
,
'2'
:
data
.
data
.
building_images
[
i
].
img_name
,
}));
};
}));
};
}
business
.
buildingStations
=
data
.
data
.
building_stations
;
//获取 地铁(编辑)
$
.
ajax
({
url
:
'/office_index/getList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
data
.
data
.
city
,
'province'
:
data
.
data
.
province
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
_str
=
'<option value="">请选择</option>'
;
for
(
var
i
in
data
.
data
){
_str
+=
"<option data-id='"
+
JSON
.
stringify
(
data
.
data
[
i
])
+
"' value='"
+
i
+
"'>"
+
i
+
'</option>'
;
};
//编辑获取交通详情
$
(
'.detail-modal-bargaininfo-commission-addarea'
).
html
(
''
);
business
.
addStr
=
_str
;
$
.
each
(
business
.
buildingStations
,
function
(
i
,
v
)
{
$
(
'.detail-modal-bargaininfo-commission-addarea'
).
append
(
'<div data-id="'
+
v
.
id
+
'" class="form-group detail-modal-bargaininfo-commission-sec"><label class="control-label" style="float: left;">距离</label><select class="form-control btn2-city shop_city_choose_site_list_line">'
+
_str
+
'</select><select class="form-control btn2-city shop_area_id_line"><option value="{3}" selected="selected">{1}</option></select><input type="number" class="form-control btn2-city" name="user_phone" autocomplete="off" class="" placeholder="请输入" value="{2}"><label class="control-label">米</label><span href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></span></div>'
.
stringFormatObj
({
'0'
:
v
.
line_name
,
'1'
:
v
.
name
,
'2'
:
v
.
distance
,
'3'
:
v
.
stations_id
,
}));
var
name_
=
v
.
line_name
?
v
.
line_name
.
substr
(
2
,
3
):
v
.
line_name
;
$
(
".shop_city_choose_site_list_line"
).
eq
(
i
).
val
(
name_
);
});
}
}
});
//取数据
//取数据
$
(
'#loupan_title'
).
val
(
data
.
data
.
title
),
$
(
'#loupan_title'
).
val
(
data
.
data
.
title
),
$
(
'#loupan_type'
).
val
(
data
.
data
.
type
),
$
(
'#loupan_type'
).
val
(
data
.
data
.
type
),
...
@@ -659,8 +739,8 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -659,8 +739,8 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
_cityInternalObj
.
val
(
data
.
data
.
city
),
_cityInternalObj
.
val
(
data
.
data
.
city
),
_discInternalObj
.
val
(
data
.
data
.
disc
),
_discInternalObj
.
val
(
data
.
data
.
disc
),
$
.
trim
(
_addressInternalObj
.
val
(
data
.
data
.
address
)),
$
.
trim
(
_addressInternalObj
.
val
(
data
.
data
.
address
)),
_longitudeObj
.
val
(
data
.
data
.
longitude
),
_longitudeObj
.
val
(
data
.
data
.
longitude
),
_latitudeObj
.
val
(
data
.
data
.
latitude
),
_latitudeObj
.
val
(
data
.
data
.
latitude
),
$
(
'.louceng_num'
).
html
(
data
.
data
.
id
);
$
(
'.louceng_num'
).
html
(
data
.
data
.
id
);
$
(
'#business_rong'
).
html
(
''
);
$
(
'#business_rong'
).
html
(
''
);
$
.
ajax
({
$
.
ajax
({
...
@@ -707,6 +787,24 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
...
@@ -707,6 +787,24 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
}
}
});
});
},
},
//地铁
getDitieList
:
function
()
{
$
.
ajax
({
url
:
'/office_index/getList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
$
(
'#city_internal'
).
val
(),
'province'
:
$
(
'#province_internal'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
//城市 区域 筛选
//城市 区域 筛选
getDistrictStoreList
:
function
(
id
,
fn
)
{
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
$
.
ajax
({
...
...
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