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
e3cf01b2
Commit
e3cf01b2
authored
Jan 25, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表
parent
00d1c43c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
48 deletions
+184
-48
houseList.html
application/index/view/houses/houseList.html
+47
-6
home.css
public/resource/css/home.css
+11
-6
houseList.js
public/resource/js/houseList.js
+121
-31
house_template_tpl.html
public/resource/template/house_template_tpl.html
+5
-5
No files found.
application/index/view/houses/houseList.html
View file @
e3cf01b2
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"
form_search_
reset"
>
重置
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
</form>
</form>
</td>
</td>
</tr>
</tr>
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</div>
</div>
<!--设置案场权限人-->
<!--设置案场权限人
,修改盘方
-->
<div
class=
"modal fade"
id=
"modal-anch"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-anch"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
...
@@ -168,20 +168,61 @@
...
@@ -168,20 +168,61 @@
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<form
action=
"/Houseinfos/agent_prv"
method=
"POST"
id=
"submit_agent"
>
<form
id=
"submit_agent"
>
<div
class=
"jian_class"
>
<div
class=
"jian_class"
>
<input
name=
"
phone[]
"
placeholder=
"请输入"
type=
"tel"
value=
""
class=
"phone_jia"
>
<input
name=
"
ues_id
"
placeholder=
"请输入"
type=
"tel"
value=
""
class=
"phone_jia"
>
<!--号码匹配名字-->
<!--号码匹配名字-->
<ul
class=
"phone_list"
></ul>
<ul
class=
"phone_list"
></ul>
</div>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"jia"
>
<img
src=
"/resource/image/jia2@2x.png"
class=
"jia"
>
<input
type=
"hidden"
name=
"
houseinfo
s_id"
class=
"houseinfos_id"
>
<input
type=
"hidden"
name=
"
ue
s_id"
class=
"houseinfos_id"
>
</form>
</form>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"submit_follow"
>
<button
type=
"button"
class=
"btn btn-primary submit_follow"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--操作记录-->
<div
class=
"modal fade"
id=
"modal-record"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
操作记录
</h4>
</div>
<div
class=
"modal-body"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
盘方修改记录
</th>
<th
class=
"text-center"
>
操作人
</th>
<th
class=
"text-center"
>
操作时间
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
""
>
<tr>
<td>
212
</td>
<td>
商场
</td>
<td>
长兴
</td>
</tr>
</table>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_follow"
data-dismiss=
"modal"
>
提交
提交
</button>
</button>
</div>
</div>
...
...
public/resource/css/home.css
View file @
e3cf01b2
...
@@ -111,32 +111,36 @@ body{
...
@@ -111,32 +111,36 @@ body{
width
:
17px
;
width
:
17px
;
height
:
17px
;
height
:
17px
;
margin-left
:
10px
;
margin-left
:
10px
;
margin-top
:
7
px
;
margin-top
:
15
px
;
}
}
.jian
{
.jian
{
width
:
12px
;
width
:
12px
;
height
:
16px
;
height
:
16px
;
margin-left
:
-16px
;
margin-left
:
-16px
;
float
:
left
;
float
:
left
;
margin-top
:
9
px
;
margin-top
:
15
px
;
}
}
.jian_class
{
.jian_class
{
display
:
block
;
display
:
block
;
margin
:
0
auto
;
margin
:
0
auto
;
margin-top
:
20px
;
height
:
auto
;
overflow
:
hidden
;
float
:
left
;
}
}
.phone_list1
{
.phone_list1
{
width
:
185px
;
width
:
185px
;
color
:
#3c3c3c
;
color
:
#3c3c3c
;
height
:
auto
;
height
:
auto
;
background
:
#Fff
;
background
:
#Fff
;
border
:
1px
solid
#d0d0d0
;
border-top
:
0px
solid
#d0d0d0
;
border-top
:
none
;
border-left
:
1px
solid
#d0d0d0
;
border-right
:
1px
solid
#d0d0d0
;
border-bottom
:
1px
solid
#d0d0d0
;
margin
:
0
0
0
0
;
margin
:
0
0
0
0
;
padding-left
:
10px
;
padding-left
:
10px
;
float
:
left
;
float
:
left
;
margin-left
:
-187px
;
margin-left
:
-187px
;
margin-top
:
2
6px
;
margin-top
:
3
6px
;
}
}
.phone_list1
li
{
.phone_list1
li
{
width
:
100%
;
width
:
100%
;
...
@@ -175,6 +179,7 @@ body{
...
@@ -175,6 +179,7 @@ body{
}
}
.phone_add
{
.phone_add
{
width
:
188px
;
width
:
188px
;
margin-top
:
10px
;
}
}
.phone_name
{
.phone_name
{
margin-left
:
4px
;
margin-left
:
4px
;
...
...
public/resource/js/houseList.js
View file @
e3cf01b2
...
@@ -7,6 +7,8 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -7,6 +7,8 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
pageNo
:
1
,
/*第几页*/
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
pageSize
:
10
,
/*每页显示多少条*/
id
:
''
,
id
:
''
,
house_id
:
''
,
type
:
''
,
valueCurrent
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
ajaxObj
:
''
,
stopstatus
:
true
,
stopstatus
:
true
,
...
@@ -21,33 +23,32 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -21,33 +23,32 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
business
.
event
();
business
.
event
();
business
.
resetLoad
();
business
.
resetLoad
();
business
.
loadMain
();
business
.
loadMain
();
},
},
event
:
function
()
{
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
$
(
"#search"
).
click
(
function
()
{
business
.
getList
(
1
);
business
.
getList
(
1
);
});
});
$
(
"#reset"
).
click
(
function
()
{
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
document
.
getElementById
(
"form_search"
).
reset
();
});
});
$
(
"#modal_add"
).
click
(
function
()
{
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
$
(
"#title"
).
html
(
'新增商圈'
);
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
business
.
getRegionsProvince
(
310000
,
310100
,
310101
);
//默认上海,上海,黄浦
});
$
(
"#province"
).
change
(
function
()
{
business
.
getRegionsCity
();
});
});
$
(
document
).
delegate
(
".anch"
,
"click"
,
function
()
{
//点击设置案场权限人
$
(
"#city"
).
change
(
function
()
{
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
getRegionsDisc
();
business
.
type
=
"1"
;
business
.
Anch
();
//获取手机号名字的
});
});
$
(
document
).
delegate
(
".add_applies"
,
"click"
,
function
()
{
//点击设置案场权限人
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
business
.
type
=
"2"
;
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
business
.
Anch
();
});
$
(
document
).
delegate
(
".submit_follow"
,
"click"
,
function
()
{
//提交按钮设置案场权限人
business
.
Submit_follow
();
});
});
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
...
@@ -60,9 +61,12 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -60,9 +61,12 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
business
.
addphone
(
this
);
business
.
addphone
(
this
);
});
});
$
(
document
).
delegate
(
".jian"
,
"click"
,
function
()
{
//叉号
business
.
jianbox
();
});
$
(
document
).
on
(
'input'
,
'.phone_jia,.phone_add'
,
function
(
e
)
{
//搜索手机号码
$
(
document
).
on
(
'input'
,
'.phone_jia,.phone_add'
,
function
(
e
)
{
//搜索手机号码/加号搜索
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
...
@@ -78,7 +82,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -78,7 +82,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
}
}
});
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//推荐至首页
if
(
!
confirm
(
'是否继续?'
))
{
if
(
!
confirm
(
'是否继续?'
))
{
return
;
return
;
}
}
...
@@ -95,6 +99,56 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -95,6 +99,56 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
}
}
});
});
},
},
Anch
:
function
(){
//获取手机号名字的
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getAgentsTohouses'
,
data
:
{
"houses_id"
:
business
.
house_id
,
"type"
:
business
.
type
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
$
(
".jian_class"
).
html
(
''
);
//写入
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
business
.
jiabox_data
(
data
[
'id'
],
data
[
'name'
],
data
[
'phone'
]);
});
business
.
jiabox
();
}
}
else
{
alert
(
'请登录!'
);
}
}
});
},
Submit_follow
:
function
(){
//提交案场权限人数据
var
agents_id
=
""
;
var
_agents_id
=
""
;
$
(
"input[name='ues_id']"
).
each
(
function
()
{
//拼接经纪人id
var
s
=
$
(
this
).
val
();
var
m
=
s
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
if
(
m
===
null
){
return
false
;
}
else
{
agents_id
+=
","
+
m
[
0
];
_agents_id
=
agents_id
.
substring
(
1
);
}
});
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addHousesAgents'
,
data
:
{
"houses_id"
:
business
.
house_id
,
"type"
:
business
.
type
,
"agents_id"
:
_agents_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
$
(
"#modal-anch"
).
hide
;
}
}
else
{
$
(
"#modal-anch"
).
hide
;
}
}
});
},
resetLoad
:
function
(){
//手机号
resetLoad
:
function
(){
//手机号
if
(
business
.
ajaxObj
){
if
(
business
.
ajaxObj
){
business
.
ajaxObj
.
abort
();
business
.
ajaxObj
.
abort
();
...
@@ -134,7 +188,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -134,7 +188,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
}
}
});
});
},
},
addphone
:
function
(
obj
){
addphone
:
function
(
obj
){
//list消失
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
console
.
log
(
phone_name
);
console
.
log
(
phone_name
);
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
...
@@ -145,8 +199,8 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -145,8 +199,8 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
business
.
ldHtml
.
html
(
''
);
business
.
ldHtml
.
html
(
''
);
return
false
;
return
false
;
},
},
jiabox
:
function
()
{
jiabox
:
function
()
{
//加输入框
business
.
boxphoto
=
'<input name="
phone[]
" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
business
.
boxphoto
=
'<input name="
ues_id
" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/resource/image/qdao-sha.png" class="jian">'
;
'<img src="/resource/image/qdao-sha.png" class="jian">'
;
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
...
@@ -154,19 +208,55 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
...
@@ -154,19 +208,55 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','pagin
business
.
jianbox
();
business
.
jianbox
();
},
},
// jiabox_data:function (id,name,phone) {
jiabox_data
:
function
(
id
,
name
,
phone
)
{
//显示已经获取的数据
// business.boxphoto = '<input name="phone[]" placeholder="请输入" value=
'+name+'-'+phone+' type="tel" style="margin-left: 10px;float: left" class="phone_add">' +
business
.
boxphoto
=
'<input name="ues_id" placeholder="请输入" value='
+
id
+
'-
'
+
name
+
'-'
+
phone
+
' type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
//
'<ul class="phone_list1"></ul>'+
'<ul class="phone_list1"></ul>'
+
// '<img src="/resource/image/qdao-sha.png" class="jian" onclick="jianbox()
"><input type="hidden" value="'+id+'">';
'<img src="/resource/image/qdao-sha.png" class="jian
"><input type="hidden" value="'
+
id
+
'">'
;
//
$(".jian_class").append(business.boxphoto);//写入
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
// business.jianbox();
},
//},
jianbox
:
function
()
{
jianbox
:
function
()
{
$
(
".jian"
).
click
(
function
()
{
$
(
".jian"
).
click
(
function
()
{
//删除经纪人数据
$
(
this
).
prev
().
prev
().
remove
();
var
ss
=
$
(
this
).
prev
().
prev
().
val
();
$
(
this
).
prev
().
remove
();
var
mm
=
ss
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
$
(
this
).
remove
();
if
(
mm
===
null
){
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
return
false
;
}
else
{
var
mm_id
=
mm
[
0
];
}
var
r
=
confirm
(
"确定删除吗!"
);
if
(
r
==
true
)
{
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/delTohouses'
,
data
:
{
"id"
:
mm_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
"删除失败"
);
}
}
});
}
else
{
}
});
});
},
},
getList
:
function
(
pageNo
)
{
getList
:
function
(
pageNo
)
{
...
...
public/resource/template/house_template_tpl.html
View file @
e3cf01b2
...
@@ -37,15 +37,15 @@
...
@@ -37,15 +37,15 @@
<
/td
>
<
/td
>
<
td
>
<
td
>
[
%=
it
[
item
][
'dish_name'
]
%
]
[
%=
it
[
item
][
'dish_name'
]
%
]
<
a
data
-
toggle
=
"modal"
data
-
id
=
"77"
href
=
"#modal-wat
ch"
class
=
"btn1 btn-danger add_applies"
>
修改
<
/a
>
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-an
ch"
class
=
"btn1 btn-danger add_applies"
>
修改
<
/a
>
<
/td
>
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%].html"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%].html"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success is_show"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
推荐至首页
<
/a
>
<
a
class
=
"btn1 btn-success is_show"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
推荐至首页
<
/a
>
<
a
class
=
"btn1 btn-success"
data
-
target
=
"#modal-anch"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
设置案场权限人
<
/a
>
<
a
class
=
"btn1 btn-success
anch
"
data
-
target
=
"#modal-anch"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
设置案场权限人
<
/a
>
<
a
class
=
"btn1 btn-success
"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
是否独家
<
/a
>
<
a
class
=
"btn1 btn-success"
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
是否独家
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-
process
"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
操作记录
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-
record
"
data
-
toggle
=
"modal"
data
-
id
=
"77"
>
操作记录
<
/a
>
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-delete"
class
=
"btn1 btn-danger add_applies del_modal"
>
删除
<
/a
>
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-delete"
class
=
"btn1 btn-danger add_applies del_modal"
>
删除
<
/a
>
<
/td
>
<
/td
>
...
...
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